We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2442
    • 11 Posts
    "Cannot modify header information" ... "headers already sent by..." ... modinstall.class.php

    error appears during setup of the MODx Revo release candidate and beta versions tried on a FreeBSD 8 machine (at the screen after you select the DB colation set) I have tried for several hours getting around the problem but I couldn’t.

    On the same machine I have tried setting up Modx evo and no such error has come up.

    That’s just to help MODx developers. Could some of the code be particularly prone to that error? I guess some session management and certain cookie operations might be the cause of that.

      • 22303 MODX Staff
      • 10,725 Posts
      Please provide details of your environment (PHP/MySQL/platform). Help us help you. I’ve never seen this one in any environment, so the more details you can provide, the better.
        • 2442
        • 11 Posts
        Here is my system info:

        System FreeBSD 8.0-RELEASE (GENERIC i386)
        -------------------------------------
        PHP Version 5.3.2
        PHP Build Date Apr 12 2010 17:18:54
        PHP Configure Command ’./configure’ ’--with-layout=GNU’ ’--with-config-file-scan-dir=/usr/local/etc/php’ ’--disable-all’ ’--enable-libxml’ ’--with-libxml-dir=/usr/local’ ’--program-prefix=’ ’--with-apxs2=/usr/local/sbin/apxs’ ’--with-pcre-regex=/usr/local’ ’--with-regex=php’ ’--with-zend-vm=CALL’ ’--prefix=/usr/local’ ’--mandir=/usr/local/man’ ’--infodir=/usr/local/info/’ ’--build=i386-portbld-freebsd8.0’

        PHP Configuration File (php.ini) Path /usr/local/etc

        PHP API 20090626
        PHP Extension 20090626
        Zend Extension 220090626

        -------------------------
        MySQL Server-5.0.86
        php5-pdo_mysql-5.2.11
        php5-mysqli-5.3.2
        php5-pdo_mysql-5.3.2
        -------------------------

        In MODx revo (2.0.0-rc-1) version, I got that that error during installation and could not continue:

        Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/mt/modxrevo/setup/includes/modinstall.class.php:760) in /Library/WebServer/mt/modxrevo/setup/includes/modinstallrequest.class.php on line 98


        In MODx evo (1.0.2) version no such problem occurred during installation, but another similar problem did occur while trying to login as admin at ./manager:


        Warning: strftime() [function.strftime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ’Europe/Helsinki’ for ’EEST/3.0/DST’ instead in /Library/WebServer/mt/modxevo/setup/includes/modinstall.class.php on line 217

        Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/mt/modxevo/setup/includes/modinstall.class.php:760) in /Library/WebServer/mt/moderevo/setup/includes/modinstallrequest.class.php on line 98


        This message popped up as a JavaScript prompt and of course it didn’t allow me to login and go on.

        Noticing the [function.strftime] warning, I have checked with the date.timezone settings at php.ini and edited it accordingly. After that, that peculiar message has dissappeared and only then could I login as admin at ./manager

        Encouraged by this timezone correction, I have tried installin revo version from scratch again and see if it would cause the same problem. And fortunately, no such problem occurred smiley Revo version is working now.

        Consequently I might say that it was a problem specific to php-5.3.x (requiring explicitly the date.timezone to be entered)
        By the way, I should say that manager panel of revo seems very fine, too. It looks full of new features & functionality, can’t wait to try them.

        Thanks.
          • 22303 MODX Staff
          • 10,725 Posts
          Thanks for the feedback on the issues you were having. I’m sure this will help others identify similar problems.

          FWIW, PHP requires you to set the default time zone setting since 5.2 or it will cause these kinds of warnings. Normally, if you suppress such warnings using your error_reporting settings, they won’t cause problems like this.