473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

use of undefined constant

cassbiz
202 100+
I just upgraded to PHP5 and now most of my stuff doesn't work :(

In the error log I am getting a string (this happens on every call to the language file)

Expand|Select|Wrap|Line Numbers
  1. PHP Notice:  Use of undefined constant Welcome - assumed 'Welcome' in /includes/en.php on line 206
  2.  
The language file is being called by
Expand|Select|Wrap|Line Numbers
  1. include $include_path."en.php";
  2.  

The string that I am using is in the pages are
Expand|Select|Wrap|Line Numbers
  1. echo "{$t_admin['Welcome']}";
  2.  
Here is a snippet from the en.php
Expand|Select|Wrap|Line Numbers
  1. $t_admin[Welcome] =     "Welcome";
  2.  

If anyone can see the error here I would greatly appreciate it. My next task will be to find out why all the dates have reverted to 31.12.1969
Feb 20 '07 #1
4 5441
Motoma
3,237 Expert 2GB
I just upgraded to PHP5 and now most of my stuff doesn't work :(

In the error log I am getting a string (this happens on every call to the language file)

Expand|Select|Wrap|Line Numbers
  1. PHP Notice:  Use of undefined constant Welcome - assumed 'Welcome' in /includes/en.php on line 206
  2.  
The language file is being called by
Expand|Select|Wrap|Line Numbers
  1. include $include_path."en.php";
  2.  

The string that I am using is in the pages are
Expand|Select|Wrap|Line Numbers
  1. echo "{$t_admin['Welcome']}";
  2.  
Here is a snippet from the en.php
Expand|Select|Wrap|Line Numbers
  1. $t_admin[Welcome] =     "Welcome";
  2.  

If anyone can see the error here I would greatly appreciate it. My next task will be to find out why all the dates have reverted to 31.12.1969
You need to enclose the key name in quotes if it is not a variable:
[PHP]
$t_admin[Welcome]; // ERROR
$t_admin['Welcome']; // Correct
$index = "Welcome";
$t_admin[$index]; // Correct
[/PHP]
Feb 20 '07 #2
cassbiz
202 100+
Thank that helped and corrected the errors.

Any ideas on why all of my calendars and such would have reverted back to 31.12.1969?
Feb 20 '07 #3
Motoma
3,237 Expert 2GB
Thank that helped and corrected the errors.

Any ideas on why all of my calendars and such would have reverted back to 31.12.1969?
No idea.
Perhaps if you post some erroneous code, I could help.
Feb 20 '07 #4
cassbiz
202 100+
No idea.
Perhaps if you post some erroneous code, I could help.
Let me get back to you on that.

LOL

I think I just found my stupid pills and now have to look at what is (most likely) causing the problem.

Thanks for the help.
Feb 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Phil Powell | last post by:
class NicknameVerifier { function NicknameVerifier() {} function isValid() { if ($fileID) { $content = fread($fileID, HTMLRetriever::MAX_URL_SIZE); fclose($fileID); if ($content)...
1
by: D. Alvarado | last post by:
Hello, Ia m running PHP 4 on Fedora Linus Apache 1.27. Since I have a dev box, I would like warnings to appear in the event of undefined variables or constants. But although I specified this...
2
by: Jochen Daum | last post by:
Hi, according to php.net, I should use CURLOPT_HTTPPOST to upload a file with cURL. When I use it I get 'undefined constant'? My php is compiled with curllib 7.11.2 help anyone? Jochen
6
by: Wayne Wengert | last post by:
I have an ASP page in which I reference quite a few ADO constants such as adOpenStatic, adLockReadOnly and they work fine but a reference to adUseServer comes up as undefined? I have a typelib...
4
by: Kees Hoogendijk | last post by:
Hi everyone, Actually I dont know how te explein this, that's why I paste my code below. I've a main en I've a few header files. After I include the headers, the compiler shows the errors as...
3
by: bp | last post by:
Hi, Could someone to tell me what I'm doing wrong? I'm using gcc version 3.3.4 and ld version 2.15.90.0.3 20040415 the linker message is: .../obj/classOpenAreaForm.o(.text+0x211): In...
6
by: Simon Bailey | last post by:
In the following code at the end of the program z = 20 & y = 99. void doit(const int* x) { int* nonconst; nonconst = const_cast<int*>(x); *nonconst = 99; } int main(int argc, char* argv)
6
by: mark_galeck_spam_magnet | last post by:
Hello, K&R say about the constant expression after #if: "The resulting constant expression is restricted: it must be integral (...)" Clearly, the expression 1 < FOO if FOO is undefined, is...
16
by: Francois Grieu | last post by:
Hello, does the expression (0x41u*0x201)&0x7FFF yield the well defined value 0x0241, or is the behaviour undefined? In other words: what's the type of the product on an unsigned by an int,...
22
by: blargg | last post by:
Does ~0 yield undefined behavior? C++03 section 5 paragraph 5 seems to suggest so: The description of unary ~ (C++03 section 5.3.1 paragraph 8): But perhaps "one's complement" means the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.