*'''Error:''' Maximum Execution Time Exceeded: This is a PHP limit; go into the php.ini file and set the maximum execution time up from 30 seconds to something higher, as needed. It is also not a bad idea to double the RAM allowed per script to 16MB instead of 8MB.

*'''Error:''' Maximum Execution Time Exceeded: This is a PHP limit; go into the php.ini file and set the maximum execution time up from 30 seconds to something higher, as needed. It is also not a bad idea to double the RAM allowed per script to 16MB instead of 8MB.

+

+

=== Key too long error ===

+

This is actually a known issue with Laravel and older MySQL versions. DreamFactory is a Laravel/PHP based application with an Angular front end. Please see this article on how to fix this if you wanted to stay with your current version of MySQL:<br />

+

https://laravel-news.com/laravel-5-4-key-too-long-error

Revision as of 22:24, 5 September 2018

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 with your DreamFactory instance. Depending on the way your instance was installed and the hosting platform, some additional libraries, drivers, or packages may be required for certain services to work properly. See the matrix here for details on necessary drivers.

The following services must be licensed from DreamFactory, and are therefore are not enabled by default: Oracle, SQL Server, IBM DB2, SAP SQL Anywhere, Salesforce, Active Directory, LDAP, and SOAP. Information about purchasing a commercial DreamFactory license to enable these services is here.

If you are unable to install or enable the necessary drivers, please contact DreamFactory Support for assistance.

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/.

Drivers

If you find when you are creating services or testing the API you are receiving an error 'driver not found' you'll first need to check that the drivers are installed properly. If you feel the drivers have been installed correctly you can check which drivers are enabled by running on the command line:

php -m

If the driver is shown in the PHP modules list from the aforementioned command but you still aren't managing a connection you can create a info.php file in your 'public' folder. Open a text editor and place the following at the top of a file called 'info.php':

<?phpphpinfo();

Save the file in the 'public' folder of your DreamFactory installation path. Go to 'localhost/info.php' in your browser to view more information about your PHP environment. Look for more information about the driver in question.

Setting your DreamFactory log level to any of these will log that level and the levels above it. So, if you set your log level to
ERROR then the system will log all ERROR, CRITICAL, ALERT, and EMERGENCY messages in your log file.
By default, log level is set to WARNING. To change it, set APP_LOG_LEVEL to any of the above in your .env file located in your install directory. (Previously, this setting was named DF_LOG_LEVEL.)
Here are some additional logging environment settings that you may edit in your .env file.

Parameter

Default value

Notes

APP_DEBUG

false

Shows/hides error messages on the web.

APP_LOG

single

Controls the format of the log file, options are 'single', 'daily', 'syslog', or 'errorlog'.

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.

Apache Logging Configuration

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

Common Errors

HTTP 400

No token or api key provided

Error message "Bad request. No token or api key provided" indicates that you have not supplied an API Key in your request. All non admin session API calls in DreamFactory need an API key, except for logging in/out. To resolve this error, make the call with an API Key.

See the Authentication and Authorization documentation for more details

Blank Screen After Install or Upgrade

This can be caused by a number of issues, but the most common is a failure to reset the permissions on the bootstrap/cache and storage directories. These permissions can often be modified during install or upgrade. Try resetting the permissions as outlined in the General Instructions or in the platform specific instructions you used.
The default www user for various platforms is below:

Ubuntu/Debian

www-data

CentOS/RHEL - Apache

apache

CentOS/RHEL - Nginx

nginx

Linux Bitnami - Non Root

the user account that installed the application

Linux Bitnami - Root

root

Linux Bitnami VMs and Cloud VMs

root

API Docs or Other Tabs Are Not Viewable

Are you using any version of Internet Explorer? If yes, please try FireFox or Chrome. If not, please try clearing your cache with:

php artisan cache:clear

PHP Out of Memory

If you are seeing for example in your log files:

Fatal error: Allowed memory size of 268435465 bytes exhausted

This error is mainly caused by PHP loading more into memory than what PHP currently has allocated for one process. This error has been seen with uploading large files and logging in using Active Directory with a large number of users in the domain. This error may occur elsewhere if a process is resource-intensive.

Edit your php.ini file on the lines shown below. Note: Depending on your installation the php.ini directives may be listed differently or in different order. For a full list of php.ini directives click here. Set the values in bytes according to your needs. Example: 256M, 512M, 64M. PHP supports M,K, and G when setting byte values.

[PHP]memory_limit= 128Mpost_max_size= 32Mupload_max_filesize= 32M

Warning: To have no memory limit, set this directive to -1. We strongly advise against doing this.

If you are running Linux and are not sure how much RAM your machine has, the following commands can help you find this information and understand how the resources are being allocated. These commands may vary depending on what flavor Linux you are running, the recommendations below are for Ubuntu Linux.

This error is thrown due to the wrong drivers being installed. You will want to add in the 32-bit drivers, php_pdo_sqlsrv_7_ts_x86.dll and php_sqlsrv_7_ts_x86.dll and delete the 64-bit drivers.

Note: In the Microsoft Drivers 5.2.1 for PHP for SQL Server, the x86 and x64 drivers no longer are called out by x86 and x64, so when you download the drivers, make sure you are importing the correct drivers.

MySQL Common Issues with PHP

Error: Maximum Execution Time Exceeded: This is a PHP limit; go into the php.ini file and set the maximum execution time up from 30 seconds to something higher, as needed. It is also not a bad idea to double the RAM allowed per script to 16MB instead of 8MB.

Key too long error

This is actually a known issue with Laravel and older MySQL versions. DreamFactory is a Laravel/PHP based application with an Angular front end. Please see this article on how to fix this if you wanted to stay with your current version of MySQL:https://laravel-news.com/laravel-5-4-key-too-long-error