403 errors on new template with MAMP
Hi,
I followed the instructions on setting up a new template from here:
https://www.zen-cart.com/tutorials/i...hp?article=142
When I choose the new template, on the localhost I get interesting colors and can see the images in the includes/templates/my_custom_template/images and when I use Firebug or the Developer toolbar add-in I can see the CSS files.
When I access the server remotely, I get the following on all of my CSS
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /includes/templates/my_custom_template/css/stylesheet_css_buttons.css
on this server.</p>
<hr>
<address>Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2 Server at localhost Port 8888</address>
</body></html>
I used the copy functions within the finder (just holding option while dragging) and inspected all directories from terminal and all of the permissions are the same.
I do have some extended attributes, yet have no idea how to fix them. In the copied directory (e.g. the new template), on my template_info.php file, I have the following extra entries (when you ls - lO@):
com.apple.FinderInfo 32
com.apple.TextEncoding 15
In both directories (the classic template and the new one) in the css and images directory, com.apple.quarantine is set to 38 (also from ls -lO@).
I tried deleting the .htaccess file from the zen-cart root (per other threads) with no luck.
I'm pretty stumped at this point and would really like to customize this template. Any help would be greatly appreciated :)
Thank you.
On an unrelated note, when going through the wiki I noticed some inconsistencies and would be happy to fix them, but every path I followed there to get an account led to a dead-end, if anybody knows to whom I should send e-mail, etc....
Re: 403 errors on new template with MAMP
Quote:
Originally Posted by
dpinkus
I tried deleting the .htaccess file from the zen-cart root (per other threads) with no luck.
Um ... there is no .htaccess in the zen cart root. That is, unless you put one there yourself.
However, there is one in the /includes/ folder, and should allow .css files fine if your server's apache is configured properly.
Re: 403 errors on new template with MAMP
Yes, it was in my includes directory.
Same problem still though.
This is probably a MAMP issue, but curious if anybody else had come across it.
Re: 403 errors on new template with MAMP
I use MAMP every day, and have never had any of the problems you're mentioning. Nothing special in my configuration either.
Re: 403 errors on new template with MAMP
I solved it on a single machine by doing a unix copy of the directory and trying to do as little as possible in the finder. But when I access across the network, I still don't get any of the assets that I copied (e.g. CSS or some images).
Do you have other machines accessing pages hosted on your MAMP instance, or do you reserve it only for local development?
I'm trying to use my laptop as my primary dev instance, but occasionally my desktop and that's where I'm having the issues.
I just researched again and thought maybe only using the IP address was the issue and I needed an entry in my hosts file, but when I click on an image to open it in a new tab, I'm definitely getting a response from MAMP:
Forbidden
You don't have permission to access /includes/templates/my_custom_template/images/logo.gif on this server.
Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2 Server at localhost Port 8888
I'm stumped at this point :frusty:
I'll either keep banging on it, or will either develop exclusively on the laptop or find a way (probably a good exercise) to use my desktop as QA/staging and just learn how to promote my site changes often :)
But I'd still like to solve it :cool:
Re: 403 errors on new template with MAMP
I can access it externally without issue. Granted, I did change the configuration to use port 80, but that just makes it so I don't have to specify port 8888 when viewing externally.
Yes, it needs the IP address, or a hand-made DNS entry in the other computer's hosts file.
But, you need to read the installation docs or at least the prerequisites mentioned in the /includes/.htaccess file to configure your httpd.conf settings to work with the security restrictions included there.