PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 تعذر فتح HTTP طلب الدفق مع fopen او fsockopen وظائف

With Apache/2.xx or Apache/2.2.x webserver, with PHP5 as the scripting module, a HTTP communication error may occur within the PHP scripts that are parsing and running via the web server. مع Apache/2.xx أو Apache/2.2.x الويب ، مع PHP5 بوصفها وحدة البرمجة النصية ، الاتصال HTTP خطأ قد يحدث داخل PHP الكتابات التي هي تحليل وتشغيل عن طريق خادم الويب.

The errors that generated by PHP include: الأخطاء التي تولدها PHP تشمل ما يلي :

PHP Warning: fopen(http://www.example.com): failed to open stream: HTTP request failed! PHP تحذير : fopen (http://www.example.com) : فشلت في فتح الدفق : فشل طلب HTTP!
fsockopen(): unable to connect to … fsockopen () : غير قادر على الاتصال...
file_get_contents(): failed to open stream: HTTP request failed! file_get_contents () : فشلت في فتح الدفق : فشل طلب HTTP!
PHP Warning: main(): Failed opening ‘http://www.example.com/index.html’ for inclusion … PHP تحذير : الرئيسية () : فشل فتح 'http://www.example.com/index.html' لإدراجها...
PHP Warning: include(/usr/local/index.php): failed to open stream: No such file or directory in … PHP تحذير : تشمل (/ usr / المحلية / index.php) : فشلت في فتح الدفق : لا يوجد مثل هذا الملف أو الدليل في...

To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file. لحل هذه المشكلة ، وضمان أن allow_url_fopen تمكين PHP.INI في ملف التكوين. The line should look like this: الخط ينبغي أن يكون مثل هذا :

allow_url_fopen = On وفي allow_url_fopen =

Note: Depending on your system OS and configuration, the PHP.INI is located at various varied location, such as in Apache bin directory for Windows system or /usr/local/etc in FreeBSD Apache installation, if you don’t specify or point to PHP.INI in another directory. ملاحظة : اعتمادا على النظام الخاص بك نظام التشغيل والتكوين ، PHP.INI يقع في مكان مختلف متنوعة ، مثل بن لاباتشي في دليل لنظام ويندوز أو / usr / المحلية / الخ في تركيب اباتشي فري بي ، إذا لم تقم بتحديد أو نقطة لPHP.INI في دليل آخر.

If the error still happen and the PHP scripts still unable to connect to remote external servers and thus unable to download updates or retrieve files, check the user_agent setting in PHP.ini. وإذا كان خطأ ما زال يحدث ومخطوطات PHP لا يزال غير قادر على الاتصال عن بعد لخدمة الخارجية ، وبالتالي غير قادر على تحميل التحديثات أو استرجاع الملفات والتحقق من وضع user_agent في PHP.ini.

By default php.ini set the user_agent to “PHP” which signifies that it’s the script that try to access the web server. افتراضيا php.ini حدد user_agent إلى "PHP" الذي يدل على انه السيناريو أن محاولة الوصول إلى ملقم الويب. Some web servers will refuse and don’t allow script to access and receive the date from the server. بعض خوادم شبكة الإنترنت سوف ترفض ولا تسمح لسيناريو وصول واستقبال من تاريخ الخادم. So, by setting the user_agent to that of a web browser, PHP will let the web server know which kind of web browser will receive the date, and thus able to open the HTTP connection stream. لذا ، من خلال تحديد user_agent إلى أن من متصفح الإنترنت ، PHP سوف تسمح خدمة الويب التي نعرف نوع من متصفح الإنترنت وسوف تتلقى حتى الآن ، وبالتالي قادرة على فتح العنوان التالي تيار الصدد.

The user_agent can be set to any kind of browser strings, for example of Internet Explorer: وقد user_agent يمكن لمجموعة من أي نوع المتصفح الجمل ، على سبيل المثال من إنترنت إكسبلورر :

user_agent=”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)” user_agent = "Mozilla/4.0 (متوافقة ؛ MSIE 6.0 ؛ الإقليم الشمالي ويندوز 5.0)"

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. هام : هذه هي آلة الصفحة المترجمة التي تقدم "كما هي" دون ضمان. Machine translation may be difficult to understand. الترجمة الآلية قد يكون من الصعب فهم. Please refer to يرجى الرجوع إلى original English article المادة الانكليزية الأصلية whenever possible. كلما كان ذلك ممكنا.

Share and contribute or get technical support and help at وحصة المساهمة أو الحصول على الدعم التقني والمساعدة في My Digital Life Forums بلادي الرقمي الحياة المنتديات .



One Response to “PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions” واحد ردا على "PHP 5 تعذر فتح HTTP طلب الدفق مع fopen او fsockopen وظائف"

  1. totoro
    October 6th, 2008 05:33 أكتوبر 6th ، 2008 05:33
    1

    thank you, I solved my problem. أشكركم ، أنا بلدي تحل المشكلة.
    by default, on openbsd allow_url_fopen = off بشكل افتراضي ، على openbsd allow_url_fopen قبالة =

Leave a Reply ترك الرد

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> يمكنك استخدام هذه العلامات : <ahref="" title=""> <abbrtitle=""> <acronymtitle=""> <b><blockquotecite=""> <cite><code><ديل datetime = ""> <em><i><qcite=""> <strike><strong>

Subscribe without commenting اكتتاب دون التعليق


Custom Search

New Articles المواد الجديدة

Incoming Search Terms for the Article ابحث الواردة للشروط المنصوص عليها في المادة

failed to open stream: HTTP request failed! فشل في فتح الدفق : فشل طلب HTTP! - -- failed to open stream: HTTP request failed فشل في فتح الدفق : فشل طلب HTTP - -- fsockopen php.ini fsockopen php.ini - -- enable fsockopen تمكين fsockopen - -- file_get_contents failed to open stream file_get_contents فشلت في فتح الدفق - -- failed to open stream: HTTP request failed! فشل في فتح الدفق : فشل طلب HTTP! - -- fsockopen php5 fsockopen php5 - -- php HttpRequest php HttpRequest - -- php.ini fsockopen php.ini fsockopen - -- httprequest php httprequest php - -- fsockopen php fsockopen php - -- failed to open stream: HTTP request failed! فشل في فتح الدفق : فشل طلب HTTP! in في - -- php fsockopen php.ini php fsockopen php.ini - -- php.ini user_agent php.ini user_agent - -- fsockopen in php fsockopen في php - -- php enable file_get_contents php تمكين file_get_contents - -- file_get_contents php.ini file_get_contents php.ini - -- file_get_contents HTTP request failed file_get_contents فشل طلب HTTP - -- php open stream php فتح الدفق - -- enable file_get_contents تمكين file_get_contents - -- php ini fsockopen(): on php على رسائل كتبها هذا المؤلف fsockopen () : على - -- php5 fopen php5 fopen - -- apache fopen اباتشي fopen - -- det php ini to allow fsockopen مخبر الشرطة على رسائل كتبها هذا المؤلف php السماح fsockopen - -- file_get_contents failed to open stream: HTTP request failed! file_get_contents فشلت في فتح الدفق : فشل طلب HTTP! - -- fopen failed to open stream: HTTP request failed fopen فشلت في فتح الدفق : فشل طلب HTTP - -- php open http php فتح بروتوكول انتقال النص المتشعب - -- fsockopen enable fsockopen تمكين - -- php5 failed to open stream: HTTP request failed! php5 فشلت في فتح الدفق : فشل طلب HTTP! - -- php5 file_get_contents failed to open stream: HTTP request failed! php5 file_get_contents فشلت في فتح الدفق : فشل طلب HTTP! - -- php http request php طلب العنوان التالي - -- http request php بروتوكول انتقال النص المتشعب طلب php - -- php enable fsockopen php تمكين fsockopen - -- php5 http request php5 طلب العنوان التالي - -- unable to open https غير قادر على فتح https - -- php ini fsockopen php على رسائل كتبها هذا المؤلف fsockopen - -- php.ini fsockopen(): On php.ini fsockopen () : - -- php.ini fsockopen(): on php.ini fsockopen () : على - -- error fsockopen() php.ini خطأ fsockopen () php.ini - -- phpp open http phpp فتح بروتوكول انتقال النص المتشعب - -- user_agent php.ini user_agent php.ini - -- webservice failed to open stream: HTTP request failed webservice فشلت في فتح الدفق : فشل طلب HTTP - -- to open stream php لفتح تيار php - -- configurer apache fsockopen unable configurer اباتشي fsockopen غير قادر - -- fopen "HTTP request failed" fopen "فشل طلب HTTP" - -- http_request php sample http_request php عينة - -- php failed to open stream: HTTP request failed! php فشلت في فتح الدفق : فشل طلب HTTP! 403 403 - -- php apache fopen no such file or directory php.ini php اباتشي لا fopen مثل هذا الملف أو الدليل php.ini - -- php.ini enable fopen php.ini تمكين fopen - -- php5 http request get php5 طلب الحصول على العنوان التالي - --