Click to See Complete Forum and Search --> : [RESOLVED] PHP 4.4.7 to work with Apache 2.*
kheius
06-23-2007, 03:40 PM
Hi guyz this is my first 30 mins installing php the part for apache 2.* is done and working but when I try if the php page is working by placing a code like
<?php phpinfo();?>:confused: just to try if its working it just display "<?php phpinfo();?>" on the page any can help me with this :) plssss... tnx
bpat1434
06-24-2007, 09:20 AM
How do you have PHP linked to Apache? CGI, FCGI, Module?
Did you see my stickied post above? It might help.
kheius
06-24-2007, 11:12 AM
I just follow the instruction installing php 4 like editing httpd-php.conf on apache folder,,
when i type "localhost" on the browser it says it works! but when i changeit to "localhost/phpino.php" it did not display the settings of my php it just display the content of phpinfo.php which is "<?php phpinfo();?>"
can you help me plss,, i only need a setup for php4.4.7 and apache 2 only tnx :)
bpat1434
06-24-2007, 11:21 AM
Okay, what does your conf file look like? Did you add the AddType directives?
bradgrafelman
06-25-2007, 02:17 AM
Also, just to clarify... Apache 2.* isn't descriptive, as there are two distinct subversions: 2.0.x and 2.2.x -- it DOES matter which one you're using. So... which is it?
kheius
06-28-2007, 03:53 AM
yes i also add the AddType directives but still the same happening,, oh! my apache version is the latest version of apache 2.2.x :)
bpat1434
06-28-2007, 09:41 AM
1.) What does your httpd.conf file look like?
2.) What does your php.ini file look like?
What OS are you using? Windows, Mac, Linux?
kheius
06-29-2007, 12:55 AM
this is my php.ini and httpd.conf attached as .txt and im using windows XP service pack 2
i place my php.ini to c:\php
and my httpd.conf file at C:\Program Files\Apache Software Foundation\Apache2.2\conf
anything wrong with these? :(
bpat1434
06-29-2007, 01:14 AM
In your httpd.conf file, there's no AddType application/x-httpd-php .php line.
You also don't load the php module. You need LoadModule php4_module /path/to/your/mod_php.so as well.
Apache 2.2 now allows for the [b]PHPIniDir directive. You can use this to place php.ini in your c:\php folder. That line would look like: PHPIniDir "C:/php/php.ini"
Fix those three things, and you should at least have php working. Whether it's secure is another thing.
kheius
06-29-2007, 11:22 AM
oh im sorry but still cant understand
i place in my httpd.conf but still not working
where can i find my mod_php.so i already search on my computer but cannot find this mod_php.so file am i going to create it or it is missing
take a look at my new httpd.conf file tnx :)
#PHPIniDir "C:/php/php.ini"
#LoadModule php4_module /modules/mod_php.so
#AddType application/x-httpd-php .php
oh wait is it my php4apache2.dll placed in mysapi folder is it look like these
#Load Module php4_module c:/php/sapi/php4apache2.dll
bpat1434
06-29-2007, 11:35 AM
The # character at teh beginning of lines comments out the line. So your three lines will never be executed :(
THe module is actually probably in your C:\php folder. Probably something like: C:\php\php4apache2.dll
However, please note that the php4apache2.dll WILL NOT work with apache 2.2.x. For that you need to get php4apache2_2.dll. In my stickied post, you can see this toward the top:
Get Apache 2 handler for php4
PHP 4 does not have a native apache 2 handler. We need to download a new handler for it. You can do this by downloading from this site (http://www.devside.net/server/downloads) [Image (http://bpatterson.net/images/phpBuilder/apacheInstall/php4_2.jpg)]
You need to get that dll, extract it to your c:\php folder, and then use that as the module. So your LoadModule line would look like:
LoadModule php4_module C:/php/php4apache2_2.dll
Hope that helps.
kheius
06-29-2007, 07:14 PM
great its working now thankyou bpat 1434 it really helps:) :) :) :D
bpat1434
06-29-2007, 07:17 PM
No problem!
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.