Tắt chức năng thông báo lỗi của wamp display error năm 2024

In order to test it, I've checked this script against the following development servers with these results:

Code:

WAMP 2.0 - Does not display "Headers already sent" error XAMPP 1.4.14 - Does not display "Headers already sent" error XAMPP 1.6.4 - Does display "Headers already sent" error

I'm migrating all my projects form XAMPP to WAMP (due to its flexibility to reproduce more accurately the production server characteristics).

How can I get WAMP to show this error?

I've attached the current WAMP php.ini file.

[EDIT] php.ini also available here http://pastie.org/286858

  • El Forum Guest

[eluser]Nicolight[/eluser] I have exactly the same problem with Wampserver 2.0. I cannot see some of the errors, most of the time notices and warnings like "Cannot modify header information". I checked the php.ini file and I have

- error_reporting = E_ALL - display_errors = On

I am testing it on Mamp and on a live server as well, where all the errors are displayed correctly.

I have attached my php.ini as well

  • El Forum Guest

[eluser]janogarcia[/eluser] Hi Nicolight,

Eventualy I found the source of the problem I described. It was related to the output_buffering directive. Pay attention to how the WAMP php.ini management works! (is a bit missleading)

Don't know if it is applicable to your case. Hope it helps.

  • El Forum Guest

[eluser]Nicolight[/eluser] Hi Janogarcia,

Thanks a lot for your answer, it dealt with my problem as well! I set the output_buffering to

Quote:Off

in the correct WAMP php.ini file as indicated in your link.

BTW: How do I mark the thread as solved?

  • El Forum Guest

[eluser]janogarcia[/eluser] I've marked it as SOLVED.

Nice to know that it was helpful!

Welcome to CodeIgniter.

  • El Forum Guest

[eluser]industrial[/eluser] Hi!

I am experiencing the same problems. Have set output buffering to off, but still see no errors. What is going on and what can I do?

  • El Forum Guest

[eluser]industrial[/eluser] [quote author="industrial" date="1272251709"]Hi!

I am experiencing the same problems. Have set output buffering to off, but still see no errors. What is going on and what can I do?[/quote]

It was Xdebug that caused it to malfunction, so if you are running a few months old version of xDebug and experiencing this, try to update it.

Sorry, that's not what I meant. I want to keep Error Reporting ON.

However, wamp used to display native php error reporting like;

Notice: Undefined variable: leftLinks in /var/www/home/shop/script/header.php on line 124

Notice: Undefined variable: q in /var/www/home/shop/script/header.php on line 138

Notice: Undefined variable: welcome in /var/www/home/shop/script/header.php on line 148

Now however what it does it prints out orange boxes on the screen and says stuff like;

( ! ) Notice: Undefined variable: mysli in C:\Projects\localhost\account_pg\index.php on line 8 Call Stack # Time Memory Function Location 1 0.0010 373776 {main}( ) ..\index.php:0

( ! ) Fatal error: Call to a member function result() on a non-object in C:\Projects\localhost\account_pg\index.php on line 8 Call Stack # Time Memory Function Location 1 0.0010 373776 {main}( ) ..\index.php:0

I want the old reporting back.

Any idea how?

Actually the warnings and the notices are not harmful they are just messages and suggest you to fix the issues. If you are a developer then you should always try to handle the notices and warnings nicely.

Notices and warnings happens when something is not already defined for example. If you created a variable in PHP $customer_id which would get the customer id after form submission.

Please find here how to properly handle the notices if you are developer. PHP Error. Notice: Undefined Index

In case you have not developed the script and just want to disable the warnings and notices then follow steps below.

Tắt chức năng thông báo lỗi của wamp display error năm 2024

Bad thing about the WAMP is that it do not let you complete work without fixing the error. So better disable if you consider the errors are fine and are not harmful.

How to Disable warning and notice message for wamp

Open your php.ini file in any text editor if you don’t have any you may use notepad++. VisualStudio Code is also a great and free software to edit code files.

Now try to find this line

;error_reporting ....

Replace the above ilne in your php.ini with the following line. This would disable the notices and warnings in your PHP for WAMP enviornment.