รบกวนผู้รู้ ตั้ง cronjob กับ dreamhost แล้วมี mail แจ้ง error

เริ่มโดย step1, 04 กุมภาพันธ์ 2011, 12:54:18

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

step1

cron jobs ที่โฮสทำงาน มันส่งเมล์แจ้งการทำงานมาประมาณนี้อ่ะครับ

Warning: main(../../config.inc.php): failed to open stream: No such file or directory in /home/xxx/xxx.xxxxx.com/cron/pjsfiles/config.inc.php on line 2 Warning: main(../../config.inc.php): failed to open stream: No such file or directory in /home/xxx/xxx.xxxxx.com/cron/pjsfiles/config.inc.php on line 2 Warning: main(): Failed opening '../../config.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/xxx/xxx.xxxxx.com/cron/pjsfiles/config.inc.php on line 2

ต้องแก้ยังไง

คำสั่งเดิม
/usr/local/php5/bin/php /home/userxyz/mwp.mydomainja.com/cron.php

ใช้ macrowordpress
รบกวนด้วยจ้า  :wanwan017:


SmileHost

ดูจาก error มันหาไฟล์ไม่เจอครับ ลองเข้า mwp.mydomainja.com/cron.php มันขึ้น error ไหมครับ

มันหาไฟล์ที่ include มาไม่เจอ /home/xxx/xxx.xxxxx.com/cron/pjsfiles/config.inc.php

step1

อ้างถึงจาก: SmileHost ใน 04 กุมภาพันธ์ 2011, 13:26:34
ดูจาก error มันหาไฟล์ไม่เจอครับ ลองเข้า mwp.mydomainja.com/cron.php มันขึ้น error ไหมครับ

มันหาไฟล์ที่ include มาไม่เจอ /home/xxx/xxx.xxxxx.com/cron/pjsfiles/config.inc.php

ไม่ได้ทำไร เพิ่มเลย
ยังใช้กับ gator ได้อยู่เลย งง เลยครับ  :wanwan008:



step1

อ้างถึงจาก: step1 ใน 04 กุมภาพันธ์ 2011, 13:58:52
อ้างถึงจาก: NaiTan ใน 04 กุมภาพันธ์ 2011, 13:44:13
ไฟล์เสียหรือป่าว ลองอัพขึ้นไปใหม่ :P

ครับเดี๋ยวลองดู อีกที  :wanwan017:

ยัง error เหมือนเดิม สงสัย คำสั่ง เรียก ไม่ถูก ครับ error แบบนี้
Warning: include(../../config.inc.php): failed to open stream: No such file or directory in /home/userxy/xx.xxxx.com/cron/pjsfiles/config.inc.php on line 2

Warning: include(): Failed opening '../../config.inc.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/userxy/xx.xxxx/cron/pjsfiles/config.inc.php on line 2

แต่ถ้า เีรียกผ่านหน้าเวปตรงๆ มันก็ทำงาน คือ post ปกติ เช่น xx.xxxx.com/cron.php

step1

ขออนุญาติ ดันหน่อยครัับ ปวดหัวกับมันหลายวันล่ะ
:wanwan017:


krtsss

wget -O /dev/null url

ผมใช้แบบนี้ แล้วได้อ่ะครับ

ลองดูนะ

suphot.s

สร้างมาอีกไฟล์ใส่ code ตามด้านล่าง แล้วเอา url ที่ต้องการไปใส่ใน array แล้วก็สั่ง cron run ไฟล์นี้แทนครับ วิธีอ้อมโลกนิดนึง  :P

<?
@set_time_limit(0);
//*****************************************************************
$url_list[] = 'http://www.domain.com/cron1.php';
$url_list[] = 'http://www.domain.com/cron2.php';
//*****************************************************************
function remote_fopen( $uri ) {
        if ( ini_get('allow_url_fopen') ) {
                $fp = fopen( $uri, 'r' );
                if ( !$fp )
                        return false;
                $linea = '';
                while( $remote_read = fread($fp, 4096) )
                        $linea .= $remote_read;
                return $linea;
        } else if ( function_exists('curl_init') ) {
                $handle = curl_init();
                curl_setopt ($handle, CURLOPT_URL, $uri);
                curl_setopt ($handle, CURLOPT_CONNECTTIMEOUT, 180);
                curl_setopt ($handle, CURLOPT_RETURNTRANSFER, 1);
                $buffer = curl_exec($handle);
                curl_close($handle);
                return $buffer;
        } else {
                return false;
        }
}

for ($i=0;$i<count($url_list);$i++) {
$call_result=@remote_fopen($url_list[$i]);
if($call_result==NULL || $call_result===false) {
echo "Fail for ".$url_list[$i]."<br>";
} else {
echo "Successfully  for ".$url_list[$i]."<br>";
}
}

?>


step1

ขอบคุณทุกๆ ท่านที่ช่วยแก้ไขครับ
+1 ให้กับทั้ง 2 ท่านนะครับ
แล้วจะมารายงานผล
:wanwan017:

step1

อ้างถึงจาก: krtsss ใน 04 กุมภาพันธ์ 2011, 17:11:04
wget -O /dev/null url

ผมใช้แบบนี้ แล้วได้อ่ะครับ

ลองดูนะ


ใช้ได้แล้วจ้า ด้วยวิธีนี้ work ครับง่ายดี Confirm
ใช้ได้แล้วจ้า ขอบคุณเพื่อนมากมาย
:wanwan020: