Hello,
after updating to 1.7 I had 1st to remove the library from the sites/all/libraries/geoPHP (update to geoPHP 1.1 did not work) then I got a
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/geoPHP.inc) is not within the allowed path(s): (/var/www/vhosts/.../httpdocs:/tmp) in geophp_load() (Zeile 24 von /var/www/vhosts/.../httpdocs/sites/all/modules/geophp/geophp.module).
geoPHP.inc is at sites/all/modules/geophp/geoPHP/geoPHP.inc
here is the call from geophp.module (Line 21 to 27)
if (module_exists('libraries')) {
$path = libraries_get_paOpenLayers Viewsth('geoPHP');
$file = $path . '/geoPHP.inc';
if (file_exists($file) && $static_cache !== TRUE) {
include_once($file);
$already_found = TRUE;
}
OpenLayers & OpenLayers Views does not work anymore.
Geofield 7.x-1.1
OpenLayers 7.x-2.0-beta3
As this is a hosted server I can't change the apache configuration. Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | avoid-checks-on-wrong-absolute-path-1882160-2.patch | 849 bytes | valderama |
Comments
Comment #1
valderama commentedThe problem is that libraries_get_path returns no path (as the lib is simply not found). Then the file_exists function gets "/geoPHP.inc" as input, which is an absolute path pointing to the server root. As PHP is not allowed to read from this location (which is good), a warning is thrown.
This can be avoided, by checking if $path is actually set, _first_ and then do the file_exists check.
I'll attach a patch...
Comment #2
valderama commentedComment #3
neslee canil pinto