000webhost website upload didn't come out right

  • Context: PHP 
  • Thread starter Thread starter TheMacNerd
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 2K views
TheMacNerd
Messages
74
Reaction score
18
Hi,
I literally just revised a website template and tried uploading it to 000webhost.com (free website hosting) today, but it didnt come out right. There was supposed to be a bunch of pictures and animations, but it came out as just text with a white background. Is there a solution to this to make my website come out right? I tried editing the text file and that didnt seem to solve the problem. I need help on this. Thanks.
 
Physics news on Phys.org
https://sienaprofessionalservicescom.000webhostapp.com/
 
Assuming the link in #3 is the site in question- it looks like all of the css files are missing. And also the javascript files.

For example, your main stylesheet returns a 404 error- https://sienaprofessionalservicescom.000webhostapp.com/css/style.css
 
TheMacNerd said:
I downloaded it just now to my desktop and unzipped the file 'balay.zip', which created a folder 'balay'. I dropped the folder into my 'Sites' folder on my Mac, which contains a copy of my website and can be served by a copy of Apache running on this machine. I opened a new tab in Firefox, entered the URL http://localhost/~jtbell/balay/ and the template's home page came right up. I can click to the other sample pages in the menu on the left. The animations work. To add a new page, I suppose I'd copy one of the existing pages and tinker with the text, change the image URLs to point to my own, add a link to the new page in the menu on each of the other pages, etc.

I expect that if I uploaded this folder to the 'public_html' folder of my web site, "alongside" my own stuff, I'd be able to access it via http://mydomain/balay/ . I might have to adjust the permissions on the files and folders, but I don't have to do it with my own stuff.

My own site is competely hand-coded, with really plain and simple HTML, CSS, PHP, and no animations etc. I have no experience with templates like this, but it seems to work "out of the box" for me.
 
Last edited:
Download a tool called Fiddler. It will help you debug issues like missing stylesheets. You can also right click on the page and hit "Inspect." This will bring up your Javascript console. Right off the bat I see

Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

That is telling you that Apache is not returning the correct thing. The fact that it's text/html means that it's probably serving you a default 404 HTML page. Check your paths and your domains.