Is there any way to disable white screen of death (Error that says "Sorry, we are experiencing technical difficulties") and make it show the standard PHP errors? Have been looking for hours for solution:
I have set up the wp-config
ini_set('log_errors','On');
ini_set('display_errors','On');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
I have enabled error reporting in php.ini.
Still, it does show error report for some errors and shows the white screen for others, and sometimes (not always) it adds the errors to error log. So, is there any way to stop this "smart" thing of wordpress and make consider the PHP error reporting as a priority?
Thanks
may be you should try looking
.htacces file
Some web hosting providers allow to modify php parameters from .htaccess file like this.
php_value display_errors 1
Here is php.net documentation for this.
https://www.php.net/manual/en/configuration.changes.php
Here are some more directives that you can add to htaccess or domain's httpd.conf
#hide php errors
php_flag display_startup_errors ON
php_flag display_errors ON
php_flag html_errors ON
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /home/path/public_html/domain/PHP_errors.log
php_value error_reporting 999999999
php_value error_reporting -1
php_value log_errors_max_len 0
Order allow,deny
Deny from all
Satisfy All
Related
I'm trying to install WooCommerce, but when I try to activate it, I get a 500 Internal Server Error. I've tried installing it via the Plugin Search in the admin panel, and FTP, but both result in the same error.
You can try below options here:
1) editing Your .htaccess File
php_value upload_max_filesize 1000M
php_value post_max_size 2000M
php_value memory_limit 3000M
php_value max_execution_time 1800
php_value max_input_time 180
2) Using a Plugin:https://wordpress.org/plugins/wp-maximum-execution-time-exceeded/
3) http://www.inmotionhosting.com/support/website/php/update-local-php-settings
I think one of above will help you.
I am trying to increase the maximum post size limit on my server.
Here is the .htaccess file:
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
However it does not seem to work and throws a 500 Internal server error.
Any ideas why this could be happening and how to overcome this?
As far as I can tell, your syntax is correct. However, the php_value Apache directive is provided by the mod_php module. If you don't run PHP as Apache module (e.g., it runs as FastCGI or with some other SAPI) that directive won't be defined, thus the 500 error.
There're many ways to change PHP settings. In practice, I've found that hosting services that run CGI often provide a custom php.ini file somewhere in your FTP account. Additionally, if you run PHP/5.3.0 or newer you can use .user.ini files. Last but not least, there's ini_set() within code.
When I try to upload a theme that is roughly 2.3MB when zipped, I get this error message:
The uploaded file exceeds the upload_max_filesize directive in php.ini.
In order to remedy this, I have modified the php.ini file in the wp-admin folder to specify:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
Yet, it still does not work. I have tried restarting my XAMPP server and clearing my cache but it still gives me the same error message. I have also tried placing a file called "php5.ini" with the same contents as the "php.ini" file in the same wp-admin folder--still nothing.
I have modified the php.ini file in the wp-admin folder
This does not sound right. The parameters your setting are all fine, but if you're using Windows, the location of the php.ini file should be:
xampp\php\php.ini
On Mac, it should be:
private/etc/php.ini
Just make sure you edit the php.ini file at the right location, then save and restart the httpd service (or reboot) when done and you should be fine.
Had this problem but editing my php.ini file with similar configurations did not work.
What worked for me was adding the following lines to my .htaccess file.
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 400M
php_value max_execution_time 180
php_value max_input_time 180
I get an http error while trying to upload large files to Wordpress. I've edited the php.ini and .htaccess files to updated the file size and time limits. This is somewhat new territory for me. Am I missing something?
php.ini
post_max_size=90M
upload_max_filesize=90M
memory_limit=90M
max_execution_time=3600
.htaccess
php_value post_max_size 90M
php_value upload_max_filesize 90M
php_value memory_limit 90M
php_value max_execution_time 3600
php_value max_input_time 3600
php_value session.gc_maxlifetime 3600
Try this :
Add WP_MEMORY_LIMIT into your wp-config.php file.
This setting may not work if your host does not allow you to increase the PHP memory limit.
In wp-config.php
define('WP_MEMORY_LIMIT', '64M')
I have disabled ini_set in PHP. I however want a specific domain to use ini_set. How do I enable ini_set for a specific domain?
Thanks
You can't. If you disable it there's no way from that function.
Maybe you can enable php.ini overrride, and put a individual php.ini to the desired folder to enable it and use set_ini again.
If you're using php as module, you can use .htaccess with php_flag or php_value to set desired values or flags.
Example:
php_value memory_limit 32M or php_flag display_errors 1 (display errors must work with value and flag rule as well)