Jump to content

[Solved] 500 Internal Server Error


dalrae
 Share

Recommended Posts

Hi, I just switched from 000webhost to HelioHost, so I downloaded all content from the file manager their and uploaded it to heliohost, however I'm unable to view any directories in my site.

The site is "dalrae.heliohost.org"

All my php file permission are 644, my folder permissions are 755, my public_html folder is 755, and my "www" folder is 777.

Thanks for any help!

Link to comment
Share on other sites

Try renaming or deleting your .htaccess file. If that fixes the 500 error it will help narrow down whether the syntax of your .htaccess is correct

Interesting... That fixed it. My .htaccess is very simple, I don't see why it's syntax is incorrect:

 

 

 

 

 

EDIT: I figured this out. Apparently HelioHost doesn't allow overriding of php.ini, so I can't use the "php_value" or "php_flag" options


# HTID:6583797: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW
php_value display_errors 1
# DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:6583797:
RewriteEngine On

#RewriteCond $1 !^(music\.php)
#RewriteRule ^(.*)$ music.php?l=$1 [L]
#php_value auto_prepend_file "required.html"
<FilesMatch "\.(txt)$">
  Order Deny,Allow 
  Deny from all
</FilesMatch>
ErrorDocument 404 /index.php
Options -Indexes
Link to comment
Share on other sites

Display errors is already enabled on all versions of php on all servers so that line is pointless anyways, but if you want to disable errors you can do

<?php
ini_set('display_errors', 0);
To prepend a file to your php script you can just do

<?php
require "required.html";
In my opinion it's better technique to include/require files like that in your code rather than your .htaccess because you might want to edit your php headers, and you can't do that once something has already been echoed.
Link to comment
Share on other sites

Display errors is already enabled on all versions of php on all servers so that line is pointless anyways, but if you want to disable errors you can do

<?php
ini_set('display_errors', 0);
To prepend a file to your php script you can just do

<?php
require "required.html";
In my opinion it's better technique to include/require files like that in your code rather than your .htaccess because you might want to edit your php headers, and you can't do that once something has already been echoed.

 

Oh thanks for letting me know that.

I don't know why I added that line to my .htaccess, but I'd assume 000webhostapp disabled php errors by default.

Link to comment
Share on other sites

PHP display_errors is disabled by default on a new PHP installation because it can sometimes be a security vulnerability to display errors on your page for any visitor to see, but HelioHost is used primarily by people who are still learning, so it's nicer to see an error on your page rather than just a blank white browser window with no indication what went wrong. Hosting a new site for a beginner can be a fairly daunting endeavor so we like to be as newbie friendly as possible to keep people from getting discouraged and giving up. For the more advanced users who know to look in the error_log file, or users who are hosting production sites that are being viewed by thousands instead of just themselves we recommend turning display_errors off.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...