Hey guys! Thanks for all the hard work creating OpenCart! I'm using 1.5.2.1... I'm trying to turn on SEO URLs, but I get the "Internal Server Error" every time. I'm on a Linux server and my host, Aruba.it (Italy), has assured me that mod-rewrite is on. All of my categories and products have unique SEO URLs in the control panel. Opencart is installed in the root directory, so it doesn't appear that I need to update the "RewriteBase" command in the htaccess file. OK, great so far (if indeed the RewriteBase is OK as is). But when I rename the .htaccess file and select yes in the settings to turn on SEO URLs, I can't open the front or back end. I have to go back into FTP, rename the file back to htaccess.txt, then I can open the admin and turn off the SEO URL feature to open the front end.
I have read the bottom of the .htaccess file...
"### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that." - I have not uncommented any of these features. My Internal Server Error message does not have a number.
I remember a couple of yellow flags on install, but could not understand what to do about them, so I continued install as is. The install said that with these yellow flags, some features might not be available to me. I guess this is one. What more info can I give someone to help me figure this out? PHP.ini? My clients site is www.chiazzesegru.it.
Thans, Kevin
I have read the bottom of the .htaccess file...
"### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that." - I have not uncommented any of these features. My Internal Server Error message does not have a number.
I remember a couple of yellow flags on install, but could not understand what to do about them, so I continued install as is. The install said that with these yellow flags, some features might not be available to me. I guess this is one. What more info can I give someone to help me figure this out? PHP.ini? My clients site is www.chiazzesegru.it.
Thans, Kevin
A good place to start is to see what is installed yourself. Create a new file upload it to the route of your site and call it something like info.php Then put this code inside.
The file address should be http://www.chiazzesegru.it/info.php Type it into your browser and it will give you all of your server's php info. Look for the heading loaded modules under configuration and you should see mod_rewrite.
Since you are not sure what other warnings you received during installation, read this page
http://www.opencart.com/index.php?route ... ion&path=3
and make sure the requirements are met as well.
Code: Select all
<?php
phpinfo();
?>
Since you are not sure what other warnings you received during installation, read this page
http://www.opencart.com/index.php?route ... ion&path=3
and make sure the requirements are met as well.
Thanks for a quick response. The info.php file shows no evidence of mod-rewrite. I read not only the "additional modules" section under "configuration", but every other line as well. Nothing. But my host insists its installed. Here is their response to me translated:
"Dear client,
In regards to your request, we inform you that mod-rewrite is installed and active on our Linux hosting solution. On the following pages, you may find some examples of the most uses of the mod-rewrite command. ...link...
We further inform you that for security reasons, we have not implemented all possible commands of this module. We invite you to verify your mod-rewrite rules utilizing the following generator:
http://www.webmaster-toolkit.com/mod_re ... ator.shtml
Please activate those functions in your application."
Regarding the other requirements, they are all correct. "Register Globals: off", etc., etc. Only "zip" is not clear. I found "BZip2" enabled. I assume that's fine.
I need to go back to the host, saying that the PHP info does not show mod-rewrite, correct? Anything else I'm missing here?
"Dear client,
In regards to your request, we inform you that mod-rewrite is installed and active on our Linux hosting solution. On the following pages, you may find some examples of the most uses of the mod-rewrite command. ...link...
We further inform you that for security reasons, we have not implemented all possible commands of this module. We invite you to verify your mod-rewrite rules utilizing the following generator:
http://www.webmaster-toolkit.com/mod_re ... ator.shtml
Please activate those functions in your application."
Regarding the other requirements, they are all correct. "Register Globals: off", etc., etc. Only "zip" is not clear. I found "BZip2" enabled. I assume that's fine.
I need to go back to the host, saying that the PHP info does not show mod-rewrite, correct? Anything else I'm missing here?
Hmm...they probably have php run as cgi and that will not show the configuration you needed to see, so they definitely could have it installed without it showing. Sorry I forgot about that.
I can't say if bzip2 will work in place of zip. Both are installed in my php installation.
Delete the info.php file from your server when you are done with it, so your setup can't be viewed by anyone.
See if your host will look directly at your htaccess file and tell you why it is not working. It is hard to say if they aren't telling you which rules are enabled and which aren't. Also ask them if you need to comment out:
Options +FollowSymlinks
Options -Indexes
Some servers won't work with those options.
I can't say if bzip2 will work in place of zip. Both are installed in my php installation.
Delete the info.php file from your server when you are done with it, so your setup can't be viewed by anyone.
See if your host will look directly at your htaccess file and tell you why it is not working. It is hard to say if they aren't telling you which rules are enabled and which aren't. Also ask them if you need to comment out:
Options +FollowSymlinks
Options -Indexes
Some servers won't work with those options.
Can you provide a copy of your .htaccess file?
I've been spending the last 15 minutes working out SEO URLs on my own shop, which I finally got working. I want to see if you've hit the same issue I was facing.
I've been spending the last 15 minutes working out SEO URLs on my own shop, which I finally got working. I want to see if you've hit the same issue I was facing.
Here's the complete copy and paste version:
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M
# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200
# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M
# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200
# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200
Thanks for the help, GTG. I haven't yet contacted the host with the suggestions on the last reply from Etcher. Been working on other projects. Now, I'll wait until I hear back from you on this one. You'all are great!
Kevin
Kevin
For some reason version "opencart_v1.5.2.1" zip file does not come with htaccess.txt, also copied and pasted the above and turned on the SEO setting and still nothing.
mod_rewrite working on the sever, by the way. -.- frustrated.
mod_rewrite working on the sever, by the way. -.- frustrated.
I apologize for not posting sooner (thought I had email notification enabled :/ )
I checked your .htaccess file against mine, but unfortunately it looks like you have the same setup as I have, so we'll have to rule that out as the issue. Maybe someone else can correct me if I'm wrong, but since mod_rewrite is an Apache extension, I'm fairly certain that this issue wouldn't fall within an issue with the PHP configuration, although it is possible that a setting could be causing some issues.
One thing I would recommend trying to do is creating a sub-directory somewhere on the website and creating a mod_rewrite test with something generic, just to make sure mod_rewrite is properly configured on your server.
I checked your .htaccess file against mine, but unfortunately it looks like you have the same setup as I have, so we'll have to rule that out as the issue. Maybe someone else can correct me if I'm wrong, but since mod_rewrite is an Apache extension, I'm fairly certain that this issue wouldn't fall within an issue with the PHP configuration, although it is possible that a setting could be causing some issues.
One thing I would recommend trying to do is creating a sub-directory somewhere on the website and creating a mod_rewrite test with something generic, just to make sure mod_rewrite is properly configured on your server.
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
Try and put a '#' hastag infront of Options - Indexes and Options +FollowSymlinks,
that worked for me!
# Prevent Directoy listing
Options -Indexes
Try and put a '#' hastag infront of Options - Indexes and Options +FollowSymlinks,
that worked for me!
Look here for this problem solution!
http://forum.opencart.com/viewtopic.php ... 77#p485177
I've had the same trouble, but solved it by this method!
http://forum.opencart.com/viewtopic.php ... 77#p485177
I've had the same trouble, but solved it by this method!
Great solution! The only one that talk about this kind of issue.Etcher wrote: ↑Tue May 01, 2012 10:02 pmHmm...they probably have php run as cgi and that will not show the configuration you needed to see, so they definitely could have it installed without it showing. Sorry I forgot about that.
I can't say if bzip2 will work in place of zip. Both are installed in my php installation.
Delete the info.php file from your server when you are done with it, so your setup can't be viewed by anyone.
See if your host will look directly at your htaccess file and tell you why it is not working. It is hard to say if they aren't telling you which rules are enabled and which aren't. Also ask them if you need to comment out:
Options +FollowSymlinks
Options -Indexes
Some servers won't work with those options.
I have commented just the line Options +FollowSymlinks and now it is working.
Many hosts now disallow the "Options" command as some sort of security exposure. Commenting out such commands may get you around the immediate problem, but there's no telling what kind of functionality was lost in the process (i.e., why did they put in the FollowSymlinks in the first place?).
The "indexes" one should not be ignored (simply commented out) -- the idea was to prevent someone from getting a listing of files and subdirectories in a directory and being able to spy or do mischief. You can add an empty index.html file to each directory otherwise lacking an index file, or you may be able to add a fixed location script to your DirectoryIndex list to catch all directories where there is no index file.
The "indexes" one should not be ignored (simply commented out) -- the idea was to prevent someone from getting a listing of files and subdirectories in a directory and being able to spy or do mischief. You can add an empty index.html file to each directory otherwise lacking an index file, or you may be able to add a fixed location script to your DirectoryIndex list to catch all directories where there is no index file.
Who is online
Users browsing this forum: No registered users and 93 guests