Hy All

I run a PPD website, so the members have to complete a survey before they can download a file. But after the survey they got this error, please see the pics.

http://filemonster.org/images/97f448bf6398174f45e04ffc8ac964bb.png

I didnt edit anything and check the file structure and didnt see any bad coding.

I attach here the 2 php code maybe you can spot the problem:

<?php
/**
 * @version 1.0
 */

    class config extends core{
        /**
         * Data Base MySQL
         */
        static $db_host = 'blabla';
        static $db_user = 'blabla';
        static $db_pass = 'blabla';
        static $db_base = 'blabla';
        static $db_start_query = 'SET NAMES UTF8'; // Not change!

        /**
         * Global
         */
        static $script_name = 'Filemonster.org';
        static $page_dir = ''; // dir of the site (if the side is in the main catalogue of domain leave empty)
        static $with_url = ''; // www. or leave empty


        /**
         * Pagination
         */
        static $str_default_insite = '20'; // Domyślna ilość elementów w stronicowaniu
        static $str_default_anomaly = '5'; // Odchylenie stronicowania (Długość ciągu stron)

        /**
         * Auth
         */
        static $sys_token = 'bd3bc7b5d6c6227045e598558d629a21'; // Zmiana klucza spowoduje błąd w autoryzacji

        /**
         * JavaScript
         */
        static $javascript_map = array(
            // Core JavaScript/Ajax
            'core' => 'js/core.js',

            // jQuery
            'jq' => 'js/jquery.js',
            //'jq-ui' => 'js/jquery-ui-1.7.2.custom.min.js',
            'jq-ui' => 'js/jquery-ui-1.8.16.custom.min.js',

            // "Clouds"
            'jq-tooltip' => 'js/jquery.tooltip.min.js',

            // jQuery-DataPicker - Graficzne wybieranie daty
            'jq-datapicker' => 'js/jquery-ui-1.7.2.datapicker.js',

            // jQuery-LightBox
            'jq-lightbox' => 'js/jquery.colorbox-min.js',

            // CP (Control Panel)
            'cp' => 'js/cp.js',

            // Editor HTML
            'tiny_mce' => 'extra/tinymce/tiny_mce.js'
        );

        /**
         * CSS
         */
        static $css_map = array(
            // General CSS






'general' => 'css/style.css',
            'ui' => 'css/ui-style.css',
            // CSS Control Panel
            'cp' => 'css/cp.css',
            // Standard CSS and CP
            'simple' => 'css/simple.css',
            // Massages CSS
            'messages' => 'css/messages.css',
            // CSS Internet Explorer






'browser-ie' => 'css/ie.css',
            // CSS Google Chrome
            'browser-chrome' => 'css/chrome.css',
            // CSS JavaScript/Ajax
            'javascript' => 'css/javascript.css',
            // Pagination
            'pagination' => 'css/pagination.css',

            // jQuery






'jquery-ui' => 'css/ui-lightness/jquery-ui-1.7.2.custom.css',






'lightbox' => 'css/lightbox.css'
        );

        static $currency = "$";

/**
 * **********************************************************************************************************
 * Advanced part, Changes aren't being recommended to this Section because it can result in Total stopping the System
 * **********************************************************************************************************
 */

        /**
         * Smarty
         */
        static $tpl_dir = ''; // Smarty

        /**
         * Modules
         */
        static $module_dir = 'module/'; // Moduły
        static $module_default = 'home'; // Domyslny modul
        static $module_default_function = 'default'; // Domyslna funkcja

        /**
         * Admin Panel
         */
        static $admin_dir = 'admin/';
    }



?>

and the second the default.php

<?php //0051a
// @Copyright FileShareScript.com
// Buy your license at http://filesharescript.com
// 
// Nulled script won't receive support and updates from us and will get you in trouble.
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube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ibnhdOVSXqazhdE2xRRqex2TiYS/9a7kzPQbusfRej
qOi=

Recommended Answers

All 16 Replies

Member Avatar for diafol

The code is encrypted. Can't see line 51 therefore. But it's due to the config.php outputting something. Have a look at config.php on line 1 to see what it could be. It's possible that you have a space or blank line before the <?php tag.

This error is because you are using somewhere header() method which is used after outputing some value

Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include, or require, functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.

Quote from http://php.net/manual/en/function.header.php for header() method.

There are two fix fro this problem:-

  • Place your header() method before any actual output is sent.
  • try placing this at the top of your page:

    <? ob_start(); ?>
    

then at the bottom of the page place this line of code:

<? ob_flush(); ?>

This will flush the output image and will let you redirect using header() method.

if i paste the ob start flush code to the default.php on the download folder, then its say download/default.php is crrupted. I have to paste it to the config.php?

or maybe i pasted it wrong, can you send me the correct pasted code?

try placing this at the top of your page:

<?php ob_start(); ?>

then at the bottom of the page place this line of code:

<?php ob_flush(); ?>

place it int the file that contains header() method.Check config.php and default.php

I pasted to the config.php and when i tried it, its say the same just instead of config.php:1 its said config.php:121 when i try to paste it to the default.php it came back as default.php is corrupted. I dont know what to do, as the script provider dont help me, and every single minute i loosing members because of this issue

search in both file if there is any header() method.If it is then check condition at top to get rid of this error.
Unless you show the code that contains header() i cannot help.

Whats in your config.php

As Diafol has mentioned the error is in there

both of the files the config.php and default.php been uploaded here, please check on the top.the first code is the config.php, the 2nd is the default.php .
i checked both files, and can not find "header)(" so i dont know where to refer this error.
Please check the code maybe you can find the error.

As it is encrypted not sure what you expect anyone to do.

Have you contacted FileShareScript?

Have you got the IONCUBE installed?

bro. did you pastec both and flush functions on the same file???

if it is, then do the ob_start at the config.php ( make sure every pages calls this php file ). the ob_flush function must be at the very bottom of the page before the session_destroy (if and only if there is/are session variable(s)) otherwise just paste it at the very bottom

one way of doing this is try to debug it on the browser by inspect element. to see if there's header function that interrupts the transaction of the (must be running) script

Member Avatar for diafol

The only way I can see that config will throw an error is if there is whitespace before the php tag or the file has a BOM. If there is no whitespace, try copying the entire text of the config file and pasting into a new file and save as encoding utf-8 without BOM. Most good editors will allow you to do this, e.g. Notepad++

diafol was right. other than that. there may be also files like htaccess or htpassword is included but the greatest probability of error is around config.ph that has BOM

i put the ob dlush but its not work. I find out this is on the line 51-52

  header('Content-Disposition: attachment; filename="'.$data['name'].'"');

here is the code from line 45-59 the error say i have the problem on the line 51-52

// File type
                    //header('Content-type: MIMETYPE');

                    // Download

                    if(file_exists( $data['file'] )){ 

                        header('Content-Disposition: attachment; filename="'.$data['name'].'"');

                        // Plik do pobrania
                        readfile( $data['file'] ); 

                        die();

                    } else page::setError('Action Success, but file not exists! Contact with administrator');
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.