We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36752
    • 27 Posts
    Hi,

    I just did a fresh install of MODX Revolution 2.1.3-pl (traditional), PHP Version 5.2.9, and I've done nothing to the site so far other than attempt to view the "Home" resource in the browser.

    I get the following error when I do:

    The requested URL /siteroot/index.php?id=1 was not found on this server.

    Shouldn't it, at the very least, display blank?

    Have I done something wrong? The installation went through without apparent complication. [ed. note: andrewjh last edited this post 15 years, 1 month ago.]
      • 36752
      • 27 Posts
      This is also true of any additional resources I create, though the id increments accordingly.
        • 3749
        • 24,544 Posts
        Make sure your template has this in the <head> section:

        <base href="[[++site_url]]" />


        Also make sure there is no .htaccess file with rewrite rules (there should be an ht.access file, but that will be ignored), unless you have Friendly URLs turned on in System Settings.

        Try setting the site_start System Setting to the ID of one of your pages.

        Make sure the page you're trying to look at has a template and that the template exists.

        And make sure there's no index.html file in the site root.
        [ed. note: BobRay last edited this post 15 years, 1 month ago.]
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 36752
          • 27 Posts
          Thanks for the reply!

          Make sure your template has this in the <head> section:
          <base href="[[++site_url]]" />

          I'm using the default template that comes with the installation:

          <html>
          <head>
          <title>[[++site_name]] - [[*pagetitle]]</title>
          <base href="[[++site_url]]" />
          </head>
          <body>
          [[*content]]
          </body>
          </html>


          Also make sure there is no .htaccess file with rewrite rules (there should be an ht.access file, but that will be ignored), unless you have Friendly URLs turned on in System Settings.

          I've got an .htaccess file, but Friendly URLs are enabled. There's also an ht.access file left over when I tried to reinstall MODx (didn't work).

          Try setting the site_start System Setting to the ID of one of your pages.

          It's set to "1", the ID of the default "Home" resource that came with the installation. I tried changing it to "2" for a test page, but no luck.

          Make sure the page you're trying to look at has a template and that the template exists.

          The above template is applied to all the resources I've tested.


          And make sure there's no index.html file in the site root.

          There's no such file on my server.

          If I go to www.sitename.com/modxdev/, which is where I've installed MODx, I get the following error: You don't have permission to access /modxdev/ on this server.

          When I access /modxdev/test.html I get a 404 Not Found error, despite all the above seeming to be correct.

          Could it be a permissions error? I don't really know what the correct permissions ought to be for the core, connectors and manager folders, so I've set them to 777, which also hasn't worked.

          I've installed MODx before, but don't remember having so much trouble. Very strange.
            • 3749
            • 24,544 Posts
            The first thing to try is turning off FURLs and renaming .htaccess to ht.access (and clearing the site cache and browser cache).

            If that fixes things, it means there's a problem with the .htaccess file -- usually the rewrite base line.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 36752
              • 27 Posts
              Okay, turned off FURLs and renamed the .htaccess to ht.access, cleared browser and site caches and cookies. Still not working.

              I noticed I had two prefixes and data table sets in the database, from two different installations. I deleted the one that wasn't being used, but doing so didn't seem to affect anything.
                • 36752
                • 27 Posts
                I don't know if this is related, but my /core/config/config.inc.php file permissions are set to 644. I tried setting it to 777 but I get a server error saying "Operation not permitted."
                  • 3749
                  • 24,544 Posts
                  Try putting an index.html file with this code in the MODX root and accessing it directly with http://siteroot/index.html and http://www.siteroot/index.html:

                  <h2>Hello World</h2>
                  <?php
                  return "PHP is working";
                  ?>
                  


                  Leave FURLs off. Don't forget to delete the index.html file when you're through with it.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 36752
                    • 27 Posts
                    Okay, I tried that.

                    The page loads, displays "Hellow World", but the php does not display.

                    Does that mean it's a server-side PHP configuration problem?
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Quote from: BobRay at Sep 18, 2011, 05:06 PM
                      Try putting an index.html file with this code in the MODX root and accessing it directly with http://siteroot/index.html and http://www.siteroot/index.html:

                      <h2>Hello World</h2>
                      <?php
                      return "PHP is working";
                      ?>
                      


                      Leave FURLs off. Don't forget to delete the index.html file when you're through with it.

                      Note this will only work if your web server is configured to parse HTML pages using PHP. Not all are.