I recently installed PHP APC on our server via our WHM panel (Web Host Manager). After a successful install, I thought everything was fine. However the next day I noticed our error_log file was getting quite large, after inspection I noticed the following line many times:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
Looking into the directory I do not see apc.so, but I also do not see it anywhere else on our server (maybe it is and I just haven't found it). Is there anyway I can generate this file to place into the proper folder? Will this work, or do I need to reinstall something or change a path in some file?
.so files are the equivalents of windows .dll files. you can't just whip one up. You'd have to extract it from the installation package (or recompile it if you started from source code). You can try doing find / -name apc.so to see where it's hiding on the system.
Related
I am trying to upload a 35Mb XML file.
But i got this error in the error_log from php
[22-Feb-2018 10:03:12 Europe/Belgrade] PHP Warning: PHP Startup:
Unable to load dynamic library 'C:\Program Files
(x86)\PHP\v5.6\ext\php_pdo_firebird.dll' - The specified module could
not be found.
How can i debug this??
The php_pdo_firebird.dll is only an interface between PHP and the firebird engine. So you need firebird installed and also the php-pdo-firebird.dll needs to be able to find fbclient.dll
Try copying fbclient.dll into \wamp\bin\php\php7.1.10
If you also need access from Apache you may need to copy fbclient.dll into \wamp\bin\apache\apache{version}\bin as well and also amend the php.ini file that controls PHP under apache. Do that by using the wampmanager menus to edit the correct php.ini file like this
left click wampmanager icon -> PHP -> php.ini
For me, it got fixed after copying fbclient.dll file into the php installation folder. You have to download the Zip kit for manual/custom installs from the firebird website. You can find the file there. 64 bit version worked.
Download the 32 bits zip package from the firebird site. in the bin dir there is a fbclient.dll. Copy this dll to the php dir. (Not to the extension dir) and everything works.
Answer Reference
Author Name: ronaldk
copying fbclient to php bin did not work for me (and I spent a whole day trying to copy different versions of it).. instead copy it to apache/bin folder and it works (for me it was 64x version that worked)
The best thing to do is simply comment it out if you don't need it
; PHP_PDO_FIREBIRD
So, I have started to explore Azure, and trying to setup a PHP, MySQL on my Free Azure tier.
I have a WebApp setup on Azure, and phpinfo() is coming up nicely.
I am getting trouble setting up ImageMagick though.
I am on on the default PHP 5.4.42
I downloaded the extension dlls for ImageMagick from https://pecl.php.net/package/imagick/3.1.2/windows
Specifically, i got the http://windows.php.net/downloads/pecl/releases/imagick/3.1.2/php_imagick-3.1.2-5.4-nts-vc9-x86.zip file, which is nts version for PHP 5.4
Next, i followed the steps at https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/
I created a folder under my wwwroot folder called 'bin'. So now mu site path looks like /site/wwwroot/bin.
In this bin folder, i copied the php_imagick.dll file AND the other 8 Core_RL*.* files.
Next, In my Azure app settings, i added PHP_EXTENSIONS key, with value bin\php_imagick.dll
I then restarted my web app, but i am only getting the below error in my azure logs:
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\home\site\wwwroot\bin\php_imagick.dll' - The specified module could not be found.
in Unknown on line 0
As alternatives, now I have changed my PHP version to 5.6(latest on Azure), and have put the corresponding version of imagick files from pecl site. This did not fix anything.
I have also tried the ini method, by creating ext and ini folders under the site folder, and creating the corresponding 'PHP_INI_SCAN_DIR' setting, but on restart of app, nothing shows up in the phpinfo(). Very sad :(
Please suggest what can I attempt to fix this issue.
Not all the versions of Imagemagick are compatible.
Here is a repo https://github.com/snobu/php-imagick-webapps that has the right resources referenced.
Download these resources (NTS Versions)
http://windows.php.net/downloads/pecl/releases/imagick/3.3.0rc2/php_imagick-3.3.0rc2-5.6-nts-vc11-x86.zip
http://www.imagemagick.org/download/binaries/ImageMagick-6.9.2-8-Q16-x86-dll.exe
Follow the steps in this Article, It just works http://blogs.msdn.com/b/azureossds/archive/2015/12/01/php-imagemagick-on-azure-web-apps.aspx
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 installed WAMP server and whenever I try to compile a php file it doesn't display the php part. Only the html part is being displayed. The extension of the extension of the file is .php. I have tried setting the PATH for the environment variable. Nothing worked. When I checked the error log, this is what I could find.
[05-Aug-2014 12:04:30 UTC] PHP Warning: PHP Startup: Unable to load dynamic library
'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.
in Unknown on line 0
[05-Aug-2014 12:04:31 UTC] PHP Warning: PHP Startup: Unable to load dynamic library
'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be
found.
in Unknown on line 0
Please help.
All you need to do is :-
Using the wampmanager menus do
wampmanager -> Apache -> Version
and click on the version number probably it will be 2.4.9
This will rebuild all the SYMLINKS in the apache/bin folder and Apache/PHP will be able to find the dll's required for these 2 extensions.
Also remove anything you added to the PATH env var as this will just cause problems if you ever install another version of Apache/Php, remember WAMPServer can install multi versions of both and allow you to switch between them at the click of a menu option.
WAMPServer does not need anything added to the PATH to work correctly.
ADDITIONAL INFO:
Something you said
If I click on php www directory and run the index php file (already existing).
made me think you are using Explorer, and double clicking on the php scripts from there to launch a web page. Is this what you are doing?
If you are, DONT, you have to use your browser like you were accessing any other web site.
Always use the browser address bar to launch PHP code, otherwise it never actually goes through Apache, and therefore the PHP code never actually get passed to the PHP interpreter for compilation and execution.
Please uninstall wamp which you had been installed..
Try to install Visual C++ ie, the link is given here http://www.microsoft.com/en-in/download/confirmation.aspx?id=30679 use this link.
after downloading and installing Visual C++ you can install the Wamp server again..
So that it will work..correctly...
Copy all dll files from C:\wamp\bin\php\php5.5.12
to C:\wamp\bin\apache\apache2.4.9\bin
I had this same and I enabled the rewrite_module in appache and it worked.
append the following to the path of system variables
C:\wamp\bin\php\php5.5.12\ext;C:\wamp\bin\php\php5.5.12;.;
I'm having problems installing the GD library. I'm using an IIS server with PHP 5.2.14. I uncommented extension=php_gd2.dll in php.ini.
This is the error:
gd: Unable to initialize module
Module compiled with module API =20060613
PHP compiled with modlule API = 20090626
These options need to match
in Unknown on Line 0
I downloaded various PHP versions to try and get the correct DLL, including thread-safe 5.2.14. I would then restart my application pool and try to load a file that uses the GD library. Are there other files necessary for gd2 to work? Are there any quick ways to solve this without reinstalling PHP entirely?
first, iis7 was not configured properly for php - I searched for a guide that walked me through. Second the directory was incorrect, whenever I reset the iis server it originally would say one directory when ISAPI api was being used- but after 2 mins it would say extension_dir was in another directory when cgi/fastcgi is being used. So i created that directory that it wanted (which was different than any of my php.ini's). The one it was pulling from needed to be put in the C:/windows directory, but even though I had it set to go to "./ext" it wanted to go to Program files/PHP-- extremely weird. Third, I had to add IUSR to the permissions of any folder being used.