Forums

CollectiveAccess Support Forum » Troubleshooting

Error in Setup.php: E_DEPRECATED undefined

(7 posts)

No tags yet.


  1. cajunjoel
    Member

    After installing CA (fresh, clean install on it's own virtual host and there were no errors while installing) I get the following error:

    Notice: Use of undefined constant E_DEPRECATED - assumed 'E_DEPRECATED' in /.../subdomains/collectiveaccess/httpsdocs/setup.php on line 134

    The line of code is this:

    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

    And I can change it to this:

    error_reporting(E_ALL & ~E_NOTICE);

    and I am able to log in. I've grepped for the string and it only appears in setup.php.

    Any ideas?

    Thanks,
    --Joel

    Posted 2 months ago #
  2. seth
    Developer

    What version of PHP are you running?

    Posted 2 months ago #
  3. cajunjoel
    Member

    # php -v
    PHP 5.1.6 (cli) (built: Mar 31 2010 02:39:17)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

    Crud. I need to update, don't I? Gives me more reason to totally rebuild my server. Seems that my virtual server hosting provider isn't giving me the latest and greatest.

    Thanks, Seth!

    Posted 2 months ago #
  4. seth
    Developer

    E_DEPRECATED is something introduced in PHP 5.3. We use it to suppress annoying "deprecated" messages when running under 5.3. Of course, it throws notices when running < 5.3, so we really can't win :-(

    We officially only run under PHP > 5.2.3, but in reality 5.1.6 will work ok too. They still ship 5.1.6 with RedHat/CentOS which is why people are still using it.

    If you can upgrade you should. 5.3 is shinier/nicer/faster. But if you can't just turn off notices.

    seth

    Posted 2 months ago #
  5. cajunjoel
    Member

    Turns out I needed to make a variety of updates on my server.

    I was able to get up to 5.2.13 through my hosting provider. I attempted to get an RPM of 5.3.x and it caused some ugly warnings/errors from some lib files. So I backed out. I think for the foreseeable future I'll stick with 5.2.13, keep and eye on the error log, and when I get a chance to look into it further I will.

    Thanks!

    --Joel

    Posted 2 months ago #
  6. How about changing the code to:

    if (defined('E_DEPRECATED')) {
      error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
    }
    else {
      error_reporting(E_ALL & ~E_NOTICE);
    }

    Did a quick test on my PHP 5.2 installation, and that solved the error.

    Posted 2 months ago #
  7. seth
    Developer

    Why didn't I think of that? :-)

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.