Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Environment Errors
#1
Environment errors occur when a system that’s external to a PHP script causes a problem. For example, your MySQL server might have been down at the point at which your PHP script tried to connect to it. Perhaps you specified an incorrect path to a file you wanted to open, so PHP was unable to find the file.


These errors also occur when we take a PHP script that has been written on one system, and execute it on another system with a different environment. The problem may simply be that the underlying directory structure or domain name of the Web server is different. It’s common to deal with these types of issues by creating a central configuration script that stores all these environment variables. PHP also has a number of settings in php.ini that can cause a script to fail on another system where the settings are different. I’ll be looking at these in “How do I write portable PHP code?”; there’s also summary information in Appendix A.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Logic Errors in PHP ? beingchinmay 1 3,813 07-15-2020, 11:56 AM
Last Post: RH-Calvin
  How do I resolve errors in my SQL queries? beingchinmay 0 2,907 01-09-2016, 04:30 PM
Last Post: beingchinmay

Forum Jump:


Users browsing this thread: 3 Guest(s)