Jump to content
xisto Community
kudmus

Configuring The Httpd.conf And Php.ini Where did I go wrong?

Recommended Posts

Hey guys!

I installed Apache2.2.x on my machine running on XP SP3 and it worked. When I tried to install php5 from a .msi I then got "Error trying to access httpd.conf file. You will need to manually configure the web server." This is a re-installation on a machine that had php5, Apache2.2 and MySQL, all running in hamony. After "manually configuring the server" (editing the httpd.conf) I restarted Apache and when I try to open a .php file I get a blank page and the browser says "done". Tried phpinfo () but I still get the blank page. Now I don't know where I'm messing things up.

Here I attached my php.ini and the httpd.conf files for you guys to have a look and see where I went wrong.

php.txt

httpd.txt

I'm getting the same result even in Win2K on the same machine.

Please help!

Share this post


Link to post
Share on other sites

My suggestion would be to use a single click installer such as xampp or easyphp.All of the settings are configured to default settings.Also, are you using a browser to open your php file in "localhost" ?

Share this post


Link to post
Share on other sites

Please try these steps to check the issues

 

Before go with the following steps, you should aware that I'am not sure whether php will work with folder with space char.

So, with a last method, you have to move all files in php folder up one level to a drive root.

 

But, to better understand how php check and works with path, let's learn it from errors.

 

1.) Please turn on this setting in the php.ini file,

display_errors = Ondisplay_startup_errors = On

2.) Check if php folder on the %path% enviroment variable

C:> path
If it did't, add it to path by press win-key + break button on your keyborad.

Click the tab -> Environment on the appeared dialog.

 

post-13683-1214741534_thumb.jpg

 

3.) Change directory to apache 2.2 installation folder's bin directory and

type in apache -t -f conf/httpd.conf

C:\program files\apache2\bin> apache -t -f conf/httpd.conf
This will check the syntax to see if it is correct.

 

4.) On a command prompt type,

C:\program files\php\php -r "phpinfo();"
This will check if php was correctly installed

 

5.) Restart apache server and test it

 

If it did't go with next step.

 

6.) please attach your apache log file here.

 

A final note: please restore setting 1 when all things get done. This will safer you server.

 

 

Eric,

Share this post


Link to post
Share on other sites

Also, are you using a browser to open your php file in "localhost" ?

Yes I was using Firefox3. I haven't tried it in other browsers.

2.) Check if php folder on the %path% enviroment variable
CODE

C:> path

If it did't, add it to path by press win-key + break button on your keyborad.
Click the tab -> Environment on the appeared dialog.



I'm a bit lost here. What will I be doing and where? Do I do this in the text editor?

I'll sure do that. thanks very much guys I hope you are going to keep following this thread untill my problem is solved.

Share this post


Link to post
Share on other sites

Hi,It means that you have to open system applet on control panel folder, as follow,Click the start menu -> Settings -> Control Panel -> Double click the System IconChoose the environment variables button, this will bring up another dialog,(Note: this dialog was capture from windows 2000, but the items basically the same)post-13683-1214923919_thumb.jpgDouble-click the path entry on the system variables list and check if php folder's path exists,if not, please add it to the text box. For instance, if you have installed php on c:\php. Then, type it in the text box.After complete the steps above. Go with next step mentioned above.Eric,

Share this post


Link to post
Share on other sites

Hi,
I am also stuck with PHP installation..
My Apache is working properly but I am not able to see any php pages . .. I tried
to check PHP with the following code

<Body>Testing PHP..<BR>
<?php phpinfo(); ?>
</Body>


but it ONLY shows the HTML part and no PHP info.. I have configured PHP on another machine but i cant remember what I am missing this time ;)
Its like php is not even reading it ..

I think apache is configured properly since it displays

Apache/2.2.9 (Win32) PHP/5.2.6 on the status bar of apache service monitor


I am a big n00b with this .. Pls help


My php and Apache installations are in D:\

and I have used a zip package for PHP and an Installer for PHP.

I hope this will help

I am also attaching the config files for both .. Thanks

php.zip

Edited by bluedragon (see edit history)

Share this post


Link to post
Share on other sites
#LoadModule unique_id_module modules/mod_unique_id.so#LoadModule userdir_module modules/mod_userdir.so#LoadModule usertrack_module modules/mod_usertrack.so#LoadModule version_module modules/mod_version.so#LoadModule vhost_alias_module modules/mod_vhost_alias.soLoadModule php5_module "d:/php/php5apache2_2.dll" 

the line to load php module is different, it refers to a dll file where as the rest of the modules use the .so entension. I remember on my machine it uses name.so format so maybe its the same for your windows version of php. maybe do a search and correct the path.

Share this post


Link to post
Share on other sites

Thanks ppl, I figured it out.. I had left some configuration with the PHP.ini file and totally forgot about copying the ini to Windows directory.Its all fixed now and working ;)Thanks again

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.