problem using error_reporting() PHP 5.0.2 (cli)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi:


  I'm using 
[root@bfc11 etc]# php -version
PHP 5.0.2 (cli) (built: Oct  9 2004 01:47:08)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies

and have the following entry in the php.ini file 

error_reporting = E_ALL

i then invoke the script from my browser

[yvb@bfc11 php_tut]$ cat ref_obj1.php
<pre>
<?php
 
error_reporting(E_STRICT|E_ALL);
 
class Class1 {
  var $var1=11;
 
  public function displayVars(){
    echo("var1 = $this->var1\n");
  }
} // end of class Class1
 
$instance1 = new Class1();
$instance1->displayVars();
 
$instance2 =& new Class1();
$instance2->displayVars();
 
?>
</pre>
[yvb@bfc11 php_tut]$

I donot see the warning messages (which i'm supposed to) inspite of
having enabled E_STRICT at runtime.

However if i change the entry in the php.ini file to
error_reporting = E_ALL | E_STRICT

and restart apache
and invoke the same script, i get the messages
Strict Standards: var: Deprecated. Please use the
public/private/protected modifiers in
/usr/local/htdocs/yvb/php_tut/ref_obj1.php on line 7

Strict Standards: Assigning the return value of new by reference is
deprecated in /usr/local/htdocs/yvb/php_tut/ref_obj1.php on line 17

My question is why is the funtion call

error_reporting(E_ALL|E_STRICT);

not enabling E_STRICT at runtime ?

my os is
[root@bfc11 etc]# uname -a
Linux bfc11 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 i686 i386 GNU/Linux

and my webserver is
[root@bfc11 etc]# httpd -v
Server version: Apache/2.0.52
Server built:   Oct  8 2004 02:13:40

Appreciate any help on fixing the above problem.

Thanks.

Yashesh Bhatia.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux