when installing a script geting - E_CORE_NOTICE - ????

loveispoison

Banned
Messages
323
Reaction score
0
Points
0
hi

im having this problem im trying to install a script but i get this error on top of the header does any know how to fix this or what it is?


Code:
Notice: Use of undefined constant E_CORE_NOTICE - assumed 'E_CORE_NOTICE' in /home/user/public_html/mydomain.com/libs/xx/class.Error.php on line 175

Notice: Use of undefined constant E_COMPILE_NOTICE - assumed 'E_COMPILE_NOTICE' in /home/user/public_html/mydomain.com/libs/xx/class.Error.php on line 176
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
That's really bizarre. E_CORE_NOTICE and E_COMPILE_NOTICE are system constants that have been defined since PHP4. I wonder if it's a configuration error on the admin side.
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Maybe your script is using outdated functions, or using functions in a wrong fashion
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
The weird thing is it's saying the constant is not defined, so it's using another constant. But, the constant it's using is the one it was looking for in the first place.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
im having this problem im trying to install a script but i get this error on top of the header does any know how to fix this or what it is?
Quoting errors is helpful, but it's still damn hard to fix them without knowing the source that generated it. Always give enough information to properly diagnose the issue. If it's a custom script, post a minimal test case that generates the error. If you're using a library, say which library, but you don't (necessarily) need to post source code from the library as most of it will just clutter up the post. Most importantly, RTFM for the library.

E_CORE_NOTICE and E_COMPILE_NOTICE aren't system constants. There are E_(CORE|COMPILE)_(ERROR|WARNING) constants, but apparently Zend doesn't generate notice-level messages, or at least doesn't need to handle them as it does other messages.

The warning messages indicate that the bare identifiers are being turned into the strings 'E_CORE_NOTICE' and 'E_COMPILE_NOTICE', not the values of those (non-existent) constants.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
...And again mission finds the subtle nuances. It's treating the non-existent constant as a string.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
I thought it was documented behavior, but I can't find a reference in the PHP docs. It sure as hell is documented for Perl ("Programming Perl", 3rd ed., p860). It may have been in the documentation around 2006, when Ben Ramsey references it.

Edit: The bit that Ben Ramsey quotes includes a reference to the PHP.net page on arrays that mentions quoting bare strings, but the referenced page isn't intentionally documenting this behavior; it's more of an offhand comment.
 
Last edited:

loveispoison

Banned
Messages
323
Reaction score
0
Points
0
i dont realy understand what u guys are talking about and specialy what mission is saying lolz

and i have removed that live from the script i got it working but then getting another error and removed that iswell then the script didt work and its a custom made script old 1
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
If your script uses the constant a lot, you'll probably get a whole slew of errors if you remove the line in which it's referenced. I would add this to the beginning of the file that you got the original error from:

Code:
define('E_CORE_NOTICE', E_CORE_WARNING);
define('E_COMPILER_NOTICE', E_COMPILER_WARNING);

Without knowing exactly what your script is doing, it's hard to pinpoint an exact solution, but I think this is a reasonable solution requiring little re-coding.

This is what is happening:
Code:
$var = ERROR_DOESNT_EXIST;
echo $var; // prints ERROR_DOESNT_EXIST (a string) and throws an error

define('ERROR_DOESNT_EXIST', 12345);
$var = ERROR_DOESNT_EXIST;
echo $var; // prints 12345 (no error)
 

loveispoison

Banned
Messages
323
Reaction score
0
Points
0
If your script uses the constant a lot, you'll probably get a whole slew of errors if you remove the line in which it's referenced. I would add this to the beginning of the file that you got the original error from:

Code:
define('E_CORE_NOTICE', E_CORE_WARNING);
define('E_COMPILER_NOTICE', E_COMPILER_WARNING);
Without knowing exactly what your script is doing, it's hard to pinpoint an exact solution, but I think this is a reasonable solution requiring little re-coding.

This is what is happening:
Code:
$var = ERROR_DOESNT_EXIST;
echo $var; // prints ERROR_DOESNT_EXIST (a string) and throws an error

define('ERROR_DOESNT_EXIST', 12345);
$var = ERROR_DOESNT_EXIST;
echo $var; // prints 12345 (no error)

fantastic it worked i removed those lines and replaced it with your and the errors didnt show up thanks :biggrin:

im gona try and see if is there gona be another error if any i will post here

EDIT:

didnt work i get same error again and another once that was there b4

Notice: Use of undefined constant E_COMPILER_WARNING - assumed 'E_COMPILER_WARNING' in /home/user/public_html/mydomain.com//libs/xx/class.Error.php on line 176

Notice: Constant E_CORE_NOTICE already defined in /home/user//public_html/mydomain.com//libs/xx/class.Error.php on line 175

Notice: Use of undefined constant E_COMPILER_WARNING - assumed 'E_COMPILER_WARNING' in /home/user//public_html/mydomain.com//libs/xx/class.Error.php on line 176

Notice: Constant E_COMPILER_NOTICE already defined in /home/user//public_html/mydomain.com//libs/xx/class.Error.php on line 176

Fatal error: Class '1' not found in /home/user//public_html/mydomain.com/libs/xx/class.xxDatabase.php on line 157

i get this at the last step there are 5 steps of installation and the script is ppc search engine script
 
Last edited:

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
Sorry, E_COMPILE_WARNING

It also looks like someone did define the constants, but they're defined later in the script. You should go to those lines and use:

Code:
if (!defined('E_COMPILE_NOTICE')) {
define(....

It looks like the author got things out of order. You should also copy the define() statement from where it is giving the error now, to where I told you to define them earlier.
 
Last edited:

loveispoison

Banned
Messages
323
Reaction score
0
Points
0
ok but the other main problem is this one even if i remove those line i get this error and even if i leave them

Fatal error: Class '1' not found in /home/user//public_html/mydomain.com/libs/xx/class.xxDatabase.php on line 157

this i dot get why it doesnt work
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
Can you post or PM me that file? At least, as much as you feel comfortable with.
 

loveispoison

Banned
Messages
323
Reaction score
0
Points
0
ok pmed u with the download link for the script please can u fix it i tryed im not a noobi but i know about php some time like this i dont get whats going on let me know if u can fix it i will give u some credits if u want
 
Top