Results 1 to 5 of 5

Thread: Eliminate WAMP Server 2 Notices?

  1. #1
    Join Date
    Feb 2007
    Posts
    161

    Default Eliminate WAMP Server 2 Notices?

    Wondering if anyone here is running, or has experience with WAMP and can help out by explaining how to comment out or
    eliminate entirely Depreciated notices.

    Code:
    Deprecated: Assigning the return value of new by reference is deprecated [...]
    Deprecated: Function ereg() is deprecated [...]
    Etc. etc. etc.

    I'm not looking to resolve them; an updated version of the program is currently in alpha and addresses these (and more) issues. I'm just needing to run this older version locally and don't care to display the debug notices.

    Thanks!

  2. #2
    Join Date
    Feb 2007
    Posts
    161

    Default

    Nevermind...

    After some searching around, and a quick modification to PHP --> php.ini, I was able to hide the warnings via E_ALL & ~E_NOTICE.

    Rather than edit the original post, I'll just leave this here in anticipation that someone else was as lazy as I was and didn't feel like Googling :-)

    Anyway, if you do use WAMP and have some new user tips, I'm all eyes.

  3. #3
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    4,944

    Default

    Why not fix the code so that it doesn't produce the errors rather than just hiding the errors.

    Alternatively why not get the antiquated version of PHP that you are coding in that will accept the antiquated code rather than producing an obsolete code error.

  4. #4
    Join Date
    Feb 2007
    Posts
    161

    Default

    Quote Originally Posted by felgall View Post
    Why not fix the code so that it doesn't produce the errors rather than just hiding the errors.
    Quote Originally Posted by JND View Post
    I'm not looking to resolve them; an updated version of the program is currently in alpha and addresses these (and more) issues. I'm just needing to run this older version locally and don't care to display the debug notices.
    Quote Originally Posted by felgall View Post
    Alternatively why not get the antiquated version of PHP that you are coding in that will accept the antiquated code rather than producing an obsolete code error.
    Because the current stable release will soon become obsolete, while the latest alpha release requires this version. These errors are only present with the (soon to be obsolete) current release.

    Sure, I can flip between PHP versions, but the fact that there are errors isn't a concern for me.

    Quote Originally Posted by JND View Post
    Anyway, if you do use WAMP and have some new user tips, I'm all eyes.

  5. #5

    Default

    Hi. If you just want to hide the notices, please follow one of these:

    Look for file "php.ini" in your local install of WAMP, usually inside folder "php".
    Open it with your fav editor, then look for Error handling and logging section.

    Set/change error_reporting to:
    error_reporting = E_ALL & ~E_NOTICE

    It will turn of the notice errors while still displaying warning errors.


    Or, you may also add this code into your PHP program:
    error_reporting(E_ALL & ~E_NOTICE);


    Just as that simple. Hope it will help you.
    Thanks.

Posting Permissions

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