How to recompile PHP Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Come Celebrate our 10 Year Anniversary!How 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?

Fundamental Solution of the Pell Equation

How come Sam didn't become Lord of Horn Hill?

What's the meaning of "fortified infraction restraint"?

Do jazz musicians improvise on the parent scale in addition to the chord-scales?

If my PI received research grants from a company to be able to pay my postdoc salary, did I have a potential conflict interest too?

Circuit to "zoom in" on mV fluctuations of a DC signal?

Did MS DOS itself ever use blinking text?

What does this Jacques Hadamard quote mean?

Do wooden building fires get hotter than 600°C?

What causes the direction of lightning flashes?

Is it cost-effective to upgrade an old-ish Giant Escape R3 commuter bike with entry-level branded parts (wheels, drivetrain)?

Compare a given version number in the form major.minor.build.patch and see if one is less than the other

An adverb for when you're not exaggerating

How would a mousetrap for use in space work?

When the Haste spell ends on a creature, do attackers have advantage against that creature?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

How can I use the Python library networkx from Mathematica?

Why aren't air breathing engines used as small first stages

Extracting terms with certain heads in a function

Significance of Cersei's obsession with elephants?

Generate an RGB colour grid

What would be the ideal power source for a cybernetic eye?

Why are there no cargo aircraft with "flying wing" design?

If a contract sometimes uses the wrong name, is it still valid?



How to recompile PHP



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!How 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,94562745




    1,94562745












    • 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 Apr 12 at 9:12

























        answered Apr 12 at 9:03









        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

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company