Q: PHP include path problems on OSX I'm working on Mac OSX Lion. This is a new computer and I'm working to set up my dev environment again.
When I try to include a nonsense, nonexistent file, the page loads fine.
$dir = dirname(__FILE__);

var_dump(include_once($dir . '/sg.php'));

// returns bool(false)

But when I try to include an actual, existent file, the page fails to load at all. Needless to say, all my includes are helplessly broken right now, throwing warnings left and right.
I've checked perms, ownership, and the include_path in php.ini. Now I'm just stuck and could use some help.

A: your problem is probably not improperly working include but wrong mysql socket file in php.ini.
Try to set it up to /tmp/mysql.sock.
I had mysql_connect in my included file and it reported partial error message "No such file or directory" on web page. When I tried to call index.php from commandline it appeared that it can't find mysql socket file - not the included file ;-)
-Maciej
