We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23933
    • 3 Posts
    Hi,
    Just installed my first MODx, very nice installer, very easy configuration. Thanks to the developers.
    At the end of the installation an error occurred - "Can’t write config.inc.php. Copy this code and paste it in the file"
    I did what the installer said, and pasted the code it showed me in the config.inc.php file. Than i went to www.pronetsys.biz/modx/manager and here are the errors:

    Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\pronetsys.it\httpdocs\modx\manager\includes\config.inc.php:41) in C:\Inetpub\vhosts\pronetsys.it\httpdocs\modx\manager\Index.php on line 144

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Inetpub\vhosts\pronetsys.it\httpdocs\modx\manager\includes\config.inc.php:41) in C:\Inetpub\vhosts\pronetsys.it\httpdocs\modx\manager\includes\config.inc.php on line 38


    I also encountered this error:

    Warning: fopen(../assets/cache//siteCache.idx.php): failed to open stream: Permission denied in C:\Inetpub\vhosts\pronetsys.it\httpdocs\modx\manager\processors\cache_sync.class.processor.php on line 188
    Cannot open file (../assets/cache//siteCache.idx.php)


    I think the problem is in the double slash // - what is the file containing the error?

    What should I do??

    Thanks in advance for any support..
      • 32241
      • 1,495 Posts
      Check your config file, do they have empty space before the <?php tag?

      If yes, please remove those empty space and make sure that your <?php is at the first line, and try it again.

      Addition: please leave no empty space after the end tag as well ?>

      Sincerely,
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 32241
        • 1,495 Posts
        I think the empty space will do just fine, but double checking will be good. Could you paste your config file to here? I would like to know what’s happening in line 41. Don’t forget to remove your database information and password.
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 23933
          • 3 Posts
          I know about the PHP code space problems, I made sure there are no spaces. But still getting the errors. Thanks for your help
          I am pasting here in italic the code contained in config.inc.php:

          <?php
          /**
          * MODx Configuration file
          *
          */
          $database_type = "mysql";
          $database_server = "localhost";
          $database_user = "modx";
          $database_password = "********";
          $dbase = "`modx`";
          $table_prefix = "modx_";
          error_reporting(E_ALL ^ E_NOTICE);

          $site_sessionname = "SN43ef15f60c9d0";

          // automatically assign base_path and base_url
          if($base_path==""||$base_url=="") {
          $a = explode("/manager",str_replace("\\","/",dirname($_SERVER["PHP_SELF"])));
          if(count($a)>1) array_pop($a);
          $url = implode("manager",$a); reset($a);
          $a = explode("manager",str_replace("\\","/",dirname(__FILE__)));
          if(count($a)>1) array_pop($a);
          $pth = implode("manager",$a); unset($a);
          $base_url = $url.(substr($url,-1)!="/"? "/":"");
          $base_path = $pth.(substr($pth,-1)!="/" && substr($pth,-1)!="\\"? "/":"");
          $site_url = (!isset($_SERVER[’HTTPS’]) || strtolower($_SERVER[’HTTPS’]) != ’on’)? ’http://’ : ’https://’;
          $site_url .= $_SERVER[’HTTP_HOST’];
          if($_SERVER[’SERVER_PORT’]!=80) $site_url = str_replace(’:’.$_SERVER[’SERVER_PORT’],’’,$site_url); // remove port from HTTP_HOST
          $site_url .= ($_SERVER[’SERVER_PORT’]==80 || isset($_SERVER[’HTTPS’]) || strtolower($_SERVER[’HTTPS’])==’on’)? ’’:’:’.$_SERVER[’SERVER_PORT’];
          $site_url .= $base_url;
          }

          // start cms session
          if(!function_exists(’startCMSSession’)) {
          function startCMSSession(){
          global $site_sessionname;
          session_name($site_sessionname);
          session_start();
          }
          }
          ?>


          Anything suspicious?
            • 25663 MODX Staff
            • 12,272 Posts
            It sounds to me that your siteindex cache files need to be made world-writable.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 23933
              • 3 Posts
              Hmm.. what’s that supposed to mean?
              What should I do exactly?
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Go into the assets/cache folder, and make sure that the folder and the files in it are world-writable (777). If you’re on a *nix server, at any rate.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 18940
                  • 152 Posts
                  So did you solve this issue? I’m also having the exact same error on siteCache, /www/website/assets/cache/siteCache.idx.php
                  When I CHMOD it to 777 the warning in the configuration in modx is gone but the error keeps coming up everytime I hit the save button in the manager. huh

                  I have to say this site is hosted at new webhost which had a few problems before. Everything works as expected except the saving error (it does save my changes though)

                  Warning: fopen(../assets/cache//sitePublishing.idx.php) [function.fopen]: failed to open stream: Permission denied in /data/home/website/www/website/manager/processors/cache_sync.class.processor.php on line 280
                  Cannot open file (../assets/cache//sitePublishing.idx.php)


                  Thnx in advance.
                    Quality doesn&#39;t need a big signature.
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Warning: fopen(../assets/cache//sitePublishing.idx.php)
                    Take another look at that URL; there’s a problem with a // there.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 18940
                      • 152 Posts
                      I noticed that but I don’t know how to change this huh
                        Quality doesn&#39;t need a big signature.