Re: User defined function problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Jon,

That did the trick nicely, not sure why I didn't think of it myself but is 
glad for the reminder of what that function is for. :)

Best Regards,
Steve

"Jon Anderson" <jon@xxxxxxxxxxxxxxxxxx> wrote in message 
news:44BD605E.6030703@xxxxxxxxxxxxxxxxxxxxx
> This would be the simplest work-around I can think of.
>
> In your config script, wrap an if around your function call:
>
> if (!function_exists('clean_sql')) {
>    function clean_sql() {
>       ...
>    }
> }
>
> jon
>
> Stephen Lake wrote:
>> Hey Guys and Gals,
>>
>> I am having a small problem with a user defined function, I placed it in 
>> a config file and it works as expected, but the problem seems to arise 
>> only when I try to use my login script for a members area I am 
>> redeveloping.
>>
>> The error message that comes up is the following:
>>
>> Fatal error: Cannot redeclare clean_sql() (previously declared in 
>> C:\Apache2\htdocs\braille\config.php:94) in 
>> C:\Apache2\htdocs\braille\config.php on line 108
>>
>> The problem is its claiming that I am trying to redeclare the function in 
>> the config file when there is only the original function.
>>
>> I checked in other area's where this config file is being used and I do 
>> not get this error. Nor am I including other files that have the config 
>> included in them.
>>
>> The problem is only in my login script. If anyone can give me a little 
>> insight into this error I would be greatly appreciated.
>>
>> Best Regards,
>> Steve
>> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux