|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-01-12 09:02 UTC] forlevibr at yahoo dot com dot br
Description:
------------
I installed PHP with the commands below:
rm config.cache
make clean
./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-sybase-ct=/opt/sybase --with-java=/usr/local/java --enable-sockets --enable-ftp --enable-calendar
make && make install && make install-cli
Then I created a script teste.sh that have permisions 755 with the command below:
/usr/local/php/bin/php /etc/cron/teste.php
The script teste.php have the commands below:
<?php
mail("email@domain", "Subject', "Text");
?>
I added the command in the contab
0 0-23 * * * /etc/cron/teste.sh
When the job execute it throw the message:
/etc/cron/teste.sh: line 1: 27310 Segmentation fault /usr/local/php/bin/php /etc/cron/teste.php
When I execute the script in the line command it work, but when the cron execute it don't work.
Reproduce code:
---------------
file teste.php
<?php
mail("email@domain", "Subject', "Text");
?>
file teste.sh
/usr/local/php/bin/php /etc/cron/teste.php
crontab
0 0-23 * * * /etc/cron/teste.sh
Expected result:
----------------
Crontab execute the script sending the mail
Actual result:
--------------
Crontab execute the script but throw message:
/etc/cron/teste.sh: line 1: 27310 Segmentation fault /usr/local/php/bin/php /etc/cron/teste.php
and not send mail
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
I updated to last version (200401131230 ) and the problem continue. My new script teste.php: <?php mail("email@domain", "Subject", "Text"); ?> The error: /etc/cron.bol/teste.sh: line 1: 31063 Segmentation fault /usr/local/php/bin/php /etc/cron.bol/teste.phpHi, I would like to ask you how to generate a core file if I'm getting the crash from "cron" and not from a cgi or from a http. Running directly from cgi the script runs and does not crash, as you know. The steps on PHP docs are talking how produce a core file using cgi or http as you can see below: "If you don't have a core file yet: * Remove any limits you may have on core dump size from your shell: o tcsh: unlimit coredumpsize o bash/sh: ulimit -c unlimited * Ensure that the directory in which you're running PHP, or the PHP-enabled httpd, has write permissions for the user who's running PHP. * Cause PHP to crash: o PHP CGI: Simply run php with the script that crashes it o PHP Apache Module: Run httpd -X, and access the script that crashes PHP." So, is there a way how we can go ahead with this case, or generating a core as you told running it with "cron" or other way where we can find the problem and try to solve it? Thanks.