the-perfect-server-opensuse-13.1-with-apache2-mysql-php-postfix-and-ispconfig-3-p4

Discussion in 'Installation/Configuration' started by Sandro, Jul 31, 2014.

  1. Sandro

    Sandro New Member

    Hi all,

    I'm following;
    The Perfect Server - OpenSUSE 12.2 x86_64 (Apache2, Dovecot, ISPConfig 3)
    http://www.howtoforge.com/the-perfe...-apache2-mysql-php-postfix-and-ispconfig-3-p4

    My OS - OpenSuse 13.1

    I faced a problem:
    not working php and Apache.

    # systemctl enable php-fpm.service

    Code:
    php-fpm.service is not a native service, redirecting to /sbin/chkconfig.
    Executing /sbin/chkconfig php-fpm on
    The unit files have no [Install] section. They are not meant to be enabled
    using systemctl.
    Possible reasons for having this kind of units are:
    1) A unit may be statically enabled by being symlinked from another unit's
       .wants/ or .requires/ directory.
    2) A unit's purpose may be to act as a helper for some other unit which has
       a requirement dependency on it.
    3) A unit may be started when needed via activation (socket, path, timer,
       D-Bus, udev, scripted systemctl call, ...).
    
    # systemctl start php-fpm.service

    Code:
    OK :)
    # systemctl start apache2.service

    Code:
    Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
    
    # systemctl status apache2.service

    Code:
    apache2.service - The Apache Webserver
       Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
       Active: failed (Result: exit-code) since Чт 2014-07-31 13:09:41 MSK; 1min 27s ago
      Process: 4687 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
      Process: 4669 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
     Main PID: 4669 (code=exited, status=1/FAILURE)
    
    июл 31 13:09:41 server1 start_apache2[4669]: [Thu Jul 31 13:09:41.762587 2014] [so:warn] [pid 4669] AH01574: module fastcgi_module is already loaded, skipping
    июл 31 13:09:41 server1 start_apache2[4669]: AH00526: Syntax error on line 4 of /etc/apache2/conf.d/squirrelmail.conf:
    июл 31 13:09:41 server1 start_apache2[4669]: Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
    июл 31 13:09:41 server1 systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
    июл 31 13:09:41 server1 start_apache2[4687]: [Thu Jul 31 13:09:41.847913 2014] [so:warn] [pid 4687] AH01574: module fastcgi_module is already loaded, skipping
    июл 31 13:09:41 server1 start_apache2[4687]: AH00526: Syntax error on line 4 of /etc/apache2/conf.d/squirrelmail.conf:
    июл 31 13:09:41 server1 start_apache2[4687]: Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
    июл 31 13:09:41 server1 systemd[1]: apache2.service: control process exited, code=exited status=1
    июл 31 13:09:41 server1 systemd[1]: Failed to start The Apache Webserver.
    июл 31 13:09:41 server1 systemd[1]: Unit apache2.service entered failed state.
    
    # journalctl -xn

    Code:
    -- Logs begin at Чт 2014-07-31 12:06:58 MSK, end at Чт 2014-07-31 13:12:01 MSK. --
    июл 31 13:11:38 server1 kernel: usb 2-1.8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    июл 31 13:11:38 server1 kernel: usb 2-1.8: Product: USB Optical Mouse
    июл 31 13:11:38 server1 kernel: usb 2-1.8: Manufacturer: Logitech
    июл 31 13:11:38 server1 kernel: input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.8/2-1.8:1.0/input/input75
    июл 31 13:11:38 server1 kernel: hid-generic 0003:046D:C05A.0040: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.0-1.8/input0
    июл 31 13:12:01 server1 /usr/sbin/cron[4817]: pam_unix(crond:session): session opened for user root by (uid=0)
    июл 31 13:12:01 server1 systemd[1]: Starting Session 83 of user root.
    -- Subject: Unit session-83.scope has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-83.scope has begun starting up.
    июл 31 13:12:01 server1 systemd[1]: Started Session 83 of user root.
    -- Subject: Unit session-83.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-83.scope has finished starting up.
    --
    -- The start-up result is done.
    июл 31 13:12:01 server1 /USR/SBIN/CRON[4818]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    июл 31 13:12:01 server1 /USR/SBIN/CRON[4817]: pam_unix(crond:session): session closed for user root
    
    # vi /etc/apache2/conf.d/squirrelmail.conf

    Code:
    Alias /squirrelmail /srv/www/htdocs/squirrelmail
    Alias /webmail /srv/www/htdocs/squirrelmail
    <Directory "/srv/www/htdocs/squirrelmail">
    php_admin_flag register_globals Off
    php_admin_flag magic_quotes_gpc Off
    php_admin_flag allow_url_include Off
    php_admin_flag allow_url_fopen Off
    php_admin_flag session.use_only_cookies On
    php_admin_flag session.cookie_httponly On
    php_admin_value open_basedir "/srv/www/htdocs/squirrelmail:/var/lib/squirrelmail:/usr/share/php5/PEAR:/tmp"
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/class">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/config">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/data">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/doc">
            Order Deny,Allow
            Deny from All
            Allow from 127.0.0.0/8
            Allow from ::1/128
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/functions">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/help">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/include">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/locale">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/po">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/themes">
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/srv/www/htdocs/squirrelmail/themes/css">
            Order deny,allow
            Allow from all
    </Directory>
    

    # tail /var/log/messages

    Code:
    2014-07-31T13:07:32.556314+04:00 server1 kernel: [ 3638.763398] usb 2-1.8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    2014-07-31T13:07:32.556317+04:00 server1 kernel: [ 3638.763400] usb 2-1.8: Product: USB Optical Mouse
    2014-07-31T13:07:32.556318+04:00 server1 kernel: [ 3638.763402] usb 2-1.8: Manufacturer: Logitech
    2014-07-31T13:07:32.556320+04:00 server1 kernel: [ 3638.766082] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.8/2-1.8:1.0/input/input71
    2014-07-31T13:07:32.556321+04:00 server1 kernel: [ 3638.766336] hid-generic 0003:046D:C05A.003C: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.0-1.8/input0
    2014-07-31T13:08:01.844572+04:00 server1 /usr/sbin/cron[4603]: pam_unix(crond:session): session opened for user root by (uid=0)
    2014-07-31T13:08:01.846894+04:00 server1 systemd[1]: Starting Session 78 of user root.
    2014-07-31T13:08:01.847281+04:00 server1 systemd[1]: Started Session 78 of user root.
    2014-07-31T13:08:01.848595+04:00 server1 /USR/SBIN/CRON[4604]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    2014-07-31T13:08:01.950431+04:00 server1 /USR/SBIN/CRON[4603]: pam_unix(crond:session): session closed for user root
    
    Please prompt as to eliminate malfunction and to start Apache and Php :confused:
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    you missed to install or enable apache mod_php.
     
  3. Sandro

    Sandro New Member

    Thank you very much! It is valid so! Don't close please the branch, suddenly still what problems will be!!!!!
     
  4. Sandro

    Sandro New Member

    zypper install apache2-mod_php5
    Code:
    Loading of data on repositories...
    Reading the established packages...
    'apache2-mod_php5' is already established.
    There are no candidates for the apache2-mod_php5-5.4.20-21.1.x86_64 updating. The latest version is already established.
    Permission of dependences of packages...
    
    There is nothing to carry out.
    # a2enmod apache2-mod_php5
    # a2enmod apache2-mod_php5
    Code:
    "apache2-mod_php5" already present
    The problem isn't eliminated, everything remained without changes :(
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    try:

    a2enmod php5

    and then restart apache.
     
  6. Sandro

    Sandro New Member

    systemctl start apache2.service
    Code:
    OK! :-) 
    systemctl enable apache2.service
    Code:
    OK! :-) 
    systemctl start php-fpm.service
    Code:
    OK! :-) 
    systemctl enable php-fpm.service
    Code:
    php-fpm.service is not a native service, redirecting to /sbin/chkconfig.
    Executing /sbin/chkconfig php-fpm on
    The unit files have no [Install] section. They are not meant to be enabled
    using systemctl.
    Possible reasons for having this kind of units are:
    1) A unit may be statically enabled by being symlinked from another unit's
       .wants/ or .requires/ directory.
    2) A unit's purpose may be to act as a helper for some other unit which has
       a requirement dependency on it.
    3) A unit may be started when needed via activation (socket, path, timer,
       D-Bus, udev, scripted systemctl call, ...).
    
    Reputable Till, In what there can be a problem? ;) By and large the problem is solved, but it would be desirable to add in automatic loading php-fpm.service
     
    Last edited: Jul 31, 2014
  7. Sandro

    Sandro New Member

    till thank you very very very much :):):)
     

Share This Page