Server Move - PHP Install on 64-Bit

My sites were moved to the new 64-bit servers, and as I was running a custom install of PHP & APC… they have stopped working!
Dreamhost advised that a simple reinstall (recompile) was all that was required to get everything back up and running.

Unfortunately… NOT!

Initially the install kept failing, but by upping the version of ZLIB from 1.2.3 to 1.2.5 solved that, and the install appeared to complete.
However, my site is generating a 500 error, and running dispatch.fcgi from shell tells me: “/home/sidepa/******.com/php.cgi: error while loading shared libraries: wrong ELF class: ELFCLASS64”.

I’m not an expert at this kind of stuff, so I was wondering if anybody could give me some pointers as to what may be wrong.

I know that the original install is somehow still looking for, or depending on, some 32-Bit components, but I have no clue as to how to instruct it to use the 64-Bit ones.

Below I have listed the versions I’m trying to install, and the configure command. I can post the entire install script if needed!
Can anyone advise me as to which bit is wrong, or needs changing?
Thanks, in advance :slight_smile:





Hi sidepa!

Just a quick idea: Are you still using the same source directory as where you compiled the 32bit version?

If yes: do a “make clean” in that directory and compile PHP again and see if it helps.

Another thing I see is that you are still using PHP 5.2.0? Did you try to update that to 5.2.14 which is the current version? I know I had some problems on my own 64 bit servers with some older PHP versions.

Hi Zylox,

Thanks for the quick reply!

I’m using the same distribution files, but clearing the source and installation directories before each install attempt.

I haven’t tried upping the PHP version yet, but I may end up trying that too.

Slight update:
It seems that the install is NOT creating a “bin” directory in the installation directory.
The install script ends with this:
“cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi”

But it’s not able to copy “php.cgi” from “${INSTALLDIR}/bin/php” into my domain because “${INSTALLDIR}/bin/php” doesn’t exist!

The original error I was getting from running “dispatch.fcgi” via shell was because it was using the old php.cgi. I’ve now deleted that, but I’m obviously not getting a new version with the install!

Any explanation for the missing “bin” directory? Would a later version of PHP solve that?

Crisis over, lol
After 5 days of having my site down… everything is back-up and running smoothly!

It seems as though pspell was the cause of all my problems. I removed pspell from the PHP features, and both PHP & APC have installed successfully… hooray :wink:

Are there any error messages at the end of the make run? Make probably fails at some point an doesn’t create the binary.