Deprecated message

Discussion in 'PHP' started by piropeator, Jul 5, 2011.

  1. #1
    Hello, I installed Xampp 1.7.4 and my little system show me this message:
    Deprecated:  Assigning the return value of new by reference is deprecated in C:\www\sistema\lib\adodb-492\adodb.inc.php on line 914
     
     Deprecated:  Assigning the return value of new by reference is deprecated in C:\www\sistema\lib\adodb-492\adodb.inc.php on line 1988
     
     Deprecated:  Assigning the return value of new by reference is deprecated in C:\www\sistema\lib\adodb-492\adodb.inc.php on line 2060
    PHP:
    What is the problem?
     
    piropeator, Jul 5, 2011 IP
  2. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How about showing us some code?
     
    Kyosys, Jul 6, 2011 IP
  3. akshat.gl

    akshat.gl Member

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    You must be using a statement like this :

    $obj = new class_name();
    or
    $obj =& new class_name();

    If latter is the case, remove & (ampersand).
    In former, try to view the code of the class, there may be some ampersand assignment(reference) like this =&
    try removing these ampersands.
     
    akshat.gl, Jul 7, 2011 IP
  4. piropeator

    piropeator Well-Known Member

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #4
    But the errors message is in the ADODB library, not in my code.
     
    piropeator, Jul 19, 2011 IP
  5. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #5
    ADODB looks like it's not been updated in over a year. You can either switch to PDO + Propel/Doctrine or suppress the error by editing the php.ini file:

    error_reporting = E_ALL & ~E_DEPRECATED
    Code (markup):
    The later is not ideal but might be your only option if the problems not resolved by the ADODB devs.
     
    mfscripts, Jul 25, 2011 IP