Clearing out a decade of accumulated site legacy, and saying goodbye to PHP5.6

A PHP vulnerability with a CVSS score of 9.2 that lets anyone execute code remotely without even logging in — and the official fix only covers 8.2 through 8.5. My server runs 5.6, which has no patch and no backport. This morning I only wanted to confirm how badly I was affected. But one thing led to another, and I ended up giving the site legacy — stacked up and steadily gaining entropy for over a decade — a thorough slimming down.

Backend Server

Nginx configuration for forwarding to a TSRPC server

Notes on deploying a TSRPC server on the Baota panel, including configuring an Nginx reverse proxy and fixing the issue where the Node.js project fails to start. Modify the Nginx configuration file, add CORS-related settings, and comment out the conflicting port listening configuration to ensure the service runs properly.

Backend Server

A gotcha with 404 error pages under IIS

I was just testing the site and ran into a problem with Flash image loading. I found that when loading a nonexistent file, Flash still reports progress info, and after reaching 100% it shows nothin...

Backend Server

The file is clearly there, yet require_once(./*.php) throws an error

Problem description:Right after installing PMA, accessing it in Firefox shows a blank page with no output at all. In IE you can see a 500 error (Internal Server Error). Turn on error reporting and you find this: Warning: require_once(./libraries/common.inc.php) [function.require-once]: failed to open stream: No such file or directory in ***\mousebomb\pma\index.php on line 35 Fatal error: require_once() [function.require]: Failed opening required ‘./libraries/common.inc.php’ (include_path=’.;C:\php5\pear’) in ***\mousebomb\pma\index.php on line 35 And yet the file really does exist, and IUSR (the IIS anonymous access user) has permission on it.

Backend Server

WordPress permalinks under wimp

Not long ago I switched from LAMP to WIMP (windows2k3+iis6+mysql5.2+php5.2), and WordPress lost two important features: one is permalinks (static URLs), and the other is email sending. I’ve just perfectly solved the permalink problem, so I’ll share the method. (A so-called permalink is something like http://www.flashj.cn/wp/wimp-wordpress-permalink.html这样的格式) Because Windows doesn’t support .htaccess, to do rewrite you need to download an ISAPI_Rewrite component to implement rewriting. I tried it, and personally I didn’t find the result very ideal.

Backend Server

Spending your whole life loading org.eclipse.php.core?

Problem description:At the company I use Zend Studio for Eclipse Professional Edition to write PHP projects. It’s a great piece of software, but it still has plenty of bugs. This morning it suddenly refused to start — it got stuck on loading org.eclipse.php.core and the progress bar never moved again. I tried reinstalling over the existing installation and it still didn’t work, which left me baffled. Was I going to be stuck at loading org.eclipse.php.core forever?

Backend Server

PDO transaction error?

Today I hit an error in the PDO transaction-handling part: Fatal error: Uncaught exception ‘PDOException’ with message ‘There is no active transaction’ in /data/www/web.passport/pay/classes/class.Mydb.php:145 Stack trace: #0 /data/www/web.passport/pay/classes/class.Mydb.php(145): PDO->rollBack() #1 /data/www/web.passport/pay/yeepayOrder.php(138): Mydb->transaction(Array) #2 {main} thrown in /data/www/web.passport/pay/classes/class.Mydb.php on line 145 Looking through the error log I saw:

Backend Server

How to fix session_start() errors in PHP

I’m not doing .net for now — I’ve gotten interested in PHP, so I’m learning PHP while working on it. There are a shocking number of baffling things in the beginner stage; good thing I was mentally prepared. Last night I ran into a problem: in PHP, session_start() always threw an error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:wwwrootEZineTest.php:1) in D:wwwrootEZineTest.php on line 1 I searched all over the web and found three explanations and fixes for it:

Backend Server

The ASP file clearly exists, yet it shows a 404 error—can IIS not display ASP?

Ran into this weird problem today — guess I’ve been living under a rock… ASP files wouldn’t load… showing a 404 error, but non-ASP files like logo.jpg opened just fine. Any file that was .asp gave ...

Backend Server