Three things I noticed when migrating to a new (MAMP) server. Are they important?

Permalink
Using another Mac these days, so I installed MAMP on a second Mac and copied what I needed from the first Mac's MAMP folder to it to pickup where I left off with my C5 site. I believe all I copied over was the mysql db folder and the htdocs folder.

That second Mac got a new version of MAMP and I wanted to update C5 as well, prior to editing the site.

1) In order to get "pretty URLs" working on the new server, when I added the relevant code --- copied from the Dashboard --- to the Apache conf file, Apache wouldn't run unless I used older (i.e. different) code from my earlier MAMP/C5 setup from the first machine.

Specifically, I had to change the first line, <IfModule mod_rewrite.c> to <IfModule mod_rewrite.so>

I know nothing about Apache nor PHP, so I don't know what that means.

2) In order to get "pretty URLs" working on the new server I had to hit the Save button again, even though I'd copied over my old C5 install as-is and it appeared to have remembered I wanted pretty URLs (it was still check-marked.)

3) The built-in updater to the current C5 failed with a message about possibly not having zip installed. That begat a search here, I learned I do (of course) have zip installed, and I so I began to ponder about permissions.

It just so happens there was also an update waiting for one of my add-ons, so I tried it. And it worked, so I went back and tried the C5 update and THEN it worked.

I plan to copy the site to a host soon (running on Linux I believe) and would like to know if any or all of that trouble could have been avoided if I'd have done things differently. Thanks.

 
jordanlev replied on at Permalink Reply
jordanlev
You probably installed a version of MAMP that was newer than the other version. Or perhaps you changed settings on the other version a long time ago and forgot about it (for example, maybe it's running an older version of Apache or PHP or MySQL)?

I think it's always going to cause trouble if you copy MySQL files directly -- instead you should make a SQL data dump (either using phpMyAdmin, or directly from the Concrete5 dashboard) and import that into the new database (again, with phpMyAdmin, or via C5 dashboard).

When you deploy to your server, make sure you clear out the contents of files/cache and files/tmp and files/trash before copying everything up. Also, you will definitely need to do the SQL export/import thing (no shared host is going to let you copy the actual MySQL database on the filesystem). Then you will want to check the config/site.php file and the .htaccess file to make sure the paths, database connection, etc. all makes sense for the server.

If interested, you can search the forums about deployment, there are a ton of threads about it.

Good luck!
deckeda replied on at Permalink Reply
Thanks for the checklist of things to keep in mind. I plan to initially upload such that the site is semi-hidden at a "beta.domain.com" address to hopefully get things rolling. And I'll continue to poke around here for the existing deployment ideas.

The <IfModule mod_rewrite.c> vs. <IfModule mod_rewrite.so> issue remains a conundrum, given that the code presented within the Dashboard simply doesn't work for me. So in one sense, if this newer MAMP server/Apache version is somehow incompatible with the last AND latest C5 out of the box that's significant.

I don't believe that's necessarily the case, but nor do I understand why using <IfModule mod_rewrite.so> remains necessary, unless the "c" in <IfModule mod_rewrite.c> is a mere typo, which is doubtful. Like I said, I don't know enough to know what's probably a simple answer here.

For now I'm satisfied to leave it as a noted anomaly and use the previous, <IfModule mod_rewrite.so> code.
kirkroberts replied on at Permalink Reply
kirkroberts
Had a similar issue with a MAMP upgrade and pretty URLs not working.

Changing mod_rewrite.c to mod_rewrite.so in .htaccess as suggested above but that didn't do the trick. With some more research I remembered changing something else way back when then forgetting about it.

In /Applications/MAMP/conf/apache/httpd.conf around line 378 find:
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride None
</Directory>

and change to
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
</Directory>

The "AllowOverride" is being changed from None to All.

Hope that helps someone!
Tony replied on at Permalink Reply
Tony
Thanks Kirk. just doing this httpd.conf change worked for me with the new mamp, without having to do the mod_rewrite.so change