WebFaction
Community site: login faq

I'm trying to execute a PHP script with a cron job. When the script is executed, it gives the following error:

Fatal error: Class 'SQLite3' not found in /home/username/webapps/application/file.php on line 12

For some reason, a reference to the SQLite3 class cannot be found. However, when I go to file.php in a web browser, the script executes fine.

I assume this issue is because cron sets up its own environment when running scripts that is different from the environment that the Static/CGI/PHP applications run on.

Is there any way to set the cron environment to the same environment/configuration as the Static/CGI/PHP applications or is there another problem I'm not aware of?

asked 20 Apr '14, 08:55

Heuristix
12
accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×81

question asked: 20 Apr '14, 08:55

question was seen: 2,282 times

last updated: 20 Apr '14, 10:48

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM