26.07.2010: Updated and improved to work with MAMP ver. 1.9. If you are not a pecl auto make ninja, pls resort to the manual build if PECL modules then it give you more control.
This howto will show you how to get those pesky PECL modules to compile on MAMP. Drupal background, FileField and ImageField 3.0 for Drupal 6 are now finally released, and the final release enables upload progress indication that come in handy uploading large file but this enhancement requires a PECL module (PHP extension), uploadprogress. Many OS X users are using MAMP to sandbox their development environment but getting PECL to compile is not quite that easy.
Build uploadprogress in Leopard (version 10.5.x)
Build uploadprogress in Snow Leopard (version 10.6.x)
Manually build uploadprogress or any PECL extension out there.
Trouble shooting and links to prebuild modules and some word of warning.
When installing the Drupal module filefield-6.x-3.x you will in /admin/reports/status find a friendly warning telling you that the uploadprogress module is a nice addon.
Upload progress
Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (prefered) or to install APC.
As an early adopter I could not find any information on the web on how to compile and get a PECL PHP extension compiled and up and running under MAMP. After a day forth and back between pages I solved it, and decided to try and document is for other that are still struggling.
cd /Applications/MAMP/bin/php5.2/include/php
./configure
cd /Applications/MAMP/bin/php5.2/bin
sudo chmod a+x *
sudo ./pecl i uploadprogress
To help with finding the extensions directory, look at your phpinfo page from MAMP: Under "PHP Core" is the listing for "extension_dir" that will be the path you want to copy to. You can also use this same page to confirm that the extension is successfully enabled.
To verify that the extension got successfully loaded by Apache, take a look in your phpinfo page from MAMP. Just search the page for "uploadprogress".

You can also manually start PHP from your command shell and ask what extensions it loaded:/Applications/MAMP/bin/php5.2/bin/php -m
Snow Leopard is almost identical to Leopard (and should be). A lot of people had problem loading the module they compiled (read comments bellow) on Snow Leopard. Snow Leopard introduced proper 64 bit support and Xcode compiled the module in 64bits mode only though MAMP 1.8/1.9 is still a 32bit (i386) application and loading a 64bit extension into a 32bit application is doomed. This is what worked on my system:
mkdir /Applications/MAMP/bin/php5.2/include
/Applications/MAMP/bin/php5.2/include/phpcd /Applications/MAMP/bin/php5.2/include/php
./configureMACOSX_DEPLOYMENT_TARGET=10.6
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGETcd /Applications/MAMP/bin/php5.2/bin
sudo chmod a+x *sudo ./pecl install uploadprogressBuild process completed successfully
Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/uploadprogress.so'
install ok: channel://pecl.php.net/uploadprogress-1.0.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=uploadprogress.so" to php.inigrep "extension_dir =" /Applications/MAMP/conf/php5.2/php.ini
On my system was it located at /Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20060613/ it might be slightly different on your system, anyway on using my paths:
cp /usr/lib/php/extensions/no-debug-non-zts-20090626/uploadprogress.so /Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20060613/
/Applications/MAMP/conf/php5.2/php.iniextension=uploadprogress.soTo verify that the extension got successfully loaded by Apache, take a look in your phpinfo page from MAMP. Just search the page for "uploadprogress".

You can also manually start PHP from your command shell and ask what extensions it loaded: /Applications/MAMP/bin/php5.2/bin/php -m
Manually build your PECL extension

http://www.flickr.com/photos/grrphoto/ / CC BY 2.0
No you don't need to be a Ninja to manually build an PECL module it normally involve a few more steps building the extension and be be very handy on computers with multiple PHP installations then makes it easier to control how to make the build and from where to include stuff.
mkdir /Applications/MAMP/bin/php5.2/include
/Applications/MAMP/bin/php5.2/include/phpcd /Applications/MAMP/bin/php5.2/include/php
./configurecd uploadprogress-version
/Applications/MAMP/bin/php5.2/bin/phpize
MACOSX_DEPLOYMENT_TARGET=10.6
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
./configure --with-php-config=/Applications/MAMP/bin/php5.2/bin/php-config
make
make installThe compiled module should now get copied to the correct extension directory and all you need to do is to restart the Apache MAMP server.
Still not working or are you just lazy?

http://www.flickr.com/photos/markjsebastian/ / CC BY-SA 2.0
If all of the above fails, read the instruction again and try to understand the steps, follow the carefully and keep a eye out for errors when MAMP is starting Apache. Monitor /Applications/MAMP/logs/php_error.log with Apple Console utility or from shell:
tail -f /Applications/MAMP/logs/php_error.log
You can also try loading more information regarding the extension manually:
/Applications/MAMP/bin/php5.2/bin/php --ri uploadprogress
This should give you something like:
uploadprogress
uploadprogress support => enabled
Version => 1.0.1
Directive => Local Value => Master Value
uploadprogress.file.filename_template => /var/tmp//upt_%s.txt => /var/tmp//upt_%s.txt
uploadprogress.file.contents_template => /var/tmp//upload_contents_%s => /var/tmp//upload_contents_%s
uploadprogress.get_contents => 0 => 0
A lot of the problem people are seeing trying to compile on Snow Leopard is related to PECL auto build are not correctly set up, and the pecl utility are building the extension by using the system wide PHP installation and/or the extension are build for 64bit programs only. MAMP (up to 1.9) are still running in 32 bit mode so loading a 64 bit version of your module in a 32 bits MAMP is futile. Check the compiled module:
file uploadprogress.so
uploadprogress.so: Mach-O universal binary with 2 architectures
uploadprogress.so (for architecture i386): Mach-O bundle i386
uploadprogress.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
Does this this command tell you that it is only build for Mach-O 64-bit bundle x86_64 do you have an error in your PECL/PEAR config. Check for .pecl.default config files in your system that might cause you grief.
Still reading? Then I guess you are getting quite desperate, but not all hope is not lost. I have also provided two precompiled extensions:
As usual you need to include the module in php.ini belonging to MAMP and restart the MAMP Apache server
Just a heads up...one thing that can cause headaches is if you have macports libraries installed that you have to link against....on Snow leopard if you don't edit /opt/local/etc/macports/macports.conf and uncomment this line build_arch i386 before you install the port it will compile using x86_64 architecture.....
Then when you try to build your extension (fileinfo in my case which needs libmagic installed) and point the config to look in /opt/local/ , if you are targeting 32 bit the build will crap out, and if you build in 64 bit obviously and you are downloading a precompiled version of 32 bit MAMP, then the extension won't load....anyhoo, I spose you could build MAMP from source in 64 bit as the other alternative.
This how to is largely build upon http://www.lullabot.com/about/nate-haug excellent article on how to Setup a Memcached-Enabled MAMP Sandbox Environment
Comments
Just what I was looking for!
Just what I was looking for! But step 7 seems incomplete, right?
Step 7 incompleate
Good catch! Step 7 is now fixed.
Once the extension is
Once the extension is compiled and moved into MAMP's own extension's directory, does the extra downloaded copy of PHP need to remain, or can it be deleted?
Thanks for the lesson by the way, I was wondering about how to do this in MAMP.
Thanks a lot, works like a
Thanks a lot, works like a charm!!
not working
Hi!
Once I get to "./pecl i uploadprogress"
I get this error message:
No releases available for package "pecl.php.net/uploadprogress"
Cannot initialize 'channel://pecl.php.net/uploadprogress', invalid or missing package file
Package "channel://pecl.php.net/uploadprogress" is not valid
install failed
I think the link is incorrect, because it should be: http://pecl.php.net/get/uploadprogress
Help anyone?
thanks!
bluestar
Sure?
Did you run:
"./pecl i uploadprogress"
FYI I found that I didn't
FYI I found that I didn't need to install the complete PHP Source Code into MAMP. Once I downloaded xCode Tools I was fine.
No " Build process completed successfully"
Thanks for the guild but I couldn't get a success installation.
I get the error below:
uploadprogress.c:75: error: 'MULTIPART_EVENT_START' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:75: error: (Each undeclared identifier is reported only once
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:75: error: for each function it appears in.)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:76: error: 'multipart_event_start' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:76: error: 'e_data' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:77: error: parse error before ')' token
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:87: error: 'MULTIPART_EVENT_FORMDATA' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:89: error: 'multipart_event_formdata' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:90: error: parse error before ')' token
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:124: error: 'MULTIPART_EVENT_FILE_START' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:127: error: 'multipart_event_file_start' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:129: error: parse error before ')' token
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:146: error: 'MULTIPART_EVENT_FILE_DATA' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:147: error: 'multipart_event_file_data' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:149: error: parse error before ')' token
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:163: error: 'MULTIPART_EVENT_FILE_END' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:164: error: 'multipart_event_file_end' undeclared (first use in this function)
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:166: error: parse error before ')' token
/Users/jenoloo/temp/uploadprogress/uploadprogress.c:176: error: 'MULTIPART_EVENT_END' undeclared (first use in this function)
make: *** [uploadprogress.lo] Error 1
ERROR: `make' failed
Thanks
What version of OS X are you running?
What version of OS X are you running?
What PHP version did you download?
It is not finding any or some lib from PHP when it compiles the plugin.
My setup
I am running on my test machine which is my laptop running Mac OS X 10.4.10. + drupal 6.12 + MAMP Pro 1.7.2 (I think it won't make any difference if I am using the free version of MAMP).
Thanks
Apache
PHP Version 5.2.6
I think the problem is that
I think the problem is that you are running ver. 10.4 (not 100% sure)
You could test it by manually downloading the extension and unpack it (anywhere). then run:
phpize (This makes the "build files". If that worked)
./configure
make
phpize is a part of the system wide installed PHP and it is prob. to old release: Try "whereis phpize" and the shell will tell you what location.
This is from my OS X ver. 10.5.6:
"phpize --version"
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
"php -v"
PHP 5.2.8 (cli) (built: Feb 5 2009 21:21:13)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
move the newly compiled extension
HI Thanks for this. I finished up to the end of the terminal bit, got the "Build process completed successfully" but I'm confused about which file needs to be moved where? Should there be a new file created in the newly created 'include' directory that I need to move? Thanks
Move uploadprogress.so
The compilation create an extension named uploadprogress.so. This is the file you need to move.
Excellent instructions
Well done, thanks. To help with finding the extensions directory, look at your phpinfo page from MAMP: Under "PHP Core" is the listing for "extension_dir" that will be the path you want to copy to. You can also use this same page to confirm that the extension is successfully enabled.
Great tip
That is a great tip Kyle, I'll add this information about how to find your extension_dir to the how to. Thanx!
Many thanks! works great!!
Many thanks! works great!!
uploadprogress not enabled
Thanks for the instructions... I tried to compile and install uploadprogress following the instructions above, and it looks like everything went well, but the extension does not seem to be enabled.
I am on OS X 10.6 running mamp v. 1.8.1 with php 5.2.10. I added the appropriate line to php.ini and made the uploadprogress.so file was executable.
Am I missing something or are there any known conflicts I should look out for?
....
Build process completed successfully
Installing '/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so'
install ok: channel://pecl.php.net/uploadprogress-1.0.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=uploadprogress.so" to php.ini
...
@double Same result for me :(
I'm running MAMP v.1.7.2 on OS 10.5.8 & using PHP Version 5.2.6.
When I try "php --ri uploadprogress" I get:
PHP Warning: PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
Extension 'uploadprogress' not present.
Could be a bug with ver
Could be a bug with ver 1.0.1. I'll try and do some tests and post back my results, interesting....
Not Working Either
I've tried twice now to follow these instructions, but without success. I tried once with my original install of MAMP. Everything completed successfully, I moved the uploadprogress.so into the correct folder and changed the PHP.ini. Still didn't work. So, just in case I screwed up, I re-installed the latest version of MAMP, downloaded the latest version of PHP, and followed the steps. Again, no error messages, but I can't find uploadprogress on the PHPinfo page and my Drupal site still indicates that it's not installed. Any idea? Where exactly should I check on the PHPinfo page for evidence that it's actually installed. Thanks for the tutorial.
Confirm problems with SL 10.6
I have done some more tests on a MAMP ver 1.7.1 setup under 10.6.x. This computer is upgraded from 10.5.x with an existing working MAMP env.
phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Compiled successfully uploadprgress ver 1.0.1 with GCC ver. 4.2.1 (current running XCode release), but MAM/Apache is not able to load it. Did the same ting with uploadprgress 1.0.0 that also have problem loading under 10.6..
Uploaded precompiled uploadprogress extension
Have done some more debugging and I think the problem is that PHP is compiled in 32 bit mode, but when you compile on 10.6 modules by default get compiled in 64 bit mode:
file uploadprogress.so
uploadprogress.so: Mach-O 64-bit bundle x86_64
Get compiled GCC in 10.6.x
uploadprogress.so
uploadprogress.so: Mach-O bundle i386
Compiled in 10.5.x and are working.
I have uploaded a precompiled uploadprogress.so to try and help you out until we have solved this problem. The extension is tested and is working in MAMP 1.7.1, 1.7.2, 1.8.x under OS X ver. 10.5.x and 10.6.x.
A issue in Snow Leopard
Dear Friends
I've this error in SNOW LEOPARD (after section 6 of this tutorial)
sh-3.2# ./configure
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... i686-apple-darwin10.0.0
checking target system type... i686-apple-darwin10.0.0
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
sh-3.2# cd /Applications/MAMP/bin/php5/bin
sh-3.2# ./pecl i uploadprogress
WARNING: channel "pecl.php.net" has updated its protocols, use "channel-update pecl.php.net" to update
downloading uploadprogress-1.0.1.tgz ...
Starting to download uploadprogress-1.0.1.tgz (8,536 bytes)
.....done: 8,536 bytes
4 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.
ERROR: `phpize' failed
sh-3.2# ERROR: `phpize' failed
And IF I try this:
sh-3.2# phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
Why It not work?
I've try use the precompiled uploadprogress.do too but...
Well I've try to download the precompiled uploadprogress.so from here: http://smbjorklund.no/sites/smbjorklund.no/files/uploadprogress.so
I've put it on my /Application/MAMP/bin/php5/lib/php/extension/no-debug-non-zts-20050922
And I've restart MAMP but It not work, WHY???
Somebody help me please?
@ryosaeb4 You must have done
@ryosaeb4
You must have done something wrong prior to point 6.
Autoconf is part of Xcode check if it is installed by
ls -l /Developer/usr/bin/autoconfIf you are trying manually to build the extension make sure you run the phpize that is a part of MAMP (/Applications/MAMP/bin/php5/bin/phpize), OS X also ship with phpize and make sure you are in the top level dir of the module source code.
Remember to include the extension in your MAMP php.ini file and look for problems inside your /Applications/MAMP/logs/php_error.log
Problems under Snow Leopard solved
Just in case you guys have not noticed it, I solved the issue regarding making this work in Snow Leopard few days ago and updated this article. I also added a section about manually compiling en PECL extension.
Cheers
Steinmb
Thanks! Saved my day. :)
Thanks! Saved my day. :)
Good work!
Thanks.... for sharing. Good work, keep it up.
Thanks
Thanks for the pre-compiled extension. Saved me lots of time. :D
Thanks and may this help you
Hi
I thank for this article on PECL uploadprogress for MAMP this helped to do that.
I got same warning and I deleted and installed MAMP many times did same but again I got same
PHP Warning: PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
But I later found that my MAMP php version is 5.2.11 and I was downloading
php 3.0 stuff and following same method and failing.
LOL then I saw a little below downloaded tar.gz for php 5.2.11 and now all is well...
I am posting this if any did same like me and didn't observe error they are doing may be getting frustrated like me LOL...
well done in this article thanks again
Glad so many found this
Glad so many found this article useful. There is a lot of pitfalls out there ;)
php settings
on 10.6 system present system php 5.3 and mamp php 5.2.*
when I try to compile for mamp it compile for system php 5.3
how to say in console, php to compile with mamp php.ini?
@Andre: That is correct, that
@Andre: That is correct, that is the reason you need to follow the Snow Tiger section in this how to and hopfully you will have not have any problems.
loaded... but
ok by comand
/mamp-path/php -m
uploadprogress loaded
I restart MAMP
but phpinfo show that uploadprogress not loaded
@andre: Getting close now :)
@andre: Getting close now :) Check your MAMP php.ini file, you must be missing something there.
close.. ? in
close.. ?
in phpinfo
Configuration File (php.ini) Path /Applications/MAMP/conf/php5
NEXT file is new after mamp reboot.
Loaded Configuration File
/Library/Application Support/appsolute/MAMP PRO/conf/php.ini
file /Applications/MAMP/conf/php5/php.ini not printed in that table.
where is original data for /Library/Application Support/appsolute/MAMP PRO/conf/php.ini ? (
Have never used MAMP pro.
Have never used MAMP pro. Check your php_info() setting, It will tell you what php.ini that is in use.
thanks a lot ! mamp pro
thanks a lot !
mamp pro autocreate ini-files from templates (File-Edit Templates)
do not forget to copy *.so files to right place.
Thanks A lot! You gave the
Thanks A lot!
You gave the info I needed in a clean simple manner that even a noob like me could understand.
Thanks a lot, that snippet
Thanks a lot, that snippet was impossible to figure out !
MACOSX_DEPLOYMENT_TARGET=10.6CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
Just a heads up...one thing
Just a heads up...one thing that can cause headaches is if you have macports libraries installed that you have to link against....on Snow leopard if you don't edit /opt/local/etc/macports/macports.conf and uncomment this line build_arch i386 before you install the port it will compile using x86_64 architecture.....
Then when you try to build your extension (fileinfo in my case which needs libmagic installed) and point the config to look in /opt/local/ , if you are targeting 32 bit the build will crap out, and if you build in 64 bit obviously and you are downloading a precompiled version of 32 bit MAMP, then the extension won't load....anyhoo, I spose you could build MAMP from source in 64 bit as the other alternative.
Thanx @jon! I have included
Thanx @jon! I have included you tip in the how to. If you have not shared this information with with us I would never have known :)
you're a champion! I could
you're a champion!
I could not get it load, tried it all.
Finally downloaded your pre-complied .so and it work perfectly!
I must have screwed up the compile somewhere.
Thank you!
Thank god for your
Thank god for your precompiled so! I get my server done but i never get my laptop done, i get stuck on this problem for two days already! Thanks so much, you are my angel.
Thank you for this! I have
Thank you for this! I have used it to try to install oauth.so.
I followed the instructions, suitably amended, and oauth.so is in the right place and the extensions line in php.ini is correct. However, I get the following error when I restart mamp:
[26-Feb-2010 15:05:35] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/oauth.so' - (null) in Unknown on line 0
What did I do wrong?
Rob
Hi Rob Have no idea what the
Hi Rob
Have no idea what the problem is regarding http://pecl.php.net/package/oauth You could try to follow the manual compile instruction in the how to.
Thanks for this useful post~
Thanks for this useful post~ I will be trying it tonight!
Great information my friend,
Great information my friend, I'd been trying to do that for ages. ganar dinero | relojes
Hi, I'm trying to install
Hi,
I'm trying to install pecl_http with your instruction, but I get stuck at the "./configure", when I get the answer:
-bash: ./configure: No such file or directory
Obviously, after that pecl i pecl_http starts but it fails in the end...
Do you have any suggestion?
Thanks
Danilo
Hi Danilo Make sure that you
Hi Danilo
Make sure that you complete step 1-5 before starting the ./configure script.
Hi, I'm using MAMP 1.9 on OS
Hi,
I'm using MAMP 1.9 on OS X 10.6.3.
MAMP 1.9 is using php 5.3.2
Extensions folder is located on /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/
I've downloaded your pre-compiled file (1.0.1) and copied into this folder, then edited php.ini:
; Extensions
extension=apc.so
extension=imap.so
extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so
extension=uploadprogress.so
I've restarted MAMP servers, but the extension doesn't load.
Any advice?
Try and have a look in Apache
Try and have a look in Apache and the PHP–error logs. There is normally some pointers in them from the restart of MAMP.
Precompiled extension worked
Precompiled extension worked like a charm on 10.6 + MAMP Pro.
Thanks a lot.
TIm
Hi, Thanks for the .so file -
Hi,
Thanks for the .so file - it saved my day!
Gregor
SO, if the "lazy" option
SO, if the "lazy" option isn't working don forget to put ADMIN R&W permissions to the uploadprogress.so !!
The error log
The error log says:
25-May-2010 11:38:51] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/uploadprogress.so' - dlopen(/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/uploadprogress.so, 9): image not found in Unknown on line 0
and the extension doesn't work (at leat Drupal doesn't recognize it as installed and running).
Any advice?
Your php arcitecture doesn't
Your php arcitecture doesn't match the auth.so you compiled. you probably have 32b php and 64b extension. see apple recomended make configuration
http://discussions.apple.com/thread.jspa?threadID=2174107&tstart=52
No /bin directory
No /bin directory created...
Hello, thank you for the precompiled extension. I used that and all was well. However, curious why my attempts at your instructions failed...
I have Snow Leopard, and the compile of PHP worked great. However, when I tried to proceed through the next step:
cd /Applications/MAMP/bin/php5.2/bin
(I opted to use php5.2 to mimic the original MAMP directory)
... the php5.2/bin directory did not exist. The only directory in php5.2/ was the include directory from the previous steps.
Anyway, its working with the precompiled extension, but trying to backtrack and figure out what my mistake was...
Thanks if you have the time to reply.
Hello, I've had the same
Hello,
I've had the same problem as Lex, I get :-
image not found in Unknown on line 0
I tried your precompiled version and it works. But I was hoping to use your tutorial to install http_conf and as far as I aware there is no precompiled http.so. I had to make alteration when following your tutorial as zinho did.
Does your tutorial need updating?
I would very much like be able install other pecl extensions as it's been in a nightmare in both MAMP and XAMPP.
Did you find out what went
Did you find out what went wrong?
I'm currently traveling and
I'm currently traveling and unable to look into the issue. I'll have a look when I get back in about a week. Pls. Include php and Mamp ver. In your error rapports.
Cheers
@steinmb
Mac OS 19.6.4 XCode
Mac OS 19.6.4
XCode 3.2.2
MAMP 1.9
Attempt 1
- Created /Applications/MAMP/bin/php5.3/include
- Put php-5.3.2 into /include and renamed it to php
- Pasted MACOSX_DEPL... et cetera one by one into terminal
- cd /Applications/MAMP/bin/php5.3/include/php
- ./configure
Result:
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... i386-apple-darwin10.4.0
checking target system type... i386-apple-darwin10.4.0
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
GAVE UP ATTEMPT 1
Attempt 2
- Downloaded and unpacked uploadprogress-1.0.1.tgz into /include
- cd /Applications/MAMP/bin/php5.3/include/uploadprogress-1.0.1/
- /Applications/MAMP/bin/php5.3/bin/phpize
Result: permission denied
- sudo /Applications/MAMP/bin/php5.3/bin/phpize
- Password:
Result:
sudo: /Applications/MAMP/bin/php5.3/bin/phpize: command not found
Check:
- cd /Applications/MAMP/bin/php5.3/bin
- ls
pear pecl phar.phar php-config
peardev phar php phpize
GAVE UP ATTEMPT 2
Attempt 3
- Downloaded uploadprogress.so version 1.0.1
- Put it here: ... php5.3/lib/php/extensions/no-debug-non-zts-20090626
- Opened: ... conf/php5.3/php.ini in TextWrangler
- Added the line: extension=uploadprogress.so and saved
- Restarted the MAMP servers
- Checked phpInfo: Tokenizer followed by XCache
GAVE UP ATTEMPT 3
Was I lazy? Any suggestions?
Make the bin-files
Make the bin-files executeable
sudo chmod a+x /Applications/MAMP/bin/php5.3/bin/*
This should fix the "Result: permission denied" issue.
I did: sudo chmod a+x
I did: sudo chmod a+x /Applications/MAMP/bin/php5.3/bin/*
Then: /Applications/MAMP/bin/php5.3/bin/phpize
Result: -bash: -: command not found
"@Bi Devi" So it tell you
"@Bi Devi" So it tell you that phpize is not in the bin directory. What do you have in the directory?
@steinmb
@Yves: Let me run some tests
@Yves:
Let me run some tests to see if there are issues with latest version of MAMP and PHP 5.3, there might then things have a tendency to break with every major PHP release :-/
These are the files in
These are the files in directory /Applications/MAMP/bin/php5.3/bin :
pear
peardev
pecl
phar (shortcut)
phar.phar
php
php-config
phpize
@Bi Devi: Doooh! Wait wait
@Bi Devi:
Doooh! Wait wait the error message
-bash: -: command not foundTell you that you are trying to run a "-" as a separate command. To verify this just type - and press enter.
Now I get this: sudo
Now I get this:
sudo /Applications/MAMP/bin/php5.3/bin/phpize
Password:
Cannot find config.m4.
Make sure that you run '/Applications/MAMP/bin/php5.3/bin/phpize' in the top level source directory of the module
MAMP friends: I have done
MAMP friends:
I have done some research, updated the how to to match the latest changes made by the MAMP team in ver. 1.9, tested on latest PHP 5.2 release. Updated Leopard, Snow Leopard, manual build and trouble shooting section.
If you do not have full control over your PECL installation and config pls. follow the manual build section then you will avoid a lot of grief and sorrow.
Post new comment