Cron Job Reporting False Error

This is the email I get from my Cron job:

<font color="red">short_open_tag is Off (must be On!)<b>Warning!</b> Dolphin cannot work without <b>short_open_tag</b>.</font> <br />
Please go to the <br />
<a href="http://www.boonex.com/trac/dolphin/wiki/GenDolTShooter">Dolphin Troubleshooter</a> <br />
and solve the problem.

However checking my php.ini file and the host tools in Dolphin, both show that short_open_tag is indeed "ON".  Any way to stop the message?

Quote · 13 Feb 2013

Cron is using the servers main php.ini file. The command line version of php(cli)

It is not using the one you provide for the web space. So it's not a false error.

For dedicated servers you should edit the php.ini file for the main system normally located in the servers /etc folder.

If your on shared hosting then you need to pass the path to your custom php.ini file on the cron command line.



https://www.deanbassett.com
Quote · 13 Feb 2013

I will be the first to admit that I have exactly 0 knowledge on servers and their PHP configurations.  I appreciate any info.

I looked in the /etc folder and didn't see a php.ini file. The only one I know of is in the /www folder, which I found, and as I said, it  has this line:

short_open_tag On

 

(And, the Dolphin host tools indicate it's on as well.)

Am I missing something here? It took me a while just to get the cron job to do anything at all besides return an error.

Quote · 13 Feb 2013

So you are saying you have a dedicated sever then and have access to the servers /etc folder as root?

Where in the etc folder it is located depends on the OS thats installed.

Look in dolphin admin in host tools in the php info section. That section will show you the path to the master php.ini file which could be in any of several locations.

/etc/php,ini
/etc/php/php.ini
/etc/php5/php.ini
/etc/php5/apache2/php.ini
/usr/bin/php5/bin/php.ini
/usr/local/lib/php.ini

Or any number of other locations. So check php info in host tools. It should show you.


2-13-2013 12-17-15 PM.png · 550.3K · 539 views
https://www.deanbassett.com
Quote · 13 Feb 2013

Okay, it's giving me this file path:

/usr/local/php5/lib

But I don't have access to that folder as root.

 

And, it seems like the loaded configuration file is in an entirely different path. 

Quote · 13 Feb 2013

Sorry, but root has access to everything.

So i am assuming you do not know what root is.

So i will ask this question again. Do you have a shared hosting account, or a dedicated server?

https://www.deanbassett.com
Quote · 13 Feb 2013

Well if I don't have access to what I should on a dedicated, I'd suppose it's shared, then.  When I'm logged into my control panel or my ftp client I could see the other folder you were referencing, so that's what I went with first.

Quote · 13 Feb 2013

We will treat it as shared. You can't access anything as root unless you log into your server as the root user and not your cpanel user. But that a lesson for another day.

Anyhow.

We will change your cron command instead. I need to know these two things to provide you with a replacement cron command.

1) What is your current cron command.
2) What is the path to the custom php.ini file you set for dolphin. The one that has short_open_tag on

https://www.deanbassett.com
Quote · 13 Feb 2013

1. MAILTO=admin@osiacomunita.com /usr/local/bin/php -q /usr/home/osiama/www/htdocs/periodic/cron.php

(No clue if that's even right, but got me an email finally, so...)

2. /usr/home/osiama/www/php.ini

Quote · 13 Feb 2013

Set your cron job to....

 

MAILTO=admin@osiacomunita.com  /usr/local/bin/php -c /usr/home/osiama/www/php.ini -q /usr/home/osiama/www/htdocs/periodic/cron.php





Btw. Sorry, didn't mean to butt in here, I had my reply typed out for ages before I could post it due to no signal, now I've edited it to make sense given what Deano asked and you have posted in the mean time.

Quote · 13 Feb 2013

I get this message using that cron job:

 

Error parsing /usr/home/osiama/www/php.ini on line 11

Quote · 13 Feb 2013

What is on line 11?

Quote · 13 Feb 2013

exec() allowed

Quote · 13 Feb 2013

That's a strange thing to have there. Where did you get that from? Remove it or comment it with a # at the beginning of the line. Report back.

Quote · 13 Feb 2013

Perhaps you better post the content of your php.ini file.

I have a feeling that you may have copied some things from the hosting requirements docs and did not actually create a valid php.ini file. We should see all of it to check for errors.



https://www.deanbassett.com
Quote · 13 Feb 2013

 Good shout. 

Perhaps you better post the content of your php.ini file.

I have a feeling that you may have copied some things from the hosting requirements docs and did not actually create a valid php.ini file. We should see all of it to check for errors.



 

Quote · 13 Feb 2013

I think it's working now (I got an email with actual information in it instead of an error, for once) but as I said, I have 0 idea what I'm doing on this end of things, so for your viewing pleasure, my php.ini file:

 

register_globals off

magic_quotes_gpc off

allow_url_include off

upload_max_filesize 300M

post_max_size 300M

max_input_time 3000

max_execution_time 3000

memory_limit 128M

short_open_tag On

safe_mode off

allow_url_fopen On

allow_url_include Off

open_basedir 128M

 
Then again, I have the job set up to report every minutes (just while I'm testing) and it's definitely not sending that many emails.
 

Thanks for all the help so far. :)

Quote · 14 Feb 2013

That is actually incorrectly formated. So it should not even be working. All the = signs are missing. Also, the memory limit should be increased for more reliability. Your open_basedir setting is also wrong. Should be empty, but you can't use that one in a per directory ini file anyway. That can only be specified in the servers master ini file.

Use this instead.

magic_quotes_gpc = Off
safe_mode = Off
allow_url_include = Off
allow_url_fopen = On
register_globals = Off
upload_max_filesize = 1000M
post_max_size = 2000M
memory_limit = 512M
max_input_time = 3000
max_execution_time = 3000
short_open_tag = On

https://www.deanbassett.com
Quote · 14 Feb 2013

I made those changes, and that seems to have cleared up some stuff in the host tools, which is great.

 

I edited my last post just as you were posting your response; I have the cron job set up to email out every minute (just so I can quickly see if the changes being made are having an effect), and the emails definitely aren't being sent out that frequently. Would that be related to this issue, or should I be looking elsewhere to resolve that?

Quote · 14 Feb 2013

Cron jobs are to be run every minute.

But cron is not suppose to send a message unless there is a error, or when dolphin sends the nightly report which happens once per night at midnight per your servers clock.

Other than that you are not suppose to receive any messages from cron.

https://www.deanbassett.com
Quote · 14 Feb 2013

I understand. I was so used to getting the error messages every minute I thought that was supposed to be the norm. Makes sense!

Thank you both SO MUCH for all of you help.

Quote · 14 Feb 2013

Wow, been watching all day for a php.ini, I go to bake a cake for my wife as it's our anniversary as well as Valentine's day and you to go ahead and have the party without me!

 

On a serious note, glad it's all sorted for you! 

Quote · 14 Feb 2013

Haha the cake was much more important anyway! Thanks!

Quote · 14 Feb 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.