ששא
-
בעיה בשימוש עם text to speech בשפת PHP -
תגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי@A0533057932 כתב בתגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי:
@ששא כיון שנראה שפתרת את הבעיה מחקתי
בכל מקרה זה נועד לבדוק האם היציאה מתחברת לגוגל בכלל
ועליך להתקין את החבילה על מנת שתוכל להשתמש בה
או להריץ את זה כךcurl telnet://smtp.gmail.com:587
220 smtp.gmail.com ESMTP 2adb3069b0e04-521f38d90b2sm1378075e87.242 - gsmtp
-
תגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי@A0533057932 כתב בתגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי:
@ששא מה הפלט של
telnet smtp.gmail.com 587
?
להרצה ב CMD?
-
תגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי@צדיק-תמים תודה רבה
עשיתי בקשה וזה אושר מיידית...
עכשיו זה עובד לי -
תגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי@צדיק-תמים כתב בתגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי:
אתה יכול לשלוח דרך פורט 587
זה התגובה
2024-05-12 14:04:15 SMTP ERROR: Failed to connect to server: (0) SMTP Connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Mailer Error: SMTP Connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshootingשגיאת שרת SMTP: Failed to connect to server
-
תגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד ליתגובה: בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי
לא הגבתי בנושא הישן יותר מחודש אז אני פותח חדש
ניסיתי את הפתרונות הנ"ל ולא עזר לי
תפסתי את עצמי שהחלפתי שרת (לשרת של הצנר) וזה עבד לי בשרת הישן, אבל בחדש לא עבד לי עד שניסיתי וראיתי שלא עובד...
התקנתי מחדש עם הפקודהcomposer require phpmailer/phpmailer
בתוך התיקייה ששם כל הקודים אבל זה לא עזר
מצרף שוב את הקוד<?php set_time_limit(15); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; require 'vendor/autoload.php'; $mail = new PHPMailer(); $mail->setLanguage('he', vendor/phpmailer/phpmailer/language/'); $mail->isSMTP(); $mail->SMTPDebug = SMTP::DEBUG_SERVER; $mail->Host = 'smtp.gmail.com'; $mail->Port = 465; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->SMTPAuth = true; $mail->Username = '*******@gmail.com'; $mail->Password = '*****'; $mail->setFrom('***@***', "אני"); //$mail->addReplyTo('replyto@example.com', 'First Last'); $mail->addAddress('***@gmail.com', "אתה"); $mail->Subject = 'נושא'; // $mail->msgHTML(file_get_contents('contents.html'), __DIR__); $mail->Body = 'גוף'; // $mail->addAttachment('images/phpmailer_mini.png'); if (!$mail->send()) { echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message sent!'; #if (save_mail($mail)) { # echo "Message saved!"; #} }
מישהו יכול לכווין אותי מה יכול להיות הבעיה?
-
בעיה בפתיחת קובץ דרך cron@יוס כתב בבעיה בפתיחת קובץ דרך cron:
לכאורה אתה צריך להגדיר לו מיקום מלא לקובץ ZIP (בשורה 2)
כי ה CRON רץ מתקיית אחרת מאשר השרת אינטרנטאכן עזר
תודה רבה!@clickone כתב בבעיה בפתיחת קובץ דרך cron:
מומלץ שתגן על התיקיות האלו בשרת, וגם אולי תערוך את הקוד שהדבקת כאן.
תודה על הערת תשומת הלב!
-
בעיה בפתיחת קובץ דרך cronיש לי משימה ב cron שמריצה קובץ php שפותחת קובץ zip ומחלצת אותו לתיקייה אחרת
בדפדפן הכל עובד טוב, אבל במשימה הוא נתקע כבר מיד בפתיחת הקובץ (ולא בחילוץ)
זה הקוד$zip = new ZipArchive(); if ($zip->open("zips/israel-public-transportation.zip") === TRUE) { //$files = array("routes.txt"); // $zip->extractTo("zips"); $zip->extractTo("mysql-files"); $zip->close(); echo "ok"; } else echo "error"; }
וזה ההרשאות לקובץ
ניסיתי להגדיר (דרך Webmin) שיריץ כ root וגם ניסיתי שיריץ כ www-data אבל שניהם לא עזרו
אשמח לעזרה
-
בעיה בהורדת קובץ לשרת -
בעיה בהורדת קובץ לשרת@yossiz צודק... שכחתי שכבר דנתי בזה...
עכשיו ניסיתי להשתמש במה ש @dovid נתן לי שם, אך הקובץ לא יורד לי<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); set_time_limit(0); $fileUrl = 'https://gtfs.mot.gov.il/gtfsfiles/israel-public-transportation.zip'; $options = array( 'http' => array( 'header' => "Accept-language: he\r\n" . "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36\r\n" ), 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false ) ); $content = file_get_contents($fileUrl, false, stream_context_create($options)); $file = file_put_contents("israel-public-transportation.zip", $content); echo "בוצע!";
עובר אפילו שתי דקות והקובץ לא מתחיל לרדת שם
מה הבעיה עכשיו? -
בעיה בהורדת קובץ לשרתיש לי את הקוד הזה
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); //set_time_limit(0); $fileUrl = 'https://gtfs.mot.gov.il/gtfsfiles/israel-public-transportation.zip'; $destinationPath = '/var/www/shmuelsh.ovh/zips/israel-public-transportation.zip'; $ch = curl_init($fileUrl); $fp = fopen($destinationPath, 'w'); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); if(curl_exec($ch) === false) { echo 'cURL Error: ' . curl_error($ch); } else echo 'הקובץ יורד בהצלחה'; curl_close($ch); fclose($fp); ?>
כשאני מפעיל את זה אני מקבל
cURL Error: OpenSSL SSL_read: Connection reset by peer, errno 104אני רואה שהקובץ נוצר - בגודל 0 bytes...
מה הבעיה?
-
בעיה ביצירת שינויים עם הרצת קובץ php בדפדפן@dovid כרגע שיניתי ידנית בWebmin ל 7777 וזה עובד לי
מקווה שזה אכן יעבוד הלאה -
בעיה ביצירת שינויים עם הרצת קובץ php בדפדפן@dovid כתב בבעיה ביצירת שינויים עם הרצת קובץ php בדפדפן:
תוכל לוודא שזה המשתמש על ידי כתיבה בPHP:
echo get_current_user();
מודפס לי root וכמובן של root יש הרשאות לתיקייה, לא?
אז איך יכול להיות שלא עובד לי? -
בעיה ביצירת שינויים עם הרצת קובץ php בדפדפןיש לי קובץ PHP בתיקייה /var/www/aaa והוא רוצה לעשות שינויים בתיקייה /var/www/aaa/zips
אבל אני מקבל שגיאה שההרשאה נדחתה,
מה אני צריך לעשות כדי שיעבוד לי?אני מריץ את הקובץ מהדפדפן ויש לי nginx
-
דור 4 למה לא מחברים אותנו...@ivrtikshoret כתב בדור 4 למה לא מחברים אותנו...:
מאז שהתחברתי לדור 4 אני מקבל את השיחות עם קידומת של +972
באג ידוע בדור 4
-
בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי@ששא אני רואה פה כבר שגיאות (בנתיב var>log>nginx)
Stack trace: #0 {main} thrown in /var/www//***/sendMail2.php on line 19" while reading response header from upstream, client: 172.70.235.138, server: /***, request: "GET /sendMail2.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "/***" 2024/03/28 13:41:02 [error] 1469004#1469004: *61347 FastCGI sent in stderr: "PHP message: PHP Warning: require(vendor/autoload.php): Failed to open stream: No such file or directory in /var/www//***/sendMail2.php on line 19; PHP message: PHP Fatal error: Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www//***/sendMail2.php:19 Stack trace: #0 {main} thrown in /var/www//***/sendMail2.php on line 19" while reading response header from upstream, client: 172.70.235.137, server: /***, request: "GET /sendMail2.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "/***" 2024/03/28 13:49:08 [error] 1469004#1469004: *61390 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined variable $login in /var/www//***/test.php on line 8; PHP message: PHP Warning: Trying to access array offset on value of type null in /var/www//***/test.php on line 8" while reading response header from upstream, client: 172.70.235.137, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "/***" 2024/03/28 13:51:01 [error] 1469004#1469004: *61392 upstream timed out (110: Unknown error) while reading response header from upstream, client: 172.70.235.143, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock", host: "/***" 2024/03/28 13:53:15 [error] 1469004#1469004: *61396 upstream timed out (110: Unknown error) while reading response header from upstream, client: 172.70.235.138, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock", host: "/***" 2024/03/28 13:55:18 [error] 1469004#1469004: *61398 upstream timed out (110: Unknown error) while reading response header from upstream, client: 172.70.235.130, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock", host: "/***" 2024/03/28 13:55:43 [error] 1469004#1469004: *61402 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined variable $send in /var/www//***/test.php on line 9" while reading response header from upstream, client: 172.70.235.136, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "/***" 2024/03/28 13:55:44 [error] 1469004#1469004: *61406 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined variable $send in /var/www//***/test.php on line 9" while reading response header from upstream, client: 172.70.235.138, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "/***" 2024/03/28 13:56:59 [error] 1469004#1469004: *61408 upstream timed out (110: Unknown error) while reading response header from upstream, client: 172.70.235.143, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock", host: "/***" 2024/03/28 14:00:46 [error] 1469004#1469004: *61410 upstream timed out (110: Unknown error) while reading response header from upstream, client: 172.70.235.130, server: /***, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock", host: "/***" 2024/03/28 22:03:46 [error] 1469004#1469004: *61850 FastCGI sent in stderr: ": Undefined variable $ifDay in /var/www//***/menus.php on line 36; PHP message: PHP Warning: Undefined array key "date13-3" in /var/www//***/menus.php on line 65; PHP message: PHP Warning: Undefined variable $ifDay in /var/www//***/menus.php on line 36; PHP message: PHP Warning: Undefined array key "date14-2" in /var/www//***/menus.php on line 65; PHP message: PHP Warning: Undefined variable $ifDay in /var/www//***/menus.php on line 36; PHP message: PHP Warning: Undefined variable $ifTime in /var/www//***/menus.php on line 36; PHP message: PHP Warning: Undefined variable $ifDay in /var/www//***/menus.php on line 36; PHP message: PHP Warning: Undefined variable $ifDay in /var/www//***/menus.php on line 36; PHP message: PHP Warning: Undefined array key "date15-5" in /var/www//***/menus.php on line 65" while reading response header from upstream, client: 172.70.235.131, server: /***, request: "GET /menus.php?ApiCallId=ddc679227bcf5d00b3e32da17ed45564b96bb4ab&ApiYFCallId=017d932c-8b5b-42d4-a1d6-
סליחה שאני מעלה את זה פה, אבל אני לא ממש מבין מה קורה שם ומהם השגיאות, אשמח אם מישהו יוכל לעזור לי בהבנת הבעיות
-
בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי -
בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי@צבי-ש @yagoodjew לוגים איפה?
של השגיאות בשרת? -
בעיה בשימוש עם PHPMailer - הפסיק לעבוד לי@yagoodjew כתב בבעיה בשימוש עם PHPMailer - הפסיק לעבוד לי:
שהIP חסום
ה IP של השרת שלי? חסום איפה? מה זה ע"י האיחסון? ואיפה אני יכול לראות את זה?
@yagoodjew כתב בבעיה בשימוש עם PHPMailer - הפסיק לעבוד לי:
כשאתה עושה smtpdebug=true
דהיינו מוסיף שורה
$mail->smtpdebug=true;
?
לא משתנה כלום@yagoodjew כתב בבעיה בשימוש עם PHPMailer - הפסיק לעבוד לי:
אתה מקבל לאגס עד השלב שנתקע?
לא הבנתי
אשמח אם תסביר לי יותר ברור כי אני לא בדיוק הבנתי
-
בעיה בשימוש עם PHPMailer - הפסיק לעבוד לייש לי את הקוד הבא ששולח מיילים עם PHPMailer באמצעות חשבון ג'ימייל עם סיסמה לאפליקצייה
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; require 'vendor/autoload.php'; function sendMail($name,$to,$sub,$body,$toName){ $mail = new PHPMailer(); $mail->CharSet = "UTF-8"; $mail->isSMTP(); $mail->SMTPDebug = SMTP::DEBUG_SERVER; $mail->Host = 'smtp.gmail.com'; $mail->Port = 465; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->SMTPAuth = true; $mail->Username = '*****@gmail.com'; $mail->Password = '*******'; $mail->setFrom('shmuel@******', $name); $mail->addAddress($to, $toName); $mail->Subject = $sub; $mail->Body = $body; if (!$mail->send()) echo 'Mailer Error: ' . $mail->ErrorInfo; else echo 'Message sent!'; } ?>
אני קורא לקוד עם
$aa = sendMail("שם שולח",'****@gmail.com','כותרת','גוף','שם נשלח');
זה עבד לי המון זמן, אך פתאום היום שמתי לב שזה כבר לא עובד לי
לא נגעתי בקוד כבר המון זמן, מה יכול להיות הבעיה?
אני לא מקבל שגיאה, אלא time-out Error code 504 אחרי נסיון אחרי זמן בהרצה מהדפדפן