Could not load xDebug .dll in xampp - xampp

Trying for a while but could not fixed the php_xdebug.dll load issue.
Php Version: 7.0.9
xDebug Version: PHP 7.0 VC14 (64 bit)
file: php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll
I have copied the .dll file in ext directory and edited the php.ini directory accordingly
php.ini configuration:
zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="127.0.01"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_log="C:\xampp\logs"
After restarting the apache, If I check the php --ini then getting load error
C:\xampp\php>php --ini
Failed loading C:\xampp\php\ext\php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: C:\xampp\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)

It means that the .dll file is not in the "ext" folder. Check the "zend_ext" folder.

Related

Laravel migration cannot find driver when using sqlsrv database in windows

I am using sqlsrv database connection in my project as I need to connect to Microsoft SQL Database.
I have successfully installed the sqlsrv driver because I can connect to the Database to retrieve data.
But when I try to do the Laravel Migration, it shows an error:
Illuminate\Database\QueryException : could not find driver (SQL: select * from sysobjects where type = 'U' and name = migrations)
Below is my .env
DB_CONNECTION=sqlsrv
DB_HOST=**********.database.windows.net
DB_PORT=1433
DB_DATABASE=****************_4cd1_9d18_2a7d9ddbcd13
DB_USERNAME=***************_4cd1_9d18_2a7d9ddbcd13_ExternalWriter
DB_PASSWORD=***************
php.ini
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_pdo_sqlsrv_7_nts_x64.dll
extension=php_pdo_sqlsrv_7_nts_x86.dll
extension=php_pdo_sqlsrv_7_ts_x64.dll
extension=php_pdo_sqlsrv_7_ts_x86.dll
extension=php_pdo_sqlsrv_71_nts_x64.dll
extension=php_pdo_sqlsrv_71_nts_x86.dll
extension=php_pdo_sqlsrv_71_ts_x64.dll
extension=php_pdo_sqlsrv_71_ts_x86.dll
extension=php_sqlsrv_7_nts_x64.dll
extension=php_sqlsrv_7_nts_x86.dll
extension=php_sqlsrv_7_ts_x64.dll
extension=php_sqlsrv_7_ts_x86.dll
extension=php_sqlsrv_71_nts_x64.dll
extension=php_sqlsrv_71_nts_x86.dll
extension=php_sqlsrv_71_ts_x64.dll
extension=php_sqlsrv_71_ts_x86.dll
How to use SQL Server DLL files with PHP 7.2 version on xampp
https://github.com/Microsoft/msphpsql/releases
To download Windows DLLs for PHP 7.1 or above from the PECL repository, please go to the SQLSRV or PDO_SQLSRV PECL page.
https://pecl.php.net/package/sqlsrv/5.6.1/windows
https://pecl.php.net/package/pdo_sqlsrv/5.6.1/windows
NOTE: Do not forget to remove 'php_' prefix when you add extension dll filename in php.ini file. eg.
extension=pdo_sqlsrv
extension=sqlsrv
Do not change actual filename which you put in /xampp/php/ext/ directory.
"7.2 Thread Safe (TS) x86" worked for me for 'sqlsrv' and 'pdo_sqlsrv' extensions.
Restart xampp or apache then you can see enabled 'pdo_sqlsrv' extension when you print phpinfo() in a test php file
It was very hard to find this solution. I hope, this will also help you. All the best :)
You may need to upgrade your PHP version to PHP 7.1.
Now make sure that the files config/database.php and .env are configured properly.
See this one: https://laracasts.com/discuss/channels/general-discussion/connect-laravel-to-microsoft-sql
After fighting with it for a while found a solution :
you need to downloaded it from here then extract the files in your php folder
For PHP 7.4 on Windows 10 (x64), I've solved same error s below:
Downloaded the driver from
https://www.microsoft.com/en-us/download/details.aspx?id=20098
Extracted the archive and copied the file
php_pdo_sqlsrv_74_ts_x64.dll to the ext folder (C:\Program Files\php74\ext in my setup)
Added extension=php_pdo_sqlsrv_74_ts_x64.dll into php.ini file
In my .env file I've DB_CONNECTION=sqlsrv so I first thought php_sqlsrv_74_ts_x64.dll should be used but it didn't work.

Composer Update Failed cannot open shared object file:

I just run
composer update
but I got this
Failed loading ./opcache.so: ./opcache.so: cannot open shared object file: No such file or directory
PHP Warning: PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library './calendar.so' - ./calendar.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library './ctype.so' - ./ctype.so: cannot open shared object file: No such file or directory in Unknown on line 0
... so on
I run php -i and got this
Loaded Configuration File => /etc/php/7.0/cli/php.ini
Scan this dir for additional .ini files => /etc/php/7.0/cli/conf.d
Additional .ini files parsed => /etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
... so on
How do I fix it?
Thanks in Advance.
Your php can not find the dlls. To solve it:
Run php -i and find your php.ini location under Loaded Configuration File key.
Search for the dll files php unable to load and find their full path
Update the extension key in your php.ini to the full dll path
for example:
extension=<path>/php_pdo_firebird.dll
extension=<path>/php_pdo_mysql.dll'
extension=<path>/php_pdo_pgsql.dll:
composer use php.ini in /etc/php/7.0/cli/php.ini looks like you uncoment extension_dir
just comment, and reload apache and you done it.

info.php shows log_errors is Off but it is set to be On in the php.ini of Loaded Configuration File

PHP info page shows that log_errors is set Off even tho I set it On
in info.php page shows:
Loaded Configuration File -> /etc/php/7.0/apache2/php.ini
Scan this dir for additional .ini files -> /etc/php/7.0/apache2/conf.d
top portion of altered php.ini file:
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
display_errors = On
log_errors = On
error_log = /var/log/php-errors.log
I have tracked the rest of php.ini file and found other log_error reference which I have also set On
log_errors = On
I am not sure if I should use ini_set('display_errors', 1); format in .ini files, I have found answers about this and used everything to test if anything worked but still.
So what's wrong with config?
Note: yes, I have restarted apache2.
Using up to date Ubuntu Server x64 16.04 running PHP Version 7.0.13-0ubuntu0.16.04.1
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
won't work in ini file.
to enable error reporting write following line in your ini file
error_reporting = E_ALL
for more info refer here

On windows system,I get this error-The mbstring extension is missing. Please check your PHP configurationn

I get this error when I go to localhost/phpmyadmin (I am using WAMP).
I have windows...so the sudo -apt commands solution won't work.Also the line-
extension=php_mbstring.dll is commented out.Any other reason for this?
Okay..so backstage I had this warning on my localhost at the bottom:
* ERROR * The PHP configuration loaded file is: c:/wamp/bin/apache /apache2.4.17/php.ini - should be: C:/wamp/bin/apache/apache2.4.17 /bin/php.ini or c:/wamp/bin/php/php5.6.15/phpforapache.ini
I did this-
1.open cmd.Change the dir to bin of your apache dir.
cd C:\wamp\bin\apache\apache2.4.17\bin
type
mklink php.ini C:\wamp\bin\php\php5.6.15\phpForApache.ini
the cmd read...
symbolic link created for php.ini <<===>> C:\wamp\bin\php\php5.6.15 \phpForApache.ini
exit the cmd and restart your wamp.

installation - PHP Extensions "pdo_mysql" must be loaded

This is whay i see on phpinfo();
pdo_mysql
PDO Driver for MySQL enabled
Client API version 5.1.68
Directive Local Value Master Value
pdo_mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock
but im still getting the magento message :
"PHP Extensions "pdo_mysql" must be loaded"
why is that ?
open or make php.ini file into root directory and add the following code:
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so

Resources