[Solved] (Well Sorta)Declaration errors
So on my index.php page I get a declaration error:
PHP Code:
Fatal error: Cannot redeclare sha512() (previously declared in /home/flownyx/public_html/lacydic/config.php:8) in /home/flownyx/public_html/lacydic/config.php on line 11
And on my config.php file it only contains the following from lines 1-12:
PHP Code:
<?php
$mysqluser = "censored";
$mysqlpass = "censored";
$mysqldb = "censored";
$mysqlserver = "localhost";
function sha512($input){
$sha512 = hash('SHA512', $input);
return $sha512;
}
Re: [Solved] (Well Sorta)Declaration errors
Well why does your variable have the same name as the function. Even if it were allowed it's still stupid.
Re: [Solved] (Well Sorta)Declaration errors
Oops mis-read.
Just rename the variable to like 'retur' or something. I mean it really doesn't matter what the variable is named inside of the function.
Re: [Solved] (Well Sorta)Declaration errors
I changed my variable but it still comes out to the same error.
Re: [Solved] (Well Sorta)Declaration errors
Well do you include the file more than once?
Re: [Solved] (Well Sorta)Declaration errors
Nope I got that response and it fixed it only for a bit. Then why I tried to solve the other errors that popped up I got the same error again.