The Blog of a Programmer
A Few Notes for Building PHP 5 on DreamHost PS
The information here is being used to overwrite the original PHP install on a DreamHost PS, mostly because I want to enable SOAP and XMLRPC.
Since the OS is currently Debian Etch I need to download, compile, and install xmlrpc-epi:
http://xmlrpc-epi.sourceforge.net/
I want to enable SOAP so I modified the configure command to use:
‘./configure’ ‘–prefix=/usr/local/php5′ ‘–datadir=/usr/local/php5/share’ ‘–localstatedir=/usr/local/php5/var’ ‘–enable-sockets’ ‘–enable-fastcgi’ ‘–enable-bcmath’ ‘–with-pear=/usr/local/php5/lib/pear’ ‘–with-mysql=/usr’ ‘–enable-calendar’ ‘–with-mhash=/usr’ ‘–with-kerberos’ ‘–enable-force-cgi-redirect’ ‘–with-config-file-path=/etc/php5/cgi’ ‘–with-imap’ ‘–with-imap-ssl’ ‘–with-gd’ ‘–with-xsl’ ‘–with-ttf=/usr’ ‘–with-freetype-dir=/usr’ ‘–enable-exif’ ‘–with-jpeg-dir=/usr’ ‘–with-png-dir=/usr’ ‘–with-zlib-dir=/usr’ ‘–with-pdo-mysql’ ‘–enable-ftp’ ‘–with-curl=/usr’ ‘–with-pspell=/usr’ ‘–enable-mbstring’ ‘–with-mcrypt’ ‘–with-mysqli’ ‘–with-openssl=/usr’ ‘–with-gettext’ ‘–enable-soap’
I also had wanted xmlrpc but ended up having so much trouble trying to get PHP to compile with it enabled that I went the route of downloading the debian etch package “php5-xmlrpc” from here:
http://packages.debian.org/etch/php5-xmlrpc
I extracted the contents using:
dpkg –extract package.deb folder/
Then pulled the xmlrpc.so file and put it into my extension dir and added the following line to the php.ini:
extension=xmlrpc.so
It should also be noted that the old configure command contained:
–enable-trans-sid
–with-xml
–with-xslt
–with-xslt-sablot=/usr
–with-dom-xslt=/usr
Which are PHP4 configure options and not needed for PHP5.
Finally, there are LOTS of dependencies that needed installation, can’t remember if these are all correct:
sudo apt-get install libcurl3-dev
sudo apt-get install libc-client-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libmhash-dev
sudo apt-get install libaspell-dev
sudo apt-get install libpspell-dev
That’s all for the time being, I’ll make a final post when I have all the details (and a working install) up and running.
It looks like it’s all up and running smoothly! There was one last catch, when running php through fastcgi you need to manually replace a file:
/dh/cgi-system/php5.cgi
With the file that was created here:
/usr/local/php5/bin/php-cgi
So a quick:
cp -a /usr/local/php5/bin/php-cgi /dh/cgi-system/php5.cgi
Did the trick.
| This entry was posted by JuanJose on March 26, 2010 at 5:15 pm, and is filed under PHP, Software. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 4 months ago
With your help I am so close but still get this error – any ideas?
ext/xmlreader/php_xmlreader.o: In function `zim_xmlreader_XML':
/home/janda23/phpsource/php-5.2.13/ext/xmlreader/php_xmlreader.c:1109: undefined reference to `xmlTextReaderSetup'
/home/janda23/php/lib/libexslt.so: undefined reference to `xmlFreeNode@LIBXML2_2.4.30'
/home/janda23/php/lib/libexslt.so: undefined reference to `xmlXPathNewNodeSet@LIBXML2_2.4.30'
(snipped many errors)
collect2: ld returned 1 exit status
about 4 months ago
My guess is that the PS doesn’t have libxml2-devel installed. Try:
sudo apt-get install libxml2-devel
I likely had done this while compiling other packages before, which is why it didn’t come up as a problem for me. If it turns out the be the problem please let me know so I can update this post.
about 4 months ago
Hi,
for my drupal i would love to install/compile an custom php with actual version of php5, APC, PECL uploadprogess… but i really dont’t get it working like i would love it…
i’ve just signed up for a Dreamhost PS but cannot use it as i want because of misunderstanding or not enough understanding of unix and building custom php with custom extensions like pecl, pear etc….
would love some help like an installscript or a link for a onlinegenerator for this if smth like this exists….
Greetings from germany
~TR
about 4 months ago
Nope, I don’t know if any sort of script that will let you custom build a script and allow you to select what extensions you’d like.
Good luck with the custom compiling though!