How to recompile PHP The 2019 Stack Overflow Developer Survey Results Are InHow can I sort du -h output by sizeRecompile PHP *nixWhen I recompile Apache do I need to recompile PHP and recompile PHP's extensions?How do you restart php-fpm?How do I tell Git for Windows where to find my private RSA key?How to automate SSH login with password?Enable zip on PHP 5.1.6 without recompile“no input file specified” with apache/php after recompileDo you need to recompile PHP to use APC?How to correctly recompile PHP?

How did passengers keep warm on sail ships?

How can I define good in a religion that claims no moral authority?

How to translate "being like"?

Is bread bad for ducks?

How do I free up internal storage if I don't have any apps downloaded?

Kerning for subscripts of sigma?

Does adding complexity mean a more secure cipher?

Falsification in Math vs Science

Geography at the pixel level

Cooking pasta in a water boiler

Correct punctuation for showing a character's confusion

How to notate time signature switching consistently every measure

Why didn't the Event Horizon Telescope team mention Sagittarius A*?

What was the last CPU that did not have the x87 floating-point unit built in?

Deal with toxic manager when you can't quit

How to support a colleague who finds meetings extremely tiring?

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

Loose spokes after only a few rides

Word to describe a time interval

Why can't wing-mounted spoilers be used to steepen approaches?

What is this sharp, curved notch on my knife for?

Accepted by European university, rejected by all American ones I applied to? Possible reasons?

The phrase "to the numbers born"?

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?



How to recompile PHP



The 2019 Stack Overflow Developer Survey Results Are InHow can I sort du -h output by sizeRecompile PHP *nixWhen I recompile Apache do I need to recompile PHP and recompile PHP's extensions?How do you restart php-fpm?How do I tell Git for Windows where to find my private RSA key?How to automate SSH login with password?Enable zip on PHP 5.1.6 without recompile“no input file specified” with apache/php after recompileDo you need to recompile PHP to use APC?How to correctly recompile PHP?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








4















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.










share|improve this question















migrated from stackoverflow.com Jan 21 '10 at 6:59


This question came from our site for professional and enthusiast programmers.













  • 1





    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.

    – Ignacio Vazquez-Abrams
    Jan 21 '10 at 6:47











  • 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.

    – ZoogieZork
    Jan 21 '10 at 7:04











  • okay...so basically a fresh install?

    – johnnietheblack
    Jan 21 '10 at 7:06











  • Since you're modifying the source package for PHP, the result will be a new PHP package which you can use to install "over" your existing installation. This only works if PHP was originally installed via package, of course.

    – ZoogieZork
    Jan 21 '10 at 7:13

















4















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.










share|improve this question















migrated from stackoverflow.com Jan 21 '10 at 6:59


This question came from our site for professional and enthusiast programmers.













  • 1





    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.

    – Ignacio Vazquez-Abrams
    Jan 21 '10 at 6:47











  • 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.

    – ZoogieZork
    Jan 21 '10 at 7:04











  • okay...so basically a fresh install?

    – johnnietheblack
    Jan 21 '10 at 7:06











  • Since you're modifying the source package for PHP, the result will be a new PHP package which you can use to install "over" your existing installation. This only works if PHP was originally installed via package, of course.

    – ZoogieZork
    Jan 21 '10 at 7:13













4












4








4


1






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.










share|improve this question
















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.







linux php ssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 21 '10 at 7:01







johnnietheblack

















asked Jan 21 '10 at 6:46









johnnietheblackjohnnietheblack

2261410




2261410




migrated from stackoverflow.com Jan 21 '10 at 6:59


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Jan 21 '10 at 6:59


This question came from our site for professional and enthusiast programmers.









  • 1





    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.

    – Ignacio Vazquez-Abrams
    Jan 21 '10 at 6:47











  • 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.

    – ZoogieZork
    Jan 21 '10 at 7:04











  • okay...so basically a fresh install?

    – johnnietheblack
    Jan 21 '10 at 7:06











  • Since you're modifying the source package for PHP, the result will be a new PHP package which you can use to install "over" your existing installation. This only works if PHP was originally installed via package, of course.

    – ZoogieZork
    Jan 21 '10 at 7:13












  • 1





    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.

    – Ignacio Vazquez-Abrams
    Jan 21 '10 at 6:47











  • 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.

    – ZoogieZork
    Jan 21 '10 at 7:04











  • okay...so basically a fresh install?

    – johnnietheblack
    Jan 21 '10 at 7:06











  • Since you're modifying the source package for PHP, the result will be a new PHP package which you can use to install "over" your existing installation. This only works if PHP was originally installed via package, of course.

    – ZoogieZork
    Jan 21 '10 at 7:13







1




1





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.

– Ignacio Vazquez-Abrams
Jan 21 '10 at 6:47





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.

– Ignacio Vazquez-Abrams
Jan 21 '10 at 6:47













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.

– ZoogieZork
Jan 21 '10 at 7:04





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.

– ZoogieZork
Jan 21 '10 at 7:04













okay...so basically a fresh install?

– johnnietheblack
Jan 21 '10 at 7:06





okay...so basically a fresh install?

– johnnietheblack
Jan 21 '10 at 7:06













Since you're modifying the source package for PHP, the result will be a new PHP package which you can use to install "over" your existing installation. This only works if PHP was originally installed via package, of course.

– ZoogieZork
Jan 21 '10 at 7:13





Since you're modifying the source package for PHP, the result will be a new PHP package which you can use to install "over" your existing installation. This only works if PHP was originally installed via package, of course.

– ZoogieZork
Jan 21 '10 at 7:13










2 Answers
2






active

oldest

votes


















1














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|improve this answer

























  • Hmmm... better edit my post. The site is down.

    – Nathan Osman
    Jan 21 '10 at 7:09











  • There. A new working link!

    – Nathan Osman
    Jan 21 '10 at 7:16











  • thanks george:) sorry on the delay for checkin you as answer

    – johnnietheblack
    Jan 21 '10 at 17:35


















0














We have many roads that lead to Rome. If you want to recompile PHP, then you should first check your server. Which OS are you using? Which PHP version? Are there any Bundled PHP Extension you want to use?... and so on.



Recompiling PHP in general is like this:



  • searching for the official PHP source code

  • invoking ./configure. For example like this: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
    See a full list of configure options: https://www.php.net/manual/en/configure.about.php


  • invoking make


  • invoking make install

Please have a look at these tutorials:



Official tutorial (PHP is installed as an Apache2 module):
https://www.php.net/manual/en/install.unix.apache2.php (See step 5.)



You could also check at the offical github page.
https://github.com/php/php-src



Unofficial tutorial:
http://www.softwareprojects.com/resources/programming/t-how-to-recompile-php-with-gd-support-on-a-live-serv-1572.html






share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "2"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f104892%2fhow-to-recompile-php%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    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|improve this answer

























    • Hmmm... better edit my post. The site is down.

      – Nathan Osman
      Jan 21 '10 at 7:09











    • There. A new working link!

      – Nathan Osman
      Jan 21 '10 at 7:16











    • thanks george:) sorry on the delay for checkin you as answer

      – johnnietheblack
      Jan 21 '10 at 17:35















    1














    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|improve this answer

























    • Hmmm... better edit my post. The site is down.

      – Nathan Osman
      Jan 21 '10 at 7:09











    • There. A new working link!

      – Nathan Osman
      Jan 21 '10 at 7:16











    • thanks george:) sorry on the delay for checkin you as answer

      – johnnietheblack
      Jan 21 '10 at 17:35













    1












    1








    1







    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|improve this 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







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 21 '10 at 7:15

























    answered Jan 21 '10 at 7:04









    Nathan OsmanNathan Osman

    1,93062745




    1,93062745












    • Hmmm... better edit my post. The site is down.

      – Nathan Osman
      Jan 21 '10 at 7:09











    • There. A new working link!

      – Nathan Osman
      Jan 21 '10 at 7:16











    • thanks george:) sorry on the delay for checkin you as answer

      – johnnietheblack
      Jan 21 '10 at 17:35

















    • Hmmm... better edit my post. The site is down.

      – Nathan Osman
      Jan 21 '10 at 7:09











    • There. A new working link!

      – Nathan Osman
      Jan 21 '10 at 7:16











    • thanks george:) sorry on the delay for checkin you as answer

      – johnnietheblack
      Jan 21 '10 at 17:35
















    Hmmm... better edit my post. The site is down.

    – Nathan Osman
    Jan 21 '10 at 7:09





    Hmmm... better edit my post. The site is down.

    – Nathan Osman
    Jan 21 '10 at 7:09













    There. A new working link!

    – Nathan Osman
    Jan 21 '10 at 7:16





    There. A new working link!

    – Nathan Osman
    Jan 21 '10 at 7:16













    thanks george:) sorry on the delay for checkin you as answer

    – johnnietheblack
    Jan 21 '10 at 17:35





    thanks george:) sorry on the delay for checkin you as answer

    – johnnietheblack
    Jan 21 '10 at 17:35













    0














    We have many roads that lead to Rome. If you want to recompile PHP, then you should first check your server. Which OS are you using? Which PHP version? Are there any Bundled PHP Extension you want to use?... and so on.



    Recompiling PHP in general is like this:



    • searching for the official PHP source code

    • invoking ./configure. For example like this: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
      See a full list of configure options: https://www.php.net/manual/en/configure.about.php


    • invoking make


    • invoking make install

    Please have a look at these tutorials:



    Official tutorial (PHP is installed as an Apache2 module):
    https://www.php.net/manual/en/install.unix.apache2.php (See step 5.)



    You could also check at the offical github page.
    https://github.com/php/php-src



    Unofficial tutorial:
    http://www.softwareprojects.com/resources/programming/t-how-to-recompile-php-with-gd-support-on-a-live-serv-1572.html






    share|improve this answer





























      0














      We have many roads that lead to Rome. If you want to recompile PHP, then you should first check your server. Which OS are you using? Which PHP version? Are there any Bundled PHP Extension you want to use?... and so on.



      Recompiling PHP in general is like this:



      • searching for the official PHP source code

      • invoking ./configure. For example like this: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
        See a full list of configure options: https://www.php.net/manual/en/configure.about.php


      • invoking make


      • invoking make install

      Please have a look at these tutorials:



      Official tutorial (PHP is installed as an Apache2 module):
      https://www.php.net/manual/en/install.unix.apache2.php (See step 5.)



      You could also check at the offical github page.
      https://github.com/php/php-src



      Unofficial tutorial:
      http://www.softwareprojects.com/resources/programming/t-how-to-recompile-php-with-gd-support-on-a-live-serv-1572.html






      share|improve this answer



























        0












        0








        0







        We have many roads that lead to Rome. If you want to recompile PHP, then you should first check your server. Which OS are you using? Which PHP version? Are there any Bundled PHP Extension you want to use?... and so on.



        Recompiling PHP in general is like this:



        • searching for the official PHP source code

        • invoking ./configure. For example like this: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
          See a full list of configure options: https://www.php.net/manual/en/configure.about.php


        • invoking make


        • invoking make install

        Please have a look at these tutorials:



        Official tutorial (PHP is installed as an Apache2 module):
        https://www.php.net/manual/en/install.unix.apache2.php (See step 5.)



        You could also check at the offical github page.
        https://github.com/php/php-src



        Unofficial tutorial:
        http://www.softwareprojects.com/resources/programming/t-how-to-recompile-php-with-gd-support-on-a-live-serv-1572.html






        share|improve this answer















        We have many roads that lead to Rome. If you want to recompile PHP, then you should first check your server. Which OS are you using? Which PHP version? Are there any Bundled PHP Extension you want to use?... and so on.



        Recompiling PHP in general is like this:



        • searching for the official PHP source code

        • invoking ./configure. For example like this: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
          See a full list of configure options: https://www.php.net/manual/en/configure.about.php


        • invoking make


        • invoking make install

        Please have a look at these tutorials:



        Official tutorial (PHP is installed as an Apache2 module):
        https://www.php.net/manual/en/install.unix.apache2.php (See step 5.)



        You could also check at the offical github page.
        https://github.com/php/php-src



        Unofficial tutorial:
        http://www.softwareprojects.com/resources/programming/t-how-to-recompile-php-with-gd-support-on-a-live-serv-1572.html







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 45 mins ago

























        answered 54 mins ago









        JulianJulian

        1013




        1013



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f104892%2fhow-to-recompile-php%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to make RAID controller rescan devices The 2019 Stack Overflow Developer Survey Results Are InLSI MegaRAID SAS 9261-8i: Disk isn't recognized after replacementHow to monitor the hard disk status behind Dell PERC H710 Raid Controller with CentOS 6?LSI MegaRAID - Recreate missing RAID 1 arrayext. 2-bay USB-Drive with RAID: btrfs RAID vs built-in RAIDInvalid SAS topologyDoes enabling JBOD mode on LSI based controllers affect existing logical disks/arrays?Why is there a shift between the WWN reported from the controller and the Linux system?Optimal RAID 6+0 Setup for 40+ 4TB DisksAccidental SAS cable removal

            How can I have a shield and a way of attacking at distance at the same time? The 2019 Stack Overflow Developer Survey Results Are InDoes the Thrown property mean I can attack with my DEX?Is it possible to build a custom weapon, and if so, how will my character be able to use it?Can the Ghost Touch weapon property allow an attacker to perform incorporeal touch attacks?The DM allowed me to wield two shields, how can I get the most AC and HP, as a Bear Barbarian?Are there ways other than Kensei Weapons or Hex Warrior to use an ability other than STR for non-finesse melee weapons?Cheapest way to cast spells with sword and (heavy) shield?Is this homebrew “Throwing Weapons Master” feat balanced?Can Hexblade warlocks use a staff and shield?Are there any balance issues with allowing thrown Javelins to be drawn for free like ammunition weapons?Does an unattuned Frost Brand weapon still glow in freezing temperatures?Does a druid starting with a bow start with no arrows?Is it possible to build a custom weapon, and if so, how will my character be able to use it?

            How to determine omitted units in a publication The 2019 Stack Overflow Developer Survey Results Are InUnits of mass on the atomic scaleUnits in modified Arrhenius equation?Why are osmoles not considered SI units?When to use Da or u for mass unitsDividing different units of measurement?When you report Einstein units do you capitalize it?How to use C1V1=C2V2 How do the units work?Force Fields and unitsDoes adding prefixes to SI units make them no longer SI units?Types of concentration units