Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Location
    India
    Posts
    109

    Unanswered: PHP not throwing Mysql warning errors

    Hi,

    I have been trying to get PHP throw mysql warning errors but am not able to do so. I have set mysql sql_mode as 'TRADITIONAL' so that mysql throws up warning messages like 'OUT OF RANGE' value.

    And in php.ini, mysql.trace_mode is set to On. Still I dont get to see those error messages. What do I need to do to get php throw these error messages?

    Thank you.
    Cela

  2. #2
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    You need to use mysql_error() to display any mysql errors from queries.

    PHP only generates errors caused by mysql function calls if the function call itself fails, not for errors returned by the mysql server.

  3. #3
    Join Date
    Aug 2003
    Location
    India
    Posts
    109
    Yes, I do use mysql_error(). The problem here is, I know that mysql server is throwing the error but mysql_error() function is not catching it.

    I am sure that there should be some trivial setting that I need to do to get this to work.

  4. #4
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    The only thing I can see that might prevent specific errors from coming through is that TRADITIONAL mode is in MySQL 5.0.2 and higher. Perhaps the mysql PHP client .dll is not a high enough version to work with the errors that you are getting from mysql.

  5. #5
    Join Date
    Aug 2003
    Location
    India
    Posts
    109
    Mysql version is 5.0.19 and PHP is 5.1.4 and am on MAC OS x. How do I find out whether PHP client .dll is of a higher version or not?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •