I am a very junior dev working in a small software company.
Since I started 5 daysago I have database connection problems. Everything started from the setting up of my new working environment.
I have now a PC working on windows 10 and I had to install Apache 2.4 and php7 'manually', without using Wampp, Ampp etc. I did it, many times, comparing each line of my configuration and framework lines to those of my colleagues but I am still not able log in my users, to dysplay use the database, etc. In the browser (any) the error message is "Cannot connect to database".
My company uses Mysql workbench (my boss does not like it) and SQLyog (prefered to manage the databases). So I tried to solve the problem installinf phpMyAdmin. I cheked any parameter, the php.ini is good, every file is well located.
When I try to reach index/php/phpmyadmin (we use our own mvc framework) I geta message error sayong thar msqli extension is missing, with this link : http://localhost/phpmyadmin/doc/html/faq.html#faqmysql. Please note that I have this in my php.ini :
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
;extension=php_ftp.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
extension=php_mysql.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
and there is no error in extension_dir = ******/****/
Can you help me please?
Cordially
Related
I cannot find a way to solve this. I have done pretty much everything I can think of, I am kind of new to this stuff, so sometimes I am not sure I am doing it right. I have xampp and am trying to use phpmyadmin to work with databases. I have added the extensions:
extension=php_bz2.dll
extension=php_curl.dll
extension=php_mbstring.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mssql.dll
;extension=mysqli.so
extension=php_mbstring.dll
extension=php_exif.dll Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pdo_sqlite_external.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
What am I doing wrong?
Strange, because php comes with the mysqli extension as part of it's core extensions.
1 - Make sure the file php_mysqli.dll exists in:
drive:\xamp_install_dir\bin\php\php<phpversion>\ext\
if so, copy the following line to your php.ini
extension=php_mysqli.dll
2 - Restart apache, and create a file named test.php with the following content:
<?php
echo phpinfo();
?>
3 - Open it on your browser a search for :
4 - Found it?
Yes: Good, you're ready to go.
No: You may need to re-install wamp
NOTE:
Don't worry about php_mysql.dll because it's deprecated.
recently i install the Wamp last version in my local computer. Before that i used php in Windows 7 - IIS 7.5. I used PDO mysql and it workd just fine.
try {
$db = new PDO("mysql:host=localhost;dbname=aaa;charset=utf8", "root", "root");
} catch ( PDOException $e ){
print $e->getMessage();
}
But when i pass the iss to the wamp, Pdo_mysql not worked. When i visit my db page, it giving error 'could not find driver'. I searched in google but i cant figure this out.
Extensions
extension=php_bz2.dll
extension=php_curl.dll
extension=php_com_dotnet.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
extension=php_shmop.dll
phpinfo()
Please check if you are editing on php.ini in the apache servers bin folder (e.g: \apache2.4.18\bin) If you are editing the php.ini in your php folder those changes will not work. Please check your php.ini in your apache\bin to see if you have extension=php_mysql.dll and don't forget to restart the services.
If you get this error while you can still see it enabled in php.ini then WAMP is responsible for this issue.
I suggest you to use XAMPP instead.
Hi see this Question all over the place. But the answers did not solve my issue. I am still getting the same problem with:
Fatal error: Call to undefined function mb_detect_encoding() in C:\inetpub\htdocs\phpMyAdmin\libraries\php-gettext\gettext.inc on line 177
I have tried everything and none of it is working for me. I have the php_mbstring.dll enabled:
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll
;Use with Oracle 11gR2 Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
I got my Apache HTTP Server 2.2 set up with the php5apache2_2.dll. I even tried making a copy of php.ini to config.ini become some one said that worked for them.
I got past the error by placing a copy of php.ini in C:/windows. Is there any way to change where it looks for that file and others???
Also now have a full blank page when I try to open phpMyAdmin. and one other page that seem to need databases. I dont even know if I have a database
HELP
I'm running Apache 2.4.7 with PHP 5.5.9 on Windows 8. I installed PHPUnit and this warning image "warning" started to pop up.
Yes I enabled extension loading in php.ini as well as "extension_dir" to correct folder and there is file named "php_pdo_oci.dll" in that folder.
I tried to use different apache and php releases, but it didn't help.
Any suggestions how to fix this?
The ..._oci.dll is part of the Oracle C Interface. Unless you need to use Oracle, I suggest you go to the relevant line inside the php.ini file and uncomment the loading of this extension. However, if you need to use this extension, you’ll need to install the free Oracle Client libraries and add them to the path.
Oracle has a page where you can download the libraries needed for your setup work as expected and you can see here:
Oracle Instant Client Downloads
Note: After you choose your operational system (Windows as in your answer) in download section you will see the installation guide in foot notes of the next page. For others OSs this process will work the same way.
I currently have PHP version 7.1.9 and encountered this problem and resolved the issue. Just ensure these lines in your php.ini file are uncommented like so:
extension=php_fileinfo.dll
extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_shmop.dll
Please restart your server application (IIS, Apache e.t.c.) after any changes to your php.ini file.
Please add below line in php.ini file
extension=pdo.so
extension=php_pdo.dll
extension=php_pdo_oci.dll
extension=php_pdo_oci8.dll
and restart apache server and check.
I am trying to get XHProf working on my WampServer.
I have downloaded the dll from: http://dev.freshsite.pl/php-extensions/xhprof/file/details/xhprof-0103-for-php-53-vc9.html and renamed to xhprof.dll in C:\wamp\bin\php\php5.3.9\ext (Which is the dir listed for extensions in phpinfo())
Php.ini path from phpinfo():
C:\wamp\bin\apache\Apache2.2.21\bin\php.ini
Extensions listed in that file:
extension=php_curl.dll
extension=xhprof.dll
;extension=php_dba.dll
extension=php_mbstring.dll
;extension=php_exif.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_ming.dll
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_oci8_11g.dll
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_phar.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sqlite3.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
But when I restart WampServer and the services associated with it, no XHProf information appears in phpinfo()
I am looking for a way to fix this, or a further way to investigate why this extension isnt loading
Thanks
You are using WampServer 64-bit, but the xhprof.dll is made for the 32-bit architecture and isn't compatible. Ony my own Windows 7 machine I got this error in the apache_error.log:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.8/ext/php_xhprof.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.8/ext/php_xhprof.dll' - %1 is not a valid Win32 application.
in <b>Unknown</b> on line <b>0</b><br />
It doesn't seem that there is a 64-bit version at this time, so you are limited to options of what you can do. The first choice is to use the 32-bit version of WampServer (on a development machine I can't see too many drawbacks with this). The second is to sweet-talk the makers at fresh-site to compile/support 64-bit. Good luck!
Thanks Leonard Challis. I had a similar error for a few hours. I needed to use php_ibm_db2.dll. After adding it to the extension folder and the php.ini file. I started getting the error message.
Unable to load dynamic library 'c:/wamp/bin/php/php5.3.13/ext/php_ibm_db2.dll' - %1 is not a valid Win32 application.
Some solutions I came across advise to put it in the system32 folder. That did not help. I went to several forums and blogs. All advises failed. Until I saw you recommendation. So simple, can't figure out why I did not think of that. Although the error message is a bit vague.
BTW, for those who are working with a PHP to DB2 environment the dll files may be obtained here: http://sourceforge.net/projects/db2mc/files/.
Ensure that you also install Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) - vcredist_x86.exe.
http://www.microsoft.com/en-us/download/details.aspx?id=8328
I hope this helps anyone that may have a similar problem in the future. Thanks to everyone who contributed to this forum. It was a great help.