简体   繁体   中英

pdflib9.0.2 is not installing in my MAMP for php5.5.10

I am trying to install pdflib9.0.2 extension for my MAMP php5.5.10. I did the following steps.

  1. Downloaded pdflib9.0.2 from http://www.pdflib.com/download/pdflib-family/pdflib-9/copied
  2. created a folder "pdflib" in htdocs
  3. found the extension_dir path from php.ini /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212
  4. copied /Applications/MAMP/htdocs/pdflib/bind/php/php-550/php_pdflib.so to /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212
  5. changed the permission to rw mode.
  6. added extension=php_pdflib.so under "Dynamic Extensions" in php.ini
  7. commented the following in /Applications/MAMP/Library/bin/envvars #if test "x$DYLD_LIBRARY_PATH" != "x" ; then
    # DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
    #else
    # DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib"
    #fi
    #export DYLD_LIBRARY_PATH****
  8. But I could not see pdflib in my phpinfo()

I tried to access /pdflib/hello.php and I see following message in my apache error log

client denied by server configuration: /Applications/MAMP/htdocs/pdflib/.DS_Store
client denied by server configuration: /Applications/MAMP/htdocs/pdflib/bind/.DS_Store, referer: http:///pdflib/

I dont know where is going wrong.

I saw this version map in the doc. So I dont think there is a version mismatch.
bind/php/php-530 for PHP 5.3.0 and above
bind/php/php-540 for PHP 5.4.0 and above
bind/php/php-550 for PHP 5.5.0 and above

Can anyone one find out the issue here. Any input will show me a new path to solve this issue.

Thanks in advance.

I have added my Apache2 error log and php_error_log and I guess either one or both of these may be the reason for my unsuccessful installation of pdflib. If I can get some information to move forward to fix the issue, it will be very useful.

Apache Error log
[Tue Apr 15 11:38:22 2014] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/pdflib/.DS_Store
[Tue Apr 15 11:38:24 2014] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/pdflib/bind/.DS_Store, referer: http:///pdflib/

php_error_log [15-Apr-2014 11:25:08 America/Los_Angeles] PHP Warning: PHP Startup: PDFlib: Unable to initialize module
Module compiled with build ID=API20121212,TS
PHP compiled with build ID=API20121212,NTS
These options need to match

Your php_error_log tells:

php_error_log [15-Apr-2014 11:25:08 America/Los_Angeles] PHP Warning: PHP Startup: PDFlib: Unable to initialize module
Module compiled with build ID=API20121212,TS
PHP compiled with build ID=API20121212,NTS
These options need to match

This means that the PHP you are using is compiled "non thread safe", the PDFlib module you use is the "thread safe" variant. In a "non thread safe" php you can only use "non thread safe extensions. Sou you need to install the extension from the "php-550-nozts_VS11" directory of the PDFlib package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM