Cron Not Working

Status
Not open for further replies.

BlackIrish

New Member
Messages
34
Reaction score
0
Points
0
This is what I get after applying for a advanced php version:

Your application for PHP v2 was denied. The reason stated is -"If you are having a problem with cron\'s, please post on our support forums."

So here's the problem.

After successfully installing my mailing list script, I tested all of it's options out. Mail sending and list management all work great.

The only problem is, for the make the scheduled auto responder work, I need to configure a cron.php script in my folders. The script doesn't load at all, as you can see here: http://blackmethod.x10hosting.com/sendstudio/admin/cron/cron.php (probably due to security restrictions).

Also, I tried configuring the bounce to work, and it says: imap_open() can't work or something, so this is probably some limitation of my current php version (maybe the IMAP command is not enabled?).

So that's all, and hopefully the issues will be done with a change to an advanced php version...
 
Last edited:

kaotic

New Member
Messages
14
Reaction score
0
Points
0
Im having problems with Cron's running on V2 of the new PHP... It was fine before the upgrade... I even reinstalled the game and they still won't even run. Any idea how to fix?
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I passed this on to Bryon, IMAP is not installed on any version currenty. There is a post in the news section from Bryon for module requests, please post in there you would like imap installed to remind him to do it on the next update.
 

BlackIrish

New Member
Messages
34
Reaction score
0
Points
0
I passed this on to Bryon, IMAP is not installed on any version currenty. There is a post in the news section from Bryon for module requests, please post in there you would like imap installed to remind him to do it on the next update.

Ok, posted!

Just one thing, that's about the bounces. For the crop job, I still do need php advanced, cos the script is not loading at all, I don't get any options for it, even though all the other parts (normal mailing) work great.
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Ok, posted!

Just one thing, that's about the bounces. For the crop job, I still do need php advanced, cos the script is not loading at all, I don't get any options for it, even though all the other parts (normal mailing) work great.

I'm not sure what is causing your crons to not work. Apply for version three and state that I said to apply and you'll be accepted. I don't think that will resolve the problem though. It may, but we'll see. If it doesn't I'll look into your scripts some.
 
Last edited:

BlackIrish

New Member
Messages
34
Reaction score
0
Points
0
Yup, you where right.

The problem didn't got fixed, but at least now I'm getting the error message. Here it is:

ALERT - script tried to increase memory_limit to 16777216 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/home/nesovski/public_html/sendstudio/admin/functions/init.php', line 25)
ALERT - function within blacklist called: set_time_limit() (attacker 'REMOTE_ADDR not set', file '/home/nesovski/public_html/sendstudio/admin/cron/send.php', line 27)
<br />
<b>Warning</b>: set_time_limit() has been disabled for security reasons in <b>/home/nesovski/public_html/sendstudio/admin/cron/send.php</b> on line <b>27</b><br />

Seems like some problem with the memory, it requires 16777216 bytes and the command set_time_limit()... Dunno what the rest says.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I would comment out the line where it is trying to set the memory. The memory for advanced is over 16MB which it is trying to set it to.

Look for something like ini_set near the top of the file.
 

BlackIrish

New Member
Messages
34
Reaction score
0
Points
0
I would comment out the line where it is trying to set the memory. The memory for advanced is over 16MB which it is trying to set it to.

Look for something like ini_set near the top of the file.

Mmm, I lowered the memory to 8mb and now the first error it's gone, so it seems to limit for php advanced is lower then 16mb?

Anyway, the second error is still here the one about function within blacklist called: set_time_limit()... maybe you need to enable that option in the configuration?
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
The function set_time_limit() is supposed to be enabled for versions 2 and 3. Something must be up with that, I'll look into it now.

Edit: That function is not blacklisted on any server for PHP versions 2 and 3. Also, the memory_limit for version 2 is 32MB, 128MB for version 3. I don't understand why you were getting an error stating that it raise the limit to 16MB, when the limit on raising it would be 128MB.

I can't find any errors on any of the links that you've sent. I need to look at them to look into these problems more. Can you tell me where you got those error messages from?
 
Last edited:

BlackIrish

New Member
Messages
34
Reaction score
0
Points
0
I get all the errors on my e-mail from:

root@ciroc.x10hosting.com

Subject: Cron <nesovski@ciroc> env php -q /home/nesovski/public_html/sendstudio/admin/cron/cron.php

ALERT - function within blacklist called: set_time_limit()....

It seems as even though I'm on php advanced, everything behaves as I'm on the lowest level, maybe some mistake while changing my php version or something or with the enc/php.ini file?

Edit: I analyzied the line that is making the time limit error, and it's connected with the server safe mode, look:

if (!SENDSTUDIO_SAFE_MODE && !in_array('set_time_limit', $disabled_functions)) {
set_time_limit(0);
 
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
The problem is that you're using "php -q /path/to/script.php" to call PHP. With the new system with PHP, you will need to use "php-cron-adv -q /path/to/script.php"

Sorry that I did not catch that before.
 
Last edited:

BlackIrish

New Member
Messages
34
Reaction score
0
Points
0
Yeah, we're getting near now :biggrin:

The thing is, do I only put: php-cron-adv -q /path/to/script.php, or do I use env php-cron-adv -q /path/to/script.php? Cos I tried some combinations with them and I didn't get any error but nor did any message got delivered.

While when I wrote: /usr/bin/php php-cron-adv -q /home/nesovski/public_html/sendstudio/admin/cron/cron.php I got: Status: 404
X-Powered-By: PHP/5.2.4
Content-type: text/html

No input file specified.

?
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
You should just use php-cron-adv -q

Using /usr/bin/php php-cron-adv you're trying to use the default PHP binary against the advanced PHP binary... which won't work. If you wanted to use the path it would be:
/usr/bin/php-cron-adv -q /home/..... instead of /usr/bin/php php-cron-adv -q

-Corey
 

BlackIrish

New Member
Messages
34
Reaction score
0
Points
0
On a side note (sorry for bothering, this will hopefully be my last question is support :biggrin:), I'm expirementing with a perl script, so would the default cron command be:

usr/bin/perl home/public_html/cgi-bin

or would it be:

usr/bin/perl-cron-adv home/publick_html/cgi-bin...?
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Should just be /usr/bin/perl or even just perl might work. We don't have modified version of perl like we do PHP.
 
Status
Not open for further replies.
Top