How to recompile PHP
Begin by figuring out how to connect to your server via ssh. Then use wget to download the latest php sources. cd into the directory with the unzipped files. Run configure with the options you want, then run make.
Here is the official FAQ: http://php.net/manual/en/faq.build.php
Comments
-
johnnietheblack over 1 year
I have changed some settings in various things on my site and I am being told i need to "recompile PHP" via ssh.
can anybody tell me how to do that?
OOF, harsh - people wanna shut this one real fast.
Heres the situation. I have some nice preg_matches going on throughout my site, but the server I am on is throwing up errors left and right, complaining about my PCRE not being UTF-8 friendly.
After researching the problem, it seems the only way to make it friendly is by recompiling PHP with a few flags in the conditions.
And that is where I'm at.
-
Admin over 14 yearsRecompiling PHP is almost always a last resort. You need to talk more in detail about your situation in order to get at what you really need.
-
Admin over 14 yearsWhat OS? If it's a Linux distro, it's often easiest to start with the source package and modify it to add whatever extra options you need.
-
Admin over 14 yearsokay...so basically a fresh install?
-
-
Nathan Osman over 14 yearsHmmm... better edit my post. The site is down.
-
Nathan Osman over 14 yearsThere. A new working link!
-
johnnietheblack over 14 yearsthanks george:) sorry on the delay for checkin you as answer