HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   PHP-FPM install problems (http://www.howtoforge.com/forums/showthread.php?t=60845)

higgins_gee 7th March 2013 10:49

PHP-FPM install problems
 
Hi there, I've followed the instructions to setup an OpenSUSE 12.2 server with Apache and PHP-FPM however PHP-FPM isn't loading. I believe i need to change the path which PHP-FPM is looking at from /usr/var to /var by using the -p argument but being a noob i'm not sure of how to do this. Any assistance would be appreciated...thanks.

falko 8th March 2013 14:48

Which tutorial (URL) did you use?

higgins_gee 8th March 2013 15:10

The tutorial i used is The Perfect Server - OpenSUSE 12.2 x86_64 (Apache2, Dovecot, ISPConfig 3). I've actually worked it out now though...i simply needed to run php-fpm -p /var from the command line to change the default location to /var. It's all working fine now thanks. I interpreted the instructions to run the install with a -p argument which baffled me. It was the word "dynamically" which I missed.

higgins_gee 8th March 2013 20:26

All is not well after all...not able to restart apache2 there appears to be a problem with fastcgi and squirrelmail / php_admin_flags...is there a resolution for this?

Output is below.


server:~ # systemctl status apache2.service
apache2.service - apache
Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
Active: failed (Result: exit-code) since Fri, 08 Mar 2013 19:03:36 +0000; 16min ago
Process: 12721 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/apache2.service

Mar 08 19:03:36 server start_apache2[12721]: Syntax error on line 2 of /etc/apache2/conf.d/squirrelmail.conf:
Mar 08 19:03:36 server start_apache2[12721]: Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration

falko 9th March 2013 17:35

Is mod_php enabled?

Can you post your /etc/apache2/conf.d/squirrelmail.conf?

higgins_gee 9th March 2013 19:04

Squirrelmail conf I've not added the aliases as yet but i will be doing that after. Unable to restart apache to confirm if mod_php is enabled.

<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>

falko 12th March 2013 18:21

Comment out all the php_admin_* lines in squirrelmail.conf, restart Apache and then check if mod_php is enabled.

higgins_gee 15th March 2013 18:06

Apologies for delay...
commenting out the php_admin_* lines allows apache to restart but php still isn't running. Running apache2ctl -M does not show php5_module and all php files try to download as opposed to open...

falko 16th March 2013 10:52

Try to reinstall PHP and restart Apache.

BTW, OpenSUSE is not the recommended distro for use with ISPConfig.

higgins_gee 20th March 2013 14:49

Hi Falko, I've rebuilt my server using Debian and following this tutorial - http://www.howtoforge.com/perfect-se...#comment-33390

and I'm in the process of restarting nginx but i keep getting an error

root@server:~# /etc/init.d/nginx start
Starting nginx: nginxnginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

In /etc/nginx/sites-enabled/ I've editted the default file to listen on 81 but the problem remains.


All times are GMT +2. The time now is 05:39.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.