I’ve copied and pasted the code exactly, and am still getting the “divide by zero” error. I’ve also altered permissions of both the wp-content directory and the upload directory. no luck.
?
thanks for the help on this.
I couldn’t get any of the define’s to work. Once I’d run procmon on the server and found what the directory was that it was actually trying to utilize I hit a home run and got it working. I don’t know why the addition of the define’s telling it where to store the temp’s wouldn’t work. Once I made the root directory tmp directory and assigned rights it took right off…
2 June at 4:06 am
Thanks!! :D
16 June at 5:15 pm
Thanks,
I’m using wp3 in multisite mode
I created a temp dir with 777 permissions
define(‘WP_TEMP_DIR’,ABSPATH.’wp-content/temp/’);
and it solved the problem.
17 August at 5:49 pm
Thank you very much!!!!
20 August at 1:09 pm
Thanks a million, this solved a plugin update issue for me, I spent hours messing around with permissions before I found your fix.
So if anyone gets a “cannot find wp-content” error when trying to auto-update plugins use this fix
25 August at 7:59 pm
AAH THANKS!! seriously, that it awesome
25 August at 8:01 pm
Warning: Division by zero in D:\inetpub\mysite\blog\wp-config.php on line 92
not working
26 August at 10:05 am
That’s some kind of another trouble…
Please put here your 92 line, I’ll look through this.
31 August at 3:33 am
I am having the same error as Ryan’s , and the line is actually the code itself !!
31 August at 1:42 pm
Mmmm. Did you really properly copy-paste the code?
1 September at 7:53 pm
yes..
1 September at 8:02 pm
Well i’ve modified the path where the temp file should be..
21 September at 1:22 am
I had the same problem (Division by Zero)
Use the following snippet :)
$path = $ABSPATH .’wp-content/uploads/’;
define(‘WP_TEMP_DIR’,$path’);
21 September at 4:09 am
Thanks!
24 September at 2:02 am
Brilliant! Now update works!
$path = $ABSPATH .’wp-content/uploads/’;
define(‘WP_TEMP_DIR’,$path’);
solve my update problem.
8 January at 2:28 pm
I still get this error
Warning: Division by zero in C:\inetpub\vhosts\frawson.co.za\httpdocs\wp-config.php on line 91
12 January at 8:38 pm
Go to your file manager and changed the permissions on the wp-content folder to read and write!
12 February at 2:57 am
I’ve copied and pasted the code exactly, and am still getting the “divide by zero” error. I’ve also altered permissions of both the wp-content directory and the upload directory. no luck.
?
thanks for the help on this.
24 April at 2:02 am
I think this is the correct code for later versions of WordPress (to fix the division-by-zero problem:
$path = ABSPATH . ‘wp-content/temp/’;
define(‘WP_TEMP_DIR’,$path’);
…but I couldn’t get this to solve the *actual* problem. ;-)
14 June at 2:52 am
I couldn’t get any of the define’s to work. Once I’d run procmon on the server and found what the directory was that it was actually trying to utilize I hit a home run and got it working. I don’t know why the addition of the define’s telling it where to store the temp’s wouldn’t work. Once I made the root directory tmp directory and assigned rights it took right off…
4 August at 3:13 pm
I Like you! ^^
25 December at 1:25 pm
yes it be solve by create temp with 777
and past this code
define(‘WP_TEMP_DIR’, ABSPATH.’wp-content/temp/’);
now it work am happy thank u all