Quick PHP Install question!
Moderator: General Moderators
Quick PHP Install question!
Hey all,
I am running a server with Red Hat 9...and when I type 'php-v' in the command prompt, it tells me that the server has PHP 4.3.5...however when I check phpinfo() on a page, it tells me I have 4.2.2.
I know that the server is officially running 4.2.2 because I try using functions (i.e: mysql_real_escape_string) that were introduced afterwards 4.3, but get fatal errors. Does anybody know what could be causing this?
Also, the server is running on Apache 2.0 and may be running PHP as a module.
What could be causing this? Can I disable 4.2.2 somehow to allow 4.3.5 to take effect?
Thanks!
I am running a server with Red Hat 9...and when I type 'php-v' in the command prompt, it tells me that the server has PHP 4.3.5...however when I check phpinfo() on a page, it tells me I have 4.2.2.
I know that the server is officially running 4.2.2 because I try using functions (i.e: mysql_real_escape_string) that were introduced afterwards 4.3, but get fatal errors. Does anybody know what could be causing this?
Also, the server is running on Apache 2.0 and may be running PHP as a module.
What could be causing this? Can I disable 4.2.2 somehow to allow 4.3.5 to take effect?
Thanks!
If you're running Apache 2, you'll want to edit httpd2.conf (in /etc/httpd/conf/ on my Mandrake installation). The line to change is:
Code: Select all
LoadModule php4_module /usr/lib/apache2-2.0.44/libphp4.soReal programmers don't comment their code. If it was hard to write, it should be hard to understand.
Hrm, I tried that and it doesn't work...it just shows my PHP source code at every page.pickle wrote:If you're running Apache 2, you'll want to edit httpd2.conf (in /etc/httpd/conf/ on my Mandrake installation). The line to change is:
Code: Select all
LoadModule php4_module /usr/lib/apache2-2.0.44/libphp4.so
So now I think the answer to this will solve my problem: How can I configure Apache 2 to use the commandline php to execute files with the .php extension?
Thanks!
-influx
Btw, you may ask yourself why it doesn't work. When you started apache, didn't apache complain about a missing module? (Check your error log for that...)influx wrote:Hrm, I tried that and it doesn't work...it just shows my PHP source code at every page.pickle wrote:If you're running Apache 2, you'll want to edit httpd2.conf (in /etc/httpd/conf/ on my Mandrake installation). The line to change is:
Code: Select all
LoadModule php4_module /usr/lib/apache2-2.0.44/libphp4.so
Influx and I are having the same issue.
Here's what I tried.
Apache's httpd.conf file in Redhat 9 loads several other config files. One of those config files is "php.conf". Here is the content of php.conf:
I modified Apache's config such that it no longer loads php.conf. What i need to know now is how to have files with a .php extension be passed off to the command line version of php (located at /usr/local/bin/php).
The example in the apache tutorial refers to ExtFilterDefine command but I don't have the proper module (i.e. mod_ext_filter) installed to use that command. Any suggestions?
Here's what I tried.
Apache's httpd.conf file in Redhat 9 loads several other config files. One of those config files is "php.conf". Here is the content of php.conf:
Code: Select all
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 0
</Files>
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.phpThe example in the apache tutorial refers to ExtFilterDefine command but I don't have the proper module (i.e. mod_ext_filter) installed to use that command. Any suggestions?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
what's wrong with
Code: Select all
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
</IfModule>