Post PHP-5 upgrade, cron issues [Archive] - ActiveCampaign Community Forum

PDA

View Full Version : Post PHP-5 upgrade, cron issues


aaronvegh
10-25-2007, 08:55 AM
Hi there,
I've been using 12all for a couple years now. Yesterday, I upgraded my server to PHP 5 and MySQL 5 (formerly 4 of both). Now, although the application is apparently working okay, the cron jobs are sending me errors to my email. I'm getting errors from three of the crons: cron.php, cron_responder.php and cron_pop.php.

From cron.php:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/sqlite.so' - /usr/lib/php/modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

from cron_responder.php and from cron_pop.php

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/sqlite.so' - /usr/lib/php/modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
<div style="position:absolute; top:0px; left:0;"><div style="padding:2px; width:100px; border-bottom:1px dashed #FFCC00; border-right:1px dashed #FFCC00; background:#FFFBDD;"><a href="javascript:void(0)" onclick="var x = document.getElementById('17e59emain'); x.style.display = (x.style.display=='none' ? 'block' : 'none')" style="font-size:10px; color:#FF9900; text-decoration:none;">&nbsp;+ Error Occured&nbsp;</a></div>

<div class="trapperr" style="display: none; padding:20px; font-size:10px; background:#FFFBDD; border:1px dashed #FFCC00; width:400px; position:relative; top:5px; left:0px;"id="17e59emain">
<i>File Location:</i> <b>Unknown</b><br />
<i>Line:</i> <b>0</b><br />
<i>Message:</i> <b>Unknown: open(/var/lib/php/session/sess_5konn4iruc7oj05ngptne6b206, O_RDWR) failed: Permission denied (13)</b><br />
<i>Error Type:</i> <b>Warning</b>, <i>Error Number:</i> <b>2</b><br />
<i>Address:</i> <b><my site>/12all/admin/cron_responder.php</b><br />
<i>Session:</i> <b>5konn4iruc7oj05ngptne6b206</b><br />
<i>User:</i> <b>0</b><br />
<i>Host:</i> <b>localhost.localdomain</b>, <i>IP:</i> <b>127.0.0.1</b><br />
<i>Date:</i> <b>6:59:02, 25. 10. 2007. (EDT)</b><br />
<a href="javascript:void(0)" onclick="var x = document.getElementById('17e59evars'); x.style.display = (x.style.display=='none' ? 'block' : 'none')">Vars</a> &middot;
<a href="javascript:void(0)" onclick="var x = document.getElementById('17e59etrace'); x.style.display = (x.style.display=='none' ? 'block' : 'none')">Trace</a><br />
<div class="trapperr_vars" id="17e59evars" style="display: none; border: 1px solid Black;">
<i>Vars:</i><br />
<pre></pre>
</div>
<div class="trapperr_trace" id="17e59etrace" style="display: none; border: 1px solid Black;">
<i>Backtrace:</i><br />
<pre></pre>
</div>
</div>
</div>
<div style="position:absolute; top:0px; left:100;"><div style="padding:2px; width:100px; border-bottom:1px dashed #FFCC00; border-right:1px dashed #FFCC00; background:#FFFBDD;"><a href="javascript:void(0)" onclick="var x = document.getElementById('ca4a94main'); x.style.display = (x.style.display=='none' ? 'block' : 'none')" style="font-size:10px; color:#FF9900; text-decoration:none;">&nbsp;+ Error Occured&nbsp;</a></div>

<div class="trapperr" style="display: none; padding:20px; font-size:10px; background:#FFFBDD; border:1px dashed #FFCC00; width:400px; position:relative; top:5px; left:0px;"id="ca4a94main">
<i>File Location:</i> <b>Unknown</b><br />
<i>Line:</i> <b>0</b><br />
<i>Message:</i> <b>Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session)</b><br />
<i>Error Type:</i> <b>Warning</b>, <i>Error Number:</i> <b>2</b><br />
<i>Address:</i> <b><my site>/12all/admin/cron_responder.php</b><br />
<i>Session:</i> <b>5konn4iruc7oj05ngptne6b206</b><br />
<i>User:</i> <b>0</b><br />
<i>Host:</i> <b>localhost.localdomain</b>, <i>IP:</i> <b>127.0.0.1</b><br />
<i>Date:</i> <b>6:59:02, 25. 10. 2007. (EDT)</b><br />
<a href="javascript:void(0)" onclick="var x = document.getElementById('ca4a94vars'); x.style.display = (x.style.display=='none' ? 'block' : 'none')">Vars</a> &middot;
<a href="javascript:void(0)" onclick="var x = document.getElementById('ca4a94trace'); x.style.display = (x.style.display=='none' ? 'block' : 'none')">Trace</a><br />
<div class="trapperr_vars" id="ca4a94vars" style="display: none; border: 1px solid Black;">
<i>Vars:</i><br />
<pre></pre>
</div>
<div class="trapperr_trace" id="ca4a94trace" style="display: none; border: 1px solid Black;">
<i>Backtrace:</i><br />
<pre></pre>
</div>
</div>
</div>



The complaint about sqlite.so seems to be because, with PHP 4, I had the module installed separately, but of course it's not necessary anymore with PHP5, which includes it.

I upgraded to the latest version of 12all, and I've tried routing the cron output to /dev/null. These emails are coming every 15 minutes, and it's starting to drive me crazy. Any help would be appreciated!

Thanks,
Aaron.

jvandeboom
10-25-2007, 12:26 PM
The old php must still be on the server or something like that.

Check the path to php on the first line of each of the cronjobs along with the crontab entries if the php path is in those.

Ensure the paths to php are correct for your updated php on the server.

aaronvegh
10-25-2007, 01:06 PM
Thanks for your reply.

I did, it seems, replace the old PHP 4 with the new version.

[root@cl-t011-030cl php.d]# which php
/usr/bin/php

But here's something interesting!

[aaron@cl-t011-030cl ~]$ php --version
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/sqlite.so' - /usr/lib/php/modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.1.6 (cli) (built: Jun 17 2007 11:44:56)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies


There's that error I was getting! I managed to trace it back to /etc/php.d/sqlite.ini. I comment out the directive to load that driver, and boom! The error message goes away. So too, unfortunately, does Sqlite support in my PHP installation. Fortunately, I don't use it right now...

The other problem, with no permission to write to the session folder, remains. Any thoughts on that one?

Cheers!
Aaron.

jvandeboom
10-25-2007, 05:53 PM
I would just ensure /var/lib/php/session exists and is writable by the server.

aaronvegh
10-25-2007, 08:03 PM
that folder did exist, and it was writable by the server. But, I realized, the cron job was being run by my user ("aaron"), not the apache process. So I added the cron jobs to the root crontab, and now all is well!

Cheers,
Aaron.

Nabeel
11-02-2007, 06:01 AM
Hi, This post of mine is very beneficial and informative, however there are some specific facts or information that I require. If anyone can help me in this matter then please send me a private message. Best Regards,