I'm trying to get the ZendDebugger.so extension loaded in my custom (homebrew) PHP 5.3.19 install on OS X Mountain Lion, and all I get is:
Failed loading /path/to/php/extensions/ZendDebugger.so: dlopen(/path/to/php/extensions/ZendDebugger.so, 9): Symbol not found: _executor_globals
Referenced from: /path/to/php/extensions/ZendDebugger.so
Expected in: flat namespace
That's what I get from php -m, php -v and the error_log.
It's not an architecture error, as I'm using 64 bit (and tried 32 on a lark) and I can't find anyone with this issue online. Is it just the PHP version? Some compilation flag missing? I can't figure it out.
Edit: ZendDebugger.so downloaded from: http://www.zend.com/en/products/studio/downloads and using the 5.3.x version.
Related
I am working on OSX 10.10.5, using AMPPS 3.2, PHP 5.6. I am trying to install memcached to work with PHP but no luck so far.
What I have done so far:
I have installed downloading the sources
Using homebrew (also update it)
Using pecl
First time I tried I got an error about architecture did not match, then I realized that the PHP version with AMPPS is 32bits and OSX is 64bits so I added this flag: CFLAGS='-arch i386' which solved that issue but now I got another errors:
memcached support => enabled
Version => 2.2.0
dyld: lazy symbol binding failed: Symbol not found: _memcached_lib_version
Referenced from: /Applications/AMPPS/php-5.6/lib/extensions/no-debug-non-zts-20131226/memcached.so
Expected in: flat namespace
dyld: Symbol not found: _memcached_lib_version
Referenced from: /Applications/AMPPS/php-5.6/lib/extensions/no-debug-non-zts-20131226/memcached.so
Expected in: flat namespace
Any ideas?
I'm not very good when it comes to managing libraries on mac os x. I'm running php56-fpm on mac and getting the following errors:
dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib
Referenced from: /usr/local/Cellar/php56/5.6.9/sbin/php-fpm
Reason: Incompatible library version: php-fpm requires version 34.0.0 or later, but libpng16.16.dylib provides version 29.0.0
/usr/local/opt/php56/sbin/php56-fpm: line 53: 38984 Trace/BPT trap: 5 $php_fpm_BIN --daemonize $php_opts
failed
Obviously I have an old library of libpng installed. Normally I'd remove it, find an updated version of the library and install. Unfortunately, I do not know how to do this on mac. I've tried uninstall and reinstalling with brew, but I keep grabbing the outdated libpng. How can I get the new updated version?
I am on OS X 10.9.5.
I installed Php 5.5 via homebrew and also the PHP 5.5 mcrypt extension, php55 and php55-mcrypt in homebrew. In order to enable php5 in apache, I added this to /etc/apache2/httpd.conf
LoadModule php5_module /usr/local/opt/php55/libexec/apache2/libphp5.so
I'm using Laravel and need the Mcrypt extension, so I added this to /usr/local/php/5.5/php.ini
extension=mcrypt.so
In order to force the terminal to use the proper PHP version, 5.5, rather than the 5.4 the computer shipped with, I renamed /usr/bin/php to /usr/bin/php-old, and now the terminal falls back to /usr/local/bin/php, which is the version 5.5 that I'd like to use. Now, I am getting the following error in the terminal whenever I do anything in php from terminal.
[Sat Sep 20 16:32:12 2014] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php55/5.5.17/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so' - dlopen(/usr/local/Cellar/php55/5.5.17/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so, 9): image not found in Unknown on line 0
Any ideas on how this happened or where I went wrong? I'm getting discouraged by this OSX development server setup and considering just giving in and installing a dual-booted Ubuntu Partition. I was hoping to leverage OSX's unix base, but it has been a nightmare to setup the dev server so far.
You seem to have messed with homebrew since your PHP is looking for files in Cellar. Run "which php" and check which PHP is actually running and run "php --ini" to make sure you edited the right PHP configuration.
The easiest way to get a proper running PHP is to install it from Homebrew and add that to your PATH.
I updated my Mac to OS X Mavericks (10.9) and have had to setup PHP again, along with PECL OAuth.
When I verify my install with the command php -v, I am getting an error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/http.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/http.so, 9): Symbol not found: _php_persistent_handle_abandon
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20100525/http.so
Expected in: flat namespace
in /usr/lib/php/extensions/no-debug-non-zts-20100525/http.so in Unknown on line 0
PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)
Has anyone else come across this? Any idea what the issue could be?
I worked it out....had to install pecl_http-1.7.6.
# 1. Uninstall the current version with this command:
pecl uninstall pecl_http
# 2. Install an older version, at least until latest is figured out on Mac OSX 10.8+
pecl install pecl_http-1.7.6
I have fixed this issue by editing php.ini.
My pecl install pecl_http mixed it up and put few extension= lines on top of my php.ini in wrong order. The http.so has to be below propro.so and raphf.so according to dependencies.
I am trying to compile a PHP extension for a 32 bit PHP installation on a 64 bit system. However, I get the following warning when restart apache:
Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/spotify.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/spotify.so: wrong ELF class: ELFCLASS64 in Unknown on line 0
I compile everything using this command:
/opt/lampp/bin/phpize; CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 ./configure --enable-spotify --with-php-config=/opt/lampp/bin/php-config; make && make install
The flags should make sure it compiles to 32bit. I have gcc-multilib and g++-multilib installed
When it is done compiling (this this log: http://pastebin.com/MqgGgyzv) i do the following command:
file /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/spotify.so
and it returns
/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/spotify.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
So it is clearly not compiling it correctly, but I don't see what I'm doing wrong.
You're compiling OK, but the linker is inadvertantly creating a 64-bit .so.
The solution is to include "-m32" in your LDFLAGS, too:
https://askubuntu.com/questions/85978/building-a-32-bit-app-in-64-bit-ubuntu