PHP-5 fastcgi

Post everything else here

Moderators: Website/Forum Admins, Other/Off Topic Moderators

rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

PHP-5 fastcgi

Postby rf » Fri May 05, 2006 12:46 am

hi,

Following the directions README.FastCGI, I am experiencing these problems:

Having configured PHP with --enable-fastcgi it compiles OK

"You must start the PHP binary running by giving it an IP and port number to listen to on the command line eg.
./php -b 127.0.0.1:8002"

I get an error "no such file or directory"

It also instructs to add a line to the config file in Apache:

"LoadModule fastcgi_module /usr/lib/apache/2.0/mod_fascgi.so"

Trouble is I am unable to find anything but 1.3 in /usr/lib/apache and am unable to locate any file that ends in "fascgi.so"

putting it in anyway with /urs/local/apache2/bin/apachectl graceful - returns the expected "no such file or dir"

Question: Any suggestions?

Thanks

RF
User avatar
munky
Site Admin
Posts: 826
Joined: Wed Jul 02, 2003 4:54 pm
Location: Phoenix AZ
Contact:

Postby munky » Sat May 06, 2006 1:43 pm

you're taking it too literally

find / -name mod_fastcgi.so

use that when you are adding the LoadModule line to your config

if your base path is /usr/local/apache2, which is not default, so the examples given in the README aren't going to fit exactly.
In God we trust,
Everyone else must have an X.509 certificate.
rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Mon May 08, 2006 11:16 pm

Hi,

Appreciate the suggestion.

Ctl line command "find / -name mod_fastcgi.so " finds nothing. I tried locate after updatedb and did not get anything.

putting it in the config file following LoadModule then doing a graceful from apachectl gives this error:

"httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: LoadModule takes two arguments, a module name and the name of a shared object file to load it from"

LoadModule fastcgi_module find / -name mod_fastcgi.so or
LoadModule find / -name mod_fastcgi.so

both give the same error message when runing apachectl as quoted above.

I do not know what to do next.

Thanks,

RF :)
Last edited by rf on Mon May 08, 2006 11:54 pm, edited 1 time in total.
User avatar
munky
Site Admin
Posts: 826
Joined: Wed Jul 02, 2003 4:54 pm
Location: Phoenix AZ
Contact:

Postby munky » Mon May 08, 2006 11:53 pm

try just `locate fastcgi.so`, it's possible it has no "mod_" in front of it's name.
In God we trust,
Everyone else must have an X.509 certificate.
rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Tue May 09, 2006 1:02 am

tried that sans success.

TEXTDRIVE suggested:

"AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /php-fastcgi/php5-fcgi"

I tried that instead of the instructed "LoadModule" advice in the INSTALL instructions.

At least now I do not get any error messages when runing apachectl :D

However it does not get rid of the problem of being back where:

http://localhost/something.php or .php5 does not run - but just displays the script.

php something.php runs the script ok but not from the browser.

current configuration is now:

php -v PHP 5.1.2 (cgi) (built: May 1 2006 10:22:14)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

P4-3200RF:/usr/src/httpd-2.2.2# ./httpd -v
Server version: Apache/2.2.2
Server built: May 3 2006 19:05:36

P4-3200RF:/usr/src/httpd-2.2.2# ./httpd -l
Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
mod_authz_host.c
mod_authz_groupfile.c
mod_authz_user.c
mod_authz_default.c
mod_auth_basic.c
mod_echo.c
mod_include.c
mod_filter.c
mod_log_config.c
mod_env.c
mod_headers.c
mod_setenvif.c
mod_version.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_info.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c

Changing to php5 and apache2 was following advice from one of the forums that was the way to get of the error "update your client to conform to the server specifications for authentication" or something along those llines. It is true that that error went away but now I am back to not being able to run the php script from the browser :(

Your patience and help is appreciated. :)

It interfaces with MySQL as expected - but I do not understand why MySQL does not show up in the list of modules. I have not been able to run info() in the browser to check if that has a MySQL section. I assume it does.

RF
rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Tue May 09, 2006 7:40 pm

Update:

Reading W. Jason Gilmore (Beginning PHP5 and MySQL from Novice to Professional) it advised (pg 16) that "make clean" be performed between each ./config.

This was done with both Apache and PHP and it looks like we might be closer to getting "http://localhost/info.php" to run instead of just showing the script (which it still does with info.php5) or asking a question what wants to be done with the php script.

Problem now:

Browser gives the error that it can't find the file and says:
"The requested URL /php-fastcgi/php5-fcgi/info.php was not found on this server."

Simple! :D

Just make that directory and put the file in it so it can find it!

:( I have not been able to get it to find the file yet. Tries:

add "php-fastcgi/php5-fcgi" to the document file: "/usr/local/apache2/htdocs" and to the root directory with info.php in that spot - no success.

Question:

Where else to try (yes I have tried looking at both php.ini as well as httpd.conf and could not see anything obvious - to me!) or what else to try?

:D Thanks

RF
User avatar
munky
Site Admin
Posts: 826
Joined: Wed Jul 02, 2003 4:54 pm
Location: Phoenix AZ
Contact:

Postby munky » Thu May 11, 2006 5:36 pm

make sure that php-fastcgi isn't a script alias that's supposed to be pointing elsewhere

`locate php-fastcgi`

`grep -i scriptalias httpd.conf`
In God we trust,
Everyone else must have an X.509 certificate.
rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Fri May 12, 2006 12:13 am

munky,

Thanks for the advice:

updatedb
locate php-fastcgi finds nothing

# grep -i scriptalias /usr/local/apache2/conf/httpd.conf returns:

# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# client. The same rules about trailing "/" apply to ScriptAlias
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
# To use CGI scripts outside of ScriptAliased directories:

Still thinking and trying.

Thanks much.

RF :)
rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Wed May 17, 2006 10:32 pm

Follow Up:

I have gotten the browser to recognize and run php file well now doing two things:

a) remove the two lines that referenced fast-cgi from httpd.conf:

"AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /php-fastcgi/php5-fcgi"

b) made this change in php.ini:

open_basedir = "/usr/local/apache2/htdocs" (the default php document dir)

I never did find out how to satisfy the path or change the path fast-cgi was looking for. but now the browser can access and process php files OK.

RF :D

Who is online

Users browsing this forum: Bing [Bot] and 1 guest