Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
MCTools is on a distinguished road
 
Posts: 4
Join Date: Oct 2011
Default problems with my site - 10-15-2011, 12:57 PM

the first one is that i can upload txt files but when i open it you only see a white page and a hosting24 secret code is in my code how i delete/disable it?
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
chico's Avatar
Senior Member
chico is on a distinguished road
 
Posts: 341
Join Date: Aug 2011
Default 10-15-2011, 01:08 PM

Unfortunately, .txt and .exe files are disabled for security reasons. This feature can be enabled with premium account. You can upgrade your account at http://www.000webhost.com/upgrade/


Couldn't think of a fancy signature, so you get a instead.
Reply With Quote
(#3 (permalink))
Old
lobrc's Avatar
Administrator
lobrc is on a distinguished road
 
Posts: 5,046
Join Date: Jan 2010
Location: http://www.lobrc.net
Default 10-15-2011, 01:08 PM

1. Txt files are not supported on free hosting.

2. That piece of code can be disables here: http://members.000webhost.com/analytics.php


FREE SCRIPT INSTALLATION SERVICE | PREMIUM HOSTING* | LOBRC.NET

*All packages include Quality Support, Website Builder, Free Site Migration, 30 Day Money Back Guarantee, Official cPanel and Fantastico Autoinstaller.

Plus get 20% off with promo code 000WH20. Contact sales for more information.
Reply With Quote
(#4 (permalink))
Old
lobrc's Avatar
Administrator
lobrc is on a distinguished road
 
Posts: 5,046
Join Date: Jan 2010
Location: http://www.lobrc.net
Default 10-15-2011, 01:09 PM

Thread moved > Customer Assistance


FREE SCRIPT INSTALLATION SERVICE | PREMIUM HOSTING* | LOBRC.NET

*All packages include Quality Support, Website Builder, Free Site Migration, 30 Day Money Back Guarantee, Official cPanel and Fantastico Autoinstaller.

Plus get 20% off with promo code 000WH20. Contact sales for more information.
Reply With Quote
(#5 (permalink))
Old
Junior Member
MCTools is on a distinguished road
 
Posts: 4
Join Date: Oct 2011
Default 10-15-2011, 01:14 PM

Is there a way to fix the txt and exe because i need it for my update program. And thanks for the link to disable the hosting24 code. As it can whithout upgrade to fix the txt and exe.

Last edited by MCTools; 10-16-2011 at 11:28 AM.
Reply With Quote
(#6 (permalink))
Old
lobrc's Avatar
Administrator
lobrc is on a distinguished road
 
Posts: 5,046
Join Date: Jan 2010
Location: http://www.lobrc.net
Default 10-15-2011, 01:34 PM

The only way to get txt and exe files enabled would be to upgrade.


FREE SCRIPT INSTALLATION SERVICE | PREMIUM HOSTING* | LOBRC.NET

*All packages include Quality Support, Website Builder, Free Site Migration, 30 Day Money Back Guarantee, Official cPanel and Fantastico Autoinstaller.

Plus get 20% off with promo code 000WH20. Contact sales for more information.
Reply With Quote
(#7 (permalink))
Old
Member
Hans Henrik is on a distinguished road
 
Posts: 57
Join Date: Oct 2011
Location: Norway
Default 10-31-2011, 11:12 AM

cant believe txt files are disabled! (but just rename them to .text and you should be ok i guess)

anyway, you can do it like PhpBB do it:
an sqldb with with table "real_name" and "filename", and load the "filename" in php and send it to the user as whatever
real_name is

you can deliver exe/txt files like this:
PHP Code:
<?php
$filename
="randomfilename123";
$real_filename="hello_world.exe";
    
$size = @filesize($filename);
    
header('Pragma: public');

    
header('Content-Description: File Transfer');
    
header('Content-Type: application/octet-stream');
    
header('Content-Disposition: attachment; filename='.$real_filename);
    
header('Content-Transfer-Encoding: binary');
    
header('Expires: 0');
    
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    
header('Pragma: public');
    
header('Content-Length: ' $size);

        
$fp = @fopen($filename'rb');

        if (
$fp !== false)
        {
            while (!
feof($fp))
            {
                echo 
fread($fp8192);
            }
            
fclose($fp);
        }
        else
        {
            @
readfile($filename);
        }

        
flush();

?>
(reference: PhpBB's download\file.php / function send_file_to_browser() )
edit: live demo here: http://hanshenrik.tk/transfer_exe_test/
(will download a simple "hello world.exe" console program)
please note however, if the file download takes longer than 10 seconds, it will be canceled.
this can be boosted to 44 seconds by running: ini_set('max_execution_time', 45);
but not longer than 44 seconds, as discussed in this thread: http://www.000webhost.com/forum/customer-assistance/26848-net-err_empty_response-when-running-script-long-time.html#post146713


to get my attention, send a private message

Last edited by Hans Henrik; 10-31-2011 at 01:32 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com