SharkBait Posted May 28, 2007 Share Posted May 28, 2007 Ok, I've been looking around and I am unsure how I would go about recompiling PHP if I need to add in things like PDFLib or cURL etc. On my test server which I don't mind breaking I have 5.0.4 running but I would like to figure out how to get PDFlib running on it. On a live server I have 4.2.2 running and I would like to learn how to recompile it to at least 4.3.2 or even 5.*. Is recompiling PHP fairly involved? Would I download the latest release and use that? I'm looking for a good tutorial and explainations of the steps to recompile. I don't think I've really ever recompiled anything in my life and I want to learn! Quote Link to comment Share on other sites More sharing options...
trq Posted May 28, 2007 Share Posted May 28, 2007 What OS are you using? In gentoo Linux for instance its a simple matter of setting the USE flags you want in /etc/portage/package.use and then re-emerging. Other distro's need a bit more work. The best thing to do is download the source, extract it and read the README file. Quote Link to comment Share on other sites More sharing options...
SharkBait Posted May 28, 2007 Author Share Posted May 28, 2007 You know.. I actually forget what distro I am using on my test machine. Think its Fedora 4. I know the live server is running Ubuntu 6 I'll take a peek at the source and readme files. Thanks! Quote Link to comment Share on other sites More sharing options...
trq Posted June 4, 2007 Share Posted June 4, 2007 All you really need do is run... ./configure --help from within the source tree. It lets you see the available options. Of course, some options (if enabled) will also require you to build the dependencies. Quote Link to comment Share on other sites More sharing options...
audiokiwi Posted June 22, 2007 Share Posted June 22, 2007 There's a way to build extensions without recompiling PHP (unless you compiled it statically). To install 3rd-party extentions, go to the folder where you extracted the source. Run phpize, then ./configure, then make, and finally make install. (You need the php5-devel or similar package installled on Fedora) For a extension that comes with php (e.g. curl), then download the source, and then go to the folder of the extension (e.g. php-5.2.3/ext/curl) and run the commands above. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.