Problems compiling php5


#1

Hi,
I’m trying to compile my own php5, as the model in the script suggested by DreamHost, but I’ve troubles with mcrypt. Ok, I cut off this option and the compilation go out with an error compiling xml section. The last lines are:

-lxml2 -lz -liconv -lm -lcrypt -o sapi/cgi/php
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1
cp: cannot stat `/home/me/php/bin/php’: No such file or directory
---------- INSTALL COMPLETE! ----------

Any workaround?

Many thanks,

Salvo


#2

After experiencing the exact same problem I added some notes to the DH wiki to solve this “glitch”; see:
http://wiki.dreamhost.com/index.php/Installing_PHP5


#3

many thanks!
now it works.

But now PHP has released PHP 5.0.5, and the script in Wiki should be updated.
I’ve compiled it (modifying a bit the script, with your adds and reference for 5.0.5) and it works!

Only another thing:
virtual() doesn’t work with PHP5 as cgi, there is any workaround to make it working?


#4

That’s a bit more of a puzzle. PHP online docs say it’s an Apache-specific to mod_include and that it only works when PHP is installed as an Apache module, so I’m not so sure it’s supposed to work with PHP as a cgi (…bearing in mind, of course, that I’m not the brightest bulb in the marquis on such matters by a longshot).
If you can be more specific as to what you’re wanting it for (…without divulging any super-duper trade secrets or whatever) I might be able to recommend an alternative solution.