Forum

help me configure php in hiawatha

selvam
4 January 2014, 09:33
Hiawatha version: 8.0
Operating System: lucid puppy 5.2.8
Please look at my post below and tell me what to change to make php work
http://murga-linux.com/puppy/viewtopic.php?t=91150
Hugo Leisink
4 January 2014, 09:39
Remove the CGIextension setting and make sure PHP is running correctly in FastCGI mode.
selvam
4 January 2014, 15:05
thanks for your reply
Please tell me how to test if php is running in fastcgi mode as i am new to linux
selvam
4 January 2014, 15:08
i commented
CGIhandler = /usr/sbin/php-fcgi:php
#CGIhandler = /usr/bin/perl:pl
#CGIhandler = /usr/bin/python:py
#CGIextension = cgi
#CGIextension = pl
#CGIextension = php
TimeForCGI = 60
but still i get 500 internal server error and my error.log is
127.0.0.1|Sat 04 Jan 2014 19:37:16 +0800|/root/Web-Server/index.php|Unknown option. Use '-h' for help.
127.0.0.1|Sat 04 Jan 2014 19:37:16 +0800|/root/Web-Server/index.php|no output
Hugo Leisink
4 January 2014, 16:47
CGIhandler must point to php, not php-fcgi. php-fcgi is Hiawatha's deprecated tool to start PHP in FastCGI mode.
CGIhandler = /usr/bin/php5-cgi # or wherever your PHP CGI binary is located.


Oh, and btw. You are using PHP in both normal and FastCGI mode. Please, read all the HOWTO pages first.
selvam
5 January 2014, 15:37
i searched my linux directory for php-cgi and it is not there. i have only php-fcgi
how can i use only fast server mode only
Hugo Leisink
5 January 2014, 16:13
Ask the creators of Puppy Linux how to install PHP. I'm not familiar with Puppy Linux, so I have no idea how to do that.
selvam
6 January 2014, 05:50
i get Unknown option. Use '-h' for help.
which is same as i type php-fcgi on the terminal
i have
# COMMON GATEWAY INTERFACE (CGI) SETTINGS
# These settings can be used to run CGI applications. Use the 'php-fcgi'
# tool to start PHP as a FastCGI daemon.
#
#CGIhandler = /usr/sbin/php-fcgi:php
#CGIhandler = /usr/bin/perl:pl
#CGIhandler = /usr/bin/python:py
#CGIextension = cgi
#CGIextension = pl
CGIextension = php
#TimeForCGI = 60


FastCGIserver {
FastCGIid = PHP-fpm
ConnectTo = 127.0.0.1:9000
Extension = php
SessionTimeout = 60
}

the hiawatha howto tells the fastcgiserver extension overrides the cgihandler. but that does not happen. iam using hiawatha 8
i want php-fpm to handle the php calls
i checked by typing php-fpm at terminal it says it is already listening on 127.0.01:9000
but still i get " Unknown option. Use '-h' for help. " emitted by php-fcgi
Please help
Hugo Leisink
6 January 2014, 09:31
For some reason, you are still trying to use php-fcgi as a PHP FastCGI daemon. php-fcgi does the same as php-fpm: starting PHP as a FastCGI daemon. I still see php-fcgi in your Hiawatha config, you should remove it to prevent future mistakes. Change it to /usr/bin/php5-cgi. Install php-cgi if it's not available. You can skip the installation of php-cgi if you chose to use php-fpm, which is recommended as php-fcgi is removed from later Hiawatha versions.

After changing the configuration, don't forget to restart Hiawatha.
This topic has been closed.