Strict standards problem, help to see

Source: Internet
Author: User
I'm using php5.4. The SCWS participle module has just been installed, but the following occurs at run time:
Strict standards:redefining already defined constructor for class PSCWS3 in D:\php\wamp\www\scws\pscws3.class.php on line 145

Strict standards:redefining already defined constructor for class pscws23_dict in D:\php\wamp\www\scws\dict.class.php on Line 48

Strict standards:redefining already defined constructor for class xdb_dictionary in D:\php\wamp\www\scws\dict.class.php On line 148

Strict standards:redefining already defined constructor for class dba_dictionary in D:\php\wamp\www\scws\dict.class.php On line 201

Strict standards:redefining already defined constructor for class sql_dictionary in D:\php\wamp\www\scws\dict.class.php On line 257

Strict standards:redefining already defined constructor for class txt_dictionary in D:\php\wamp\www\scws\dict.class.php On line 315

Strict standards:redefining already defined constructor for class Xdb_r in D:\php\wamp\www\scws\xdb_r.class.php on line 3 4


PHP.ini Error Report error_reporting I also changed, I will error_reporting = e_all & ~e_notice directly removed, or useless, how to solve this. Word breaker function can be achieved, is the above error report.


Reply to discussion (solution)

Can only say that your settings do not take effect, have you restarted Apahce, php-fpm? Or the php.ini you have modified is not the one used by the current interpreter (specifically, the configuration file location specified by the "Configure file" entry in Phpinfo ())

You can also install SCWS version 1.2.0 to solve these problems
2012-3-29:scws-1.2.0 released.
1) Modify PHP extension code to support PHP 5.4.x
2) fixed an issue where the limit parameter of scws_get_tops in PHP extension does not allow less than 10
3) LIBSCWS add scws_fork () to generate branches from existing SCWS instances and share dictionary/rule sets, primarily for multithreaded development.
4) Added partial version of Win32 DLL extension, see download page

Back to the first floor: I use the Wampserver software, I was in the installation directory changed, changed after the restart, useless,

A little bit of a problem, the deletion of clean, in the installation, just fine ...

Do you have a function of the same name and check it out for yourself?
In addition, if the Zend Guard is not installed, uninstall it.

I will error_reporting = e_all & ~e_notice directly removed, or useless
What do you mean?
Comment out error_reporting, that is, when error_reporting is not set, PHP will check the error in the most restrictive manner by default

for Strict standards type error, php5.3 default does not check, and PHP5. 4 Default Check
development environment generally should
Error_reporting = E_all | E_strict
This can find your program hidden trouble

about the cause of the error:
in pscws3.class.php
82 line class PSCWS3
103 row function PSCWS3 ($d Ictfile = ")
145 line function __construct ($dictfile =") {$this->pscws3 ($dictfile);}
The method name PSCWS3 of 103 rows is the same as the class name, is considered a constructor (compatible with PHP4)
145 row and the constructor (PHP5)
so error

without changing the code, you can make
Error_reportin g = e_all & ~e_strict
To avoid this error

should be included in the public code in the actual application
Error_reporting (E_all & ~e_strict);
instead of modifying php.ini
because you may not have permission to modify php.ini, other apps may require additional configuration

Thank you for your help, I have been in accordance with your methods to try, no use. Let me show you the relevant code in my php.ini:
; Error_reporting
; Default Value:e_all & ~e_notice
; Development Value:e_all | E_strict
; Production Value:e_all & ~e_deprecated

I hope you can help me think of a way

Didn't I tell you that?
In the php.ini to make
error_reporting = E_all & ~e_strict

or execute in the program
Error_reporting (E_all & ~e_strict);

Your method I tried, I put the change to you to see:; error_reporting = E_all & ~e_strict
; Default Value:e_all & ~e_notice
; Development Value:e_all | E_strict
; Production Value:e_all & ~e_deprecated

Then I wrote the following test code:
Error_reporting (e_all ^ e_notice);
$string = "Call segment method to perform lexical cutting";
Require ' pscws3.class.php ';

$PSCWS = new PSCWS3 (' dict\dict.xdb ');
$res = $pscws->segment ($string);
Print_r ($res);

?>
。 The test effect is still the same as the old

I changed all the constructors, changed the function name to a non-constructor, the error disappears, but I do not want to use this way, I still want to use the constructor

The setting of the Error_reporting function takes precedence over the error_reporting setting in php.ini

Although you have blocked e_strict level errors with error_reporting = E_all & ~e_strict in php.ini
But you are in the program of error_reporting (e_all ^ e_notice); and opened it again.

Error_reporting (E_all & ~e_strict & ~e_notice);

Reply, it's finally settled. Thank you for your help on the six floor. Hey.

I have this problem, too.

Strict standards:redefining already defined constructor for class PSCWS4 in C:\xampp\htdocs\pscws4\pscws4.class.php on Li NE 120

Strict standards:redefining already defined constructor for class Xdb_r in C:\xampp\htdocs\pscws4\xdb_r.class.php on line 34

Is that the way you solved it?

I have this problem, too.

Strict standards:redefining already defined constructor for class PSCWS4 in C:\xampp\htdocs\pscws4\pscws4.class.php on Li NE 120

Strict standards:redefining already defined constructor for class Xdb_r in C:\xampp\htdocs\pscws4\xdb_r.class.php on line 34

Is that the way you solved it?

I also have this problem, and then the error reporting level in php.ini is useless because the error_reporting () setting level in the file is higher than php.ini, so you need to directly change the error_reporting level in the file to mask strict Standards Tips

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.