XDebug is not detected by PHPstorm - php

I have Installed nginx and php-fpm, in order to load php codes from nginx, my page works fine, but now I want to run xdebug in order to debug my code.
I follow the steps from the manuals, I modified my php.ini inside from my php-fpm folder (that is a must) but as you can see in the picture my route to the fpm does does not appear, so it believe that XDebug is not installed, when really it is.
Open Settings->Languages & Frameworks->PHP
Open Settings->Languages & Frameworks->PHP
Thank you so much

I discovered the problem, PHP Storm is supposed to detect the debuggers if the configuration files is correct, BUT is importat to make sure that the firewall doesn't block the ports used.
To prove that I deactivated the firewall and now works fine.

Related

Bitnami Wampstack: PHP caching requires server restart

I setup a WAMP stack for the first time using Bitnami. Got working pretty quickly with vhost and everything, running a couple WordPress websites for local development. The problem is, nearly everytime I save a change to a PHP file the changes don't appear when I refresh the browser unless I restart the Apache server.
I've searched around for a couple days now for a solution but nothing seems to work, considering going back to XAMPP for local development. I tried to disable opcache in the php.ini as someone suggested but that didn't work.
Any ideas what it could be?
In httpd.conf comment out:
# Include conf/pagespeed.conf
# Include conf/pagespeed_libraries.conf
In php.ini set:
opcache.enable=0
opcache.enable_cli=0
Source

How to debugging php on a VPS using phpStorm and Xdebug?

I have trying to get this done for days...and reading through about 20 tutorials, documents, etc...but still no luck.
Here is the thing. I installed wordpress(just for example, can be any php program) on my VPS, and hoping to debug it from my macbook and my desktop. This is clearly a remote debugging thing. So I here is what I done:
1.Installed right version of xdebug and located its .so file on VPS.
2.Changing php.ini and 20-xdebug.ini file on VPS, my settings currently are:
zend_extension=/usr/lib/php5/20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9200
xdebug.show_local_vars=0
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20
xdebug.show_exception_trace=0
xdebug.remote_log=/var/log/xdebug.log
;xdebug.remote_host=202.84.93.66
The last line, which is comment out is my desktop IP address, where I run phpStorm. Based on xdebug's documents, if you set remote_connect_back=1, you won't need this host ip to be specifici.
On phpStorm Side, I "start new project from existing code, and specificy the source root on VPS, map it with one of my local dest. PhpStorm just downloaded all the files and after setting up "Automatic upload", the sync is perfect.
On phpStorm side, I specificy the PHP intercepter as the remote one on my VPS.
On phpStorm side, I changed my debugging port to 9200, as same as the one I using on VPS.
Using the booklet method phpStorm provide, I put them on my firefox bootkmarklet.
Click listen button on phpStorm, set breakpoint, go to firefox open the page, click 'start debuging', refresh.....BUT NOTHING HAPPENS!
I also tried to using the tranditional methods, which set a run configration way as both php-webapplication or php-remote-debug...but still not working.
At php storm, the web debug validation, I could pass all the testing there though....
Can anyone help me with this? I think I must be doing wrong on some very fundation part since I saw all the tutorial are so simple set, but this already took me about 3 days to figure out....
Thanks!

Problems in settings with PHP Storm and PHP-FPM, trying to setup XDebug to work properly

There are several problems:
First: I have my local server with NGinx and PHP-FPM installed. I have also added the xdebug to PHP. But PHP Storm can't recognize the /usr/sbin/php5-fpm. It accepts only usual PHP - /usr/bin/php5. I've tried to add XDebug config to that version, but it haven't worked properly (both - cli and cgi version). With usual PHP it works, but I'm using different version, and I want to setup it properly to version of php-fpm and not cli or cgi. Please tell me how to do this!
Second: when I'm running a debug, putting the break points, it runs with address - localhost:9000?XDEBUG_SESSION_START=12662. It work only if I clean the port number. But it can't run without port. And if I try another project (produced with framework for example), not few simple php files, it doesn't propose me an address at all! When I hit the button "run" or "debug" it opens a new blank inset. I guess it is setup problem, but help me to solve this! Thank you!

Eclipse does not run Xdebug or Zend debugger on Mac OSX 10.8.2?

I was able to successfully install both Zend as well as Xdebugger. Verified by Phpinfo as well as Eclipse verifies the Zend debug successfully installed. Although whenever I run debug from eclipse for
Xdebug it hangs at 57%`
and for Zend debugger
the browser keeps processing/busy but nothing happens
Unsure what is causing this
-> Firewall issues?
-> No Selinux in Mac so not sure if it is a permissions issue
Any clues would be helpful.
Thank you.
it seems like a miss configuration of debug. I will try to help you showing my working configurations.
This is my php.ini piece for xdebug.
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9060
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=On
It is important to note about the parameter debug.remote_host. If your client side is not allowed here, you will stuck on 57%. The value here is the IP of the machine where you are running eclipse. If you are running apache/php and eclipse in the same machine the localhost IP should work.
Adapt zend_extension parameter to your world.
Other reason you can stop in 57% is the web site is not running. Apache/PHP only will send xdebug metadata if the site is running. If you got an internal error, for example, you will be stuck on 57% also. Eclipse stops on 57% waiting for a xdebug session. You must be sure apache/php started a debug session.
Make sure the Debug configuration on eclipse is using the correct PHP server. If you are trying to run eclipse in an invalid PHP server or a PHP server which is not well configured you will stop on 57% also. So review the PHP server parameters on Debug Configurations.
Other important review you have to made is about the Xdebug configuration for eclipse. The port Debug port field must be filled with the same value of parameter xdebug.remote_port. If they are different you will be stuck in 57% also.
Please, let me know if it was helpful.
For Xdebug, this is likely a misconfigured path mapping in Eclipse. There are 10s of questions related to that here on stackoverflow and 100s of hits on google. Please check there first.

Installing PHP, Apache 2.2.10 on Windows Vista

I am trying to get PHP working on my vista home machine but I am getting weird problems. First I had file permission problems for which I disabled Vista's UAC. Now I can't get the PHP interpreter working.
I have made all the necessary changes following some tutorial but I still can't get it working.
Tutorial was located here: http://www.tanguay.info/wamp/installPhp5.php5
Try XAMPP. I use that at home on a Vista machine and it worked nicely after the install.
WAMPServer is also a good option. You can easily enable/disable both PHP extensions and Apache 2 modules. Everything is set up somewhat securely (only local access to the serve), and you get phpMyAdmin already set up.
Only thing I've ever missed is Memcached, but that is fairly easy to set up on your own.
The only problem I have installing PHP and Apache on Vista is that you need to make sure that when you edit the httpd.conf that you are editing it as an admin, otherwise the file is saved in compatibility mode.
To overcome that problem just type notepad++ or whatever in your start menu, right click the item and run as administrator. Then open the file from the app.
You can use FastCGI for IIS 7. I'm using this also and it works perfectly!!
FastCGI
You can try Zend Core
It works on both IIS and Apache (it includes the installation of the Apache)
iis7 is one of the best web servers and especially for php, if you can't get it to work it means you need to google enough, because it isn't logical to blame Vista for php/apache issues

Categories