Link to home
Start Free TrialLog in
Avatar of Yashy
YashyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Php configuration for Apache on Windows server.....not working

hi guys,

We've installed php 5.3.3 (Vc6 module) on Windows 2008 R2, along with Apache 2.2 (downloaded from apache.org). When running the actual phpinfo.php file on the localhost, we're seeing that the environment for Apache is pointing to the incorrect locations. I've attached a screenshot. They're outputting to the Microsoft folders, when they shouldn't. IIS has completely been removed too, so we don't understand why the path isn't going to the actual correct location.

Any ideas on resolving this?

Thanks
Yash
desktop.jpg
Avatar of Gary
Gary
Flag of Ireland image

Open httpd.conf and search for DocumentRoot and change the path to where you want it to go
Also search for:
<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs">
and change the path again to the same as above.
Save the file and restart Apache.
Avatar of Yashy

ASKER

hi,

the documentroot in the httpd.conf is pointing to the location:

"C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs"

Is that right?
That's where you currently have it. I thought you wanted to change it?
Avatar of Yashy

ASKER

That's what I don't get! Why is the phpinfo file picking up the apache environment as the one in the IIS express folder and not the one in the htdocs folder?
It is looking for PHP according to the system vars
Click Start, right click My Computer
Click Advanced Settings
Advanced Tab, click Environment Variables button at the bottom
This will list where your system is looking for default programs
If you need to change then just edit the value and change the path.
Avatar of Yashy

ASKER

I've done that, i've changed it to the supposed right location.

On the command prompt, i've then done the following:

cd C:\Program Files (x86)\Apache Software Foundation\PHP\     (location of PHP)

then run the following:

php.exe index.php

And it comes up with the error below i've attached. If we comment this out, then it just skips to the next error meaning that it may not be an actual .dll file error but a configuration error?
desktop-2.jpg
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Yashy

ASKER

hey guys,

excuse the hiatus, i've managed to get it up and running by entirely removing the installations and re-installing everything again.

I then went ahead and downloaded Apache from the apache lounge as I could then use VC9 files for the installations. All is well now though.

And again, sorry for not responding earlier.