I have written a new PHP application with the CodeIgniter Framework. Oftenly the following error is thrown:
Unable to load dynamic library '/usr/lib/php/20151012/mongo.so' - /usr/lib/php/20151012/mongo.so: cannot open shared object file: No such file or directory
It is a completely fresh installation and I do not use this mongo.so library anywhere. Also on the configuration of Apache or PHP I did not change anything special.
Probably the problem can be solved by installing php-mongodb on the system. But maybe someone has a better idea to solve the problem.
I got the problem solved myself.
In /etc/php/7.0/mods_available was a file user.ini, which included the mongo extension. Don't know why, but it works now.
If you are not using MongoDB, you can safely do this
nano /etc/php/7.0/mods-available/mongodb.ini
Then, comment the line as follow
#extension=mongodb.so
Save with ctrl+o then exit with ctrl+x
That's it!
Related
My goal is to connect my laravel project to firestore firebase. I will be needing the grpc in order to continue it. However my problem is the .dll cant be found. I already uploaded the .dll file in ext folder.
I also included it in my php.ini file.
still getting the same error
I dont know if its the version og php and grpc is conflicting.
After applying the comments' suggestions:
You need to mention extensions without php_ and .dll prefix and suffix like below:
extension=fileinfo
extension=grpc
Restart Apache server if required. You can also check for php version on the command line using php --version. If it shows the version without any warnings/errors, it means the extensions are loaded correctly.
Also, as the error message in your screenshot suggests, you need to install the right thread safe package of GRPC relevant to your operating system architecture and PHP version from https://pecl.php.net/package/grpc
Since nice_dev pointed out it was a compatibilit issue. I downloaded the non thread x64 and used it. It worked. Been using the x84, maybe the reason why it's not working.
Environment:
I am trying to develop a PHP-CPP extension and have downloaded the the empty extension file from https://www.php-cpp.com/documentation/your-first-extension to start. I have also modified the makefile's INI_DIR variable to point to the correct path.
Problem:
When I try to make the empty extension it fails to create the shared library file and says /usr/bin/ld: cannot find -lphpcpp.
I'm pretty sure I have php-cpp downloaded correctly, so I have no idea what's wrong. (I have also searched the internet and have found no solutions)
PHP version: 7.4
System: Elementary-OS (Ubuntu)
Turns out that when I first ran make to compile php-cpp it didn't make the libphpcpp.so file. So, I reinstalled it from Github and built it again and it worked. I don't know why I didn't try that the first time.
I am trying to install the Saxon-C XSLT-parser with it's PHP module on my server as explained here: http://www.saxonica.com/saxon-c/index.xml. I successfully installed it and compiled the PHP module. Maybe someone of you might have an idea, whats going wrong.
When starting apache I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/saxon.so' -
libsaxon.so: cannot open shared object file: No such file or directory in Unknown on line 0
I know that it is searching the LD library.
more /etc/ld.so.conf.d/jetvm.conf
/opt/saxon/rt/lib/amd64
/opt/saxon/rt/lib/amd64/jetvm
tail -n 1 /etc/apache2/envvars
export LD_LIBRARY_PATH=/opt/saxon/rt/lib/amd64:/opt/saxon/rt/lib/amd64/jetvm:$LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
/opt/saxon/rt/lib/amd64:/opt/saxon/rt/lib/amd64/jetvm/
Everything seems to be right. I also double checked that all Paths are existing.
I have already checked the following threads (and much more), which couldn't help me:
https://askubuntu.com/questions/488874/php-startup-unable-to-load-dynamic-library
Error while loading shared libraries: 'libpcre.so.0: cannot open shared object file: No such file or directory'
Error while loading shared libraries: 'libpcre.so.0: cannot open shared object file: No such file or directory'
Error In PHP5 ..Unable to load dynamic library
After trying a couple of hours without any progress I really hope, someone can help me here. Maybe the solution is quite dump. I have not much experience with languages which has to be compiled, therefore I can only understand vaguely what is going on here.
Have many thanks in advance and best wishes.
The troubleshooting guide provides some hints to this problem:
Run the following command should resolve the error: "$ sudo ldconfig". Alternatively create a symlink to java virtual machine. This is not required to install/compile, but it is required for PHP code. The following should resolve the issue on a 64-bit machine:
ln -s $JAVA_HOME/jre/lib/amd64/server/libjvm.so /lib64/libjvm.so
Alternatively, it is possible to link the libjvm.so from the rt/lib/jetjvm directory.
The libsaxon.so file must be installed within the /usr/lib directory.
We are making steps in the next release to use an environment variable.
With the friendly aid of ond1, who is one of the developers of the Saxon, I finally found a solution. Apparently there are some Paths hardcoded so, you have to ignore the installer's question where to put the files and install it to /usr/lib.
I Uninstalled previous installation, installed to /usr/lib and coompiled from there - and now it works.
I'm facing problem to load the php_oauth.dll extension for my xampp. I downloaded the php_oauth.dll and added extension=php_oauth.dll in php.ini , but when i restart my apache, it cannot start the server anymore.
I'm using window 7 ,64bits.
Initially, I download the file from
http://downloads.php.net/pierre/
but i found that it was 32bits file , so I'm searching fo 64bit and found out
http://www.mediafire.com/php-win64-extensions
unfortunately,I still cannot load the oauth. Any solution to solve it? I look through many article, but it seems like dont have it, anyone can provide ,so that, others that using win 64bit can follow
Thank you!
This looks to be like a path problem. Make sure the extension is store in the correct extension directory.
The settings of this can be found inside php.ini as something like
extension_dir = C:\php\extensions
By default this is ext folder inside PHP installation.
Or, follow the instruction from PHP manual while installing extensions, if you are not sure what you are doing.
I'm in the process of using PHPExcel. One of the requirements is that I need to enable php_zip.
(...) if you need PHPExcel to handle .xlsx or .ods files you will need
the zip extension...
I'm using PHP v5.3.5. and in my php.ini file, I have the following lines:
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
If I remove the ; in the last line, and restart Wampserver, I get the following error message:
PHP Startup: Unable to load dynamic library
'I:/wamp/.../ext/php_zip.dll' - The specified module could not be
found.
Reading the web, many says that as of PHP 5.3.0, php_zip is built-in.
If it is built then why is this line still in the configuration?
Do I get the error message because since it's built in, the file has been removed?
PS. Sorry if this is in the wrong forum, but not sure where else to put it.
In fact, Zip is included by default. It is a bug that the line is still included.
marc answer is right. I wanted to add a comment that using
extension_loaded('zip');
returns false as it is no longer an extension, you could use
class_exists('ZipArchive');
to check for it now.
I've had a similar problem with a different library. WAMP doesn't include many libraries by default for some reason.
What I did was download the full PHP installation as a zip from php.net and the required dll was found in the extensions folder just as it is in WAMP. I just copied it from the zip to the WAMP extension folder and it worked fine.