2

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.

1 Answer 1

2

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.

1
  • +1, I usually just call the proper phpize, I keep my "other" PHP in its own prefix making it simple. Commented Oct 22, 2009 at 17:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.