Questions tagged [redeclare]
79 questions
0
votes
0 answers
Fatal error: Cannot redeclare class MYSQLi_DB
there is error :
Fatal error: Cannot redeclare class MYSQLi_DB in
/home/XXXX/public_html/XXXXX/install/include/database.php on line 10
and database.php file :

Drstreet
- 227
- 1
- 2
- 13
0
votes
1 answer
c++ use default functions in class with same name
What would be a good approach to implement a class in c++ like this:
Someclass.h:
class SomeClass
{
public:
SomeClass();
void kill();
}
Someclass.cpp:
SomeClass::kill(){
kill();//This would cause an infinit recursion
…

Poehli
- 307
- 4
- 16
0
votes
3 answers
PHP Fatal error, trying to request method inside model multiple times
The error message
[23-Mar-2010 08:36:16] PHP Fatal
error: Cannot redeclare humanize()
(previously declared in
/Users/tmclssns/Sites/nadar/nadar/trunk/webapp/application/filer/models/Filer/Aggregate.php:133)
in
…

Tom
- 191
- 1
- 11
0
votes
1 answer
Fatal Error 'Cannot redeclare' on Joomla upgrade
Tried to update our website from Joomla 2.5.9 to 2.5.22 and it broke the site, giving me the error:
Fatal error: Cannot redeclare word_count() (previously declared in
…
0
votes
2 answers
PHP MySQL - Need to display list of files and their file size, formatted. Redeclare function error
I'm stuck on something that's probably simple for more experienced PHP folks. I'm getting a "cannot redeclare function" error when I try to format the file size of a list of files I'm querying a mysql database for.
From what I can tell, I shouldn't…

jarrod1975
- 3
- 1
0
votes
2 answers
Magento - cannot redeclare categories
Hi I get an error in the following lines, but I have the following code on two different servers and on one server I don´t get this warning/error:

dgorges
- 139
- 4
- 19
0
votes
1 answer
../src/main.c:16:17: error: 'free' redeclared as different kind of symbol (Boolean)
I have a boolean free defined as
bool inbetween, free, lunch;
The only other times I use the boolean are here
//get time info
memset(period, 0, sizeof(period));
free = false;
inbetween = false;
lunch = false;
(I declare it true in a couple of if…

user2005840
- 1
- 2
0
votes
3 answers
Laravel 4 Eloquent ORM - Symfony \ Component \ Debug \ Exception \ FatalErrorException Cannot redeclare class WorkProcess
Here's the scenario!!!
Schema for (work_processes)
Schema::create('work_processes', function($table){
$table->increments('id');
$table->enum('wp_type',array('M','F','D')); //M => Maintenance, F => Field, D => Drilling
…

GoharSahi
- 488
- 1
- 8
- 22
0
votes
0 answers
Fatal error: Cannot redeclare termSort() (previously declared in \includes\common.inc(1743) : eval()'d code on line 4
Can you advise me please?
I have this code and I am displaying it on multiple pages (only with a changed VID). Everywhere, however, I leap above error.
How to modify this code so that it worked?
Thank you very much.

Hefi
- 47
- 1
- 1
- 6
0
votes
1 answer
Server configuration error:Fatal error: Cannot redeclare class JDate
everybody,
I have this propblem and I don't know how to solve it. I explain:
I hired a vps and installed a centos6 template with vhm/cpanel.Itried to configure everything and it seems to be working; The only propblem is that the script that I used…

Staulen Green
- 46
- 4
0
votes
1 answer
PHP: Out of scope variable access
What is the best approach to accessing a variable out of scope, see my current method:
// Define API
require_once( 'api.php' );
global $myapi;
$myapi = new LazyAPI( 'My API', 'myapi' );
class Content {
function DoAction() {
global…

Nahydrin
- 13,197
- 12
- 59
- 101
0
votes
2 answers
Cannot redeclare classX in classX.php?
I've searched for similar questions but didn't find any. The usual problem is that a certain class cannot be redeclared in another class, and so the solution is to use "require_once" or "include_once". But my error is not allowing the class itself…

user961627
- 12,379
- 42
- 136
- 210
0
votes
3 answers
Return and re-declare a variable from function
Working on an assignment for my Intro Programming class, I created a function and got everything working with a little help from some guys on here (thanks a ton btw) and now I have a new issue. I have two variables that I declare and prompted for a…

Justin McIntosh
- 15
- 5
0
votes
1 answer
CakePHP - Cannot redeclare class
I have a simple class that I've added to the components folder called mixpanel.php. Within the file is:

Hooman Ahmadi
- 1,397
- 1
- 12
- 21
-1
votes
3 answers
Is it possible to supress a function redeclaration error in PHP?
I wonder if it is possible to supress errors in PHP like when redeclaring functions, so the execution wont break and the script would just use the first time declared function?
Thanks in advance!

Tony Bogdanov
- 7,436
- 10
- 49
- 80