0

I have magento installed under my server, and I have created some custom folder and uploaded .php files there, but when I want to open that file from the url I get magento 404 page error. Those files have nothing to do with magento and I created that folder for something else. However when I upload .html file inside that folder it opens without problem.

for example:

http://example.com/folder/file.php dont work http://example.com/folder/test.html work

Is this some kind of magento block or its server related?

Thanks.

asked Mar 5, 2017 at 13:49

1 Answer 1

0

This is topically file and folder permission problem in your server. So you need to give the file permission of your custom folder and file as per Magento recommended.

So give directory ( your folder )and file (your_file.php) permission as

$ chmod 775 -R <your folder name>
$ chmod 644 <your file name>

If you are on a development environment, this is the way to go:

$ chmod -R 777 /magento-directory/

After that you can access of your directory or file. If you need to access the magento property, You need to add the below code at the top of your external file.

<?php
require_once('../app/Mage.php'); //Path of Mage.php
umask(0);
Mage::app('default');
// add your stuff here
answered Mar 5, 2017 at 14:06
3
  • just did that and not possible to access files as seen here steelclassic.com//bridge2cart/bridge.php Commented Mar 5, 2017 at 15:27
  • Fisrt try this chmod -R 777 /magento-directory/ Commented Mar 5, 2017 at 15:32
  • by /magento-directory/ you mean directory I need to use? Commented Mar 5, 2017 at 15:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.