I'm trying to use the Firebird extension in PHP. I've got the extension files (php_pdo_firebird.dll, php_interbase.dll) in my ext folder. I'm adding them in my php.ini file like so
...
[PHP_PDO_FIREBIRD]
extension=php_pdo_firebird.dll
[PHP_INTERBASE]
extension=php_interbase.dll
...
No errors are being thrown saying the extensions could not be loaded and yet whenever I print my phpinfo I don't see either of them listed. What am I missing here?
For what it's worth, I'm running PHP version 5.3.14 TS using Apache 2.2 on Windows 7.
Edit: It seems some errors are being logged, it's just that my error_log setting was being overwritten (for those seeing this, double check C:\Windows\Temp\php-errors.log). Now it's telling me the specified modules could not be found whenever the file clearly exists.
PHP Warning: PHP Startup: Unable to load dynamic library
'C:\Program Files (x86)\PHP\ext\php_pdo_firebird.dll' -
The specified module could not be found.
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'C:\Program Files (x86)\PHP\ext\php_interbase.dll' -
The specified module could not be found.
in Unknown on line 0
Figured it out! Okay, first to get the basics out of the way:
Make sure the version of the DLLs matches your PHP version.
For those who use the Windows installer, for some reason it doesn't provide an option to include the Interbase and Firebird modules so you'll have to download the matching .zip file and copy them from the ext folder in there.
Double check for any typos, such as unescaped backslashes, in your extension_dir setting. This only applies if the value isn't "wrapped in quotation marks."
Now for the coup de grace. That error message is extremely misleading. At this point it should be finding your DLLs but it's missing one integral piece: fbclient.dll which can be found in the bin folder of your Firebird installation. Everywhere I read before said to place fbclient.dll in the ext folder but it only works if you put it in the root of your PHP folder.
Hope this helps future wayward souls :)
Related
I had previously multiple installations of PHP on my computer. I deleted all of them and reinstalled php from the official source which is now found at C:\\php.
The symfony serve command (ran from PhpStorm console) looks for missing modules in the wrong directory. (I don't even have xampp anymore, but even if I copy the files to the location it tries, it doesn't work) Xampp folder is not in my Path env variable either.
Warning: PHP Startup: Unable to load dynamic library 'php_ftp.dll' (tried: C:\xampp\php\ext\php_ftp.dll (The specified procedure could not be found.), C:\xampp\php\ext\php_php_ftp.dll.
dll (The specified module could not be found.)) in Unknown on line 0
Any ideas on this?
run symfony local:php:refresh to fetch available PHP version of your systems.
local:php:list for list locally available PHP versions
First problem turns out to be that PhpStorm does not see my PHP installations on C: for some kind of weird permission error. (PATH was correct).
The compiled Windows version of PHP downloaded from php.net defaults the extension folder to C:/php, which had to be overriden using php.ini's extension_dir="D:/php/ext" directive.
Greeting developers, I want to learn laravel framework for my project. For that i follow some instruction in google to install it . i should have composer to install it. i try to download composer but there have some errors.the error is
The PHP exe file you specified did not run correctly:
C:\xampp\php\php.exe
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
Program Output:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_mysql.dll' (tried: C:\xampp\php\ext\php_mysql.dll (The specified module could not be found.
), C:\xampp\php\ext\php_php_mysql.dll.dll (The specified module could not be found.
)) in Unknown on line 0
i try to resolve it. i check the php.ini file all looking good only. Is that because of i am using xampp server 7.2.0. I am really need a solution.
Looks like you made a mistake on your php.ini somewhere, this route:
C:\xampp\php\ext\php_php_mysql.dll.dll
... doesnt look at all correct. "php_php" ".dll.dll"
Greeting developers, I want to learn laravel framework for my project. For that i follow some instruction in google to install it . i should have composer to install it. i try to download composer but there have some errors.the error is:
The PHP exe file you specified did not run correctly:
C:\xampp\php\php.exe
The php.ini used by your command-line PHP is:
C:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
Program Output:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_mysql.dll' (tried: C:\xampp\php\ext\php_mysql.dll (The specified module could not be found.
), C:\xampp\php\ext\php_php_mysql.dll.dll (The specified module could not be found.
)) in Unknown on line 0
i try to resolve it. i check the php.ini file all looking good only. Is that because of i am using xampp server 7.2.0. I am really need a solution.
Turning the comment by ArtisticPhoenix into an answer.:
I would say the opposite, you need to remove it (comment it out with ;php_mysql.dll) from the php.ini. Because its been deprecated and "removed" in PHP7. Also just looking at what you posted C:\xampp\php\ext\php_php_mysql.dll.dll php_php_mysql.dll.dll ? seems weird. Double you fun, 2 php_ and dll extensions... lol
ArtisticPhoenix Sep 29 '18 at 7:54
I tested it successful.
I am running XAMPP v.1.8.3, on Windows 7, which shipped with PHP version 5.5.6. I manually downloaded PHP version 5.6.1 and put it in xampp/php. The old folder php I renamed to php_5.5.6. I enabled extension=php_pdo_mysql.dll in php.ini ( which was initially named php.ini-development, had to rename to php.ini ) and started getting this error when starting apache
PHP Startup: Unable to load dynamic library 'C:\xampp\php\php_pdo_mysql.dll' -
The specified module could not be found.
Then I located the extension dll and it was in C:\xampp\php\ext\php_pdo_mysql.dll, so I moved it to C:\xampp\php\php_pdo_mysql.dll but the error remains. Why isn't it finding the driver?
What is not making sense for me is that on my older version (5.5.6) the extension was also in the ext folder and not in the main php folder.
The solution was rather simple, as suggested here my extension_dir was not correct. Which doesn't explain why moving the file to the actual extension_dir would still produce this error.
Heroku does not support PHP officially, so I needed to add PHP extensions manually. I have created a php.ini file on my main directory:
extension_dir = "/app/www/ext/"
extension=mongo.so
extension=oauth.so
extension=solr.so
All the extension files are on the ext folder which is on the main directory also. Mongo and OAuth extensions are working perfectly but when Solr added, apache is giving me the error below:
PHP Warning: PHP Startup: Unable to load dynamic library '/app/www/ext/solr.so' - /lib/libc.so.6: version `GLIBC_2.14' not found (required by /app/www/ext/solr.so) in Unknown on line 0
...and Solr extension is not working, obviously. I'm using Websolr add-on on Heroku and unfortunately neither Heroku nor Websolr is willing to help me about the issue. Heroku says "PHP is not officially supported," and Websolr says "ask Heroku."
So, any help will be appreciated.
It seems that there are no direct solutions but I have found a workaround. Instead of using solr.so extension, one can use open-source solr-php-client from here. It does note require a compiler, so no apache errors on Heroku.