Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Purdy (2383)

AOL IM: EmeraldWarp (Add Buddy, Send Message)
Yahoo! ID: jpurdy2 (Add User, Send Message)

Bleh - not feeling creative right now. You can check me out on PerlMonks [].

Journal of Purdy (2383)

Thursday November 01, 2001
09:37 AM

Thought I was smart...

[ #1130 ]

I created a centralized script that specified a MySQL DSN & created a $dbh (database handle) for any db-aware scripts to require. I have two different sites running @ work - a production server and a development server (running on a higher port & different DocumentRoot directory).

So the script uses the caller() function and based on the filename ((caller())[1]), creates a DSN pointing to the right port of the MySQL server (I also have 2 MySQL servers running on different ports [& different data directories! ;)]). Debugging, I found the DSN is being created right, but whenever a dev server script does db stuff, it messes w/ the production MySQL server... boggles me mind!

Any ideas out there? Comment away!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.