I'm running the default version of PHP that is packaged with Mojave. PHP 7.1.19. I've installed the PECL mongodb driver 1.5.3. To get the PECL mongodb driver install I had to disable csrutil in recover mode. When csrutil is disabled the driver works. When I re-enable csrutil the driver can no longer be loaded.
I receive this error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 0x0009): code signature in (/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so) not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. in Unknown on line 0
From the looks of it, it seems like it's because of an unsigned package. I have no idea what I can do to resolve this issue. Does anyone have any thoughts?
I ended up just tossing out the default mac os version of PHP and used Homebrews PHP 7.2 version. This solved my issues. By using Homebrews version you don't need to turn off csrutil.
Good reference for help with the install.
https://getgrav.org/blog/macos-mojave-apache-multiple-php-versions
Related
I installed oci8 via PECL on Macos Mojave, for use with PHP and I had it all working, until I enabled SIP again.
Now I get the following error when I try to use oci8:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/oci8.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/oci8.so, 0x0009): code signature in (/usr/lib/php/extensions/no-debug-non-zts-20160303/oci8.so) not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. in Unknown on line 0
I googled my eyes out, but the only 'tips' I could find, are to disable Apache and PHP and install it all again via brew. Well, that is not an option. Also I found others who simply signed dylibs with codesign. But this is an .so and I don't know if it can be codesigned. Furthermore, I do not have an Apple Developer account, so codesign -s MyID will not work, AFAIK.
So my question is : does someone have an elegant solution to my problem?
I'm running Macos 10.14.6, PHP 7.1 with reinstalled versions of PEAR & PECL, Xcode, Xcode headers in /usr/include (for PECL), Oracle in /opt/oracle/instantclient_19_3/.
Thanks in advance!
Put the Instant Client libraries in ~/lib or /usr/local/lib. You'll probably need to do the latter. See 3.5.4 in https://oracle.github.io/node-oracledb/INSTALL.html#instosx
Since mongo php driver got deprecated, I decided to upgrade my driver( On local machine of ubuntu running XAMPP stack).
To install mongodb driver, I ran following command
pecl install mongodb
I added extension=mongodb.so on php.ini(/opt/lampp/etc/php.ini).
But on restart lampp is was responding. So I checked the apache logs for error and I am getting this
[14-Mar-2016 09:19:43 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/mongodb.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/mongodb.so: symbol CRYPTO_get_locking_callback, version OPENSSL_1.0.0 not defined in file libcrypto.so.1.0.0 with link time reference in Unknown on line 0
I am not getting solution for this, the only option I have rigt now is to use old mongo driver. Can someone help
I'm looking to install the Amazon ElastiCache Memcached Cluster Client so I can take advantage of autodiscovery of cache nodes.
Unfortunately, it looks like they only available options are
Java
PHP 5.3 (64-bit Linux)
PHP 5.3 (32-bit Linux)
PHP 5.4 (64-bit Linux)
PHP 5.4 (32-bit Linux)
The version of PHP that is installed on my EC2 instance is PHP 5.5.3-1ubuntu2.1 (the default for Ubuntu).
Does anyone have any insight into whether or not the 5.4 package will work with PHP 5.5 or not? I did find one person looking for this on their forums but there doesn't seem to be a resolution there yet.
Only one way to find out, right? Well, the answer is no.
I followed the installation instructions and got this when I started up PHP:
PHP Warning: PHP Startup: memcached: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
I was installing Mongodb on my Ubuntu 13.04 . It was installed and I was configured in my php.ini file. My OS is 32-bit version. But when I start my LAMP it show the following error.
Warning: PHP Startup: Unable to load dynamic library
'/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/mongo.so' -
/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/mongo.so:
undefined symbol: zend_new_interned_string in Unknown on line 0
How do i solve this?
It's possible that you compiled the extension against a different version of PHP than the binary you're attempting to load it. Assuming you followed the PECL install instructions, I would suggest you confirm that you only have a single copy of PHP installed on your system, and your configurations are consistent for the web and CLI environments.
Below are some previous threads and bug reports that hint to your error ("undefined symbol: zend_new_interned_string") being a PHP/extension mismatch:
http://www.linuxquestions.org/questions/programming-9/php-gearman-undefined-symbol-zend_new_interned_string-in-unknown-on-line-0-a-941003/
https://github.com/zendtech/ZendOptimizerPlus/issues/72
https://bugs.php.net/bug.php?id=61575
The error is definitely not specific to the MongoDB driver.
I recently installed MAMP version 1.6 on my MAC OS 10.5.7. Now I am running a script to connect to a site using ssl.
After some research, I added the following line to my php.ini(under the extensions part)
extension=openssl.so
However When I reestart my Apache server I get this Warning:
[15-Jul-2009 16:30:39] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/openssl.so' - (null) in Unknown on line 0
I checked and in fact there is no openssl.so in that folder, am I missing something?. Do I need to recompile php for it to show?. How can i accomplish that?.
Any help will be greatly aprecciated.
Thank you.
-Oscar
You can try using the dl function to dynamically load the openSSL extension:
dl('openssl');
It is highly likely that MAMP does not have openSSL support enabled, in which case you might want to consider using macports to install your LAMP stack. You can find out if MAMP has openSSL support by adding this to a PHP file:
phpinfo();
exit();
And look for a configuration line that starts --with-openssl.
Note: dl() is deprecated as of PHP 5.3.0 and will be removed in 6.0.0.
See: http://www.php.net/manual/en/function.dl.php