How to recompile PHP

13,224

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

Share:
13,224
johnnietheblack
Author by

johnnietheblack

im a man w/ a plan.

Updated on September 17, 2022

Comments

  • johnnietheblack
    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
      Admin over 14 years
      Recompiling 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
      Admin over 14 years
      What 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
      Admin over 14 years
      okay...so basically a fresh install?
  • Nathan Osman
    Nathan Osman over 14 years
    Hmmm... better edit my post. The site is down.
  • Nathan Osman
    Nathan Osman over 14 years
    There. A new working link!
  • johnnietheblack
    johnnietheblack over 14 years
    thanks george:) sorry on the delay for checkin you as answer