Thursday 08 January 2009 5:53:53 am
Hello; I just wanted to share one solution: running cronjobs when your provider doesn't allow you to run cronjob tasks with parameters and when your server runs php-cgi. I am allowed to run php files only in cronjob, without any parameters and without the possibility to browse eZ Publish directory. I also don't have command line access. Yeah, this is pretty frustrating, but I can't afford a better hosting solution. In order to run cronjob task with parameters, you have to create a separate php file and then create a cronjob task pointing to that file.
Here's the code: (I give an example of data_import extension)
<?php
$output = shell_exec('cd /path/to/ezpublish/; /path/to/php5 runcronjobs.php import_images_csv');
echo "<pre>$output</pre>";
?>
And that's it :D Note that you must have safe mode disabled, but generally it's eZ Publish requirement... Well, it works for me. Don't bash me if it's too trivial, I'm just starting to learn php. -_- For people new in php as I am, I think it will be a nice hint, I couldn't find this solution in these forums.
Shiki soku ze ku...
|