Disabling warrning messages in php ver 5.x by php.ini file

Discussion in 'PHP' started by netservice, Jan 11, 2013.

  1. #1
    I have script built in php version 4.x and I installed it at GoDaddy hosting using version 5.x. Now script is giving errors like this

    Since this is readymade script and I can't modify it. So the only way to deal is to disable warning messages by php.ini.

    Can some one please tell me complete code of php.ini to do this. And also will php.ini be in script sub folder or at root of public_html?
     
    netservice, Jan 11, 2013 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    The deprecation warnings won't keep the script from working (until a new version of PHP that drops the ereg() and split() functions comes along), so you can disable the warnings. But the "Cannot send session cookie - headers already sent" and "Cannot send session cache limiter - headers already sent" errors will probably keep the script from working. Either contact the author to get an updated script, learn enough about programming and PHP to fix the errors (it's trivial if you're a PHP programmer - a couple of lines of code will fix them) or pay someone to fix the script for you.
     
    Rukbat, Jan 11, 2013 IP
  3. netservice

    netservice Active Member

    Messages:
    169
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Ok, at least tell me how to stop these warnings by php.ini?
     
    netservice, Jan 11, 2013 IP
  4. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #4
    If you normally have notices on:

    
    error_reporting = E_ALL ^ E_DEPRECATED
    
    PHP:
    If you also have noticed disabled:

    
    error_reporting = E_ALL ^ (E_NOTICE && E_DEPRECATED)
    
    PHP:
    Untested, but you can play with E_DEPRECATED if the above doesn't work. Make sure you restart Apache after each change.
     
    ThePHPMaster, Jan 11, 2013 IP