Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working directory

Status
Not open for further replies.

dbrb2

Instructor
Jul 19, 2004
121
GB
Hi... I have a rather odd (I think) problem. I'm pretty sure that normally the working directry is the same as that containing the php file in question. I've just reinstalled Apache and PHP, and when working with files my working directoys (as returned by getcwd) seems to default to:

C:\Program Files\Apache Software Foundation\Apache2.2

I'm using PHP 5 and Apache 2.2. It seems really odd that the directory containing the php file isn't the working directory...


Any ideas?

Cheers,

Ben

 
Where does the script reside?
How is the script being invoked? Is it a direct invocation from pointing a browser at the script or something more complicated?



Want the best answers? Ask the best questions! TANSTAAFL!
 
The scrtipt itself lies in a completley different location (C:\Server). It is run directly from the browser - it is nothing more than a series of very basic examples.

I am starting to think it is something odd with my local Apache/PHP versions. I noticed also that on my local server GET works while POST does not in other scripts I have written. However, when uploading to a hosted service all of the scripts work as expected... (
As you can see they are extremely basic...

Are there any know issues with the latest incarnations of PHP an Apache?
 
It may be your use of Apache 2.2.x. You might try Apache 2.0.x instead.

I don't know how you installed Apache and PHP, but there are Win32 packages that give you a WAMP machine in one go. And the components work together well. There have been a number mentioned from time to time in this forum. Unfortunately, my experience is with LAMP, so I don't remember the package names.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top