I get the following error when running my cronjob for the import script.
Output from command /usr/bin/php -f /home/domain/public_html/scripts/import.php @MODIFIED ..
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: require(../includes/common.php): failed to open stream: No such file or directory in /home/domain/public_html/scripts/import.php on line 5
PHP Fatal error: require(): Failed opening required '../includes/common.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/domain/public_html/scripts/import.php on line 5
Running it on a VPS with ubuntu
What can I do to fix this?
Hi David!
I have tried this and did a test run of the cronjob, it returned "No result". And nothing is updated.
I am using webmin and the controlpanel to set it up.
Hi mediadream,
Can you put the "No result" response in context - at what stage / where it is displayed (if you could describe the steps leading up to it), i'm not familiar with that as an error / warning message in terms of cron or a basic fetch.sh script...
Thanks!
David.
--
PriceTapestry.com
Hi David!
The response was in swedish so I just translated it, this is the original output with this settings:
cd /home/domain/public_html/scripts/ /usr/bin/php -f import.php @MODIFIED
No output generated
Hi,
I notice in your post the commands are on the same line - they do need to be on separate lines in the script - can you double check that it is:
cd /home/domain/public_html/scripts/
/usr/bin/php -f import.php @MODIFIED
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
The line beginning # (line 1 in scripts/import.php) can be safely removed - it's there to indicate the command interpreter to be used but that's not required if launching via a PHP command directly.
The main problem however is an issue I come across occasionally which is where PHP does not internally change directory to the same folder as the script. This can be fixed by replacing your command with the following:
cd /home/domain/public_html/scripts/
/usr/bin/php -f import.php @MODIFIED
That should do the trick!
Cheers,
David.
--
PriceTapestry.com