Linux – How to recompile PHP

linuxPHPssh

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.

Best Answer

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