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.
1 Answer 1
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
-
just did that and not possible to access files as seen here steelclassic.com//bridge2cart/bridge.phpBoris Zegarac– Boris Zegarac2017年03月05日 15:27:01 +00:00Commented Mar 5, 2017 at 15:27
-
Fisrt try this
chmod -R 777 /magento-directory/Supravat M– Supravat M2017年03月05日 15:32:41 +00:00Commented Mar 5, 2017 at 15:32 -
by /magento-directory/ you mean directory I need to use?Boris Zegarac– Boris Zegarac2017年03月05日 15:36:48 +00:00Commented Mar 5, 2017 at 15:36