Re: PHP
Hello Andy,
On Tuesday, August 28, 2001 at 9:45:30 AM,
you wrote (at least in part):
> Hi all,
> Yet another problem regarding Apache modules. I've been asked to get PHP
> running for another user, so I duly installed PHP and its Apache modules. I
^^^^^^^^^^^^^^
> don't know PHP, so I'm not sure whether there should be a line telling the
> server where PHP is located. It seems there should be (like in Perl), but
> the user requesting it is sure there isn't. Everything (AFAICS) is set up
> properly, so *.php is sent to PHP and executed. I'm getting a 500 error
^^^^^^^^^^^^^^^^ ^^^^^^^^^
> when the test scripts are run (which again leads me to think there is a line
> missing in the code). Any ideas? TIA
> Andy
How did you set up PHP???
First you tell you installed Apache-modules, second you're writing about 'sent
to PHP' & 'Error 500'.
The second point looks like you could find the error in error-logs of Apache
because it seems .php is threaded as CGI (therefor in every .php-file should
be a first line like
#!/usr/local/bin/php
where ever the PHP-binary is located)
But installing the Apache-modules makes it senseless to proceed .php as CGI
...
Have a look in your Apache-configuration file. Search for 'php'.
Is there a line like:
LoadModule php3_module /etc/httpd/modules/libphp3.so
or
LoadModule php4_module /etc/httpd/modules/libphp4.so
and
AddModule mod_php3.c
or
AddModule mod_php4.c
???
if so there should also be following lines:
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .php3s
</IfModule>
or
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
If in your Apache-configuration there is a line like
AddHandler cgi-script .php
you should remove it and instead switch to LoadModules-Syntax.
--
Best regards
Peter
Reply to:
- Follow-Ups:
- RE: PHP
- From: "Andy Laurence" <andy@themidwestgroup.com>
- References:
- PHP
- From: "Andy Laurence" <andy@themidwestgroup.com>