Jump to content

many errors in website!


lykaveri

Recommended Posts

Hi, I have installed a website script to my hosting server but the website is not working properly. Here is a screen shot: http://www.hot.ee/marxlee How can i solve these problems?

 

config.inc.php on line 2228-2230:

2228: if (!ereg (''.'\\/\\/'. $host, $referer))

2229: {

2230: setcookie ('CameFrom', $referer, time () + 630720000);

2231: }

 

index.php on line 587

587: list ($user_id, $chid) = split ('-', $password, 2);

 

modifier.myescape.php on line 26-37:

 

function smarty_modifier_myescape($string)

{

    if (strlen($string) > 20)  <-- this is line 28

    {

      $string = str_replace('<SC', '<SC', $string);

      $string = str_replace('<sC', '<sC', $string);

      $string = str_replace('<Sc', '<Sc', $string);

      $string = str_replace('<sc', '<sc', $string);

    }

 

    return $string;

}

 

thanks in advance :)

 

[attachment deleted by admin]

Link to comment
Share on other sites

And one thing yet, i cant login to my admin panel.. there is this error:

 

Deprecated: Function split() is deprecated in /home/puzkin/domains/................/public_html/admin.php on line 143

 

Warning: Cannot modify header information - headers already sent by (output started at /home/puzkin/domains/.............../public_html/inc/config.inc.php:2228) in /home/puzkin/domains/.............../public_html/admin.php on line 238

 

admin.php line 143

line 143: list ($user_id, $chid) = split ('-', $password, 2);

line 238: header ('Location: index.php');

 

 

Link to comment
Share on other sites

#1 - The "Cannot modify header ..." errors are most likely a result of the other error messages.  You can ignore them until you get the other errors cleaned up.

 

#2 - The "Deprecated ... " messages indicate that the script is using a function which has been depricated. This means that some future release of PHP will NOT contain that function and your code will quit working (again). You have two choices: 1) turn off deprecated messages or 2) change these function calls to use the recommended replacements for the deprecated functions.  See the php manual at http://www.php.net/manual/en/index.php for help on these functions. Note: turning off the Deprecated messages is a short-term work-around.

 

#3 - The "strlen function expects ..." indicates that one of the parameters passed to that function are not the expected type (it tells you which one). This indicates that $string is not a string (might be an array, or object, or null, or something). Since this variable is passed in to the smarty_modifier_myescape() function, you will have to look at where that function is called to see what is wrong with the "string". It is possible that this variable is not getting assigned because of one of the other errors, and fixing those errors will make this one go away.

 

#4 - You cannot login to the admin panel - this is likely a cause of one of these errors. One of the script files you added is probably getting included and it is throwing errors.

 

I highly recommend you reconsider using this script. It is using OLD functions and ignoring NEWer functions. For instance, the four calls to str_replace() could be replaced with one call to str_ireplace() which is a PHP5 function (so this code was written for PHP 4 or earlier). It could be the code is still there to allow support for PHP4 users, or it could be that the script is not being maintained. The continued use of the deprecated functions indicates (to me at least) that it is not being maintained.  See if the provider has a PHP5 version of the script since you are obviously using PHP5. Otherwise, read the line numbers presented in the error messages, find that line of code, fix the error, and try again.

 

If you run into problems or questions fixing specific lines of code, you can post the code and what is happening and we may be able to offer solutions. Be aware, if this script IS being maintained, and you start making changes to it, it will be next to impossible to "upgrade" if the provider issues a newer version of the script.  If at all possible check with the script provider to see if they have a PHP5 version of the script. If they say to just turn off Deprecated messages, ask if they PLAN to issue a PHP5 script. If you turn off deprecated messages, and your host upgrades to PHP6 (whenever it is released) your script will break again on any deprecated functions that have been removed from PHP6.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.