mfreiholz / iF.SVNAdmin

Web-based GUI to manage Subversion repositories and User/Group permissions (+LDAP support)
http://svnadmin.insanefactory.com/
GNU General Public License v2.0
350 stars 153 forks source link

cron update.php #102

Open pdagorn opened 9 years ago

pdagorn commented 9 years ago

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

mfreiholz commented 9 years ago

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

pdagorn commented 9 years ago

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!

mfreiholz commented 9 years ago

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 :)

pdagorn commented 9 years ago

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

mfreiholz commented 9 years ago

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.

pdagorn commented 9 years ago

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!

mfreiholz commented 9 years ago

thanks a lot.

spriggan-chen commented 5 months ago

You can try. dnf install php-json