chron job - no email

Status
Not open for further replies.

mowax

New Member
Messages
32
Reaction score
0
Points
0
hi all.

me again..lol

i'm trying to run a chron job and this is it

/usr/bin/perl/home/username/psychostats/stats.pl

it accepts it ok, but i'm not receiving any e-mails? and it don't look like it's running.

Thanks in advance.

ahh just recived this

Can't open perl script "/home/username/psychostats/stats.pl": No such file or directory

i think i have it wrong..lol i'll try again
 
Last edited:

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
Let us know if you can make it work or not.
 

mowax

New Member
Messages
32
Reaction score
0
Points
0
hi,

I'm still having problems running the chron job, i have installed my stats page in the following , public/stats, now it tells me that i have a stats.pl file and a stats.cfg file it tells me not to install this on the public location as it may jeopardize security of the site.

So i installed them in a folder called stats1 in the root

then the chron that I'm running is

/usr/bin/perl/home/mowax/stats1/stats.pl

How ever the e-mail that i get is

[FATAL]* Called from main(188)->PS::DB(118)->PS::DB::mysql(43) >>> Error connecting to database using dsn "DBI:mysql:database=psychostats":
Access denied for user 'mowax'@'localhost' (using password: NO)

now i can see it's trying to access "DBI:mysql:database=psychostats":

and that's not my data base, so i edited the pl file

in the cfg i have

<?php
// Basic database and user configuration.
// All other configuration is stored in the database.
$dbtype = 'mysql';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'mowax_stats';
$dbuser = 'mowax_mowax';
$dbpass = 'password';
$dbtblprefix = 'ps_';
$userhandler = 'normal';?>


now i've also edited the pl script and i've edited it to the following...but it must not be picking it up, how ever these settings are now the same in both locations.

__DATA__

# If no stats.cfg exists then this config is loaded instead

dbtype = mysql
dbhost = localhost
dbport =
dbname = mowax_stats
dbuser = mowax_mowax
dbpass = password
dbtblprefix = ps_


just had an e-mail

/bin/sh: /usr/bin/perl/home/mowax/stats1/stats.pl: Not a directory
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
perl files must be run from the cgi-bin folder.

-Corey
 

mowax

New Member
Messages
32
Reaction score
0
Points
0
hi Corey, thanks for that.

I'm still a little unsure about it, i have been reading lots and lots about chron jobs...any way.

In the root i have a bin folder, but the cgi folder is located under public? is this where i should be putting the cfg, stats.pl etc in here....

the cron i run is this /home/mowax/stats1/ && /usr/bin/perl ./stats.pl


i've put them in there in the cfg under public and the e-mail that i get coming back is

/bin/sh: /home/mowax/stats1/: is a directory
Edit:
ok im one step closer....i hope..lol

when my cron sends me an e-mail i now get

[FATAL]* Called from main(188)->PS:B(118)->PS:B::mysql(43) >>> Error connecting to database using dsn "DBI:mysql:database=my_stats;host=blah.blah.net;port=":
Access denied for user 'myusername@'xx.xxx.xxx.xxx' (using password: YES)

i edited the config to say this

# stats.cfg should ONLY contain basic database settings.
# any other configuration settings will be ignored.

dbtype = mysql
dbhost = rizla.exofire.net
dbport =
dbname = my_stats
dbuser = user_user
dbpass = password
dbtblprefix = ps_
 
Last edited:

mowax

New Member
Messages
32
Reaction score
0
Points
0
oh fantsatic.....i'm so so thankfull...it's a great bloody place this place you know that?

i also found out about the data base port!

Thank you so so much, if you'd like to check the finished article...lol then look here...

http://www.rizla.exofire.net/stats/overview.php

i am really grateful! :drool:
 
Status
Not open for further replies.
Top