Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to use the PHP CLI, and when I enter something like php test.php in the command line it returns:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll, 9): image not found in Unknown on line 0 
something

test.php contains:

<?php
echo 'something';
?>

I checked /usr/lib/php/extensions/no-debug-non-zts-20090626/, and as expected the .dll file isn't there. I'm a complete beginner when it comes to this - what is happening, and how can I fix it? A search of my system for "php_msyql.dll" reveals nothing. Does it have to do with how I compiled it? I don't have the original version of php that came with the mac, I think - I may have reinstalled it somewhere along the way.

Any help would be appreciated!

share|improve this question

migrated from stackoverflow.com Dec 29 '09 at 23:59

This question came from our site for professional and enthusiast programmers.

    
This should be on serverfault.com –  Jan Hančič Dec 29 '09 at 23:53
    
What OS are you using? Windows or Linux? –  Jay Zeng Dec 29 '09 at 23:56
2  
Maybe not your problem (yet), but AFAIK .dlls are always WIndows compiled libraries. The default extension for extensions in the Linux/Unix/OSX world is .so –  Pekka 웃 Dec 29 '09 at 23:57

2 Answers 2

up vote 7 down vote accepted

On Mac you should not deal with dll files as these are Windows libraries. You should check your php.ini file for any uncommented (no semicolon in front) lines like extension= under Dynamic Extensions section and make sure that all those lines are commented. Btw to find location of php.ini file type in Terminal:

$php --ini

And it will give you something self-explanatory like:

Configuration File (php.ini) Path: /etc
Loaded Configuration File: /private/etc/php.ini
share|improve this answer

Sorry about new account, (munchybunch here, dunno how to deal with the OpenID stuff) but I'm using Mac OS X Snow Leopard. I thought the .dll was weird too, and in that folder right now there's phpcups.so. I'm just confused as to what's causing it to look for the dll file. Is there a script being called somewhere trying to load it?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.