spacer.png, 0 kB
  May 19, 2013, 22:06:00

 
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: ./urdd.sh does start (PHP Notice: Undefined variable: db)  (Read 1182 times)
ipump

Posts: 5


View Profile
« on: January 15, 2012, 18:25:14 »

Hi

I just installed urd 1.2.0-2 from GetDeb repository,

urd doesn't want to go online for some reason :

and urdd.log has nothing about it.

./urdd.sh

Jan 15 20:19:24 sborg urdd: INFO Opening log file: /tmp/urdd.log
Jan 15 20:19:24 sborg urdd: NOTICE Starting urdd
PHP Notice:  Undefined variable: db in /var/www/www.leech.xxxx.com/news/urdd/urdd_config.php on line 123

Notice: Undefined variable: db in /var/www/www.leech.xxxx.com/news/urdd/urdd_config.php on line 123
PHP Catchable fatal error:  Argument 1 passed to set_group() must be an instance of DatabaseConnection, null given, called in /var/www/www.leech.xxxx.com/news/urdd/urdd_config.php on line 123 and defined in /var/www/www.leech.xxxx.com/news/functions/file_functions.php on line 283

Catchable fatal error: Argument 1 passed to set_group() must be an instance of DatabaseConnection, null given, called in /var/www/www.leech.xxxx.com/news/urdd/urdd_config.php on line 123 and defined in /var/www/www.leech.xxxx.com/news/functions/file_functions.php on line 283
Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #1 on: January 15, 2012, 19:09:57 »

Thanx for pointing out this problem

in urdd/urdd.php change this line
Code:
verify_magpie_cache_dir($test_results);
to
Code:
verify_magpie_cache_dir($db, $test_results);

and in urdd/urdd_config.php change this line
Code:
function verify_magpie_cache_dir(test_result_list &$test_results)
into
Code:
function verify_magpie_cache_dir(DatabaseConnection $db, test_result_list &$test_results)

You probably haven't made this directory or it doesn't have the proper rights:
functions/libs/magpierss/cache
Logged
ipump

Posts: 5


View Profile
« Reply #2 on: January 16, 2012, 13:31:35 »

Thanks for your reply,

I've done the changes and created and chmod'ed the directory

now when I do :  sudo -u www-data ./urdd.sh
I'm getting a loop :

Jan 16 15:27:48 sborg urdd: INFO Using authentication as xxxxx
Jan 16 15:27:48 sborg urdd: DEBUG fn:__construct() pid:1251 (20971520 20971520)
Jan 16 15:27:48 sborg urdd: DEBUG fn:connect() pid:1251 (20971520 20971520)
Jan 16 15:27:48 sborg urdd: INFO Connecting to NNTP server: ssl:news-europe.giganews.com:563
Jan 16 15:27:48 sborg urdd: INFO Using authentication as xxxxx
Jan 16 15:27:48 sborg urdd: DEBUG fn:__construct() pid:1251 (20971520 20971520)
Jan 16 15:27:48 sborg urdd: DEBUG fn:connect() pid:1251 (20971520 20971520)
Jan 16 15:27:48 sborg urdd: INFO Connecting to NNTP server: ssl:news-europe.giganews.com:563
Jan 16 15:27:48 sborg urdd: INFO Using authentication as xxxxx
Jan 16 15:27:48 sborg urdd: DEBUG fn:__construct() pid:1251 (20971520 20971520)
Jan 16 15:27:48 sborg urdd: DEBUG fn:connect() pid:1251 (20971520 20971520)
Jan 16 15:27:48 sborg urdd: INFO Connecting to NNTP server: ssl:news-europe.giganews.com:563


However The server does have a green light one,

How can I get this ./urdd.sh to start at startup ?
Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #3 on: January 16, 2012, 14:46:13 »

At start up URD tries to find out the number of connections it can use to the server. So that is probably the loop you see.

Manually you can click the red/green button top left to start/stop urdd

If you wanna do it automatically at runtime add the code to e.g. /etc/rc.local
You might have to do some wizardry with changing the workingdirectory first (make a custom script that runs as www user). Also add the -D flag to start it as a daemon process.

 
Logged
ipump

Posts: 5


View Profile
« Reply #4 on: January 16, 2012, 18:08:59 »

I would rather click on the red/green button to launch it, since there isn't any obvious way to just start it.

But my problem is that the red/green button doesn't react,
I've tried with chrome and safari Huh
Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #5 on: January 16, 2012, 19:22:27 »

That's really weird. I suppose you are using Ubuntu (considering you run it from getdeb)? Do you run as an administrator account (i.e. there is an admin menu) non admin's can't start/stop the daemon.

Is there anything particular in the log file that indicates any error? Please post (or PM) a larger section of the log file from just before you click the button until say a minute afterwards.

Because if you can start it up like this:
sudo -u www-data ./urdd.sh

that is just what happens when clicking the button

Also check in admin/config/programs that the path to urdd is correct (it should be set by the installer) - you may have to raise the user experience level (in admin/config/global)
Logged
ipump

Posts: 5


View Profile
« Reply #6 on: January 17, 2012, 16:07:06 »

this is what I'm getting in the logs when I click on the Red/green button :


Jan 17 13:58:35 sborg urdd: CRITICAL An error occured during startup of URD daemon: Cannot write pid file /var/www/www.leech.xxxxx.com/news/urdd.pid
Jan 17 13:58:35 sborg urdd: INFO Opening log file: /tmp/urdd.log
Jan 17 13:58:35 sborg urdd: NOTICE Starting urdd
Jan 17 13:58:35 sborg urdd: WARNING Warning on line 232 in file /var/www/www.leech.xxxxx.com/news/urdd/urdd_config.php: file_put_contents(/var/www/www.leech.xxxxx.com/news/urdd.pid): failed to open stream: Permission denied (2)

The path in admin/config/program is :
/var/www/www.leech.xxxxx.com/news/urdd.sh

which is right,

since I did initialy move urd from
/usr/share/urd
to
/var/www/www.leech.xxxxx.com/news/

since with my apache setup, php wasn't launching from there

so what is this Permission problem ?
Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #7 on: January 17, 2012, 18:52:50 »

urdd likes to write a pid file when it starts...  it does that by default in the urd directory (/var/www/www.leech.xxxxx.com/news/ in your case).

There are 3 things you can do:
1. make de URD directory writable by  URDD
2. change config.php to change the path for $config['urdd_pidfile']   
3. remove the line $config['urdd_pidfile']    from config.php all together
Logged
ipump

Posts: 5


View Profile
« Reply #8 on: January 18, 2012, 18:42:16 »

I removed $config['urdd_pidfile']  ( will it impact me ?)

And now the button goes green !

greatly appreciate your help Roll Eyes
Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #9 on: January 18, 2012, 18:46:18 »

it's a check to prevent double startups of urdd. Shouldn't happen, but it does sometimes, somehow
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Amigri by Fakdordes
spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB