Jump to content

Recommended Posts

Posted

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!

Posted

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.

Posted

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
Posted

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.
Posted

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.

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...