Problem xcode no work xcode/MAMP/PhpStorm/Mac - php

I have been through the forums without success. I'm trying to use xcode with PhpStorm on my pimp. I use MAMP/PHP 7.1.19.
When I do a phpinfo() I have nothing about Xdebug.
I have two php.ini files:
-/Applications/MAMP/conf/php7.3.0/php.ini
-/Applications/MAMP/bin/php/php7.3.1/conf/php.ini
I modified both files with:
-zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
I have of course check if the file xdebug.so exists.

If the file xdebug.so exists then you have to enable it in the php.ini. At the end of the file you have uncommented the zend_extensionbut you have to enable it. Add this:
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php7.3.1/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"
xdebug.profiler_output_dir = "/tmp/xdebug/"
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_log="/usr/local/var/log/httpd/xdebug.log"
xdebug.default_enable=0
xdebug.profiler_enable=0
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.var_display_max_depth=1000
For someone else who doesn't have the xdebug.so file, you have to install the Xdebug extension with PECL. Open the terminal and paste:
cd /Applications/MAMP/bin/php/php7.3.1/bin and then install xdebug ./pecl install xdebug

Related

Xdebug is installed, but not showing up on phpinfo

I'm trying to install xdebug on my ubuntu linux system.
Correct .so file, make install everything is correct, just maybe the php.ini configuration?
I use the installation wizard.
Installation Wizard Step by Step
I am at step 9, added the zend_extension on my INI file.
Added Zend Extension Command on other INI file.
when i PHP_INFO(), xdebug just does not appear in the list.
I googled around and seems other people php.ini file have this
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp
but mine does not?
So i added those into my php7.4/cli/php.ini
still does not show on my phpinfo?
I go to the terminal and type php info xdebug seems there. xdebug support => enabled Version => 2.9.6
but i created a testpage.php and put phpinfo();
xdebug does not appear in the page?
Am i missing something?
Yes you need to update your php.ini file. Below is the code lines that i added in my php.ini file.
[XDebug]
zend_extension = "path of you extension example /usr/lib/php/xdebub.so"
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
Must restart your server after any changes in php.ini file.

unable to install xdebug on for php 7.2 on apache 2.4 on window 7

I tried adding xdebug to my PHP. I download xdebug.dll from https://xdebug.org/download.php and adding this dll to the ext folder in my PHP. Then open php.ini from PHP directory and add these lines:
zend_extention="C:/Program Files (x86)/PHP/v7.2/ext/php_xdebug-2.6.0-7.2-
vc15-nts-x86_64.dll"
[xdebug]
xdebug.remote_enable=1
xdebug.remote_autostart = On
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
and reboot Apach.
And when I run phpinfo() on this server there is no information about xdebug
I resolved my problem by renaming my downloading dll to xdebug.dll and adding zend_extension=xdebug in php.ini

Can't locate xdebug.so on linux

I'm having some problems getting xdebug running on ElementaryOS (Ubuntu 16.04.2) with php7, and Apache2.
I installed it with sudo apt-get install php-xdebug. The install didn't report any errors. I've added
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 ; Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
to /etc/php/7.0/apache2/php.ini.
I also need to add the xdebug.so file location like, zend_extension="/path/to/xdebug.so". However, I have been unable to find xdebug.so after the install.
Does anyone know where xdebug.so is, or has the instructions changed since php7.0 was released. Most of the instructions/help seem to be for php5 online.
Thanks.
Check xDebug is installed.
php -m
Run locate xdebug.so
Returns /usr/lib/php/20151012/xdebug.so for me, but 20151012 might change in the future.
You have to execute sudo updatedb if locate does not return anything or you've just installed locate
For the new versions just add xdebug file name, example:
zend_extension=xdebug.so
xdebug.default_enable = 1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
...
If it does not work use Linux find command like the following:
find / -name "xdebug.so"
What does this command do?
Find = just find
/ = in all of directories inside / (all)
-name "xdebug.so" = with name equal to xdebug.so
Create a file with phpinfo(). Find the item extension_dir. There you'll see where the xdebug.so resides. Mine is:
/usr/local/lib/php/extensions/no-debug-non-zts-20170718

Xdebug installed on Mac Native apache

I am trying to get XDEBUG up and going but having trouble getting the cookie to show. Below is what is put in my php.ini file. I restarted apache. I did a phpinfo() call and I do see xdebug enabled and the settings set. But when I do a localhost/?XDEBUG_SESSION_START=1 I am expecting to see a Cookie set to 1 in my browser right ?
zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_output_dir="/tmp"
when I run php -m I do not see it but I do see it in phpinfo
couldnt figure the exact answer but I went and downloaded the php.ini.default file from repo and set the following in the php ini
zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.idekey=foo
xdebug.profiler_enable=On
and it worked. could of been because of remote host. who knows. it worked. this is the bare minimum configurations for mac and this is if your going by the follwing installations for xdebug on mac
http://kubyshkin.ru/posts/installing-php-xdebug-extension-on-mac-os-x-10-7-lion.html

Xdebug install (php.ini) OS X 10.8 (Mountain Lion)

I have a problem enabling xdebug.
After installation it is not listed in phpinfo.
What I do:
1. sudo cp /etc/php.ini.default /etc/php.ini
2. Uncommented this line of the php.ini file:
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
3. sudo apachectl restart
After this the php stopped working, only html pages were visible.
So I do the following:
4. sudo rm /etc/php.ini
5. Uncommented this line of the php.ini.default file:
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
6. sudo apachectl restart
After this the php was working again, but in phpinfo was not any xdebug entry and it didn't work in Netbeans.
How can I install xdebug?
Please use the wizard to help you figure out how to compile: http://xdebug.org/wizard.php
I think you also need the following settings in your php.ini file. Amyway, this is what is working for me:
[xdebug]
xdebug.profiler_output_dir = "/tmp/xdebug/"
xdebug.profiler_enable=on
xdebug.remote_enable=on
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
Also make sure that the /tmp/xdebug/ folder and the /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so file exist.
to add to Jean-François Beauchamp answer:
to create the xdebug.profiler_output_dir
sudo touch /tmp/xdebug
also i had to create a php.ini file
sudo cp /etc/php.ini.default /etc/php.ini

Categories