|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
just installed php-4.2.3-Win32 and have errors
ok, now, i know this is a register globals thing,,,but in the php.ini file it says now,,,
You should do your best to write your scripts so that they do not require register_globals to be on; now, i have these errors: Notice: Undefined variable: dbhost in c:apachehtdocsincconfig.php on line 28 Notice: Undefined variable: dbuname in c:apachehtdocsincconfig.php on line 28 Notice: Undefined variable: PHP_SELF in c:apachehtdocscomshopheader.php on line 7 and many more,,,, since i have these errors, or notices, which i know i can hide with the error: error_reporting = E_ALL & ~E_NOTICE and not only that, i left mine at error_reporting = E_ALL because i want to code php scripts with all possible, no errors,,, or notices,,, is this possible, or should i just turn globals on, and do it that way? |
|
#2
|
|||
|
|||
|
RE: just installed php-4.2.3-Win32 and have errors
What it is telling you is that those variables have not had a value assigned to them before you used them...you should assign some type of initial value to them..
as for the $PHP_SELF, use $_SERVER['PHP_SELF'] |
|
#3
|
|||
|
|||
|
RE: just installed php-4.2.3-Win32 and have errors
ok, ,but for like these:
Notice: Undefined variable: dbhost in c:apachehtdocsincconfig.php on line 28 Notice: Undefined variable: dbuname in c:apachehtdocsincconfig.php on line 28 these are in my config.php and are for my database connection: $db = mysql_pconnect($dbhost, $dbuname, $dbpass); now why would those show up with that error? i have like 9 of those errors on this line alone,, i just dong get it.. and thanks for the php_self info.. should i keep my register globals off then? cuz like anyone, id like to try to become a great php programmer..lol it does make things easier, but, i think to be the best, do it right..? what about register globals? |
|
#4
|
|||
|
|||
|
RE: just installed php-4.2.3-Win32 and have errors
because the values you have set for $dbname and all the other 3 are not defined correctly or the database source your referencing does not exist
|
|
#5
|
|||
|
|||
|
RE: just installed php-4.2.3-Win32 and have errors
Using PhP 4.2.3 on IIS 5, I have a similar problem with an undefined variable error message in a much simpler context. The same code served from an Apache server and a different version of PhP works fine. I suspect configuration is the problem but can't find the cause.
MyCode: MyQuery: http://mydomain.com/index.php?contents=index.htm Error: Notice: Undefined variable: contents in F:inetpubWWWROOTmydomainindex.php on line 48 |
|
#6
|
|||
|
|||
|
RE: just installed php-4.2.3-Win32 and have errors
Using PhP 4.2.3 on IIS 5, I have a similar problem with an undefined variable error message in a much simpler context. The same code served from an Apache server and a different version of PhP works fine. I suspect configuration is the problem but can't find the cause.
MyCode: MyQuery: http://mydomain.com/index.php?contents=index.htm Error: Notice: Undefined variable: contents in F:inetpubWWWROOTmydomainindex.php on line 48 |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > just installed php-4.2.3-Win32 and have errors |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|