I've spent some time trying to figure out why the autostart, remote , and connect_back settings wont turn on. I've typed in:
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
;xdebug.remote_host=192.168.1.108
All this into the php.ini file, restarted servers, and when I check the configuration page on the MAMP page, these settings still read OFF. Any idea why this is...
Bit late answer maybe but here's how I solved this issue.
For some reason MAMP conf files doesn't affect these settings, what I did was:
Go to /MAMP/bin/php/[phpX.X.XX ie your current version]/conf/php.ini and set it here.
This is super late, but, you need to edit the correct php.ini file. MAMP comes with 2 or more!
From the MAMP control/app launch the PHP_INFO() page, or make your own. Check the path value for the Loaded Configuration File
That is the php.ini to edit.
Related
Trying to set up XDebug with PhpStorm. I installed and configured it following this guide:
https://jtreminio.com/2012/07/xdebug-and-you-why-you-should-be-using-a-real-debugger/
At the moment it looks like that. I start a session, PhpStorm ask or asked me what connection to listen. There was just one file to select. app_dev.php (It's the index from Symfony) so I selected it. Wondering why there is just one file. Now I can only debug this only file. Everythign else doesn't work. Later, the pop up came again and I selected the project folder, but still. I can just debug the app_dev.php file. What is wrong with my settings?
I also heard, I can make the debugging without having to set the session, is this true? VIa xdebug.remote_autosrat = 1?
Xdebug php info: http://pastebin.com/LQGY7t0E
Xdebug php.ini settings: http://pastebin.com/8WjKWDZk
The settings in phpstorm are like this https://jtreminio.com/assets/posts/2012-07-05_xdebug-and-you-why-you-should-be-using-a-real-debugger/phpstorm.php_.debug_.png but I do have a external connection settings because i have anewer version. (I guess). Leave it as default.
I'm using ubuntu instaleld on a VM. I'm on Win7. I created a network map to Z: and connected with phpstorm to Z:
So, any hints on how a I can get it working?
I have been trying to set up remote (virtual box server) debugging with phpstorm. When I press the debug button phpstorm just waits indefinitely for a connection. I've been looking for a solution for a couple days, and cannot get any varying results.
These are my phpstorm settings:
Host: mywebsite.dev
Port: 9000
Debugger: Xdebug
pathmapping: /public <--> /index.php
These are my xdebug params in php.ini
xdebug.remote_enable=on
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=on
xdebug.remote_port=9000
xdebug.default_enable=on
xdebug.remote_mode=req
xdebug.remote_log=/var/log/xdebug/xdebug.log
Please let me know if you need anymore information. Thanks in advance!
This tutorial worked for me in Ubuntu
http://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide
I notice your php.ini looks a bit different. Here is mine :
[Xdebug]
zend_extension=<full_path_to_xdebug_extension>
xdebug.remote_enable=1
xdebug.remote_host=<the host where PhpStorm is running (relative to your site!)>
xdebug.remote_port=9000
And that was it.
Answering an old post for the heck of it...
You also need to edit you 20-xdebug.ini file
sudo nano /etc/php5/conf.d/20-xdebug.ini
The line zend_extension=xdebug.so should already be there. Add the following lines :
zend_extension=xdebug.so
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.scream=0
xdebug.cli_color=1
xdebug.show_local_vars=1
There might be path mapping issues as well.
If you go in run|web server debug validation … do you get error messages ? If so, that’s a clue to what you still need to solve.
You also have to set the key to your xdebug extension in your browser.
PhpStorm cannot see xdebug but it is installed. In my browser xdebug works fine. Where is the problem?
The error:
Connection with 'xdebug' was not established. Validate installation.
php.ini
[xdebug]
xdebug.idekey=PHPSTORM
zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.default_enable=1
xdebug.coverage_enable=1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/tmp"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_autostart=1
phpinfo in phpstorm:
PHP version: 5.4.10
Loaded extensions: bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, XCache, xml, xmlreader, xmlwriter, xsl, yaz, zip, zlib
First, are you using MAMP (free) or MAMP Pro?
Turns out there is a difference between the php.ini file you edit from MAMP and the php.ini file that PhpStorm uses in the interpreter.
The MAMP Pro php.ini file resides in /Library/Application Support/appsolute/MAMP PRO/conf/php.ini and doesn't have a PHP installation (which PhpStorm needs when setting the interpreter). If you run phpinfo(); this is the file you will see data from.
When you set PhpStorm to the necessary location here /Applications/MAMP/bin/php/php5.4.x/bin it looks at the php.ini file there, not the one that MAMP Pro uses (above). So if you want PhpStorm to see the debugger, you need to add the code to that php.ini file.
For help setting up the interpreter for MAMP and PhpStorm refer to the documentation here
HELPFUL HINT: When checking to see if xdebug is installed make sure to run the --version command in terminal from the MAMP php location. Otherwise you'll end up seeing the default OSX PHP info which wouldn't have xdebug installed by default.
Example: run this in the PhpStorm terminal to see if it works /Applications/Mamp/bin/php/php5.4.4/bin/php --version
MAMP using different php.ini if you run it from terminal, try this code to find the php.ini
php -i | grep php.ini
After that add the code for activate the xDebug
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.remote_host=localhost
xdebug.profiler_output_dir="/Applications/MAMP/tmp/xdebug"
xdebug.max_nesting_level=1000
If this work, please consider accept the answer for the benefit the others.
This is because Mac OS X has php installed by default. There are two ini files for MAMP PRO.
PhpStorm will run the default php which you do not add the xdebug function to it.
Read this post for the solution
http://devnet.jetbrains.com/message/5466653
Pay attention to the STEP 5
===================================
okay, if it do not work, I thought u may not pay enough attention to the article, It do helpful and explain the reason, read i again ?
I had similar problem.
I did:
Installed xdebug by following the steps here.
Found out which version of PHP does my PHPStorm use.
Created a new entry in the corresponding php.ini file of the /path/to/xdebug/modules/xdebug.so.
and I was able to solve my problem. xdebug is working now.
I had a similar issue in that it worked then it did not.
In my case, the cause turned out to be an miss placed .htaccess file in the root of the project.
The .htaccess file (repeated below) was there from a previous set of testing and was intended to stop XDebug from working. It sure did.
php_value xdebug.remote_autostart 0
php_value xdebug.remote_enable 0
php_value xdebug.profiler_enable 0
I just renamed the file and like magic, all was good.
I've been beating my head against this for hours.
I've come back to do some work in PHPStorm after not having used it in a couple of weeks, and for some reason the debug doesn't work any more. It used to work, but now it doesn't and I have no idea what is going on.
I'm running on Windows, using IIS, PHP version 5.3.8. The XDebug is installed, and I've set the configuration in PHP.ini as per the usual instructions.
When I run phpinfo() everything looks normal (ie. XDebug is there).
I've rechecked various settings, downloaded a slightly newer version of XDebug than I was using (Xdebug v2.2.1), but nothing seems to kick it into life.
Can someone please give me some clues as to what I can look at next?
UPDATE:
I've spent a few more hours beating my head against this, and don't seem to have gotten much further. XDebug is installed and loaded, according to phpinfo(). I turned on logging, but it doesn't really tell me much except that XDebug is indeed connecting...
Log opened at 2013-02-17 04:13:07
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/web/dbg/index.php" language="PHP" protocol_version="1.0" appid="6912" idekey="PHPSTORM"><engine version="2.2.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init>
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
Log closed at 2013-02-17 04:13:07
So it seems that the problem is on the PHPStorm side, but I cannot see where. I tried creating a very simple project, but could not get that to debug either.
Don't you hate it when you spend hours wrestling with something, then in desperation try something simple, and it works?
I decided to try a different port, 9001 instead of the default 9000, and it WORKED!
I now realise that I recently installed Twonky (for video streaming to my TV), and when I checked the settings, there it was... port 9000.
Had the same issue this afternoon - found this question along with several other SO questions so I thought I'd post the solution that fixed it for me.
I was missing a mapping to the file system. Which is odd because I've seen PHPStorm prompt me when they've been missing previously.
Hopefully this helps someone in the future :)
Had the same problem after updating to El Capitan. First hint to that I used is Run -> Web Server Debug Validation.
This tool from PHPStorm gave me a hint about xdebug.remote_host I'm using v-hosts and it was complaining localhost being not the correct value there. So I updated xdebug setting with xdebug.remote_connect_back=On and it worked!
Apparently if you try to debug on newer versions of xdebug you have to include this line to your xdebug-php.ini settings
xdebug.mode=debug
I had same problem and I resolved it by deleting all the watches, and then reboot phpStorm
I resolved by by myself also, cause PHP-Storm and PHP-FPM are listening same port... just kill all php-fpm port.
Had the same problem. For me I was using port 9010 for xdebug. Problem turned out to be Logitech's GHub software I recently installed for a new mouse listens on port 9010! You can use this to see what is listening on a given port on Macs:
lsof -nP -iTCP:9010 | grep LISTEN
Newer versions of PHPStorm have Debugger validation. The official PHPStorm Blog has a writeup on this feature which might help you figure it out.
One snafu for me when I set up a box with php-fpm configured is that php-fpm runs on port 9000 by default also, so I had to change the configured port in php.ini and PHPStorm's preferences to something like 9001.
For what it's worth, my current php.ini setup for xdebug:
[xdebug]
zend_extension="/the/path/to/xdebug.so"
xdebug.file_link_format="txmt://open?url=file://%f&line=%l"
xdebug.remote_enable=1
xdebug.remote_autostart=On
xdebug.remote_port=9001
xdebug.profiler_enable_trigger=1
xdebug.max_nesting_level=250
I had the same problem! I finally realized that all my configurations were correct, but on the browser side, I hadn't enabled debugging with the Chrome Browser. Each browser has their own way of enabling the debugging to start working.
I had the same issue and I tried all the solutions I could find in SO and in other sites (checked that both phpStorm and Xdebug are on the same ports, checked that I had the server mapping on the file system, reinstalled Xdebug, etc.) but eventually the problem was in the fact that we run the site on an internal server, and someone from IT changed my computer's IP address to an address which is filtered out of the allowed addresses that can be connected to that server. That's why phpStorm started to ignore the breakpoints from Xdebug.
Hopefully, this will help someone in the future and save him many hours.
Found that if xdebug log file is not writable then it could be not working. Always better to set xdebug.remote_log and make it writable.
I've got this in my php.ini
upload_max_filesize = 25M
post_max_size = 25M
and I've got this in my .htaccess
php_value upload_max_filesize 26214400
php_value post_max_size 26214400
as shorthand can only be used in the php.ini (http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes)
but no matter what I do, when i call phpinfo() I get
Directive Local Value Master Value
upload_max_filesize 4M 25M
I've looked at all other php.ini files, my .htaccess, ini_set(). Anything I could think of and nothing will change it from 4M. Any help would be great!
EDIT: restarting apache didn't work, i've check my httpd.conf, it seems like an external file or something. any other places to check?
That doesn't look like proper syntax for a php.ini file.
upload_max_filesize = 25M
post_max_size = 25M
Then, make sure to restart Apache.
If you still have troubles, refer to:
http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/
I had same issue, but restarting php-fpm helped.
So it didn't help to restart just apache2, but this command:
sudo systemctl restart php7.3-fpm
Cleared probably some cache and took the new modified php.ini.
If you're using OSX then make sure your php.ini file is not the default one in /etc (php.ini.default) with the command php --ini,
output sample :
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /Library/Server/Web/Config/php
Additional .ini files parsed: (none)
in case the first line: Configuration File (php.ini) Path with empty parameter make a copy of the default php ini and the changes will take affect.
also, you'll have to check the memory_limit directive.
If it's lower than upload_max_filesize or post_max_size then their value will be limited to the memory_limit value.
Anyway, post_max_size should be slightly larger than upload_max_filesize (any posted values other than the file itself would need some memory as well)
On modern systems, memory_limit should be at least 64M, 128M or more is recommended
If you are running PHP Fast cgi then you need to restart the process. I believe that restarting apache should do the trick.
Problem was it was actually being set in another .ini file that didn't appear at first glance to be related to anything!
Note to self: always use "grep" to search within files when things are fishy!
If you are running in a local server, such as wamp or xampp, make sure it's using the php.ini you think it is. These servers usually default to a php.ini that's not in your html docs folder.
If you are using WAMP then make changes in proper php.ini which apache uses, normally its found in C:\wamp\bin\apache\\bin.
make changes in 2 parameters post_max_size and upload_max_filesize (found in line 734 and 886, usually), to 50M (to upload files upto 50 MB).
don't forget to restart apache.
I could solve this problem via a workaround. I created .user.ini file in the root document of my webapp and overwrite the values.
I was facing the same issue.
Check Loaded Configuration File path in php info.
Then open that file and change the variables you want and restart your apache server.
Make sure that you're editing the php.ini in the conf/"server_version" folder
Make sure that your computer is not hiding a .txt on the end of the php.ini file.
Use terminal or right click / get info or properties.