We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29525
    • 388 Posts
    Yes, I have been following the discussion on content history and I do plan to give this a try. I think it could help with the document updates.

    Any thoughts on approaches for maintaining full site staging/development versions of several different sites?
      www.terrybarthdesign.com
      • 29525
      • 388 Posts
      Hi All

      I’m still trying to figure out how to support multiple sites locally.

      How do you work on more than one site locally (wamp) without commingling the DB?

      Terry
        www.terrybarthdesign.com
        • 30223
        • 1,010 Posts
        Quote from: Terry at Nov 24, 2008, 06:35 PM

        Hi All

        I’m still trying to figure out how to support multiple sites locally.

        How do you work on more than one site locally (wamp) without commingling the DB?

        Terry
        You can easily create multiple databases in WAMP using phpmyadmin (which is included with WAMP). I have about 20+ MODx sites running on my laptop by placing each of them in a subdirectory. This works fine for me as is but you can additionally add virtual hosts in WAMPS httpd.conf.

        Here’s some documentation about virtual hosts: http://httpd.apache.org/docs/2.0/vhosts/name-based.html
          • 29525
          • 388 Posts
          TobyL

          OK good.  Now I know I was on the right track to begin with!  But I’m missing something.

          I had a project installed directly in the www directory.  When I started another project, I created separate a DB for the new project and installed MODx in a new sub-directory, copied in the assets folder and imported the DB.  I can access the manager for that site, edit the site, but have trouble when I try to navigate to the front-end pages.

          I’ve had couple of different problems.


          • 404 error page from the project installed in the www directory
          • menu items, such as home, take me to the home page of the project installed in the www folder
          • friedly URLs don’t work

          Is this problem with .htacesss or config.inc.php?

          Thank you!!

          I will look over the article you referenced as well. Thank you!
            www.terrybarthdesign.com
            • 3749
            • 24,544 Posts
            It could be either one.

            The first place to look is config.inc.php to make sure that it’s connecting to the correct DB. If you forgot to change the DB name during the install, it will be going to the old DB. The manager would work, but the page ID’s might be wrong which would explain why it can’t find some of the pages.

            If everything in config.inc.php is correct, look at the rewrite section of .htacces. The rewrite engine is turned off for the Manager so if the rules are wrong, the manager will work but the pages aren’t found.

            If you have Friendly URLs turned on, I’d turn them off until things are working normally (tools | configuration | Friendly URLs tab).

            You can also try renaming .htaccess to something else to see what you get with no .htaccess file (thus no rewriting).

              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
              • 29525
              • 388 Posts
              Thanks BobRay

              DB is correct
              Manager rewrite is on

              Friendly urls do not work. With friendly urls off, I can get to the front end pages.

              I can live this since its just on my local wamp server.

              However, I don’t understand a couple of things. If someone has a quick answer on these, that’d be cool. With urls turned off:

              If I try to go to page index.php?id=14 page appears.
              If I try to go to page index.php?id=999 (no such page) I get the 404 page for this site.
              If I try to go to page wholesale.html (this is a real page) I get the 404 page for the site in the wamp root directory. I know this won’t work with urls turned off, but I would expect it to go the 404 page for this site not the other site.

              I played around with the RewriteBase / in the ht.access in the project subdirectory to no effect.

              Again, this question is not urgent, but I am curious to understand what’s happening here.
                www.terrybarthdesign.com
                • 29525
                • 388 Posts

                Excellent! I’m good to go!

                Thank you!
                  www.terrybarthdesign.com
                  • 29525
                  • 388 Posts
                  Not sure where to post this but it seems related to localhost wamp installation.

                  I have a couple of problems that I suspect are related to one another.

                  I recently reinstalled a new version of wamp. I completely uninstalled the previous version, removed all the wamp folders then installed the new version. Myphpadmin reports the following.

                  MySQL
                      * Server: localhost (localhost via TCP/IP)
                      * Server version: 5.1.30-community-log
                      * Protocol version: 10
                      * User: root@localhost
                      * MySQL charset: UTF-8 Unicode (utf8)
                  Web server
                      * Apache/2.2.11 (Win32) PHP/5.2.8
                      * MySQL client version: 5.0.51a
                      * PHP extension: mysqli
                  
                  Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.30. This may cause unpredictable behavior.
                  


                  I then installed MODx in C:/wamp/www/twp/
                  MODx Configuration
                  File manager path: C:/wamp/www/twp/
                  Resource path: assets/
                  Resource URL: assets/
                  Friendly URLs enabled (and working)
                  MODx Ver 9.6.3

                  Imported the SQL DB from my backup
                  Copied the assets folder from the backup
                  Copied the .htaccess file from backup - RewriteBase /twp/
                  Enabled apache rewrite

                  All is good. Friendly URLs are working.

                  However I can’t see files in the images folder thru TinyMCE. If I try to upload a file I get a message that says Error, "Failed to upload file, internal error..." If I try to create a folder I get "You have no permissions to create the folder". I also noticed the top of the dialogue box says: Alert http://localhost/

                  I cannot export to html. Yesterday I successfully completed an export. Today, I get two warnings and error:

                  Warning: Call-time pass-by-reference has been deprecated in C:\wamp\www\twp\manager\actions\export_site.static.php on line 227
                  Warning: Call-time pass-by-reference has been deprecated in C:\wamp\www\twp\manager\actions\export_site.static.php on line 246
                  
                  Target directory isn't writable. Please ensure the directory is writable, and try again.


                  Before I realized this problem was occuring, I later installed another instance of MODx in the root directory. I’m having the same problem with that site, except the export to html is working fine.

                  Suggestions?
                    www.terrybarthdesign.com
                  • First, your resource path should be "C:/wamp/www/twp/assets/" not just "assets/".

                    Otherwise you have a very cutting edge setup that looks to have some significant configuration issues as indicated by the statement: "Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.30. This may cause unpredictable behavior." This is probably not ideal for testing locally, but if it works for you, I wouldn’t stress too much about it.
                      • 29525
                      • 388 Posts
                      OpenGeek

                      I updated the resource path, that fixed access to the images, thank you!

                      As for the other items. Cutting edge? Yikes! All I want is a standard wamp/modx setup for the projects I’m working on. I wouldn’t know how to make any of this cutting edge. . .

                      I used the latest modx download and latest wampserver2. I’m not aware of either of those being beta or unique in anyway.

                      I don’t know where the library version of 5.0.51a is coming from other than that was in the previous wamp install. That version of sql is the reason I’m installing this all new. The sort bug was preventing me from properly testing the site I’m developing. Is it possible the uninstall of the previous wampserver was incomplete and left some remnants of the old sql? If so, how would I correct that?

                      Any thoughts on the export problem?

                      Thank you!
                        www.terrybarthdesign.com