I have been having a option for a few days. When I try to run a PHPUnit test I get a message saying failed to load Xdebug. I have tried to reinstall, change filepaths etc but I am getting nowhere. Hoping somebody can help me out :)
PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
Failing loading xxxx.dll is an indication that PHP can't load the extension file. This could have several reasons:
The file does not exist → check if it does
The permissions on the file are incorrect → check the permissions
The file is of "the wrong extension type". Which can be either:
the extension is for the wrong wrong PHP version
the extension is of the wrong bitness (32 vs 64bit)
the wrong TS variant (NTS vs ZTS)
the wrong "debug mode" build of PHP (either debug, or nodebug)
The API type (except for bitness, which you can check with echo PHP_INT_SIZE;; 4 is 32bit, and 8 is 64bit) is reflected in the "Zend Extension Build" output in php -i or phpinfo().
You can use Xdebug's wizard to tell you which exact file to download for your specific set-up.
Related
I have been trying to upgrade the current version of PHP (7.0.2) to 7.3.
I have tried this method here which helped me install v7.3, but it does not get activated.
Here's what else I tried:
I stopped and started VM Instance
I restarted apache2
Tried locating app.yaml to modify the PHP runtime specified here, but couldn't find it.
I tried reinstalling apache since it was giving some error
But none of these helped. I also read here that it's not possible without migrating to a new instance, which truly is a pain and I would want to avoid that at all costs.
Now sure what I should share so here are some stuff:
This is what I get for php -v
$ php -v
PHP 7.0.27 (cli) (built: Jan 19 2018 12:12:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.27, Copyright (c) 1999-2017, by Zend Technologies
Am I missing out on something very obvious?
I am not much of a coder, so be gentle :P
In your app.yaml add:
runtime: php73
GCP - PHP 7 Runtime Environment
I wrote an extension with C++ for php on windows. I build multiple different versions:
php 5: with a MSVC11 compiler, linked with php5ts.lib, thread safe and it works fine
php 7: with a MSVC14 compiler, linked with php7ts.lib, thread safe, but it didn't work
The php 7 version gives me
Warning: PHP Startup: Unable to load dynamic library 'C:/openserver/ospanel/modules/php/PHP-7.0/ext/module_php_7.0.21_TS.dll' - The specified module could not be found.
in Unknown on line 0
PHP 7.0.21 (cli) (built: Jul 5 2017 13:31:19) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
I tried to change extension folder, rename file, nothing helps. Library was built without any error. I double checked that it exists.
P.s: I know there is a difference between php5 and php7 api, i have #ifdef for this, so it's not a problem. Also we have successful build of this module with php7 on linux.
I resolved an issue. It was a mistake in build script. php5ts.lib and php7ts.lib was included at same time. I deleted php5ts.lib from linker and now it works as expected.
I have tried to configure ionCube Encoder on my Windows 10 PC running PHP 5.6.8 but without success. After downloading the encoder zip file from ioCube Loaders
I copied the "ioncube_loader_win_5.6.dll" to "C:\xampp\php\ext". Then I updated my php.ini file to loaded the encoder
[ionCube Loader]
zend_extension="C:\xampp\php\ext\ioncube_loader_win_5.6.dll"
and restarted apache, but when I test it from then command prompt using "php -v", it does not load. See my result
php -v
Failed loading C:\xampp\php\ext\ioncube_loader_win_5.6.dll
PHP 5.6.8 (cli) (built: Apr 15 2015 15:07:09)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
I also tried setting it up using the loader-wizard, but it did not work too. Anyone with useful information will be of great help right now.
Thanks
This Post is old but it might help other people. You have just to replace to dll. I had the same problem when using the 64bits dll. Replacing it with the x86 dll did the tric
I am running OSX El Capitan (version 10.11.6).
I had php 5.5 installed.
Phpunit requires php5.6 and more so I tried to upgrade my php to 5.6. I couldn't do it so I gave php7 a try.
I followed these guides:
https://coolestguidesontheplanet.com/upgrade-php-on-osx/
https://php-osx.liip.ch/
Mac upgraded PHP to 5.6, but CLI php -v get 5.3.28?
My current output with php -v is :
PHP 7.0.12 (cli) (built: Nov 1 2016 10:21:11) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.12, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
Funny thing, my output with a phpinfo(); when called from somewhere inside a Symfony project, is still PHP Version 5.5.36
Any ideas??
Terminal uses a different PHP than a HTTP server in browser. You can check what PHP you're using in CLI (command line interface) by this terminal command:
$ which php
I don't know if you use any AMP stack (like MAMP). They include their own PHP, so you need to update them in order to have a different PHP version in browser.
Maybe you can use this trick to determine what PHP versions you use in browser / CLI: Find the php.ini path in your phpinfo() output and compare it with this terminal command:
$ php -i | grep php.ini
It's always a good idea to use the debug URL to troubleshoot your Symfony projects; to use this, simply append:
app_dev.php
For example if your route was like http://myhome/, then you would use:
http://myhome/app_dev.php
Then on the bottom of your browser you will have the Symfony debug bar. In the bottom right corner, the version of Symofny is shown, an if you move your mouse over it, you will see the version of PHP; plus also a link to "View phpinfo()". You can click on it to view the full PHP information, including where the PHP file is located.
The PHP config file used (shown on the phpinfo() page) is shown by:
Loaded Configuration File
Hope that helps!
I'm using Ubuntu 15.04 - 64 Bit with the following setup:
Apache
Server version: Apache/2.4.10 (Ubuntu),
Server built: Jul 24 2015 17:25:18
PHP
PHP 5.6.4-4ubuntu6.2 (cli) (built: Jul 2 2015 15:29:28) Copyright,
(c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c),
1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright,
(c) 1999-2014, by Zend Technologies
My php.ini (The last 5 lines)
; Local Variables:
; tab-width: 4
; End
zend.loader=1
zend_extension="/var/www/extensions/ZendGuardLoader_56.so"
And yeah, ZendGuardLoader won't be loaded (it's not mentioned in "php -v" and also not in "phpinfo()").
Thread safety is disabled! If you need other options, let me know.
What i've tried so far:
removed the "zend.loader=1" option,
Tried "zend_loader.enabled = 1" instead "zend.loader"
included an older version from ZendGuardLoader (5.5 instead 5.6)
Changed the owner and group from both files to my account (instead www-data)
Changed the permissions to 777, 775, 755
Also nice to know:
My Apache Error Log is also "clean". If i rename the .so file, my Apache logs that exception. But on the current setup, the file is readable.. Don't get me wrong, but i expect a message like "ZendGuardLoader can't be loaded because "..
Update1
After a few hours, i'm pretty scared! I've installed vagrant incl. "Debian 7.8" as well, started everything and so on. On my box i've installed PHP (5.4) and Apache, created the www folder to the same destination, and downloaded the 5.4 ZendGuard Loader. In my box setup i did the same, as on my main system like -> php.ini, last entry: "zend_extension=/vagrant/ZendGuardLoader.so"
The file exists, is readable as well, and so on. After creating a new "info.php" ("phpinfo()"), it's still without ZendGuardLoader Extension. The command php -v says mostly same, as main system (differences on version..).
Solution for php -v
Okay guys, my mind was broken - but it's not fixed! I told you, by checking php -v the output is pretty default (no ZendGuardLoader). BUT(!): php -v gets executed by commandline (cli) - so i've added the "zend_extension" inside php5\cli\php.ini -> works like a charm!
PHP 5.4.41-0+deb7u1 (cli) (built: May 22 2015 12:49:18)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
That's what i've wanted. So i've called the phpinfo file by using commandline - and save the output into a separated file. And as i can see, the ZendGuardLoader is given, too!
But there is still the Apache Problem. The zend_extension line matches exactly between apache2\php.ini and cli\php.ini.
So it's not a permission problem, because CLI has no problem. I think, apache is broken, because it won't load that less special extension..
A new day - new ideas
Okay guys, yesterday we got the point, why it won't work on CLI, but that's less the major problem. So i've integrated ioncube on CLI and also on apache. CLI works like a charm. Apache won't load ioncube, too. So what is wrong with this apache..?
I tried to provoke some errors by creating a new file in the php5\apache2\conf.d\ directory. The new file contains the same "zend_extension=/vagrant/ZendGuardLoader.so" snippet, as my php5\apache2\php.ini - so apache2 would try to load the .so twice, and throws the expected error:
PHP Fatal error: [Zend Guard Loader] Extension "Zend Guard Loader" cannot be loaded twice in Unknown on line 0
Apache tries to load both extensions. So i might be right, if i'm gonna say, apache2 load the extension, if it's only one! But it seems, that apache can't work with the extension. Remember - php cli ("php -v" / "php -m" ) can!
For all those people, who wanna to know the solution:
After debugging Apache for a while, i've found, that the include per apache2\php.ini won't work correctly for me. So i've created a new file inside apache2\conf.d\ - and deleted the entry inside apache2\php.ini.
After reloading apache2 nothing changed, but phpinfo() says, the extensions was loaded. I've reloaded again - and, finally!, everything works. I am not sure, what happens to me or apache2.
The curios thing at all: I've to reload apache2 twice after restarting VM. But after that process, everything works perfect. So guys..
TL;DR;
Create new file in apache2\conf.d\ and use same "zend_extension=/path"
Restart apache2 twice.
Profit