Troubleshooting

From DreamFactory
Jump to: navigation, search
DreamFactoryTroubleshooting

If you experience issues with some of the services, like SQL database connection or server-side scripting, please make sure you have all of the necessary drivers [installed](Installation) with your DreamFactory instance. Depending on the way your instance was installed and the hosting platform, some [additional libraries, drivers, or packages](Installation/Additional-Drivers) may be required for certain services to work properly. Some services, like [Microsoft SQL Server](SQL-Database-Services#sqlsrv), have licensing that prevents the drivers from being included or enabled by default. If you are unable to install or enable the necessary drivers, please [contact support for assistance](Support).

> **Note**: When the "install directory" is mentioned, it is the DreamFactory code base install that is being referred to. In a Bitnami install, the DreamFactory code base starts at `<bitnami install path>/apps/dreamfactory/htdocs/`.


    1. Logs

Most logging done by the DreamFactory instance will be located in a file called dreamfactory.log.

> {install directory}/storage/logs/dreamfactory.log

Other errors may be reported by the web server (i.e. Apache writes to error.log, location based on its configuration), or system log.

      1. Logging configuration

By default, logging is turned off. To enable it, change `APP_DEBUG` to true in your `.env` file located in your install directory. Here are some additional logging environment settings that you may edit in `.env`

Parameter | Default value | Notes --- | --- | --- `APP_DEBUG` | false | Enables/disables logging `APP_LOG` | single | Controls the format of the log file, options are 'single', 'daily', 'syslog', or 'errorlog' `DF_FREETDS_DUMP` | | Enabling and location of FreeTDS dump file, defaults to disabled or default freetds.conf setting `DF_FREETDS_DUMPCONFIG` | | Location of FreeTDS connection dump file, defaults to disabled

Here are some additional logging configuration settings that you may edit in `config/df.php`

Parameter | Default value | Notes --- | --- | --- `log_cors_info` | false | Enables/disables detailed CORS logging `log_events` | true | Determines if all events dispatched to a handler are logged `scripting.log_memory_usage` | false | Enables/disables logging memory usage after a script is executed

        1. Apache

Finally, when configuring your Apache virtual host, you may configure the Apache logs for your DreamFactory instance to be co-located with your DreamFactory logs. These logs are useful for debugging and troubleshooting both PHP and Apache behavior. For example, `in /etc/apache2/sites-enabled/dreamfactory.conf`

ErrorLog {install directory}/storage/logs/error.log
CustomLog {install directory}/storage/logs/access.log combined
    1. Cache

When all else fails, clear the cache. Cache can be cleared via the Admin application by clicking the Config tab, then Cache menu option, and click 'Flush System-wide Cache'. This can also be accomplished with the following command in the install directory... > php artisan cache:clear