Can't open .php files on my website


#1

Hello there;

I recently uploaded an experimental website for testing purposes. There is a php page which is located in assets folder of my website. But when I go to its URL and try to open it the only thing that shows up is the file’s source code (not the actual page).

Link to the php page:
https://matcha-gooness.000webhostapp.com/assets/easyblog.php

I’ve been told this will happen when a hosting doesn’t support php. But to my knowledge 000Webhost supports php.

If anyone knows about how to resolve this issue, please help.

Thank you in advance.


#2

Try hitting the Repair button in the cPanel :wink:


#3

Hi ckhawand;
Thanks for helping me. :slightly_smiling_face:

Just clicked on the Repair buttton. The problem persists. :confused:


#4

Is it a wordpress website? :confused:


#5

Yes, it is a WordPress website.


#6

I couldn’t find the folder /assets in your files :confused:


#7

Sorry for the late reply. There was a problem with the WordPress admin panel.

The assets folder is back. However I’m afraid it’s not directly accessible. There are just 2 files in it:

easyblog.php:
https://matcha-gooness.000webhostapp.com/assets/easyblog.php

&

easyblog.csv:
https://matcha-gooness.000webhostapp.com/assets/easyblog.csv


#8

When you are browsing via File Manager > where are the files located?


#9

Hi Infinity;
Thank you for helping me.

It’s location is a bit odd because I’m using a WordPress plug-in to convert some pages made by Adobe Muse software to WordPress themes.

The location is:
/public_html/mtw-themes/BlogOnly/assets/

I think the plug-in sets the “BlogOnly” folder as the root folder.


#10

https://matcha-gooness.000webhostapp.com/mtw-themes/BlogOnly/assets/easyblog.php

Weird.

Must be something to do with .htaccess or the way you are linking things.


#11

Strange…:thinking:

Just tried opening https://matcha-gooness.000webhostapp.com/mtw-themes/BlogOnly/assets/easyblog.php and the php page opened but it doesn’t supposed to work like that. Besides if this gonna imply that the php file isn’t located somewhere like in an /assets/ directory in the root folder then how can I see the source code via the previous link?


#12

https://matcha-gooness.000webhostapp.com/assets/easyblog.php

Is only a link it seems

https://matcha-gooness.000webhostapp.com/assets/ doesn’t exist as you can see from public_html

There must be .htaccess rules to rewrite the file location and somehow display the code instead of running it as a PHP script.

@teodor might be able to advise.


#13

Thanks for all your helps. Will wait for @teodor for more help. Just one question:
It seems the server doesn’t give me access to the .htaccess files. Whenever I try to open them it gives back a “403 Error”. Any ideas why?


#14

You can only open them via edit on File Manager.


#15

@supun any ideas? :smiley:


#16

Hey @tommy_a

Move those files to another folder (from asserts) and try


#17

Hi Supun;

Thank you for helping me.

Not sure why but currently I can’t access my file manger. I believe it’s temporary so I will get back to you as soon as this partial issue is solved.


#18

Admins are aware of the ftp errors. Problems will be solved soon.