0

I have one PC and one notebook, I have been working on a project with php for a long time and it is working perfectly in the notebook but today I transported it to the PC and when I started it, it showed a lot of errors and notices!

Notice: Undefined variable: .......

error: Strict Standards: Non-static method ....... should not be called statically, assuming $this from incompatible context in .....

the XAMPP version that I use in the PC is: 1.7.4 and the PHP version is 5.3.5 the XAMPP version that I use in the notebook is: 1.7.3 and the PHP version is 5.3.1

any suggestions? Thank you for your time and help.

1 Answer 1

2

It's just the difference in the PHP settings that does this.

The error level for your PC is probably E_ALL, whereas error level for your laptop is probably E_ALL & ~E_NOTICE.

Sign up to request clarification or add additional context in comments.

5 Comments

can you please provide me more help on how to change this setting? if possible...
change this in the php.ini file found in the XAMPP binary folder. look for error_reporting
what do you think? should I fix all of those problems or not? because I havent tried this in a real hosting server. do you know what are the default settings for PHP in most of web hosting providers?
Error messages are there to help you write good code, not to annoy you :)
@Alvaro indeed. I totally agree with him. I'll usually set to show all errors and warnings, and fix my code until all errors and warnings till none before continue developing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.