000webhost website upload didn't come out right

  • Context: PHP 
  • Thread starter Thread starter TheMacNerd
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on issues encountered when uploading a website template to 000webhost.com, specifically the absence of CSS and JavaScript files leading to a display of only text on a white background. Users identified that the main stylesheet and other resources were returning 404 errors, indicating they were not found on the server. A solution involves ensuring that all necessary files are correctly uploaded to the 'public_html' directory and checking file permissions. Additionally, using debugging tools like Fiddler and browser inspection can help diagnose MIME type issues and path errors.

PREREQUISITES
  • Understanding of HTML and CSS file structures
  • Familiarity with web hosting environments, specifically 000webhost
  • Basic knowledge of Apache server configurations
  • Experience with debugging tools like Fiddler and browser developer tools
NEXT STEPS
  • Learn how to properly upload files to the 'public_html' directory on 000webhost
  • Research how to configure file permissions on web servers
  • Explore the use of Fiddler for debugging web applications
  • Study common MIME type issues and how to resolve them in Apache
USEFUL FOR

Web developers, particularly those using 000webhost for hosting, designers working with website templates, and anyone troubleshooting web upload issues.

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.
 
Technology news on Phys.org
Either post the template here or post a link to it.
 
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.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
Replies
4
Views
11K
Replies
15
Views
10K
  • · Replies 15 ·
Replies
15
Views
1K
  • · Replies 12 ·
Replies
12
Views
3K