9/13/2023 0 Comments Mamp pro enable curl![]() ![]() Mines it's ~/.zshrc because I use Oh My Zsh. If you are using the default Terminal coming with macOS chances are the Profile will either be ~/.bash_profile or ~/.bashrc. Your Command-line's Profile file depends on your shell. #export PATH=/Applications/MAMP/bin/php/php7.4.9/bin:$PATHĪs you can see I'm adding a different line per PHP version I want to potentially have available on the Command-line (PHP 7.1.33, PHP 7.2.33, etcetera) but having them all but one (PHP 7.3.21) commented with the # at the beginning.Įvery time you switch the PHP version in MAMP you should come back to the Profile and leave uncomment the same version so the Terminal and MAMP match. #export PATH=/Applications/MAMP/bin/php/php7.2.33/bin:$PATHĮxport PATH=/Applications/MAMP/bin/php/php7.3.21/bin:$PATH You need to edit your Terminal's Profile in order to add the following to the end: #export PATH=/Applications/MAMP/bin/php/php7.1.33/bin:$PATH ![]() Configuring the Command-line to use MAMP's PHP This next one is how I personally do it because it's easy to implement and it also covers something most of other guides won't which is configure the Terminal to also use the same php.ini MAMP uses. Out there you can find enough guides that helps you archive this because, frankly, there are plenty of methods to get this done. The idea behind changing the Command-line to start using the PHP coming with MAMP and its configuration is to be able to switch rapidly between PHP versions and to have the configuration for PHP in only one place. The problem was that the default port setting is 9000, which in my case I have that port already in use so I looked in my nginx conf at this line: location ~ \.By default, after installation, MAMP will make its PHP binaries "available on the browser" while the Terminal will keep on using the system's PHP with its own configuration. I had trouble with setting up MAMP Pro and nginx myself and the above answer did not work for me. If you already have cachegrind output files you should be able to select the file in the “Auto (newest)” dropdown or leave it select at Auto and click update which will reveal the profile data Visit webgrind url setup on your local MAMP installation. Setup Webgrind host on MAMP to run Webgrind Continue for steps on setting up with webgrind. Webgrind is a simple web based application that you can run locally on MAMP and it will look for the cachegrind.out files automatically with just one click. I went the simple route and used webgrind. ![]() Apps like KCacheGrind (Linux/Windows, KDE), WinCacheGrind (Windows), xdebugtoolkit, and Webgrind. Now you can use any app that understands those cachegrind.out files to view the profile data. ![]() You can open the ‘/tmp’ directory in finder by opening the terminal and running open /tmp Open your ‘/temp’ directory and run one of your PHP files to make sure it is working correctly. If you used the same settings that I have above, when you run PHP code, Xdebug will put the cachegrind.out files in your ‘/tmp’ directory. Doing a search in the browser window for “Xdebug” makes this easy. Check to make sure that Xdebug is running. Open MAMP’s WebStart page and navigate to PHPInfo tab. Save edited template and close edit window Now when you have errors, if they are sent to standard out, you will see something like this If you don’t want profile output and just want xdebug running then use DONT REMOVE: MAMP PRO php5.3.6.ini template compatibility version: 1 Zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" Edit the template file via File -> Edit Template -> PHP -> PHP php.iniĮdit bottom of php.ini template file so that it ends up looking like if you want profile output Here's the tutorial that helped me:Įdit php.ini template file through MAMP to enable the extension. Since release of MAMP 2.01 XDebug is already included. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |