2

I have created a dashboard using Yii2's php framework and mysql 5.3

It is a pretty basic application that simply retrieves data from the DB using mysql and displays the results (date ranges can be specified, and certain data can be filtered out of results). It's been in use for a little more than a year so far, with no issues. I just recently was asked to implement some additional queries, and ever since that push certain date ranges return an:

Error (#8) An internal server error occurred.

Message.

I've looked everywhere for what this means, but the best I could surmise is that it has something to do with null values; which I've thoroughly tested and am pretty confident is not the issue.

This error does not occur on my localhost instance of the application (which pulls from the dev server rather than the production server). The dev server is identical to the production server except that it stores different information.

Limitations:

I do not have access to the production server to test on the user data creating the error.

If anyone has experienced this issue before and solved it, or could point me in the right direction to find out what's causing this I'd be very grateful.

Thanks

  • can you show us how those additional queries where built? and inspect the app.log file for the actual errors. – Hanafi Feb 02 '16 at 05:40
  • Check application log on production server. If nothing there - check apache log (or w.e. you are using). Also you can enable yii2 debug panel for your ip on production, its extremely helpfull. – ineersa Feb 02 '16 at 08:19
  • Hi all, thanks for the replies. The problem I'm having is more of a permissions issue. I don't have access to anything in the production site; just a dev replication that is not showing the error. So.. I don't have access to the log files, or the ability to switch it from production to dev. I think I'm going to need to remedy that shackle before I can address this issue. Thanks for your help :) – Michael Winter Feb 13 '16 at 02:21

1 Answers1

2

Yii defines and uses the constants YII_DEBUG and YII_ENV. And they are set to 'true' and 'dev'. This is because the basic app template has prepared it this way in the index.php file. This file tells us also that we should remove those lines for production mode, i.e. on the production machine. Then those constants are set to 'false' and 'prod' by default.(More information can be found on Defining Constants and Environment Constants.)

Shaig Khaligli
  • 4,955
  • 5
  • 22
  • 32