User Profile

Collapse

Profile Sidebar

Collapse
AgentSpanky
AgentSpanky
Last Activity: Dec 5 '08, 06:06 AM
Joined: Nov 26 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • AgentSpanky
    replied to Cannot turn off errors from @mysql_connect
    in PHP
    Well, I've given up.
    I'm now just checking which server its on (with a global variable - yuk!) based on it's URL, and determining behaviour based on that.

    Thanks for your comments..
    See more | Go to post

    Leave a comment:


  • AgentSpanky
    replied to Cannot turn off errors from @mysql_connect
    in PHP
    Hi Markus,

    Yep - done that.

    My problem isn't how to display or handle the error, but rather that it occurs in the first place.
    Any other way of detecting if there is an sql service available that doesn't raise an error when it fails would be ok, too..

    Thanks.
    See more | Go to post

    Leave a comment:


  • AgentSpanky
    replied to Cannot turn off errors from @mysql_connect
    in PHP
    Hi pbmods,

    Agree that probably turning off all errors is not what I want..

    I'm not sure if php offers a process ID hook - I can't find one. I looked in the /var/ directory, and the /var/db/ also, but couldn't see anything interesting.

    I tried get_loaded_exte nsions() which "returns the names of all the modules compiled and loaded in the PHP interpreter".
    That didn't help much, as mysql...
    See more | Go to post

    Leave a comment:


  • AgentSpanky
    started a topic Cannot turn off errors from @mysql_connect
    in PHP

    Cannot turn off errors from @mysql_connect

    Hi All,

    I have a script that runs on two servers - one with SQL, and one without.
    I have coded it so that it doesn't matter on which server it runs, but when I try to connect (to determine which strategy to follow) with:
    Code:
    function connect_to_sql_ok() {
    	$conn = @mysql_connect($this->mysql_host, $this->mysql_user, $this->mysql_pass) or die('<hr />MySQL Error: ' .mysql_error(). '<hr />');
    ...
    See more | Go to post
No activity results to display
Show More
Working...