iF.SVNAdmin icon indicating copy to clipboard operation
iF.SVNAdmin copied to clipboard

cron update.php

Open pdagorn opened this issue 8 years ago • 7 comments

Hello, I would like to set up a cron for update.php. I have a this version of php : PHP 5.5.9-1ubunt This is the command I would like to use in cron : php /var/www/svnadmin/update.php

I get this warnings and errors

PHP Warning: include_once(./classes/util/global.func.php): failed to open stream: No such file or directory in /var/www/svnadmin/include/config.inc.php on line 21 PHP Warning: include_once(): Failed opening './classes/util/global.func.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/svnadmin/include/config.inc.php on line 21 PHP Warning: set_exception_handler() expects the argument (exception_handler) to be a valid callback in /var/www/svnadmin/include/config.inc.php on line 22 PHP Fatal error: Call to undefined function checkPHPVersion() in /var/www/svnadmin/include/config.inc.php on line 25

and no update :(

I'm sorry I'm a beginner, and I don't really understand your quote in a old post: "Yes, there is an update.php file, which can be started via cron task. If you execute the script, you need to make sure that the CWD is set to the directory of the script." If that's relevant to my issue.

Thanks for the support! Pierre

pdagorn avatar Jul 20 '15 12:07 pdagorn

The most important thing here is, that the "Current working directory (CWD)" needs to be inside the base directory of iF.SVNAdmin. So before executing the "update.php" script, you have to cd into this directory.

cd /var/www/ifsvnadmin
php update.php

Your cron-job needs to do this aswell, e.g.: cd /var/www/ifsvnadmin && php update.php

mfreiholz avatar Jul 20 '15 12:07 mfreiholz

Thank you mfreiholz! No I have new messages: root@VSVN:/var/www/svnadmin# php update.php PHP Notice: Undefined index: SERVER_SOFTWARE in /var/www/svnadmin/include/ifcorelib/IF_SVNBaseC.class.php on line 90 PHP Notice: Undefined index: SERVER_SOFTWARE in /var/www/svnadmin/include/ifcorelib/IF_SVNBaseC.class.php on line 90 PHP Notice: Undefined index: SERVER_SOFTWARE in /var/www/svnadmin/include/ifcorelib/IF_SVNBaseC.class.php on line 90 and stil no update in authz Thanks again!

pdagorn avatar Jul 20 '15 12:07 pdagorn

Looks like your are not running the current master, i whould release a new version.

you can fix this by replacing line 90 with with this line: https://github.com/mfreiholz/iF.SVNAdmin/blob/master/include/ifcorelib/IF_SVNBaseC.class.php#L90

or best: Use the current MASTER instead of the release package :)

mfreiholz avatar Jul 20 '15 12:07 mfreiholz

Hello again, The master give those error while I was testing settings ldap user and ldap groups (thoses was the same as in the rease package)

AJAX Error: jqXHR=[object XMLHttpRequest] textStatus=error; errorThrown=undefined;

I will stay on the release package, even if replacing line 90 as mention above is not enough to update authz (no error left, but no update)

Would you like me to open a new thread for the ldap bug? Regards Pierre

pdagorn avatar Jul 20 '15 13:07 pdagorn

But the update inside the web interface (Synchronize Button) works?

Would you like me to open a new thread for the ldap bug?

Yes, that would be nice.

mfreiholz avatar Jul 20 '15 13:07 mfreiholz

replacing the line 90 make the web interface still work. just not via the shell (but no error) I will synchronize manually until an update :) no worries You can close this thread or not as you'd like (I will follow your progress anyway!!;)) I will open a new thread for the ldap bug asap Thx for all the good work!

pdagorn avatar Jul 20 '15 14:07 pdagorn

thanks a lot.

mfreiholz avatar Jul 20 '15 14:07 mfreiholz

You can try. dnf install php-json

spriggan-chen avatar Mar 31 '24 12:03 spriggan-chen