Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Link the PHP library location to help installer scripts UNIX
I was working today to store Spam Assassin preferences in a MySQL database, so that I could enable my users to update their Spam Assassin preferences through a Squirrelmail plug-in called "SpamAssassin+SQL".

It took me some time to figure out how to call MySQL from the spamd (-x -Q as options did the trick), but after that, I started to get an annoying error message:
failed to find DB.php in /usr/local/lib/php
ouch. So I went looking:
# /usr/libexec/locate.updatedb
# locate DB.php
/System/Library/PHP/DB.php
Ah ... Apple logic ... let's hide some of the libraries in a place where no script can find them. The fix was easy with a symbolic link:
# ln -s /System/Library/PHP /usr/local/lib/php
This solved all problems -- not only with the plug-in described above, but also for several other Squirrelmail plugins.
    •    
  • Currently 3.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[5,714 views]  

Link the PHP library location to help installer scripts | 4 comments | Create New Account
Click here to return to the 'Link the PHP library location to help installer scripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Link the PHP library location to help installer scripts
Authored by: TheGS on Oct 08, '03 10:37:26AM
You may need to create the link as root, or using sudo.

[ Reply to This | # ]
Link the PHP library location to help installer scripts
Authored by: Greedo on Oct 08, '03 12:45:11PM

DB.php is part of PEAR, and is "usually" installed into /usr/local/lib/php.

Apple seems to have put this stuff into /System/Library/PHP.

You can change the location where PHP looks for this by making a change to your php.ini file. Simply uncomment the line that sets the include_path directive and set it to something like:

    include_path = ".:/System/Library/PHP"

Although, if you are using the PHP that comes with OS X (i.e. not compiling your own, it looks like OS X doesn't ship with a default php.ini file. You can create one that only includes that one line above, and save it as /usr/lib/php.ini.

If you are compiling your own version of PHP, then use the tags --with-config-file-path=/usr/lib/php --with-pear-dir=/System/Library/PHP, or change those paths to whatever you want.



[ Reply to This | # ]
Link the PHP library location to help installer scripts
Authored by: Alrescha on Oct 10, '03 10:48:23AM

Having used commercial unix systems for more than a decade, I'd be surprised and displeased if I bought a system that had *anything* in /usr/local - that directory is mine, not the vendor/suppliers.

A.



[ Reply to This | # ]
Link the PHP library location to help installer scripts
Authored by: Shiver758 on Nov 14, '03 08:59:08AM

That's a grand example of a "unix snob"/"look at me i'm so cool cause i've been using unix so much longer than you weenies" post, but you're missing the point.

This software didn't originate with a vendor or a supplier. This is a standard piece of GPL software. It would be nice if it were installed according to standards. This is just another example of Apple distorting some of the GPL software found in OS X.

That said, RedHat has a nasty reputation for doing the same thing (think Apache). So, maybe it's just going to be a symptom of commercially compiled GPL software.



[ Reply to This | # ]