Installing ionCube Loader 5.3 on MAMP in 2 minutes.

Today I needed to install ionCube 5.3 to run WHMCS locally and it was surprisingly easy :)

  1. Download ionCube from
  2. Copy the whole ioncube folder to
  3. Open /Applications/MAMP/conf/php5.3/php.ini
  4. Add this line somewhere around line 1088 
  5. Restart Apache.




@Mathew I think you're correct, I either made a mistake or something changed. I've updated MAMP since I did this post so I can't say.

I have now updated the post.


Nice details - but which ioncube loader do you download for MAMP on Mac? There seem to be a gazillion choices at the ioncube site ;)


If it's a 64bit Mac then try:

Hi I am still having the error :
ionCube Loaders: Failed
PHP Version: Failed

is there anything else that I am missing?

best regards



Ensure you don't have anything that conflicts with ioncube like xdebug?

Check your MAMP logs:
PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0

So try putting the "zend_extension" line at the top of your php.ini file and then restarting your MAMP server.


Just a suggestion that you update this post to include the suggestion by commenter Everett to NOT place the "zend_extension="/Applications/MAMP/bin/php/php5.3/lib/php/extensions/ioncube/" line around line 1088, but instead include it at the TOP of the .ini file. This was the only way to solve this for me. I placed the "zend_extension" line right after the initial [php] at the very top of the .ini file.


Thanks for the idea Ben. That was stupid easy.


Any Idea how to update PHP version first? I downloaded 5.4.25 and replaced it with the old php5 folder, but it doesn't seem to work.

Nevertheless, in php.ini, I added in the end:
but nothing seem to load, neither.


I followed the instructions in this post but can't get the ioncube loader to work. I hoping someone can help.

I get this message when installing a cloned website on my localhost using the Duplicator plugin for WordPress.
"Site error: the file /Applications/MAMP/htdocs/ReelAfricanSafari/wp-content/themes/pbtheme/functions.php requires the ionCube PHP Loader to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation."

I downloaded and copied the expanded folder to /Applications/MAMP/bin/php5.3/lib/php/extensions/ioncube/
I then inserted the line below at line 1085 and when that didn't work I tried inserting it just after the opening [PHP]:

Below is the first line in the functions.php file that requires ioncube to be installed. I include it incase there is a way to disable this requirement and solve the problem of trying to get the ioncube loader to work.

if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file '.__FILE__.' requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.');exit(199);

Finally found a solution : )

1. Download: Loader Wizard:
2. Copy the file loader-wizard.php to your htdocs
4. In browser run http://localhost:8888/loader-wizard.php
5. Follow the instructions on the page.
4. After making the changes stop servers, then start servers
10. In your browser with still http://localhost:8888/loader-wizard.php open, follow the remaining instructions

That worked for me.

NOTE: remember the version of PHP you are using 5.3, 5.4,... or 5.6 you need to make the changes according to the version you are using, but the loader-wizard.php will always give you the right path and version with specific instructions. Good luck!

This article helped, but in current versions, you cannot enclose the path/file in quotes. It must be simply (in my case):

zend_extension = /Applications/MAMP/bin/php/php5.4.34/lib/php/extensions/no-debug-non-zts-20100525//

The loader-wizard.php tipped me off, since it said to use the above format, and not:

zend_extension = "/Applications/MAMP/bin/php/php5.4.34/lib/php/extensions/no-debug-non-zts-20100525//"

as the article above says. As soon as I stripped the quote and restarted, all was fine.

Had an extra / in there, it should be:

zend_extension = /Applications/MAMP/bin/php/php5.4.34/lib/php/extensions/no-debug-non-zts-20100525/


No luck with the above, until I used the MAMP Pro controls: File -> Edit Template -> PHP -> (whatever version)

When editing the files in the first few replies of this topic, directly, with any editor, MAMP overwrites them back to defaults. Had to use the Template Edit.



I had no luck as well until I used the MAMP Pro controls: File -> Edit Template -> PHP -> (whatever version). I spent way to much time with this using my editor and going over and over doing searches, etc.until I came upon your post.


Para todo el que andaba buscando la solución..GRACIAS A MARK! estuve 1 día completo tratando y era una simple configuración de MAMP!!!

Thanks MARK for the solution! Applause!

Had an extra / in there, it should be:
ON MAMP Pro controls: File -> Edit Template -> PHP -> (whatever version) then Add the next line

zend_extension = /Applications/MAMP/bin/php/php5.4.34/lib/php/extensions/no-debug-non-zts-20100525/

and then SAVE...and WALA!

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.