Skip to main content
errors are not code
Source Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459

When trying to upload files to the Wordpress media library I encounter the following error:

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

I enabled debugging mode in WP by adding

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);

to my wordpress config file.

After taking a look at debug.log there seems to be a problem with one of the WP core files PHP Fatal error: Uncaught Error: Cannot unset string offsets

The full debug log

The function throwing the error is clean_dirsize_cache

Line 8381: unset( $directory_cache[ $path ] );

I've already tried the following:

  • Allocated more memory in php.ini
  • Changed limit for max file sizes

The error happens on every file I try to upload, file size or file type doesn't seem to matter.

As I'm not experienced with Wordpress and I haven't worked on this site previously at all I'm not quite sure what caused this to start occuring.

When trying to upload files to the Wordpress media library I encounter the following error:

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

I enabled debugging mode in WP by adding

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);

to my wordpress config file.

After taking a look at debug.log there seems to be a problem with one of the WP core files PHP Fatal error: Uncaught Error: Cannot unset string offsets

The full debug log

The function throwing the error is clean_dirsize_cache

Line 8381: unset( $directory_cache[ $path ] );

I've already tried the following:

  • Allocated more memory in php.ini
  • Changed limit for max file sizes

The error happens on every file I try to upload, file size or file type doesn't seem to matter.

As I'm not experienced with Wordpress and I haven't worked on this site previously at all I'm not quite sure what caused this to start occuring.

When trying to upload files to the Wordpress media library I encounter the following error:

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

I enabled debugging mode in WP by adding

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);

to my wordpress config file.

After taking a look at debug.log there seems to be a problem with one of the WP core files PHP Fatal error: Uncaught Error: Cannot unset string offsets

The full debug log

The function throwing the error is clean_dirsize_cache

Line 8381: unset( $directory_cache[ $path ] );

I've already tried the following:

  • Allocated more memory in php.ini
  • Changed limit for max file sizes

The error happens on every file I try to upload, file size or file type doesn't seem to matter.

As I'm not experienced with Wordpress and I haven't worked on this site previously at all I'm not quite sure what caused this to start occuring.

Made title more clear
Link

PHP Fatal error: Uncaught Error: Cannot unset string offsets when trying to upload any file to media library

deleted 43 characters in body
Source Link

When trying to upload files to the Wordpress media library I encounter the following error:

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

I enabled debugging mode in WP by adding

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);

to my wordpress config file.

After taking a look at debug.log there seems to be a problem with one of the WP core files PHP Fatal error: Uncaught Error: Cannot unset string offsets

The full debug log

The function throwing the error is clean_dirsize_cache

Line 8381: unset( $directory_cache[ $path ] );

I've already tried the following:

  • Allocated more memory in php.ini
  • Changed limit for max file sizes

The error happens on every file I try to upload, file size or file type doesn't seem to matter.

As I'm not experienced with Wordpress and I haven't worked on this site previously at all I'm not quite sure what caused this to start occuring (I have no prior knowledge of the site nor.

When trying to upload files to the Wordpress media library I encounter the following error:

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

I enabled debugging mode in WP by adding

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);

to my wordpress config file.

After taking a look at debug.log there seems to be a problem with one of the WP core files PHP Fatal error: Uncaught Error: Cannot unset string offsets

The full debug log

The function throwing the error is clean_dirsize_cache

Line 8381: unset( $directory_cache[ $path ] );

I've already tried the following:

  • Allocated more memory in php.ini
  • Changed limit for max file sizes

The error happens on every file I try to upload, file size or file type doesn't seem to matter.

As I'm not experienced with Wordpress and I haven't worked on this site previously at all I'm not quite sure what caused this to start occuring (I have no prior knowledge of the site nor

When trying to upload files to the Wordpress media library I encounter the following error:

Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

I enabled debugging mode in WP by adding

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);

to my wordpress config file.

After taking a look at debug.log there seems to be a problem with one of the WP core files PHP Fatal error: Uncaught Error: Cannot unset string offsets

The full debug log

The function throwing the error is clean_dirsize_cache

Line 8381: unset( $directory_cache[ $path ] );

I've already tried the following:

  • Allocated more memory in php.ini
  • Changed limit for max file sizes

The error happens on every file I try to upload, file size or file type doesn't seem to matter.

As I'm not experienced with Wordpress and I haven't worked on this site previously at all I'm not quite sure what caused this to start occuring.

added 10 characters in body
Source Link
Loading
deleted 51 characters in body
Source Link
Loading
Source Link
Loading