Support » Plugin: Enable Media Replace » Warning: is_dir(): open_basedir restriction in effect

  • Resolved dieter93

    (@dieter93)


    Recently, I get the following error when replacing an image. If I switch back to the dashboard, I get the message that the image has been replaced.

    Warning: is_dir(): open_basedir restriction in effect.
    File(/wp-content/uploads/u1/rose-1) is not within the allowed path(s):
    (/var/www/vhosts/xxxx.de/:/tmp/) in
    /var/www/vhosts/xxxx.de/httpdocs/wp-content/plugins/enable-media-replace/classes/replacer.php
    on line 470
    
    Warning: Cannot modify header information - headers already sent by (output
    started at
    /var/www/vhosts/xxxx.de/httpdocs/wp-content/plugins/enable-media-replace/classes/replacer.php:470)
    in /var/www/vhosts/xxxx.de/httpdocs/wp-includes/pluggable.php on line
    1421
    
    Warning: Cannot modify header information - headers already sent by (output
    started at
    /var/www/vhosts/xxxx.de/httpdocs/wp-content/plugins/enable-media-replace/classes/replacer.php:470)
    in /var/www/vhosts/xxxx.de/httpdocs/wp-includes/pluggable.php on line
    1424

    Nothing has changed on the server, the hosting provider suspects the problem with the plugin.
    Answer from hosting support:

    The extension tries to access File(/wp-content/uploads/u1/rose-1). But the folder “/wp-content” (i.e. starting from the base directory of the server) does not exist on the server, it is in “/var/www/vhosts/xxxx.de/httpdocs/wp-content”. See if there is a configuration for this in the plugin.

    Any ideas what can be done?

    Best regards

    • This topic was modified 2 months ago by dieter93.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support sixaxis

    (@sixaxis)

    Hi @dieter93!

    Enable Media Replace doesn’t have any configuration settings. But anyway, could you please go to Tools > Site Health > Info, click on Copy site info to clipboard and paste it here?

    Thank you,

    Thread Starter dieter93

    (@dieter93)

    Hi @sixaxis
    here it is:

    
    ### wp-core ###
    
    version: 6.0
    site_language: de_DE
    user_language: de_DE
    timezone: Europe/Berlin
    permalink: /%postname%
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: open
    environment_type: production
    user_count: -1
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /var/www/vhosts/wir-backen.de/httpdocs
    wordpress_size: 56,98 MB (59746379 bytes)
    uploads_path: /var/www/vhosts/wir-backen.de/httpdocs/wp-content/uploads
    uploads_size: 38,66 MB (40539449 bytes)
    themes_path: /var/www/vhosts/wir-backen.de/httpdocs/wp-content/themes
    themes_size: 10,46 MB (10967366 bytes)
    plugins_path: /var/www/vhosts/wir-backen.de/httpdocs/wp-content/plugins
    plugins_size: 161,61 MB (169457999 bytes)
    database_size: 11,17 MB (11711931 bytes)
    total_size: 278,88 MB (292423124 bytes)
    
    ### wp-dropins (2) ###
    
    advanced-cache.php: true
    maintenance.php: true
    
    ### wp-active-theme ###
    
    name: GeneratePress Child (generatepress_child)
    version: 0.1
    author: Tom Usborne
    author_website: https://tomusborne.com
    parent_theme: GeneratePress (generatepress)
    theme_features: core-block-patterns, widgets-block-editor, automatic-feed-links, post-thumbnails, post-formats, woocommerce, title-tag, html5, customize-selective-refresh-widgets, align-wide, responsive-embeds, editor-color-palette, custom-logo, menus, editor-styles, editor-style, widgets
    theme_path: /var/www/vhosts/wir-backen.de/httpdocs/wp-content/themes/generatepress_child
    auto_update: Deaktiviert
    
    ### wp-parent-theme ###
    
    name: GeneratePress (generatepress)
    version: 3.1.3
    author: Tom Usborne
    author_website: https://tomusborne.com
    theme_path: /var/www/vhosts/wir-backen.de/httpdocs/wp-content/themes/generatepress
    auto_update: Deaktiviert
    
    ### wp-themes-inactive (1) ###
    
    Twenty Twenty-Two: version: 1.2, author: WordPress-Team, Automatische Aktualisierungen aktiviert
    
    ### wp-plugins-active (18) ###
    
    Ad Inserter: version: 2.7.15, author: Igor Funa, Automatische Aktualisierungen aktiviert
    Enable Media Replace: version: 3.6.3, author: ShortPixel, Automatische Aktualisierungen deaktiviert
    FG Drupal to WordPress Premium: version: 1.85.0, author: Frédéric GILLES, Automatische Aktualisierungen aktiviert
    GDPR Cookie Compliance: version: 4.8.6, author: Moove Agency, Automatische Aktualisierungen aktiviert
    GenerateBlocks: version: 1.4.4, author: Tom Usborne, Automatische Aktualisierungen aktiviert
    GenerateBlocks Pro: version: 1.1.2, author: Tom Usborne, Automatische Aktualisierungen aktiviert
    GP Premium: version: 2.1.2, author: Tom Usborne, Automatische Aktualisierungen aktiviert
    Permalink Manager Pro: version: 2.2.18, author: Maciej Bis, Automatische Aktualisierungen aktiviert
    Prosodia VGW OS: version: 3.25.3, author: Prosodia – Verlag für Musik und Literatur, Automatische Aktualisierungen aktiviert
    Rate my Post - WP Rating System: version: 3.3.4, author: Blaz K., Automatische Aktualisierungen aktiviert
    Scriptless Social Sharing: version: 3.2.1, author: Robin Cornett, Automatische Aktualisierungen aktiviert
    ShortPixel Image Optimizer: version: 4.22.10, author: ShortPixel, Automatische Aktualisierungen aktiviert
    The SEO Framework: version: 4.2.5, author: The SEO Framework Team, Automatische Aktualisierungen aktiviert
    UpdraftPlus - Backup/Restore: version: 2.22.12.25, author: UpdraftPlus.Com, DavidAnderson, Automatische Aktualisierungen aktiviert
    wpDiscuz: version: 7.3.17, author: gVectors Team, Automatische Aktualisierungen aktiviert
    WP Rocket: version: 3.11.3, author: WP Media, Automatische Aktualisierungen deaktiviert
    WP Show Posts: version: 1.1.3, author: Tom Usborne, Automatische Aktualisierungen aktiviert
    WP Show Posts Pro: version: 1.0.0, author: Tom Usborne, Automatische Aktualisierungen aktiviert
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1690
    imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
    imagick_version: 3.7.0
    file_uploads: File uploads is turned off
    post_max_size: 8M
    upload_max_filesize: 2M
    max_effective_size: 2 MB
    max_file_uploads: 20
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 122 MB
    	imagick::RESOURCETYPE_DISK: 1073741824
    	imagick::RESOURCETYPE_FILE: 393216
    	imagick::RESOURCETYPE_MAP: 512 MB
    	imagick::RESOURCETYPE_MEMORY: 256 MB
    	imagick::RESOURCETYPE_THREAD: 1
    imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: 9.27
    
    ### wp-server ###
    
    server_architecture: Linux 4.19.0-17-amd64 x86_64
    httpd_software: Apache
    php_version: 7.4.29 64bit
    php_sapi: cgi-fcgi
    max_input_variables: 1000
    time_limit: 30
    memory_limit: 256M
    max_input_time: -1
    upload_max_filesize: 2M
    php_post_max_size: 8M
    curl_version: 7.64.0 OpenSSL/1.1.1n
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: true
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.3.34-MariaDB-0+deb10u1
    client_version: mysqlnd 7.4.29
    max_allowed_packet: 16777216
    max_connections: 151
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /var/www/vhosts/wir-backen.de/httpdocs/wp-content
    WP_PLUGIN_DIR: /var/www/vhosts/wir-backen.de/httpdocs/wp-content/plugins
    WP_MEMORY_LIMIT: 256M
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: true
    CONCATENATE_SCRIPTS: false
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Nicht definiert
    DB_CHARSET: utf8mb4
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    
    

    thanks for looking in!

    • This reply was modified 2 months ago by dieter93.
    Plugin Support sixaxis

    (@sixaxis)

    Hi @dieter93,

    Thanks for that.

    This is probably an image with wrong image data and our plugin is just trying to open it. If this happens for all images, but Enable Media Replace works, then some plugin is rewriting the path in wp_get_original_image_url. So there’s probably some plugin or your theme that makes the URL relative.

    I hope that gets you pointed in the right direction!

    Best,

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.