installing php on apache

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
cancertropica
Forum Newbie
Posts: 3
Joined: Tue Nov 18, 2008 9:57 am

installing php on apache

Post by cancertropica »

i installed php 5 on Apache 2.2.10.when i am making php files and putting in folder htdocs and than accesing it by http://localhost/hello.php. web page comes but only blank no error nothing. i don't know what went wrong. Is php is not installed on Apache or what?

please tell me how to install php on Apache and what is going wrong with with me.


thank you in advance.
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: installing php on apache

Post by andyhoneycutt »

create a document in your web root with the following contents:

Code: Select all

 
<?php
phpinfo();
?>
Direct your browser to the location of the file (not via the filesystem, but via http) and let me know what you get.
cancertropica
Forum Newbie
Posts: 3
Joined: Tue Nov 18, 2008 9:57 am

Re: installing php on apache

Post by cancertropica »

i was tryng from HTTP not from file system. I am getting nothing, this is problem. mean blank browser.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: installing php on apache

Post by califdon »

Did you configure Apache to include the PHP module? In httpd.conf, look to see if you have 2 lines like this:

Code: Select all

PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
Then make sure you have php5apache2_2.dll (or a different version number) in that folder. This is assuming that you are installing under Windows. The details will be different under Linux, but in any case, you must have the proper references in httpd.conf.
cancertropica
Forum Newbie
Posts: 3
Joined: Tue Nov 18, 2008 9:57 am

Re: installing php on apache

Post by cancertropica »

i configured my Apache already initially. My blank screen was not to due to that. Problem was due to php-sam dll. This i come to know when i saw error log of server.i make php_sam.dll as command in php.ini and after that every things is working fine.


Thanks allot for all your support.
Post Reply