Using PHP-MySQL Persistent Connections to Run WordPress Blog PHP - باستخدام وصلات ماي. س. ك المستمرة لادارة ووردبرس] بلوق

When connecting to MySQL database, WordPress weblog based on PHP scripting will use non-persistent connection by default. عندما ربط لقاعدة البيانات ماي. س. ك ، ووردبرس] weblog على أساس PHP كتابة سيناريو الفيلم سوف استخدام غير المستمرة الصدد بشكل افتراضي. That is, WordPress will trigger PHP to generate a new connection to MySQL server for each dynamic page request, and subsequently close the database connection once the web page building is completed. وهذا هو ، ووردبرس] سوف يؤدي PHP لتوليد جديدة الصدد الى خادم ماي. س. ك عن كل صفحة دينامية الطلب ، وبعد إغلاق قاعدة بيانات الصدد صفحة ويب بمجرد الانتهاء من بناء. Repetitive opening and closing of MySQL connections causes overheads and uses up precious CPU, memory and system resources on the web host. التكرار افتتاح واختتام ماي. س. ك صلات أسباب النفقات العامة والاستخدامات الثمينة وحدة المعالجة المركزية ، الذاكرة وموارد النظام على الشبكة المضيفة.

Using persistent connection to connect to MySQL database server is not always a good option. باستخدام الصدد إلى استمرار ربط لماي. س. ك خادم قاعدة البيانات ليست دائما خيارا جيدا. Each connections takes up resources, including memory, buffers, table or thread caches internally in MySQL and sockets, open files or IO activity at OS level. حتى يأخذ كل وصلات الموارد ، بما في الذاكرة ، والمخزونات الاحتياطية ، الجدول أو الخيط مخابئ داخليا في ماي. س. ك ومقابس ، وفتح الملفات أو نشاط الإعلام والتوعية على مستوى نظام التشغيل. Thus when a lot of persistent connections are opened but not closed after transactions are completed, the resources on system may drain up and degrade performance of web server, or in worst case, cause HTTP failure. وهكذا عندما الكثير من الصلات المستمرة هي فتح ولكن لم تغلق بعد إتمام المعاملات ، فإن الموارد على نظام مايو حتى استنزاف وتدهور الأداء من ملقم الويب ، أو في أسوأ الحالات ، سبب فشل HTTP. Furthermore, if a persistent connection is stalled, inactive or became defunct or no longer in used, it is not terminated, and MySQL server will only close it to release the resource occupied by the connection after about 28800 seconds (8 hours) by default unless changed the timeout parameters in my.cnf configuration files. وعلاوة على ذلك ، إذا كان استمرار الصدد هو المتوقفة ، وأصبحت خاملة أو الميتة أو لم تعد تستخدم ، أنها لا تنتهي ، وماي. س. ك الخادم لن يؤدي إلا أنها قريبة إلى الإفراج عن الموارد التي تشغلها الصدد بعد حوالي 28800 ثانية (8 ساعات) بشكل افتراضي ما لم غيرت معالم وقتا في my.cnf ملفات التكوين. This few factors may bring troubles such as MySQL refusing new DB connections or slow server if the applications do not properly handle persistent connections. هذه بعض العوامل قد تتسبب فى مشكلات مثل رفض ماي. س. ك (كوبر) وصلات جديدة أو بطء الخادم إذا كانت الطلبات لا التعامل على نحو مناسب مع استمرار الصلات. Thus if you’re not experience webmasters, please do not attempt to change Wordpress to use persistent connections. وهكذا فانك اذا لم تكن تجربة مشرفي المواقع ، يرجى لا محاولة لتغيير وورد لاستخدام الاتصالات المستمرة.

However, for bloggers who have busy and large blog, and facing constraints in upgrading web host system specifications, and do not want to use static page caching plugin such as WP-Cache, persistent connection is a available option to tune and optimize the web server to see if the webpage serving can be faster. ومع ذلك ، لمن المدونين الذين مزدحمة وكبيرة بلوق ، والقيود التي تواجه في رفع مستوى استضافة المواقع على الشبكة ، نظام المواصفات ، ولا يريدون استخدام البرنامج المساعد تخزين الصفحة في الذاكرة المخبئية ساكنة مثل الفسفور الابيض بين ذاكرة التخزين المؤقت ، واستمرار الصدد هو الخيار المتاح لقيمتها والأمثل لخدمة الويب لمعرفة ما اذا كانت صفحة ويب خدمة يمكن أسرع. Persistent connection allows connection to be open once and will not be closed when the execution of the script ends. استمرار الصدد تسمح الصدد إلى أن تكون مفتوحة ومرة واحدة لن تكون مغلقة عند تنفيذ السيناريو الغايات. Instead, the link is kept in pool and will remain open for future use. وبدلا من ذلك ، هو إبقاء الصلة في مجموعة وسوف تظل مفتوحة للاستخدام في المستقبل. Thus, using persistent connections will eliminate the process of opening and closing the connection. وهكذا ، باستخدام وصلات سيقضي على استمرار عملية افتتاح واختتام الصلة. This will indirectly reduce MySQL connection related server overheads such as authentication to establish connection where only once is needed, saving extra network traffic, and resources used to handle extra connection. هذا وسوف غير مباشر ماي. س. ك الصدد الحد من النفقات العامة ذات الصلة الخادم مثل التوثيق لإنشاء الصدد حيث هناك حاجة مرة واحدة فقط ، لإنقاذ اضافية شبكة المرور ، واستخدام موارد اضافية للتعامل الصدد. Beside, there could be some connection level caches, which need to be filled up for proper performance, and potentially reduce the number of connections to the database. بجانب ، قد يكون هناك بعض مخابئ مستوى الصدد ، الذي يلزم سدها لمتابعة الأداء السليم ، ويحتمل أن خفض عدد من وصلات لقاعدة البيانات.

By default, WordPress is using mysql_connect() function that establishes a new database connection on every page. افتراضيا ، تستخدم ووردبرس] mysql_connect () وظيفة أن ينشئ قاعدة بيانات جديدة الصدد على كل صفحة. The persistent connection feature will require mysql_pconnect() function which uses the exact same API, but has built-in connection pooling to keep connections alive between requests. استمرار الصدد ميزة سيتطلب mysql_pconnect () وظيفة والذي يستخدم بالضبط نفس المعهد ، ولكن قد بنيت في تجميع الصدد إلى أن تبقي على قيد الحياة وصلات بين الطلبات. So to switch to use persistent connection to run WordPress, the mysql_connect() function has to be replaced with mysql_pconnect(). لذلك التحول إلى استخدام المستمرة الصدد لادارة ووردبرس] ، mysql_connect () وظيفة لابد من الاستعاضة عن mysql_pconnect ().

To enable and use persistent connections with WordPress, simply login to your web host with SSH (or insecure Telnet), and change to the webroot home directory where WordPress blog is installed. لتمكينها من استخدام وصلات مستمرة مع ووردبرس] ، لمجرد الدخول لتتمكن من استضافة الويب الخاص بك مع SSH (أو غير آمنة التلنت) ، وتغيير إلى دليل webroot المنزل حيث هو تركيب بلوق ووردبرس]. Then change directory into wp-includes directory. ثم تغير إلى دليل الفسفور الابيض بين ويشمل الدليل. Inside the wp-includes directory, there is wp-db.php file. داخل الفسفور الابيض بين ويشمل الدليل ، هناك ملف الفسفور الابيض - db.php. Use any text editor such as vi to edit wp-db.php. استخدام أي محرر نصوص مثل السادس لتحرير الفسفور الابيض - db.php. Search or locate the function of mysql_connect (or @mysql_connect ). البحث أو العثور على وظيفة mysql_connect (أو @ mysql_connect). There is only one instance of mysql_connect. وهناك واحدة فقط من mysql_connect. Just change the mysql_connect to mysql_pconnect , then save and exit the wp-db.php. مجرد تغيير mysql_connect لmysql_pconnect ، ثم حفظ والخروج من الفسفور الابيض - db.php. WordPress and PHP (as long as you don’t turn off the mysql.allow_persistent in PHP.INI) will immediately use persistent connections to connect to MySQL database. ووردبرس] وPHP (طالما لم تقم بدورها قبالة mysql.allow_persistent في PHP.INI) على الفور استمرار استخدام وصلات لربط لقاعدة البيانات ماي. س. ك. It’s worth to try out which setting is best for your environment. ومن الجدير محاولة لتحديد أصل الذي هو أفضل للبيئة الخاصة بك.

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 “Using PHP-MySQL Persistent Connections to Run WordPress Blog” رد واحد على "استخدام PHP - ماي. س. ك الصلات المستمرة لتشغيل ووردبرس] مدونة"

  1. Edward إدوارد
    September 27th, 2007 22:14 سبتمبر 27th ، 2007 22:14
    1

    This seemed to do the trick for. هذا ما يفعله على ما يبدو فإن خدعة ل. Thanks so much for the info! شكرا جزيلا للمعلومة!

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 ابحث الواردة للشروط المنصوص عليها في المادة

php mysql persistent connections php ماي. س. ك المستمرة وصلات - -- wordpress persistent connection استمرار الصدد ووردبرس] - -- Your applications are not closing MySQL connections properly التطبيقات الخاصة بك ليست إغلاق ماي. س. ك صلات سليم - -- mysql persistent connection ماي. س. ك المستمرة الصدد - -- php persistent mysql connection php استمرار الصدد ماي. س. ك - -- php mysql persistent connection php ماي. س. ك المستمرة الصدد - -- persistent connection mysql استمرار الصدد ماي. س. ك - -- wordpress mysql connection ماي. س. ك الصدد ووردبرس] - -- php mysql persistent php ماي. س. ك المستمرة - -- wordpress persistent connections استمرار صلات ووردبرس] - -- mysql persistent connection php ماي. س. ك المستمرة الصدد php - -- php mysql auto reconnect php اعادة ماي. س. ك السيارات - -- mysql persistent connections ماي. س. ك المستمرة وصلات - -- mysql connect wordpress ماي. س. ك ربط ووردبرس] - -- mysql persistent ماي. س. ك المستمرة - -- wordpress persistent mysql ووردبرس] استمرار ماي. س. ك - -- persistent connections mysql استمرار صلات ماي. س. ك - -- php mysql keep connection php ماي. س. ك إبقاء الصدد - -- Reduce or eliminate persistent connections to reduce connection usage خفض أو القضاء على الصلات المستمرة للحد من الاستخدام الصدد - -- wordpress persistent db connection ووردبرس] استمرار الصدد ديسيبل - -- wordpress mysql persistent connection ماي. س. ك الصدد استمرار ووردبرس] - -- mysql persistent or not ماي. س. ك المستمرة أم لا - -- mysql auto close connection ماي. س. ك السيارات صلة وثيقة - -- php.ini + mysql persistent connection php.ini + ماي. س. ك المستمرة الصدد - -- MySQL PHP persistant connection ماي. س. ك PHP استمرار الصدد - -- Your applications are not closing MySQL connections properly التطبيقات الخاصة بك ليست إغلاق ماي. س. ك صلات سليم - -- wordpress connection pool ووردبرس] الصدد بركة - -- mysql wordpress Microsoft ماي. س. ك مايكروسوفت ووردبرس] - -- wordpress mysql_pconnect ووردبرس] mysql_pconnect - -- mysql php persistent connections ماي. س. ك php المستمرة وصلات - -- MySQL Persistent Connections PHP ماي. س. ك استمرار الصلات PHP - -- php mysql wordpress ماي. س. ك php ووردبرس] - -- properly close mysql connections سليم صلات وثيقة ماي. س. ك - -- how to integrate friend connect using php كيفية دمج صديق ربط باستخدام php - -- how to integrate friends connect in php كيفية دمج ربط الأصدقاء في php - -- persistent connections php استمرار الصلات php - -- disable persistent connections mysql استمرار تعطيل وصلات ماي. س. ك - -- dynamic wordpress page using mysql table دينامية ووردبرس] صفحة باستخدام الجدول ماي. س. ك - -- mysql faster db access with persistent connection ماي. س. ك أسرع ديسيبل الوصول مع استمرار الصدد - -- mysql persistent connections with php ماي. س. ك استمرار الصلات مع php - -- Not closing the database connection properly, PHP لا إغلاق قاعدة البيانات الصدد على النحو الصحيح ، PHP - -- persistent connection to MySQL +php استمرار الصدد إلى ماي. س. ك + php - -- php mysql persistent connections not working php ماي. س. ك المستمرة وصلات لا تعمل - -- ) or mysql_connect( ) ، أو mysql_connect ( - -- how to open multiple connection in mysql + php كيفية فتح المتعددة الصدد في ماي. س. ك + php - -- integrate WordPress with MySQL دمج ووردبرس] مع ماي. س. ك - -- mysql_connect persistence connection mysql_connect استمرار الصدد - -- optimizing mysql_pconnect الأمثل mysql_pconnect - -- persistence wordpress style switcher استمرار نمط التحويل ووردبرس] - -- php open and close mysql persistent connections php مفتوحة واستمرار صلات وثيقة ماي. س. ك - --