Declaration errors

Wizet

New Member
Messages
644
Reaction score
0
Points
0
So on my index.php page I get a declaration error:
PHP:
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:
<?php
$mysqluser = "censored";
$mysqlpass = "censored";
$mysqldb = "censored";
$mysqlserver = "localhost";


function sha512($input){
$sha512 = hash('SHA512', $input);
return $sha512;
}
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
So on my index.php page I get a declaration error:
PHP:
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:
<?php
$mysqluser = "censored";
$mysqlpass = "censored";
$mysqldb = "censored";
$mysqlserver = "localhost";


function sha512($input){
$sha512 = hash('SHA512', $input);
return $sha512;
}

Out of curiosity, did you by chance include config.php twice by accident?

Cause the error is freaking out that you're re-declaring function sha512 a second time, once it's already been declared, and it's saying it was declared in that same file. The only cause I can think of is that it might've gotten included twice, thus trying to re-declare it in the same file...
 

Wizet

New Member
Messages
644
Reaction score
0
Points
0
That did help only once. Now I have more errors... I'll open a new thread for this....
 
Top