I have MAMP Pro 3, have xDebug installed and activated (if I go to the xdebug.org and analyze the php info I see it’s installed)
Still MAMP Pro doesn't recognize the debug information. (see screen)
Any idea what can it be?
phpinfo() - https://www.diigo.com/item/image/4qykm/4qso
Your phpinfo() was captured via browser (served by Apache) ... while PHP Interpreters in PhpStorm is a CLI thingy (i.e. to be executed in terminal). On some systems/setup (mainly Linux & Mac) they use different settings (different php.ini files).
You clearly have two different php.ini files used in both cases. For PHP Interpreters you have to edit that file that you have on your screenshot with PHP Interpreters (just click on Open in Editor link next to it).
Your Apache uses /Library/Application Support/appsolute/MAMP PRO/conf/php.ini
PHP Interpreters one uses /Applications/MAMP/bin/php/php5.6.10/conf/php.ini
You have to edit the last one and enable/configure xdebug there.
Keep in mind that PHP Interpreters will only be used if you execute/debug CLI scripts or other PHP-powered tools (like PHPUnit tests/CodeSniffer/PHPMD integration/Composer/Phing etc). If you only want to debug files served by Apache .. then PHP Interpreter is not required (and you can ignore what it says there).
P.S.
It's also possible that you may have more than one PHP installation on your computer (even if they are both the same version) -- double check that.
Related
Bear with me - I'm learning as I go, and this is all new to me. I've set up Docksal on Mac OSX, and added an existing site. I've also got Xdebug installed. In order to use it, it appears I need an IDE. I've installed Aptana (no budget for pay services).
I'm trying to figure out how to set up the debugging within Aptana. I see old instructions from 2013 and older. They get me into the general area, of adding a PHP interpreter. But I'm stumped from here.
I don't know what to put in the Name and executable path (if I'm even in the right place for this) when I search for PHP.exe, nothing comes up. When I search for php.ini, I just find files sitting in unrelated Acquia Dev Desktop projects.
I may have accidentally managed to answer my own question.
In terminal, I first typed php --ini , but this gave me (none).
Next I tried sudo find / -type f -name php.ini
After entering the system password, I get three results:
/usr/local/etc/php/5.6/php.ini
/usr/local/etc/php/7.1/php.ini
/usr/local/php5-7.1.10-20171002-090111/lib/php.ini
Next, for the .exe file path, I typed which php
This gave me /usr/bin/php
So, within Aptana Studio 3, I went to Preferences. In the sidebar file tree I navigated to Aptana Studio > Editors > PHP > PHP Interpreters. Click the "Add" button. (This is where I got to, before realizing I couldn't find those files.
from the results above, I added my info:
In executable path, I placed: /usr/bin/php
In PHP.ini files, I placed: /usr/local/etc/php/7.1/php.ini
Press save, and that part "seems" to be solved. Here's hoping it works. I see errors in the bottom pane of Aptana when viewing a php file - so that's promising.
I have downloaded the dll file from http://windows.php.net/downloads/pecl/releases/xhprof/0.10.6/ and kept the first 32 bit file at C:\wamp\bin\php\php5.3.13\ext and also include it in my php.ini file (as extension=php_xhprof.dll). But when I call phpinfo() xhprof is now showing. I am not getting any errors in my log.
There are 2 php.ini file and you may have edited the wrong one.
To make sure you edit the correct php.ini file i.e. the one used by Apache use the wampmanager menus like so:
left click wampmanager -> PHP -> php.ini
Check this has the new extension and if not add it to this file.
The php.ini file in \wamp\bin\php\php{version}\php.ini is only used when you are running PHP CLI i.e. running PHP from the Command Line
Also make sure you downloaded the Thread Safe version of xhprof that will be the ones with -ts- in the zip file name.
Also the vc9 or vc11 should match the compiler used to compile your Apache and PHP. If you are using PHP5.3 (very old) then you had better hope it is VC9 but it is quite possible that your Apache/PHP may have been compiled with VC6 which means this extension will not run with your version of Apache/PHP.
I'm having a hard time using assetics to load resources in my views (I work with Symfony2).
I was working on Linux (Ubuntu 10.4) and switched to Windows 7 a few days ago. I've always been having trouble (some images didn't load for example), but at least most images, and all styles and scripts were loading alright.
When I switched to Windows, some resources weren't loading, so I tried a php app/console assets:install web --symlink
I was quite surprised to see that it had deleted the whole public folder of the bundle I was working on. And there was no way to find the sources again (fortunately, I had saved some of them, and I was able to retrieve most of my work thanks to cached files).
After I've recovered my files (and backed them up), I tried to command again. Same result. I tried without the --symlink and it created some folders in the web/bundle folder, instead of files that were there before (supposedly, the symlinks).
Now the command doesn't even answer anymore (it has been erasing my sources even in some of my backup folders!!).
Bottom-line : is there a way to configure assetics on Windows 7 so that it doesn't eat my files and loads the resources (including images in css) correctly?
Thanks in advance!
Edit :
I just ran the command again and this time it worked (copied the files in web/bundle/...). I must say I don't really understand how or why it worked this time... If by chance anyone knows...
In order to run assets:install web --symlink on a PC you need an elevated command prompt (fancy word for cmd.exe in Administrator mode).
Symfony2 uses the PHP symlink function, according to the docs it should work for Windows Vista, Server 2008 or greater.
By default only Administrators can create symlinks in Windows. So you'll have to use an elevated prompt or give your user the SeCreateSymbolicLinkPrivilege privilege.
You can do it with windows console, but Git Bash is much nicer. Get it and download. Ps. If you never used git before this is the right time to start. :)
When you installed it search in windows programs for git bash and right click it to run as administrator. If you have Git bash opened from the right click in the current folder "git bash here" it wont work because it is not launched by default in administrator mode. If you done this you get this warning.
app/console assets:install web --symlink
Warnings. Hard copy where used instead of symlinks.
However if you play nice and do it as i said. (run as administrator.. you will get everything work nice and smooth.
app/console assets:install web --symlink
Symlinks where created! :) Now you don't need to assets:install every time you made changes to your css files.
Ps. git bash console is nicer then native windows console but... for example Unix system such as Ubuntu would look even better. Also Symfony on Windows with Xamp will run much slower than on Linux Ubuntu system. I am talking about 5x to 20x faster page response on Linux.
You can use configure the composer.json and use forever without any problems,puting in it --symlink.Here is how you can do it.
http://www.w3docs.com/snippets/symfony/how-to-keep-symlinks-in-web-bundles-after-composer-update.html
You can add this configuration option in your composer.json:
{
"extra": {
"symfony-assets-install" : "symlink",
}
}
I did an install of PHP5.3.5 on Windows 7 Home Premium using the MSI installer download. I got it to overwrite a previous version of PHP5 in C:\php5\
When first testing it, the server failed to start. I fixed this by adding the path to PHP in the Apache2.2 httpd file where the installer had inserted 2 lines of coded pointing to the ini file directory and the PHP DLL but had left out the directory path. After doing this, the server starts ok and I can run phpinfo to view the PHP settings in my web browser on local host.
In the phpinfo it states that the loaded configuration file is C:\php5\php.ini as expected. But if I make any changes to the settings, and reboot the server, none of the changes are reflected in phpinfo. Yes, I do refresh the browser window.
If I rename the php.ini to something else to make it invisible phpinfo then correctly identifies that there is no php.ini file loaded.
So the settings in php.ini are being ignored and some default settings are being used (but I have no idea where these are derived from). As far as I can tell, there are no other php.ini files on my computer.
In phpinfo it states that the Configuration File (php.ini) Path is C:\Windows but this is the same as on a Windows XP computer that I work on. And in the windows folder I don't see any php.ini file.
In the windows registry, there is no mention of PHP5, and the PATH environment variable starts with C:\php5\;
So hopefully someone can suggest how I can get PHP5 to take notice of the C:\php5\php.ini settings. :)
You may have more than one php.ini file. If you do, and you don't realize that you do, you will be slowly driven insane [I speak from experience].
So, have you upgraded from a previous version of php to your current version? If so, delete all previous version php.ini files. Check your environment and system variable paths. Eliminate any references to previous versions.
You say youp're running Apache, but is MSII also running, or did you turn it off?
You may have to go into registry ( I no longer use MS OS so I don't know what or how VISTA or Sys7 implement Registry. I used XP when I had this problem and I had to manually eliminate Registry entries for previous versions of PHP.
Lots a luck!
The php.ini file that is loaded (checked through phpinfo) does not seem to have any effect when I change something (after restarting apache). I'm using vista for this (please no answers about use linux, I use that too, I want to have it work on vista also).
edit: version 5.3 VC6 x86 Thread Safe, apache 2.2
edit2: version 5.2.10 VC6 x86 Thread Safe works normal
call phpinfo() function or in CLI php -i
and check "Loaded Configuration File" to see exact php.ini file loaded
Are you sure that the php.ini file is placed in the correct place? Are you using IIS with PHP or just apache?
You could try to reinstall the webserver.
There could be multiple php.ini. In the case of XAMPP, there is one at "U:\xampp\php\" and one in "U:\xampp\apache\bin". The former is for PHP CLI.