WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Hello. For some reason I cannot move my site to localhost using wamp as a server. I have tried it many many times following each step to a "T". I can install zencart fine, but when I attempt to move over my files (minus includes/config and admin/includes/config) and import my database, I get this error:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80"
Here is the tail end of my apache error log (it was too long to post all of it) in the wamp log folder:
"
[Sun Mar 15 15:35:44.735940 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63850] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/zencart154test2/zc_..._page=finished
[Sun Mar 15 15:35:46.779544 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63855] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/zencart154test2/zen...from=index.php
[Sun Mar 15 15:37:30.946127 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63857] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/zencart154test2/zen...from=index.php
[Sun Mar 15 15:37:34.128533 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63858] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/zencart154test2/zc_..._page=finished
[Sun Mar 15 15:37:36.936538 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63859] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration
[Sun Mar 15 15:37:42.256147 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63861] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration
[Sun Mar 15 15:37:47.201356 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63862] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration
[Sun Mar 15 15:37:50.586562 2015] [core:alert] [pid 3936:tid 820] [client 127.0.0.1:63863] C:/wamp/www/zencart154test2/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration"
My zencart logs don't have anything except the suscessful install logs.
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Well, I removed .htaccess file and it works now. Here is my .htaccess file, would if be ok to edit my site offline without the file, than upload it later if I reupload my site to the internet? Is it only for security, and could it break my site if I try to just re-include it later?:
# Begin cache control #
ExpiresActive on
ExpiresActive off
<FilesMatch ".*">
Header unset Cache-Control
Header unset Expires
Header unset Last-Modified
FileETag None
Header unset Pragma
</FilesMatch>
# End cache control #
Do I need to respell expiresactive somehow?
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Well now I have another problem. I cannot sign in to my admin. I believe the problem stemmed from installing ioncube loaders on my wamp server. I tried to sign on to my admin WITHOUT the loaders, but it didn't work and prompted me to install them as some of my add ons use them. So I did that, and it appears I installed them correctly:
http://i57.tinypic.com/2e3bw4z.png
Now when I try to go to my admin, it crashes apache. I believe it is due to the browser being redirected to "http://www.localhost.com/zencart154test2/zenadmin/" for no reason, when it should just go to "localhost/zencart154test2/zenadmin/". I am not sure why it is redirecting, it does it on firefox and EI. I am guessing it has something to do with the ioncube loaders. My website works fine for some reason, it's just my admin:
http://i60.tinypic.com/dxh3f9.png
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
I prefer to do thing online.as after all,you have to be online.
offline seems wasting a lot of time.
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Quote:
Originally Posted by
toomanyknots
Well, I removed .htaccess file and it works now. Here is my .htaccess file, would if be ok to edit my site offline without the file
Yes. That'll be no problem. In fact a default zen-cart installation doesn't have an .htaccess file in the root folder.
Cheers
RodG
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Quote:
Originally Posted by
toomanyknots
I tried to sign on to my admin WITHOUT the loaders, but it didn't work and prompted me to install them as some of my add ons use them.
Any ideas as to what the add-ons are that need ironcube? (I've no doubt that it will be some kind of commercial add-on that isn't necessary for the cart to function)
Quote:
Originally Posted by
toomanyknots
Now when I try to go to my admin, it crashes apache. I believe it is due to the browser being redirected to "http://www.localhost.com/zencart154test2/zenadmin/" for no reason, when it should just go to "localhost/zencart154test2/zenadmin/".
Computers *never* do anything for 'no reason'.
Quote:
Originally Posted by
toomanyknots
I am not sure why it is redirecting, it does it on firefox and EI. I am guessing it has something to do with the ioncube loaders. My website works fine for some reason, it's just my admin:
Without knowing a little more about the ironcube add-on it is impossible to say if this is the cause of the redirects or not.
If we assume that the problem *isn't* caused by these add-ons, then the 1st thing you need to check is the SERVER settings in you /zenadmin/includes/configure.php file.
It should probably be
define('HTTP_SERVER'. 'http://localhost') ;
Note: Don't use a 'www' in this define (it can be done but you'll need to modify the server 'hosts' file else the server won't know that this is a 'local' server rather than a remote server)
The DIR_WS_ADMIN path should be automatically determined with your ZenCart version, but before we consider that this isn't being correctly set for some reason we need to ensure the server setting is correct 1st.
Cheers
RodG
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Quote:
Originally Posted by
win8win
I prefer to do thing online.as after all,you have to be online.
offline seems wasting a lot of time.
I call doing things online "Mistakes made while you watch" :-)
Even worse, this is generally the same as saying "I'm so good, I can work without a backup".
Worst advice ever!
Cheers
RodG
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Thank you RodG. (sorry for the slow reply, I have been busy but I really appreciate the help!) In my includes/configure and my admin/includes/configure both are define('HTTP_SERVER', 'http://localhost'); neither use a www. If I go to "www.localhost" I get the same server not found message too so I don't know if redirecting is the problem or not but it seems like it to me.
Re: WAMP / Apache INTERNAL SERVER ERROR when trying to move site to localhost...
Quote:
Originally Posted by
toomanyknots
Well, I removed .htaccess file and it works now. ...
[I]# Begin cache control #
ExpiresActive on
ExpiresActive off
...
Just enable mod_expires in your Apache configuration (and make sure you set "AllowOverride All" or at least "AllowOverride Indexes" on the server root / virtual host root). Then those directives will work.
Quote:
Originally Posted by
toomanyknots
... If I go to "www.localhost" I get the same server not found message too so I don't know if redirecting is the problem or not but it seems like it to me.
Strange, can you confirm the issue started after installing IONCube? Can also check the Apache configuration and .htaccess files (for any FQDN style Redirect / RewriteRule directives) and your browser (any plugins or proxies).
One alternative approach would be to change local domain name resolution for your computer so you can use something other than "localhost" and "localhost.localdomain".
For example I currently have the following added to the host file on my development computer:
Code:
# Zen Cart Projects
127.0.0.1 zencart.local
127.0.0.1 www.zencart.local
If you use a domain name such as "mydomain.local" and "www.mydomain.local" and configure Apache to use VirtualHost directives, it will make testing locally far easier. The multiple domain names on one IP address example should give a good idea how to accomplish this...
For example I currently have the following added to the Apache configuration on my development computer:
Code:
# Allow Apache to serve the root folder
<Directory "C:/workspaces/ZC/zencart/public_html/">
Options Indexes FollowSymLinks MultiViews
# Apache 2.4 requires mod_access_compat for these
AllowOverride all
Order allow,deny
Allow from all
</Directory>
# HTTP access
<VirtualHost *:80>
ServerName zencart.local
ServerAlias www.zencart.local
DocumentRoot "C:/workspaces/ZC/zencart/public_html/"
ErrorLog "C:/workspaces/ZC/zencart/zencart-error.log"
CustomLog "C:/workspaces/ZC/zencart/zencart-access.log" common
SetEnv APPLICATION_ENV "development"
</VirtualHost>
# HTTPs access
# Requires mod_ssl and SSL configuration elsewhere
<VirtualHost *:443>
ServerName zencart.local
ServerAlias www.zencart.local
DocumentRoot "C:/workspaces/ZC/zencart/public_html/"
ErrorLog "C:/workspaces/ZC/zencart/zencart-error.log"
CustomLog "C:/workspaces/ZC/zencart/zencart-access.log" common
SetEnv APPLICATION_ENV "development"
SSLEngine on
SSLCertificateFile "C:/wamp/bin/openssl/certs/localhost.crt"
SSLCertificateKeyFile "C:/wamp/bin/openssl/private/localhost.key"
</VirtualHost>