Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After upgrading a vBulletin installation, accessing any page tells me that files are missing--even though they exist in the filesystem.

Based on other questions I found here, I have tried changing the file permissions to no avail, changing the error log directive and php.ini, and changed ownership of the files it's trying to access.

Nothing I do seems to give me an informative error message. Running the scripts from the command line fail to give me the same errors, so that doesn't help.

Is there any way to execute a php file from the command line as if it was running under Apache? I'm hoping that might produce more informative errors.

EDIT: it was a permissions issue on the directory. includes/datastore was 644 instead of 755.

...still don't know how to get informative php error messages. :(

share|improve this question
"tells me that files are missing" -> can you please provide detailed error message? "Based on other questions I found here" -> Can you please provide links to this questions? – user130370 Feb 3 '14 at 14:47
The error message returned by Apache: "Fatal error: Datastore cache file does not exist. Please reupload includes/datastore/datastore_cache.php from the original download. in ..../includes/class_datastore.php on line 681" – Steven Edwards Feb 3 '14 at 17:34
Primarily this question:… – Steven Edwards Feb 3 '14 at 17:37

"Is there any way to execute a php file from the command line as if it was running under Apache?"

Either you can run a php script from command line using php cli eg :

 php /path/to/myscript

But it won't execute it "as if it was running under Apache".

Either you can call the page from command line using curl or wget, but it won't be useful for debugging.

share|improve this answer
Thanks, Eric. That's what I was afraid of. – Steven Edwards Feb 3 '14 at 17:37

You can execute php from the command line with the php command. For example:

php -q /var/www/html/call.php

You can see the var_dump and echo output or if you php is designed to be console interactive (ansi) interact with the application.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.