I built a number of custom PHP extensions under windows 8-10 years ago. I made the move to Ubuntu Linux for all of my web stuff some years ago and find I need to create another custom extension. I'll be doing the development under Ubuntu this time.
I've created a very simple extension (a no-op actually) just to make sure I have the build process working. It's not.
Here is what I have done:
- Cloned PHP from Git
- Checked out PHP-5.5
- Configured with --disable-all --enable-debug --enable-maintainer-zts \
--prefix= - Build PHP
Success php -i shows:
Zend Extension Build => API220121212,TS,debug
PHP Extension Build => API20121212,TS,debug - Created ext/a1 for my new, very simple extension
- Created the basic extension (from Sara Goleman's book)
- Ran phpize in ext/a1
- Ran ./configure --enable-a1
- Ran make
Build was successful.
Copied a1.so to the extensions directory
phpdir/bin/php -dextension=a1.so -v
Fails. Results in:
Module compiled with build ID=API20121212,NTS
PHP compiled with build ID=API20121212,TS,debug
So. Color me confused. According to what I've read, the phpize command is supposed to match the extension build settings to the php build settings.
I've apparently missed something basic here somewhere.
Help will be most appreciated.