i have tried to install xdebug on my mac using home-brew everything seems alright, with no errors, but when i execute phpinfo method i don't find debug module there, i have tried million times with no success, so i have read an answer here in StackOverFlow for the same reason which suggests follow these instructions http://xdebug.org/wizard.php i have copied all code source of phpinfo page, and they gave me detailed instructions, i have followed there guide with no errors after restarting my server and refresh phpinfo page, and still no xdebug !!
php.ini - http://pastebin.com/RLyzXJ9z
phpinfo() code source - http://pastebin.com/H8XVX5GG
Based on your comments, the version of Xdebug isn't the one that matches the version of php running in either your Apache mod_php or your php-fpm (if you're on nginx).
I'm guessing if you used brew, your CLI php is really in /usr/local/something... and that matches the version for your xdebug. On the other hand you whatever PHP flavor you're using for your webserver to work with is different.
My vote would be to ditch the local php or brew installed version and use something like MAMP that runs 100% it's own libraries. Adding Xdebug to MAMP is pretty well documented if you google for it.
Related
Xdebug is not working despite phpinfo() is showing Xdebug section and in VS Code the red point is displayed and the control panel. Also the debug console is started as well.
I've tried to reinstall it again. I removed Apache and install XAMPP and then install Xdebug there.
There is currently an issue with Xdebug 3.2 on Windows (specifically Apache) where it enables all features even when not requested. It is possible that this also affects other functionality like breakpoints. Until this is fixed, I recommend to use Xdebug 3.1.6, which you can still find on the historical downloads page.
However, if you use xdebug_info() instead of phpinfo(), Xdebug will tell you what it tried to do (if anything at all) to connect to the debug client. There might be hints in there too.
When I started my latest project I learned how to use the xdebug extension and I have been using it ever since. Now I am ready to spin up a server and go in to production with this project and my site doesn't fully work. The frontend pages seem to work, which are php based as well, but the backend endpoints that query the database and return some data to the frontend always are returning a 500 status code. So I attach xdebug and figure out how to run it remotely and the pages all start working without any code changes. I go in to the php.ini file and turn it back off and the pages continue to work. Since this is an AWS EC2 server, I delete the instance and create a new one running the same initialization scripts I wrote to install all the software and I get the exact same issue. The server doesn't work until I follow the xdebug install instructions and restart apache2. And like before even when I unattach the xdebug extension via the php.ini file, the code continues to work. Even after the system is rebooted it still continues to work so whatever is being fixed appears to be permanent.
What would building and attaching the xdebug extension, and restarting Apache2, do to the a LAMP stack that would make my code work, even after the extension has been turned off? My server is being built with scripts that run various apt-get install commands with no binaries provided by me as it all is community provided programs. Like clockwork it breaks every time I rebuild the machine until I apply the extension. I can automate that in to my build scripts if I have to, but it is driving me a bit nuts that I don't understand what is happening.
When the server sends a 500 error, normally you get an entry to the php_error.log. So first check this file. Maybe there is some difference in memory limits, max. post variables etc.
I would suggest you to try to find calls of any xdebug specific functions such as var_dump() or any prefixed by xdebug_ in your code:
https://xdebug.org/docs/all_functions
What would building and attaching the xdebug extension, and restarting Apache2, do to the a LAMP stack that would make my code work, even after the extension has been turned off?
Installing one piece of software can bring with it another. If you sudo apt install php-xdebug without php installed, it will install php.
I installed xampp 7.1.2 in my windows 7 computer and after installing it when i try to run apache i get following error -
the program can't start because api-ms-win-crt-runtime-l1-1-0.dll is
missing from your computer. try reinstalling the program to fix this
problem.
I reinstalled but no progress.
I posted a topic for this problem in apachefriends.com forum and they said me to have "MS visual c++ 2015(x86) 14.0.24.." installed, which i already had installed. I uninstalled existing this software in my computer and reinstalled this mentioned software but still i can't run apache in xampp control panel, i am getting same error as i wrote above!!.
I searched through web about this problem but did not find similar one. so how should i proceed??
Try following this answer here on SO.
After installing, search for that dll to verify that it exist somewhere.
If not, it's worth trying this:
Check with procmon where xampp is looking for that dll, and then download the dll and put it in the place it's looking for.
In my efforts to solve an OCI8 error, I've been led to believe it is the result of an improperly setup environment variable.
What I'm trying to do: Fix this apache environment headache, by adding variables to a certain file.
My actual problem is similar to this error from another StackOverflow user. To quote his answer to his problem:
Problem solved!
To put variables in Apache's Environment section you just have to add
them in /etc/sysconfig/apache2 file:
LD_LIBRARY_PATH=/path/to/oracle/lib.
Notably, the solution called for the modification of the file apache2.
However, I found no such apache2 file on my system.
What I've done so far:
I searched over the net, but the closest I could come up with is /etc/httpd/conf/httpd.conf file. Assuming the httpd.conf is apache2, according to this thread, I should add the variable to the end of the file, and it should work.
So I added export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib at the very end of the file.
And... apache won't even start anymore.
My system:
It's a Fedora 19 server, with Oracle 11g, PHP 5.5.4, Apache 2.4.6, and PEAR 1.9.4. In addition to this, I have the OCI8 plug-in for PHP downloaded and enabled, and have downloaded MDB2 and the MDB2_Driver_oci8.
Apache starts automatically when I boot up my system, though if for some reason I need to stop, restart, or check its status, the command I use is systemctl start httpd.service, if it means anything.
Thanks. I've been pulling my hair out on this problem.
A few things (hopefully an answer is somewhere inside)
First off, I wouldn't do this on Fedora. Fedora is the testbed for RedHat Enterprise/CentOS and it changes frequently. Even if this is just for your testing purposes, you'll find better support if you install CentOS 6 instead. The environment is virtually identical, but CentOS is better supported because so many people use it to run their servers.
Second, it sounds like you want to run the OCI8 connector (there's a reason I plugged CentOS 6). CentOS has many good repos like Remi. If you install CentOS 6 you can use his repository. This is important because this will save you a LOT of headaches down the road. Once you have his repo installed, you can do this
yum install php-oci8
And that should configure Apache to run your OCI8 extension. It's really that simple.
I know this question has been asked before and I've looked through the responses but no matter what I do, I can't create an environment to step through my php programs.
I've downloaded the XAMPP stack, and Eclipse and enabled xdebug but nothing.
PHPinfo reports: Debug Build, No.
Does that mean that I'll never get an XAMPP installation to debug. If so is there another Windows, Apache, PHP, MySQL stack recommended?
I downloaded the Komodo IDE 21 day free trial and their wizard can't start debug either.
help
No, the Debug Build phpinfo() refers to is a compile-time switch/define that affects the way php itself is compiled. The debug build is less optimized, contains some more test code and the symbol files, used when stepping through the php C code with a debugger, are more accurate (mostly due to the less optimized code).
It does not affect the ability to add a script debugger module like xdebug. But you need a version of the module .dll/.so that is compatible with your version of php. The API version, Thread-safety "enabled/disabled" and "debug yes/no" information must match. (on second thought I'm not even sure if debug yes/no must match).
Does the xdebug section appear in the output of phpinfo()? If not make sure you've edited the right php.ini. In recent versions of xampp that should be <xampp dir>/php/php.ini regardless of whether you use php-cli or the apache module. But it used to be <xampp dir>/php/php.ini for the cli version but <xampp dir>/apache/bin/php.ini for the apache module of php.
Also check the error.log in <xampp dir>/apache/logs for error messages that might be related. Those should begin with "PHP Startup: ....error message..."
try using wamp if your using windows. It works great for me