MAMP and PDFlib

I mainly use MAMP when developing web applications locally. MAMP is great because you can easily switch from PHP4 to PHP5, it's very easy to configure, and everything is built into one package.  However I do have a second development environment setup on my machine.  I also use the package that Marc Liyanage made available, but I only use this environment if I am dealing with PDFlib, because PDFlib does not work with MAMP.  It's lame having projects in two different development environments depending on if I need PDF support.

Good news.  I just came across this work around in MAMP that is actually documented in the PDFlib handbook.  For some reason, about a year ago google did not pick this text up in the documentation when I originally searched for a work around.  Now I can finally have one development environment that gives me PHP4, PHP5, and Xdebug and not have to wonder which environment I have a certain project.

To cure the problem with MAMP comment out YLD_LIBRARY_PATH in /Applications/MAMP/Library/bin/envvars.

Comments

neerdwept

Lypebeadbassy
yppd
cyncralty
rwef

Thank you!

Thank you Tom,

This was well documented, accurate and very helpful. You probably saved me an hour. :-)

To further to docs for those who are uninitiated, the php.ini file he's talking about is this one:

/Applications/MAMP/conf/php5/php.ini (or php4 if that's what you're running)

Thanks again!

Eclipse

Here's what I found on MAMP

Here's what I found on MAMP forum:

Here's how I installed PDFLib 7.0.2 on my MacBook Pro with MAMP Pro:

1. Install MAMP & PRO v 1.7
2. Download PDFLib 7.0.2 for Mac Intel PHP
3. From the PDFLib archive copy the file from:

/bind/php5/php-520/libpdf_php.so

Into the folder:

/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922

I don't know if this was important or not, but I opened terminal and did:

chmod +x /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/libpdf_php.so

I then opened the file at /Applications/MAMP/Library/bin/envvars and made the following modifications

DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH

so that these read

#DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
#export DYLD_LIBRARY_PATH

in the file

/Applications/MAMP/Library/bin/envvars

I then edited the php.ini file for php5 from the File-Edit Template-PHP 5 php.ini menu inside MAMP Pro and added the following line:

extension=libpdf_php.so

In between the lines:

MAMP_apc_MAMP
extension=imap.so

I then restarted Apache, checked my phpinfo() and I could see PDFLIb was installed!!

PDF in MAMP

I can't seem to find the line you talking about?
Witch version of MAMP are you using?

Thanks.

More Detail?

Can you go a little more in-depth? I'm looking in run PDFlib on my MAMP installation, and I would really like to hear how you did it, step by step.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options