Softaculous


Topic : Strange PHP Working Directory Behavior


Posted By: TVCJR on February 3, 2017, 7:32 pm
Hello AMMPS Experts.

I have been using AMPPS (v3.6) for a while now as my development environment and encountered something strange.

I am have a PHP script that is used to respond to a POST and updates some DB stuff. I ran a test where 11 instances of the script are running concurrently processing their respective POST data.

Occasionally, I see require_once failures where the file being included was reported as "No such file or directory" on one or two of the instances that are running. As part of my investigation I logged the current working directory. When it works, the CWD is what I expect it to be (e.g. C:\website\script, the location of the script file). When it fails the CWD is the AMMPS install root  (e.g. C:\AMPPS).

Why would the CWD change for just a few of the instances?

Any ideas would be appreciated.

Thanks,
Tom

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.