Skip to content

Instantly share code, notes, and snippets.

@codeadamca
Last active June 5, 2026 08:07
Show Gist options
  • Select an option

  • Save codeadamca/09efb674f54172cbee887f04f700fe7c to your computer and use it in GitHub Desktop.

Select an option

Save codeadamca/09efb674f54172cbee887f04f700fe7c to your computer and use it in GitHub Desktop.
How to add new PHP versions to MAMP on a Mac

Adding Versions of PHP to MAMP on a Mac

If you're working on a project that requires a version of PHP higher than the versions that MAMP comes with, you can easily add additional verions.

My version of MAMP came installed with PHP 7.4.21 and 8.0.8. I'm attempting to use MAMP to host a Laravel application which requires at least PHP 8.1.

The version of PHP MAMP uses is often different than the version you have installed. I have installed PHP using Brew. I'm currently running PHP 8.1.8. If you want to check your installed version of PHP, use the terminal and run the following command:

php --version

terminal-php-version

  1. First we need to copy the installed PHP files to MAMP. Using Finder, navigate to /usr/local/Cellar/php and you should find a folder named after the installed version of PHP. For me it was 8.1.8. Copy this folder.

  2. Navigate to the folder that MAMP stores PHP versions. For me this was /Applications/MAMP/bin/php. Paste this folder here.

  3. Rename this folder to php8.1.8 (use your PHP version number).

  4. Next we need the PHP modile file. Navigate to /usr/local/lib/httpd and copy the modules folder. Inside this folder is the PHP module file names libphp.so.

  5. Navigate to /Applications/MAMP/bin/php/php8.1.8 and paste the modules folder.

  6. Close and restart MAMP.

  7. Choose PHP 8.1.8 from the frop down and you should be good to go!

mamp-php-8 1 8

I have a video walk-through on YouTube!

@radrr

radrr commented Dec 7, 2022

Copy link
Copy Markdown

For me it works, i just took the "modules" folder with PHP module for Apache from /usr/local/Cellar/php@7.4/7.4.33/lib/httpd/modules folder. As you have probably noticed, I'm using PHP 7.4.33, adapt the path to you PHP version.

@LoesGrim

LoesGrim commented Dec 9, 2022

Copy link
Copy Markdown

hey, i don't have a "Cellar" folder inside my local folder

If you have a macbook M1 the folder will be inside opt/homebrew/Cellar ...
I have also found the modules folder inside op/homebrew/lib/httpd/modules

@ivke013

ivke013 commented Dec 16, 2022

Copy link
Copy Markdown

Thanks alot! This save my time

@ramilzv

ramilzv commented Dec 19, 2022

Copy link
Copy Markdown

Thanks alot! This save my time

Did you get the version over 8.1 working? I keep getting an Apache error on mac m1, analogues like xampp don't work either

@jzohrab

jzohrab commented Dec 27, 2022

Copy link
Copy Markdown

Thank you @analivko for the tip re the shortcut, that solved my initial setup problem.

For future visitors to this helpful gist, it sometimes helps to run sudo /Applications/MAMP/Library/bin/apachectl start from terminal, because that at least gives some hints as to where possible problems might be coming from. MAMP doesn't always log details for this error, but the terminal command shows where your .conf file is bad, for example.

@albertho425

Copy link
Copy Markdown

Thanks for writing the article and making the video. It's the best video for changing the version of PHP in MAMP.

I followed step by step and can see in phpmyinfo of MAMP that 8.2.1 of PHP is installed and running, but in the MAMP UI dropdown, it doesn't show the new version. Also, phpmyadmin stopped working after changing to the new PHP version.

I download MAMP version 6.7 which has PHP 8.2.0 installed. In the future, I will consider using Docker for PHP.

@Gas9220

Gas9220 commented Apr 28, 2023

Copy link
Copy Markdown

Thank you!

@mnadee123

Copy link
Copy Markdown

apache server is working but mysql server isn't.

@namih

namih commented May 23, 2023

Copy link
Copy Markdown

Apache couldn't be started. Please check your MAMP installation and configuration.

I followed your tutorial step by step and could get the "PHP 8.1.x" option in the "PHP version" dropdown list of MAMP. But when starting MAMP I get a modal error saying "Apache couldn't be started. Please check your MAMP installation and configuration."
And it returns the same error when trying to start it with PHP 8.0.8!

It is because in modules folder has shortcuts NOT files. Right click on file and go to original. Copy this files to your module folder. libphp.so - this file in one folder and other files in another folder. Then restart mamp.

thanks. it worked for me

@mukaspc

mukaspc commented Jun 15, 2023

Copy link
Copy Markdown

Useful info, all is clear, all working. Thanks!
(PHP 8.1.15)

@vitalijalbu

vitalijalbu commented Jul 11, 2023

Copy link
Copy Markdown

Hi guys, I laso have problem with phpmyadmin. I want to update it to latest, because i moved to php 8.2 but phpmyadmin has some bugs...
anyone can help? Thanks.

Screenshot 2023-07-11 alle 09 54 00

@Aleksandr0114

Aleksandr0114 commented Aug 24, 2023

Copy link
Copy Markdown

Hi. I installed everything according to the instructions, but the Apache in MAMP doesn't want to run. I started apachectl and got errors such as: httpd: Syntax error on line 160 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php8.2.9/modules/libphp.so into server: dlopen(/Applications/MAMP/bin/php/php8.2.9/modules/libphp.so, 0x000A): Library not loaded: @loader_path/../../../../../../opt/tidy-html5/lib/libtidy.58.dylib\n

I opened the libphp.so file and there are ways to library via @loader_path/.. /.. /.. /.. /.. /.. /opt/lib and it will not work from path /Applications/MAMP/bin/php/php8.2.9/

Could you give me some advice?

nevermind. I changed line in /Applications/MAMP/conf/apache/httpd.conf
to LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
and run mamp via command line

@dakenn

dakenn commented Sep 4, 2023

Copy link
Copy Markdown

Hi. I installed everything according to the instructions, but the Apache in MAMP doesn't want to run. I started apachectl and got errors such as: httpd: Syntax error on line 160 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php8.2.9/modules/libphp.so into server: dlopen(/Applications/MAMP/bin/php/php8.2.9/modules/libphp.so, 0x000A): Library not loaded: @loader_path/../../../../../../opt/tidy-html5/lib/libtidy.58.dylib\n

I opened the libphp.so file and there are ways to library via @loader_path/.. /.. /.. /.. /.. /.. /opt/lib and it will not work from path /Applications/MAMP/bin/php/php8.2.9/

Could you give me some advice?

nevermind. I changed line in /Applications/MAMP/conf/apache/httpd.conf to LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so and run mamp via command line

Hi Aleksandr0114, I had the same problem. My solution was:
cd /Applications/MAMP/bin/php
ln -s /opt/homebrew/opt/php@8.1/ php8.1.23
ln -s /opt/homebrew/opt/php@8.1/lib/httpd/modules modules

I hope this helps you.

@volkov989

Copy link
Copy Markdown

Hi. I installed everything according to the instructions, but the Apache in MAMP doesn't want to run. I started apachectl and got errors such as: httpd: Syntax error on line 160 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php8.2.9/modules/libphp.so into server: dlopen(/Applications/MAMP/bin/php/php8.2.9/modules/libphp.so, 0x000A): Library not loaded: @loader_path/../../../../../../opt/tidy-html5/lib/libtidy.58.dylib\n
I opened the libphp.so file and there are ways to library via @loader_path/.. /.. /.. /.. /.. /.. /opt/lib and it will not work from path /Applications/MAMP/bin/php/php8.2.9/
Could you give me some advice?
nevermind. I changed line in /Applications/MAMP/conf/apache/httpd.conf to LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so and run mamp via command line

Hi Aleksandr0114, I had the same problem. My solution was: cd /Applications/MAMP/bin/php ln -s /opt/homebrew/opt/php@8.1/ php8.1.23 ln -s /opt/homebrew/opt/php@8.1/lib/httpd/modules modules

I hope this helps you.

Thank you so much!!!

@tonweb-ru

Copy link
Copy Markdown

Hi. I installed everything according to the instructions, but the Apache in MAMP doesn't want to run. I started apachectl and got errors such as: httpd: Syntax error on line 160 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php8.2.9/modules/libphp.so into server: dlopen(/Applications/MAMP/bin/php/php8.2.9/modules/libphp.so, 0x000A): Library not loaded: @loader_path/../../../../../../opt/tidy-html5/lib/libtidy.58.dylib\n
I opened the libphp.so file and there are ways to library via @loader_path/.. /.. /.. /.. /.. /.. /opt/lib and it will not work from path /Applications/MAMP/bin/php/php8.2.9/
Could you give me some advice?
nevermind. I changed line in /Applications/MAMP/conf/apache/httpd.conf to LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so and run mamp via command line

Hi Aleksandr0114, I had the same problem. My solution was: cd /Applications/MAMP/bin/php ln -s /opt/homebrew/opt/php@8.1/ php8.1.23 ln -s /opt/homebrew/opt/php@8.1/lib/httpd/modules modules

I hope this helps you.

I linked the specified directories, but the required version did not appear in the MAMP interface. I also copied the conf folder inside the php8.1 folder, which for some reason was not in /opt/homebrew/Cellar/php@8.1/8.1.24 . Can you tell me by what criterion the program searches for versions in a folder /Applications/MAMP/bin/php (presence of a config, a specific folder or file)?

@LisaDawson

LisaDawson commented Nov 9, 2023

Copy link
Copy Markdown

I opted to install PHP 8.1.8 using Brew, ensuring compatibility. It's crucial to verify your installed PHP version, especially when MAMP may use a different one.

@jaypee-erni

jaypee-erni commented Feb 6, 2024

Copy link
Copy Markdown

hey, i don't have a "Cellar" folder inside my local folder

mine is located in /opt/homebrew/Cellar/

BTW. The way I did it is very simple, no need to do some jargons. Basically in MAMP only 2 php version are being shown in the UI.
Now you just need to go to Applications/mamp/bin/php and remove / rename all php folder version that you will not use. example php5.4.4.5 to 5.4.4.5xxxx. Just make sure not to touch 2 folder that you need. Then restart the mamp then VOALA!

@tkud04

tkud04 commented Apr 4, 2024

Copy link
Copy Markdown

Thank you

@marcoandrei

Copy link
Copy Markdown

Hello, PHP friends!

As I'm using High Sierra, I used MacPorts to install PHP 8.3 and avoid some problems that occurs when using Brew in old macOS versions.

PHP 8.3 is correctly installed, but it appears that everything is spreaded at /opt/local folder:

$ port contents php83 @8.3.6_0+libedit 
Port php83 contains:
  /opt/local/bin/php-config83
  /opt/local/bin/php83
  /opt/local/bin/phpize83
  /opt/local/etc/php83/php.ini-development
  /opt/local/etc/php83/php.ini-production
  /opt/local/etc/select/php/php83
  /opt/local/include/php83/php/TSRM/TSRM.h
  /opt/local/include/php83/php/TSRM/tsrm_win32.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_call_graph.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_cfg.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_dfg.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_dump.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_func_info.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_inference.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_optimizer.h
  /opt/local/include/php83/php/Zend/Optimizer/zend_ssa.h
  /opt/local/include/php83/php/Zend/zend.h
  /opt/local/include/php83/php/Zend/zend_API.h
  /opt/local/include/php83/php/Zend/zend_alloc.h
  /opt/local/include/php83/php/Zend/zend_alloc_sizes.h
  /opt/local/include/php83/php/Zend/zend_arena.h
  /opt/local/include/php83/php/Zend/zend_ast.h
  /opt/local/include/php83/php/Zend/zend_atomic.h
  /opt/local/include/php83/php/Zend/zend_attributes.h
  /opt/local/include/php83/php/Zend/zend_attributes_arginfo.h
  /opt/local/include/php83/php/Zend/zend_bitset.h
  /opt/local/include/php83/php/Zend/zend_build.h
  /opt/local/include/php83/php/Zend/zend_builtin_functions.h
  /opt/local/include/php83/php/Zend/zend_builtin_functions_arginfo.h
  /opt/local/include/php83/php/Zend/zend_call_stack.h
  /opt/local/include/php83/php/Zend/zend_closures.h
  /opt/local/include/php83/php/Zend/zend_closures_arginfo.h
  /opt/local/include/php83/php/Zend/zend_compile.h
  /opt/local/include/php83/php/Zend/zend_config.h
  /opt/local/include/php83/php/Zend/zend_config.w32.h
  /opt/local/include/php83/php/Zend/zend_constants.h
  /opt/local/include/php83/php/Zend/zend_constants_arginfo.h
  /opt/local/include/php83/php/Zend/zend_cpuinfo.h
  /opt/local/include/php83/php/Zend/zend_dtrace.h
  /opt/local/include/php83/php/Zend/zend_enum.h
  /opt/local/include/php83/php/Zend/zend_enum_arginfo.h
  /opt/local/include/php83/php/Zend/zend_errors.h
  /opt/local/include/php83/php/Zend/zend_exceptions.h
  /opt/local/include/php83/php/Zend/zend_exceptions_arginfo.h
  /opt/local/include/php83/php/Zend/zend_execute.h
  /opt/local/include/php83/php/Zend/zend_extensions.h
  /opt/local/include/php83/php/Zend/zend_fibers.h
  /opt/local/include/php83/php/Zend/zend_fibers_arginfo.h
  /opt/local/include/php83/php/Zend/zend_float.h
  /opt/local/include/php83/php/Zend/zend_gc.h
  /opt/local/include/php83/php/Zend/zend_gdb.h
  /opt/local/include/php83/php/Zend/zend_generators.h
  /opt/local/include/php83/php/Zend/zend_generators_arginfo.h
  /opt/local/include/php83/php/Zend/zend_globals.h
  /opt/local/include/php83/php/Zend/zend_globals_macros.h
  /opt/local/include/php83/php/Zend/zend_hash.h
  /opt/local/include/php83/php/Zend/zend_highlight.h
  /opt/local/include/php83/php/Zend/zend_hrtime.h
  /opt/local/include/php83/php/Zend/zend_inheritance.h
  /opt/local/include/php83/php/Zend/zend_ini.h
  /opt/local/include/php83/php/Zend/zend_ini_parser.h
  /opt/local/include/php83/php/Zend/zend_ini_scanner.h
  /opt/local/include/php83/php/Zend/zend_ini_scanner_defs.h
  /opt/local/include/php83/php/Zend/zend_interfaces.h
  /opt/local/include/php83/php/Zend/zend_interfaces_arginfo.h
  /opt/local/include/php83/php/Zend/zend_istdiostream.h
  /opt/local/include/php83/php/Zend/zend_iterators.h
  /opt/local/include/php83/php/Zend/zend_language_parser.h
  /opt/local/include/php83/php/Zend/zend_language_scanner.h
  /opt/local/include/php83/php/Zend/zend_language_scanner_defs.h
  /opt/local/include/php83/php/Zend/zend_list.h
  /opt/local/include/php83/php/Zend/zend_llist.h
  /opt/local/include/php83/php/Zend/zend_long.h
  /opt/local/include/php83/php/Zend/zend_map_ptr.h
  /opt/local/include/php83/php/Zend/zend_max_execution_timer.h
  /opt/local/include/php83/php/Zend/zend_mmap.h
  /opt/local/include/php83/php/Zend/zend_modules.h
  /opt/local/include/php83/php/Zend/zend_multibyte.h
  /opt/local/include/php83/php/Zend/zend_multiply.h
  /opt/local/include/php83/php/Zend/zend_object_handlers.h
  /opt/local/include/php83/php/Zend/zend_objects.h
  /opt/local/include/php83/php/Zend/zend_objects_API.h
  /opt/local/include/php83/php/Zend/zend_observer.h
  /opt/local/include/php83/php/Zend/zend_operators.h
  /opt/local/include/php83/php/Zend/zend_portability.h
  /opt/local/include/php83/php/Zend/zend_ptr_stack.h
  /opt/local/include/php83/php/Zend/zend_range_check.h
  /opt/local/include/php83/php/Zend/zend_signal.h
  /opt/local/include/php83/php/Zend/zend_smart_str.h
  /opt/local/include/php83/php/Zend/zend_smart_str_public.h
  /opt/local/include/php83/php/Zend/zend_smart_string.h
  /opt/local/include/php83/php/Zend/zend_smart_string_public.h
  /opt/local/include/php83/php/Zend/zend_sort.h
  /opt/local/include/php83/php/Zend/zend_stack.h
  /opt/local/include/php83/php/Zend/zend_stream.h
  /opt/local/include/php83/php/Zend/zend_string.h
  /opt/local/include/php83/php/Zend/zend_strtod.h
  /opt/local/include/php83/php/Zend/zend_strtod_int.h
  /opt/local/include/php83/php/Zend/zend_system_id.h
  /opt/local/include/php83/php/Zend/zend_type_info.h
  /opt/local/include/php83/php/Zend/zend_types.h
  /opt/local/include/php83/php/Zend/zend_variables.h
  /opt/local/include/php83/php/Zend/zend_virtual_cwd.h
  /opt/local/include/php83/php/Zend/zend_vm.h
  /opt/local/include/php83/php/Zend/zend_vm_def.h
  /opt/local/include/php83/php/Zend/zend_vm_execute.h
  /opt/local/include/php83/php/Zend/zend_vm_handlers.h
  /opt/local/include/php83/php/Zend/zend_vm_opcodes.h
  /opt/local/include/php83/php/Zend/zend_vm_trace_handlers.h
  /opt/local/include/php83/php/Zend/zend_vm_trace_lines.h
  /opt/local/include/php83/php/Zend/zend_vm_trace_map.h
  /opt/local/include/php83/php/Zend/zend_weakrefs.h
  /opt/local/include/php83/php/Zend/zend_weakrefs_arginfo.h
  /opt/local/include/php83/php/ext/date/lib/timelib.h
  /opt/local/include/php83/php/ext/date/lib/timelib_config.h
  /opt/local/include/php83/php/ext/date/php_date.h
  /opt/local/include/php83/php/ext/dom/xml_common.h
  /opt/local/include/php83/php/ext/filter/php_filter.h
  /opt/local/include/php83/php/ext/hash/php_hash.h
  /opt/local/include/php83/php/ext/hash/php_hash_adler32.h
  /opt/local/include/php83/php/ext/hash/php_hash_crc32.h
  /opt/local/include/php83/php/ext/hash/php_hash_fnv.h
  /opt/local/include/php83/php/ext/hash/php_hash_gost.h
  /opt/local/include/php83/php/ext/hash/php_hash_haval.h
  /opt/local/include/php83/php/ext/hash/php_hash_joaat.h
  /opt/local/include/php83/php/ext/hash/php_hash_md.h
  /opt/local/include/php83/php/ext/hash/php_hash_murmur.h
  /opt/local/include/php83/php/ext/hash/php_hash_ripemd.h
  /opt/local/include/php83/php/ext/hash/php_hash_sha.h
  /opt/local/include/php83/php/ext/hash/php_hash_sha3.h
  /opt/local/include/php83/php/ext/hash/php_hash_snefru.h
  /opt/local/include/php83/php/ext/hash/php_hash_tiger.h
  /opt/local/include/php83/php/ext/hash/php_hash_whirlpool.h
  /opt/local/include/php83/php/ext/hash/php_hash_xxhash.h
  /opt/local/include/php83/php/ext/json/php_json.h
  /opt/local/include/php83/php/ext/json/php_json_parser.h
  /opt/local/include/php83/php/ext/json/php_json_scanner.h
  /opt/local/include/php83/php/ext/libxml/php_libxml.h
  /opt/local/include/php83/php/ext/mysqlnd/config-win.h
  /opt/local/include/php83/php/ext/mysqlnd/mysql_float_to_double.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_alloc.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_auth.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_block_alloc.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_charset.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_commands.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_connection.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_debug.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_enum_n_def.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_ext_plugin.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_libmysql_compat.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_plugin.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_portability.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_priv.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_protocol_frame_codec.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_ps.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_read_buffer.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_result.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_result_meta.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_reverse_api.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_statistics.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_structs.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_vio.h
  /opt/local/include/php83/php/ext/mysqlnd/mysqlnd_wireprotocol.h
  /opt/local/include/php83/php/ext/mysqlnd/php_mysqlnd.h
  /opt/local/include/php83/php/ext/pcre/php_pcre.h
  /opt/local/include/php83/php/ext/pdo/php_pdo.h
  /opt/local/include/php83/php/ext/pdo/php_pdo_driver.h
  /opt/local/include/php83/php/ext/pdo/php_pdo_error.h
  /opt/local/include/php83/php/ext/phar/php_phar.h
  /opt/local/include/php83/php/ext/random/php_random.h
  /opt/local/include/php83/php/ext/session/mod_files.h
  /opt/local/include/php83/php/ext/session/mod_user.h
  /opt/local/include/php83/php/ext/session/php_session.h
  /opt/local/include/php83/php/ext/simplexml/php_simplexml.h
  /opt/local/include/php83/php/ext/simplexml/php_simplexml_exports.h
  /opt/local/include/php83/php/ext/spl/php_spl.h
  /opt/local/include/php83/php/ext/spl/spl_array.h
  /opt/local/include/php83/php/ext/spl/spl_directory.h
  /opt/local/include/php83/php/ext/spl/spl_dllist.h
  /opt/local/include/php83/php/ext/spl/spl_engine.h
  /opt/local/include/php83/php/ext/spl/spl_exceptions.h
  /opt/local/include/php83/php/ext/spl/spl_fixedarray.h
  /opt/local/include/php83/php/ext/spl/spl_functions.h
  /opt/local/include/php83/php/ext/spl/spl_heap.h
  /opt/local/include/php83/php/ext/spl/spl_iterators.h
  /opt/local/include/php83/php/ext/spl/spl_observer.h
  /opt/local/include/php83/php/ext/standard/base64.h
  /opt/local/include/php83/php/ext/standard/basic_functions.h
  /opt/local/include/php83/php/ext/standard/basic_functions_arginfo.h
  /opt/local/include/php83/php/ext/standard/crc32.h
  /opt/local/include/php83/php/ext/standard/crc32_x86.h
  /opt/local/include/php83/php/ext/standard/credits.h
  /opt/local/include/php83/php/ext/standard/credits_ext.h
  /opt/local/include/php83/php/ext/standard/credits_sapi.h
  /opt/local/include/php83/php/ext/standard/crypt_blowfish.h
  /opt/local/include/php83/php/ext/standard/crypt_freesec.h
  /opt/local/include/php83/php/ext/standard/css.h
  /opt/local/include/php83/php/ext/standard/datetime.h
  /opt/local/include/php83/php/ext/standard/dir_arginfo.h
  /opt/local/include/php83/php/ext/standard/dl.h
  /opt/local/include/php83/php/ext/standard/dl_arginfo.h
  /opt/local/include/php83/php/ext/standard/exec.h
  /opt/local/include/php83/php/ext/standard/file.h
  /opt/local/include/php83/php/ext/standard/file_arginfo.h
  /opt/local/include/php83/php/ext/standard/flock_compat.h
  /opt/local/include/php83/php/ext/standard/fsock.h
  /opt/local/include/php83/php/ext/standard/head.h
  /opt/local/include/php83/php/ext/standard/html.h
  /opt/local/include/php83/php/ext/standard/html_tables.h
  /opt/local/include/php83/php/ext/standard/info.h
  /opt/local/include/php83/php/ext/standard/md5.h
  /opt/local/include/php83/php/ext/standard/pack.h
  /opt/local/include/php83/php/ext/standard/pageinfo.h
  /opt/local/include/php83/php/ext/standard/php_array.h
  /opt/local/include/php83/php/ext/standard/php_assert.h
  /opt/local/include/php83/php/ext/standard/php_browscap.h
  /opt/local/include/php83/php/ext/standard/php_crypt.h
  /opt/local/include/php83/php/ext/standard/php_crypt_r.h
  /opt/local/include/php83/php/ext/standard/php_dir.h
  /opt/local/include/php83/php/ext/standard/php_dns.h
  /opt/local/include/php83/php/ext/standard/php_ext_syslog.h
  /opt/local/include/php83/php/ext/standard/php_filestat.h
  /opt/local/include/php83/php/ext/standard/php_fopen_wrappers.h
  /opt/local/include/php83/php/ext/standard/php_http.h
  /opt/local/include/php83/php/ext/standard/php_image.h
  /opt/local/include/php83/php/ext/standard/php_incomplete_class.h
  /opt/local/include/php83/php/ext/standard/php_lcg.h
  /opt/local/include/php83/php/ext/standard/php_mail.h
  /opt/local/include/php83/php/ext/standard/php_math.h
  /opt/local/include/php83/php/ext/standard/php_mt_rand.h
  /opt/local/include/php83/php/ext/standard/php_net.h
  /opt/local/include/php83/php/ext/standard/php_password.h
  /opt/local/include/php83/php/ext/standard/php_rand.h
  /opt/local/include/php83/php/ext/standard/php_random.h
  /opt/local/include/php83/php/ext/standard/php_smart_string.h
  /opt/local/include/php83/php/ext/standard/php_smart_string_public.h
  /opt/local/include/php83/php/ext/standard/php_standard.h
  /opt/local/include/php83/php/ext/standard/php_string.h
  /opt/local/include/php83/php/ext/standard/php_uuencode.h
  /opt/local/include/php83/php/ext/standard/php_var.h
  /opt/local/include/php83/php/ext/standard/php_versioning.h
  /opt/local/include/php83/php/ext/standard/proc_open.h
  /opt/local/include/php83/php/ext/standard/quot_print.h
  /opt/local/include/php83/php/ext/standard/scanf.h
  /opt/local/include/php83/php/ext/standard/sha1.h
  /opt/local/include/php83/php/ext/standard/streamsfuncs.h
  /opt/local/include/php83/php/ext/standard/url.h
  /opt/local/include/php83/php/ext/standard/url_scanner_ex.h
  /opt/local/include/php83/php/ext/standard/user_filters_arginfo.h
  /opt/local/include/php83/php/ext/standard/winver.h
  /opt/local/include/php83/php/ext/xml/expat_compat.h
  /opt/local/include/php83/php/ext/xml/php_xml.h
  /opt/local/include/php83/php/ext/xml/xml_arginfo.h
  /opt/local/include/php83/php/main/SAPI.h
  /opt/local/include/php83/php/main/build-defs.h
  /opt/local/include/php83/php/main/fastcgi.h
  /opt/local/include/php83/php/main/fopen_wrappers.h
  /opt/local/include/php83/php/main/http_status_codes.h
  /opt/local/include/php83/php/main/main_arginfo.h
  /opt/local/include/php83/php/main/php.h
  /opt/local/include/php83/php/main/php_compat.h
  /opt/local/include/php83/php/main/php_config.h
  /opt/local/include/php83/php/main/php_content_types.h
  /opt/local/include/php83/php/main/php_getopt.h
  /opt/local/include/php83/php/main/php_globals.h
  /opt/local/include/php83/php/main/php_ini.h
  /opt/local/include/php83/php/main/php_ini_builder.h
  /opt/local/include/php83/php/main/php_main.h
  /opt/local/include/php83/php/main/php_memory_streams.h
  /opt/local/include/php83/php/main/php_network.h
  /opt/local/include/php83/php/main/php_odbc_utils.h
  /opt/local/include/php83/php/main/php_open_temporary_file.h
  /opt/local/include/php83/php/main/php_output.h
  /opt/local/include/php83/php/main/php_reentrancy.h
  /opt/local/include/php83/php/main/php_scandir.h
  /opt/local/include/php83/php/main/php_streams.h
  /opt/local/include/php83/php/main/php_syslog.h
  /opt/local/include/php83/php/main/php_ticks.h
  /opt/local/include/php83/php/main/php_variables.h
  /opt/local/include/php83/php/main/php_version.h
  /opt/local/include/php83/php/main/rfc1867.h
  /opt/local/include/php83/php/main/snprintf.h
  /opt/local/include/php83/php/main/spprintf.h
  /opt/local/include/php83/php/main/streams/php_stream_context.h
  /opt/local/include/php83/php/main/streams/php_stream_filter_api.h
  /opt/local/include/php83/php/main/streams/php_stream_glob_wrapper.h
  /opt/local/include/php83/php/main/streams/php_stream_mmap.h
  /opt/local/include/php83/php/main/streams/php_stream_plain_wrapper.h
  /opt/local/include/php83/php/main/streams/php_stream_transport.h
  /opt/local/include/php83/php/main/streams/php_stream_userspace.h
  /opt/local/include/php83/php/main/streams/php_streams_int.h
  /opt/local/include/php83/php/main/streams/userspace_arginfo.h
  /opt/local/include/php83/php/sapi/cli/cli.h
  /opt/local/lib/php83/build/Makefile.global
  /opt/local/lib/php83/build/ax_check_compile_flag.m4
  /opt/local/lib/php83/build/ax_gcc_func_attribute.m4
  /opt/local/lib/php83/build/config.guess
  /opt/local/lib/php83/build/config.sub
  /opt/local/lib/php83/build/gen_stub.php
  /opt/local/lib/php83/build/libtool.m4
  /opt/local/lib/php83/build/ltmain.sh
  /opt/local/lib/php83/build/php.m4
  /opt/local/lib/php83/build/php_cxx_compile_stdcxx.m4
  /opt/local/lib/php83/build/phpize.m4
  /opt/local/lib/php83/build/pkg.m4
  /opt/local/lib/php83/build/run-tests.php
  /opt/local/lib/php83/build/shtool
  /opt/local/share/man/man1/php-config83.1.gz
  /opt/local/share/man/man1/php83.1.gz
  /opt/local/share/man/man1/phpize83.1.gz
  /opt/local/var/db/php83/.turd_php83

Could anyone help me to find out what folder I should copy to MAMP? Any advice is welcome!

Thanks in advance!

@gustavopi

Copy link
Copy Markdown

Hi! I have already the versions of PHP that I need. Problem is I had to reinstall MAMP and now only 7.4.33 and 8.2.0 are available in the versions menu of the app. This is the listing of /Applications/MAMP/bin/php:
browscap.ini php5.4.45 php7.3.33 php8.1.13 composer php5.6.40 php7.4.33 php8.2.0
I don't remember how did I fix it, but I need the 8.1.13 to work again. Please help!

@gustavopi

Copy link
Copy Markdown

Hello, PHP friends!

As I'm using High Sierra, I used MacPorts to install PHP 8.3 and avoid some problems that occurs when using Brew in old macOS versions.

PHP 8.3 is correctly installed, but it appears that everything is spreaded at /opt/local folder:

$ port contents php83 @8.3.6_0+libedit 
Port php83 contains:
  /opt/local/bin/php-config83
  /opt/local/bin/php83

Could anyone help me to find out what folder I should copy to MAMP? Any advice is welcome!

Thanks in advance!

As far I know, you install MAMP in Applications folder and copy php files to /Applications/MAMP/bin/php, not the opposite. However, it will probably NOT be available in the MAMP's php version menu to be selected. If it does, please tell me!

@simderoemer

Copy link
Copy Markdown

If anyone else is having an issue with Php 8.3:
You'll need a config folder for your 8.3 version. Go to /Applications/MAMP/conf
Duplicate one of the previous php folders (like 8.1.13) rename to the name of your 8.3 version

Then go into the folder, edit the pear.conf replace all references of 8.1.13 with your 8.3 version

@santytorrico

Copy link
Copy Markdown

hey guys, Im trying to get this to work, I only tried to run the server with the defaults and the php version that comes right now, which is 8.3.8 but when I start the server there's this error
'Apache couldn't be started. Please check your MAMP installation and configuration.'
looking into the logs theres this error
/Applications/MAMP/fcgi-bin/php.fcgi: line 4: exec: /Applications/MAMP/bin/php/php8.3.1/bin/php-cgi: cannot execute: No such file or directory
this error shows up when I run the apachectl Im not sure what to do, also anyways I need to work with a previous version 7.0.33 which is previous, does the tutorial work for previous versions ?

@stwrr

stwrr commented Sep 22, 2024

Copy link
Copy Markdown

If anyone else is having an issue with Php 8.3: You'll need a config folder for your 8.3 version. Go to /Applications/MAMP/conf Duplicate one of the previous php folders (like 8.1.13) rename to the name of your 8.3 version

Then go into the folder, edit the pear.conf replace all references of 8.1.13 with your 8.3 version

@simderoemer Hi, can you please explain in more detail what needs to be done to make it work with php 8.3?

@simderoemer

Copy link
Copy Markdown

Hi @stwrr I installed php 8.3 using homebrew then moved the folder across into /Applications/MAMP/bin/php
But there wasn't a /Applications/MAMP/conf/php8.3.8 folder, so I duplicated the config folder from 8.1 and made the changes emtioned above and this worked for me

@ShuaibBashiru

Copy link
Copy Markdown

another

You are right. I just made the same mistake

@CodeByLine

Copy link
Copy Markdown

hey, i don't have a "Cellar" folder inside my local folder

If you have a macbook M1 the folder will be inside opt/homebrew/Cellar ... I have also found the modules folder inside op/homebrew/lib/httpd/modules

That helped!

@CodeByLine

Copy link
Copy Markdown

This tip below finally resolved it for me!

For future visitors to this helpful gist, it sometimes helps to run sudo /Applications/MAMP/Library/bin/apachectl start from terminal, because that at least gives some hints as to where possible problems might be coming from. MAMP doesn't always log details for this error, but the terminal command shows where your .conf file is bad, for example.

@jgugelot

jgugelot commented Apr 28, 2026

Copy link
Copy Markdown

This is what i had to to do get it fixed (installing PHP8.3+8.4 on MAMP 6.8):

  • Be sure MAMP is in module-mode (not CGI-mode)
  • Install PHP version using brew: brew install php@{version}, copy new php folder(s) to MAMP: /opt/homebrew/Cellar/ to /Applications/MAMP/php
  • Copy /conf/* from another existing mamp PHP-version into the new-PHP version folder, edit pear.conf and php.ini and replace all references to the old version by the new version
  • Copy the folder /lib/httpd/modules into the root of the php-folder

@slackero

slackero commented Jun 5, 2026

Copy link
Copy Markdown

I have prepared an environment for building missing php packages without Homebrew and added pre-built packages for

  • php 8.2.31
  • php 8.3.31
  • php 8.4.21
  • php 8.5.6

Should work with MAMP 6.9. I need to stick with the old version to be able to run PHP 5.x, PHP 7.x for several legacy php projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment