View Full Version : Error trying to switch to PHP 4 CLI

06-13-2008, 06:05 PM
I'm setting up a new server, and it came with PHP 5 CLI installed. Turns out that I need PHP 4 CLI in order to run some sites that aren't PHP 5 compatible yet. Custombuild said I couldn't have both installed as CLI, so I installed PHP 4 as CGI to see if that would work for my sites. The install worked perfectly, but PHP 4 CGI is still causing problems with some sites, so now I'm trying to switch to PHP 4 CLI and PHP 5 CGI, or at least PHP 4 CLI -- I can live without PHP 5 for the time being, if I have to. I just need to get these sites working properly.

So, I changed my options.conf file to read this:

#PHP settings. default_php possible values - 4 or 5

And then I ran these commands:

./build update_data
./build php d

I tried it once just like that, and I tried it again inserting "./build clean" after the update. Both times, the install fails at this point in the proceedings:

/usr/bin/ld: /usr/local/lib/libltdl.a(ltdl.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libltdl.a(ltdl.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1

I don't even know what any of that means!

The operating system is CentOS 5.

Anybody have any ideas for me?

06-13-2008, 06:22 PM
I don't remember, look like I had the same problem some time ago... Try yum update libtool-ltdl libtool-ltdl-devel libtool

06-13-2008, 07:41 PM
Thanks Boris -- that helped point me in the right direction. Here's how I fixed it:

yum install libtool-ltdl
yum install libtool-ltdl-devel
ln -sf /usr/lib64/libltdl.a /usr/local/lib/libltdl.a
./build php n

06-13-2008, 07:48 PM
don't mention it :)
But I recommend installing libtool-ltdl.x86_64 and libtool-ltdl-devel.x86_64 instead of symlinking 32bit binary to 64bit location.