In this article I will post a few thoughts about bitnami MAMP on OSX.
After trying different MAMP solution, I found a good MacOS integrated way to do php development.
Installation:
First download you bitnami intaller at https://bitnami.com/stack/mamp
I run the installer to the default location and removed all option (other than phpmyadmin, which is read only anyway.)
Remember the mysql 'root' password, you will need it later on.
I also removed the could checkbox. Once the installation is done you can start the "manager-OSX".
Under the "Manage Servers" you can "Start All"
Test:
To be able to check if the php was working I create a <?php phpinfo(); ?> file 'info.php' file that I saved under
installation_path/apache2/htdocs
I alwas leave that file at the root during development phase.
As you will notice refreshing this page takes a long time because some caching is enable.
if you add in the 'info.php' some "test text" before the <?php phpinfo(); ?> and refresh the page in your browser, you will notice the huge delay before it appears.
Disable cache:
The bitnami installation comes with some cache enable the module is called "opcache".
Find the part with "[opcache]" and comment every uncommented line like:
;zend_extension=opcache.so
;opcache.enable_cli=0
;opcache.memory_consumption=128
;opcache.interned_strings_buffer=8
;opcache.max_accelerated_files=10000
;opcache.revalidate_freq=60
Save the file and restart the Apache Server in "manager-OSX" under "Manage Servers", selecht "Apache Web Server" and click "Restart".
Enable xdebug:
At the very bottom of the 'php.ini' file you will find a 'XDebug' part and uncomment the lines containing:
zend_extension="/Applications/mampstack-7.4.14-0/php/lib/php/extensions/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp
Save the file and restart the Apache Server in "manager-OSX" under "Manage Servers", selecht "Apache Web Server" and click "Restart".
Display errors:
display_errors = Off ->
display_errors = On
Save the file and restart the Apache Server in "manager-OSX" under "Manage Servers", selecht "Apache Web Server" and click "Restart".