Quick search:

error after installation plz help

waqas
2010-07-26 12:25:49
 
i have just downloaded peanuts1.4 version after putting it in xaamp apache htdocs folder when i browse it
http://localhost/phpPeanuts_1_4_0/emptyapp/index.php

it showing this error please help how to solve it

l error: Cannot redeclare lcFirst() in C:xamp tempxampphtdocsphpPeanuts_1_4_0classespntgeneralFunctions.php on line 202

please help what is issue
Henk
2010-07-27 21:44:00
 
Hi waqaz,

The file classes/pnt/generalFunctions.php is defining the function lcfirst and PHP does the same since version 5.3, see http://www.php.net/manual/en/function.lcfirst.php. Luckily both functions do the same thing, so all you need to do is remove the function's definition from classes/pnt/generalFunctions.php.

However, your version of phpPeanuts will no longer work on older versions of PHP. If you want to make it work on older versions as well as 5.3, replace the entire function definition with:
if (!function_exists('lcFirst')) {
    function lcFirst($string) {
        $len = strLen($string);
        if ($len < 2)
            return strToLower($string);
        return strToLower(subStr($string,0, 1)).subStr($string,1);
    }
}

You will encounter more problems of phpPeanuts 1.4 with php 5.3. Most of them can be solved by adding the following to your configurations file (classes/makeSettings.php) (replace the timezone by your own timezone):

if(function_exists('date_default_timezone_set'))
    date_default_timezone_set('Europe/Amsterdam');

$errLevel = E_ALL ^ E_NOTICE ^ E_USER_NOTICE;
if (defined('E_DEPRECATED'))
  $errLevel = $errLevel ^ E_DEPRECATED ^ E_USER_DEPRECATED;
error_reporting($errLevel);  
$this->errorHandler->reportingLevel = $errLevel

Version 1.5 fixes these problems (but is not yet released).

Greetings,

Henk Verhoeven.
Add a Reply
Loading form, please wait
The website will not send you an e-mail when a reply is added to this topic

Back to Topics List