Title: PHP Warning: realpath(): open_basedir restriction
Last modified: January 17, 2022

---

# PHP Warning: realpath(): open_basedir restriction

 *  Resolved [michael.orlitzky](https://wordpress.org/support/users/michaelorlitzky/)
 * (@michaelorlitzky)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-warning-realpath-open_basedir-restriction/)
 * We get these in our logs about a million times a day,
 * >  PHP Warning: realpath(): open_basedir restriction in effect. File(/var/www/
   > example.com) is not within the allowed path(s): (/var/www/example.com/www/:/
   > usr/share/php/:/usr/local/lib/wordpress/plugins/) in /var/www/example.com/www/
   > public/wp-content/plugins/wp-google-maps/legacy-core.php on line 385
 * Looking at that code… does it really need to guess the document root? Or rather,
   what special form of the document root does it desire? Normally `ABSPATH` is 
   what you want.
 * In any case, the correct document root for us is `/var/www/example.com/www/public`.
   It never should have made it up to `/var/www/example.com`.

Viewing 1 replies (of 1 total)

 *  [stevendebeer](https://wordpress.org/support/users/stevendebeer/)
 * (@stevendebeer)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-warning-realpath-open_basedir-restriction/#post-15287269)
 * Hi [@michaelorlitzky](https://wordpress.org/support/users/michaelorlitzky/),
 * Thank you so much for getting in touch, we really appreciate your time.
 * This is done due to the plugin using the user defined path which the plugin needs
   to determine and in doing so cannot make use of ABSPATH. ABSPATH is used when
   pointing to Core files, but may function incorrectly if used to locate files/
   folders within wp-content for example.
 * I have, however, informed our lead developer of this report and we will kindly
   look into this further for a future update of WP Google Maps.
 * Thank you kindly for bringing this to our attention.
 * Kindest Regards,
    Steven De Beer

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning: realpath(): open_basedir restriction’ is closed to new replies.

 * ![](https://ps.w.org/wp-google-maps/assets/icon-256x256.png?rev=3058363)
 * [WP Go Maps - Google Maps, OpenStreetMap, Leaflet Map](https://wordpress.org/plugins/wp-google-maps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-google-maps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-google-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-google-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-google-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-google-maps/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [stevendebeer](https://wordpress.org/support/users/stevendebeer/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/php-warning-realpath-open_basedir-restriction/#post-15287269)
 * Status: resolved