Jump to content

cronjob for search index gives errors


Recommended Posts

Hi guys,

on my server I can set cron jobs like :

/ramdisk/bin/php5 -q /home1/mysite/public_html/adminfolder/searchcron?full=1&token=fApvuyFp 



If I do this I get an error like :No input file specified.

then I thought well let's do this (I add .php to the searchcron):

/ramdisk/bin/php5 -q /home1/mysite/public_html/adminfolder/searchcron.php?full=1&token=fApvuyFp 



no luck either.
If I do this I get an error like :No input file specified.


and with this, it's also not working

/ramdisk/bin/php5 -q http://www.myserver.com/adminfolder/searchcron.php?full=1&token=fApvuyFp 


I get the error :
/bin/sh: http://www.myserver.com/adminfolder/searchcron?full=1: No such file or directory


I'm having over 5 cronjobs working fine with files on the server.
only the last I want to add was the build search index.

no luck.

any idea what I can do to make it work?

Link to comment
Share on other sites

Did some extra testing.

found out that there must be an error in the searchindex page cron stuff :-)

if I have this :

/ramdisk/bin/php5 -q /home1/mysite/public_html/adminfolder/searchcron.php?full=1&token=fApvuyFp 



this is correct, but gives me an error like : no input file specified.

when I try the direct url : http://www.mysite.com/adminfolder/searchcron.php?full=1&token=fApvuyFp

then the page is loading and loading and then after 2 minuts I get an error page like : this page does not longer excist.

and the url becomes : http://www.mysite.com/adminfolder/&conf=4

so really hope anybody can give me the clue to make it work.
I managed to cronjob my hugh import everynight as well as other jobs, but the search index is the last I want to run....

thx

Link to comment
Share on other sites

  • 3 months later...

Hi just add this in a new file or in you cronjob file you are making.

echo "\n\n*******************************\nSTART INDEX\n*******************************\n";


if (substr(_COOKIE_KEY_, 34, 8) != 'fApv0mFp')
   echo ("ERRORS: SEARCH INDEX NOT SUCCESFUL");

ini_set('max_execution_time', 7200);
Search::indexation('1');
/* Tools::redirectAdmin($_SERVER['HTTP_REFERER'].'&conf=4'); */
   echo ("SEARCH INDEX SUCCESFUL!");

die();



works like a charm.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...