Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I determine how our php files are being rendered in a simple LAMP configuration?

phpinfo shows:

-- Configure Command --
--enable-force-cgi-redirect
--enable-fastcgi

-- Server API --
CGI/FastCGI

-- cgi-fcgi --
Directive               Local Value Master Value
cgi.check_shebang_line  1  1
cgi.fix_pathinfo     1  1
cgi.force_redirect      1  1
cgi.nph                 0  0
cgi.redirect_status_env no value no value
cgi.rfc2616_headers     0  0
fastcgi.logging         1  1
share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

The phpinfo should really give you all the infomration you require regarding your current PHP implementation. It provides you with the PHP interpreter running, it's configuration directives, as well as letting you know whether you're running in mod_php or a cgi based ( in your case cgi based via CGI/FastCGI ).

What sort of additional information are you currently looking to get ?

share|improve this answer
add comment

If you have shell access to the server (or can fake it) you may to be able to look at the apache config (or other httpd) or the process table (fcgid) for hints.

It's also possible that shell php (cli) and web php (cgi +) may not be the same version or using the same configuration.

Here's a note on cgi security: http://us.php.net/manual/pl/security.cgi-bin.php which has a comment which says: "NOTE: Running PHP as a CGI program will change the value of $_SERVER['SCRIPT_NAME']. When running via the (normal) mod_PHP mechanism, it will be set to the name of (actually, path to) the PHP script that's running. When running via CGI, it will instead point to the path of the CGI binary."

I suspected that there would be a clue in the runtime variables, so that's worth checking.

hth, adric

share|improve this answer
    
I have shell access and can see both the httpd.conf and php.ini files. Also have a page that shows me the output from phpinfo(). What do I need to look for? –  Chris Williams Sep 10 '09 at 19:14
    
Look for "AddModule php" in httpd.conf –  Josh Sep 21 '09 at 21:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.