Results for “PHP”

How to Fix 502 Bad Gateway Error

nginx 502 Bad Gateway Fix Under High Load  When nginx is under high load, uploading images or executing scripts that take a long time constantly results in 502 Bad

Gateway . I searched online and most solutions are the same article by Master Zhang about increasing fastcgi response …

How to Load Another Page Inside a Div With AJAX (Replacing Frames)

As traditional framesets have fallen out of favor, HTML5 no longer supports frames, and iframes are now mostly used just for URLs. The DIV+CSS approach has taken over this responsibility — it handles page layout quite satisfactorily and is more convenient to use. Today, however, I suddenly ran into a problem: I needed to import another page to display within a Div on the current page …

How to Fix Nginx 504 Gateway Time-out

When configuring the LNMP stack on CentOS, I’ve always used the same set of config files without any issues. However, recently after setting up the same environment on a VPS, the site became extremely slow with just over 10 people online. Several times it hit the limit set in Nginx …

Changing Session Mechanism to Memcache Storage

The website barely gets 1000 IPs per day, but it was painfully slow whether running on MB or tt on a dual-core 2G server with 10M bandwidth. After enabling the MySQL slow query log, it filled up over 2GB of slow queries in just a few days. It turned out most were caused by SESSION, so I switched ECSHOP’s built-in SESSION to MEMCACHED…

The Bittersweet Journey of a Newbie RHCE

The bittersweet journey of a newbie RHCE. Many people want to earn their RHCE certification — let me share how I became one.

  
  1 Love at First Touch
  
   I first encountered Linux in November 2003. Back then I thought it was quite mysterious, because I’d heard it was on the same level as Unix…

Subdomain Session Sharing Solutions

1. Use a cookie to store the session_id(); Example: PHP code in Domain One: <?phpsession_start();setcookie("session_id",session_id(),time()+3600*24*365*10,"/",".session.com"); $_SESSION['user_name'] = 'Liangshan …