phpmaven Posted August 22, 2015 Share Posted August 22, 2015 I have following lines of code: $handle = fopen("/usr/local/www/logs/test.log", "a"); fwrite($handle, "this is a test"); fclose($handle); I have an Apache server with several virtual hosts running. One virtual host can run this code with no problem and the file gets created and written to. The same exact code fails on a different virtual host with "Warning: fopen(/usr/local/www/logs/test.log): failed to open stream: No such file or directory in..." I'm totally baffled as to what the problem could be. Thanks, Mark Quote Link to comment Share on other sites More sharing options...
iarp Posted August 22, 2015 Share Posted August 22, 2015 Are both virtual hosts running as the same user/group or are you modify those with AssignUserId? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.