Add to Google

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

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > PHP Programming

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

kudmus
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.
[attachment=1187:php.txt]
[attachment=1188:httpd.txt]
I'm getting the same result even in Win2K on the same machine.
Please help!

Reply

jlhaslip
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" ?

Reply

magiccode9
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,
CODE
display_errors = On
display_startup_errors = On


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.

[attachment=1189:winkey_break_key.jpg]

3.) Change directory to apache 2.2 installation folder's bin directory and
type in apache -t -f conf/httpd.conf
CODE
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,
CODE
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,

 

 

 


Reply

kudmus
QUOTE
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.

QUOTE


2.) Check if php folder on the %path% enviroment variable
CODE
QUOTE
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.

Reply

magiccode9
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 Icon

[attachment=1190:system_applet.jpg]

Choose the environment variables button, this will bring up another dialog,
(Note: this dialog was capture from windows 2000, but the items basically the same)

[attachment=1191:env.jpg]

Double-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,

Reply

bluedragon
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
QUOTE
<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 biggrin.gif
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


Reply

sonesay
CODE
#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.so

LoadModule 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.

Reply

bluedragon
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 biggrin.gif

Thanks again

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. configuring httpd.conf for php - 61.97 hr back. (1)
  2. php error trying access httpd.conf file - 233.74 hr back. (1)
  3. configure php5 php.ini for apache 2.2.9 - 328.79 hr back. (1)
  4. configuring apache 2.2 for php 5.2.6 - 539.10 hr back. (1)
  5. "error trying to access httpd.conf" php - 982.02 hr back. (1)
Similar Topics

Keywords : configuring httpd conf php ini


    Looking for configuring, httpd, conf, php, ini, wrong,

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for configuring, httpd, conf, php, ini, wrong,

*MORE FROM TRAP17.COM*
advertisement



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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE