Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to compile memcache for Dreamhost PS.

The library is created but not shown in phpinfo. Apache logs says the library isn't loaded because "undefined symbol: OnUpdateInt in Unknown on line 0"

I read that OnUpdateInt is defined in PHP4 and OnUpdateLong is defined in PHP5. Therefore the problem is that the compilation config thinks it should compile with PHP4.

The SAPI version of PHP is 5.2.10 (shown in phpinfo). The CLI is 4.4.9 (shown by php -v)

My question: How do I make the compilation of the libraries be compatible to the PHP5 on my server and not the php4.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It seems like you want to update your PATH to "pick" PHP 5 instead of PHP 4. The compilation process uses which ever PHP it finds in your path. To find your current install:

which php

PHP info should show the path to the PHP 5 version. To test it, you can then run php -v with the full path to the PHP 5 version (for example, if it is in /usr/local/bin you can use /usr/local/bin/php -v). You can then update your path:

# for bash
export PATH=/usr/local/bin:$PATH

Then php -v should hit the updated version after this.

If they have both installed "side-by-side" (e.g. a php and php5 binary), you will need to use a configure option (assuming you're compiling memcached from source). I'm not familiar with how Dreamhost has that setup.

share|improve this answer
    
+1, I usually just call the proper phpize, I keep my "other" PHP in its own prefix making it simple. –  Xorlev Oct 22 '09 at 17:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.