Web Hosting Talk







View Full Version : PHP 5 issues


Jong
01-18-2005, 02:34 AM
Recently, I upgraded to PHP 5, then the following error messages start to appear, which did not appear before the upgrade:

Notice: Use of undefined constant keep - assumed 'keep' in c:\sites\ncirs\ncirs.php on line 11

>>> 'Tis the code: $tpl=new nci_Template(".",keep);

Notice: Undefined variable: opt in c:\sites\ncirs\ncirs.php on line 13

Notice: Undefined variable: v in c:\sites\ncirs\ncirs.php on line 13

>>> 'Tis the code: if (($opt == 4 && $z == 1) || ($v == 1))

Notice: Use of undefined constant home - assumed 'home' in c:\sites\ncirs\ncirs.php on line 15

>>> 'Tis the code: else { $tpl->set_file(array(home=> "ncirs.htm")); }

Warning: Cannot modify header information - headers already sent by (output started at c:\sites\ncirs\ncirs.php:11) in c:\sites\ncirs\includes\session.inc on line 394

>>> 'Tis the code: header("Status: 302 Moved Temporarily");

Warning: Cannot modify header information - headers already sent by (output started at c:\sites\ncirs\ncirs.php:11) in c:\sites\ncirs\includes\session.inc on line 117

>>> 'Tis the code: SetCookie($this->name, $id, 0, "/", $this->cookie_domain);

Warning: Cannot modify header information - headers already sent by (output started at c:\sites\ncirs\ncirs.php:11) in c:\sites\ncirs\includes\session.inc on line 406

>>> 'Tis the code: header("Location: ". $PROTOCOL. "://".$HTTP_HOST.$this->self_url());

Thank you.

gogocode
01-18-2005, 03:04 AM
Notice: Use of undefined constant keep - assumed 'keep' in c:\sites\ncirs\ncirs.php on line 11
$tpl=new nci_Template(".",keep);


Have you defined the constant keep using define()? Or, did you think keep is a string? In which case that should read $tpl=new nci_Template(".",'keep');


Notice: Undefined variable: opt in c:\sites\ncirs\ncirs.php on line 13
Notice: Undefined variable: v in c:\sites\ncirs\ncirs.php on line 13


You havn't defined these variables. Why are you comparing undefined variables? Are you sure that your script doesn't require register globals?

Burhan
01-18-2005, 04:19 AM
There are not error messages, these are warning/notices. Your previous PHP installation was giving the same notices, but since your error reporting was off, you were not seeing them.

In short, this is not a PHP5 problem.

Rich2k
01-18-2005, 05:51 AM
error_reporting(E_ALL ^ E_NOTICE);