Magento Forum

   
Can’t access any files from the browser.  404 errors
 
kelemvor
Jr. Member
 
Total Posts:  6
Joined:  2013-04-13
 

So I have a Wordpress site up and running and am trying to install Magento in a subfolder to use as a shopping cart.  (e.g. http://www.whatever.com/magento).

Everything FTP’d over just fine, but when I try to access any of the files, I get my WP theme coming up and showing me a 404 error.  The files are there, but I just can’t get at them.

In the installation instructions, I got as far as “installing” the system but the file it tells me to go to doesn’t exist.

In step 7 here: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/magento_installation_guide#instructions1
It says to go to http://www.example.com/magento/downloader.php

This file doesn’t exist.  It does have a downloader folder so I tried it like http://www.example.com/magento/downlaoder but I just get the 404 error.

I did create an info.php file to show me the versions of things I use and put it in my magento folder.  I can access that file just fine.  I just can’t access any of the actual Magento files.

Any help would be great.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kelemvor
Jr. Member
 
Total Posts:  6
Joined:  2013-04-13
 

I checked via FileZilla on my permissions and they look right.
All the folders (app, downloader, errors, etc) show as 775
All the files (api, cron, index, etc) show as 664

I deleted the .htaaccess file from my public_html folder and then started getting a 500 error instead of the wordpress 404 error.

I’m totally stumped on this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kelemvor
Jr. Member
 
Total Posts:  6
Joined:  2013-04-13
 

So it’s definitely something with the folder or the .htaccess file.  If I download the downloader.php file and put it in a magento subfolder, I can’t access it.  If I put the downloader.php file into my public_html folder, I can access it just fine.  I started to walk thruogh the steps but don’t want it to actually install into the public_html folder and didn’t see if I coudl change that along the way.

The permissions on the folder look fine so I’m wondering if it’s something related to Wordpress hijacking the file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bzash
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2008-11-17
 

I think perhaps directory permissions problems. Downloader.php needs a full write access to directory (to download and install Magento files).

Solution try one of the following methods :

1 - First method :

- Perhaps rename/disable “.htaccess” file (example : .htaccess => _htaccess).
- Change directory permissions to full access (owner=RWX group=RWX other=RWX).
- After try to call “downloader.php” from browser.

2 - Second method :

- Copy downloader.php into root web server directory (example : /var/www/).
- Call downloader.php from browser and install Magento into the root web server directory.
- Move all Magento files from this directory to target directory (example : /var/www/ => /home/user/target_directory/).

 
Magento Community Magento Community
Magento Community
Magento Community
 
kelemvor
Jr. Member
 
Total Posts:  6
Joined:  2013-04-13
 

So here’s some more info.

If I try to access any php file from my Magento folder, I get an error.  Either a 404 error generated from Wordpress with the normal .htaccess file, or an Internal Server Error if I rename my htaccess file to something else.

However, if I create an index.html file and put it in the magento folder, I can access that just fine with either htaccess file in the root.

So html files work but php files don’t.  If I make a simple phpinfo() file, it works in my root folder but not in the magento folder.

This sounds like a permissions thing to me but the file/folder permissions are showing as:
root/magento - 777

magento/info.php - 644 (doesn’t work)
magento/index.php and downloader.php - 777 (doesn’t work)
magento/index.html - 644 (works)

I don’t know how .htaccess files work to know what I can put in one to make the magento folder exempt from any restrictions.  Or if I can put one in the actual magento folder to override any other settings.

I could put the downloader.php in the root and install from there, but after I do that, I’d probably be stuck right where I am now after I moved it since the info.php file doesn’t even work in the magento folder right now anyway.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kelemvor
Jr. Member
 
Total Posts:  6
Joined:  2013-04-13
 

OK so here’s some more info.  When I change the permissions on the folder/files to REMOVE access, then they start to work.  I changed them from 777 to 644 and now the files are working.  I figured giving them full access would make sure everything would work but apparently something didn’t like that.

Not sure if it will let me install but I’ll see what happens.

UPDATE: Well, it got as far as Installing package community/Mage_Core_Modules 1.7.0.2 and it hasn’t moved in about 30 minutes.  Is that where it’s supposed to end by chance?

Image Attachments
magento.JPG
 
Magento Community Magento Community
Magento Community
Magento Community
 
bzash
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2008-11-17
 

Try the same procedure on these directories and subdirectories (remove and update the permissions) :

app/code
app/etc
var

Downloader needs these permissions to download and install packages. The download of the files seems OK, but not the extraction and installation of packages (write access permissions...).

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top