0

This has been aired many times however I am not necessarily looking to solve it but more understand why it is happening to me!

I have written a function which uses mail.php and mail/mime.php to send a mail and stored it in a file so that it can be included

When I include it and call it from a simple test program it works fine but from the "live" program it gives the error message above.

Since the program needs to send multiple emails the function is called several times. The test program calls it twice without errors

Can someone advise me as to what I could do to track down and eliminate this error message. I don't just want to ignore the message.

Thanks ceemjay

ceemjay
  • 23
  • 5
  • Possible duplicate of [Error message Strict standards: Non-static method should not be called statically in php](https://stackoverflow.com/questions/4684454/error-message-strict-standards-non-static-method-should-not-be-called-staticall) – Shira Jun 18 '17 at 10:37
  • Are you running the same PHP version on your live and on your tests systems? Is your error handling configured to report the same on both live and test systems? – Mark Baker Jun 18 '17 at 10:47
  • Thanks ShiraNai7 but I am trying to understand why the error message is occuring! If I call the same function twice why is it OK in one environment and not in the other. I am new to both PHP and OO hence want to increase my knowledge. I am not sure I have yet got my head around static vs non-static and since the mail.php is "standard" I cant see how this is happening. – ceemjay Jun 18 '17 at 10:50
  • Thanks @MarkBaker - same system, same everything. – ceemjay Jun 18 '17 at 10:51
  • The only reason it should be different between the two environments is if there are differences in the environments.... PHP version and error configuration are the most likely, although error configurations can be overridden by your application as well – Mark Baker Jun 18 '17 at 11:05
  • @markbaker that's what's confusing me!! C – ceemjay Jun 18 '17 at 17:19

0 Answers0