PHP Scripts open_basedir Restriction in Effect Error Scripts PHP open_basedir restricción en efecto error
PHP open_basedir protection tweak is a Safe Mode security measure that prevents users from opening files or scripts located outside of their home directory with PHP, unless the folder has specifically excluded. PHP open_basedir protección pellizcar es un modo seguro medida de seguridad que evita que los usuarios de abrir archivos o scripts situados fuera de su directorio home con PHP, a menos que la carpeta tiene expresamente excluidos. PHP open_basedir setting if enabled, will ensure that all file operations to be limited to files under certain directory, and thus prevent php scripts for a particular user from accessing files in unauthorized user’s account. PHP open_basedir, si está activada, se asegurará de que todas las operaciones con archivos que se limita a ciertos ficheros en el directorio, y así evitar scripts PHP para un usuario de acceder a los archivos no autorizado en la cuenta del usuario. When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. Cuando un script intenta abrir un archivo con, por ejemplo, fopen () o gzopen (), la ubicación del archivo está activada. When the file is outside the specified or permissible directory-tree, PHP will refuse to open it and the following errors may occur: Cuando el archivo se encuentra fuera de la permitida o se especifica el directorio en árbol, PHP se negará a abrirlo y los siguientes errores pueden ocurrir:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. Warning: file_exists () [function.file-existe]: open_basedir restricción en efecto. File(/home/user_name/public_html/wp-content/uploads/2006/12/picture.jpg) is not within the allowed path(s): (/home/user_name:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/user_name/public_html/wp-admin/inline-uploading.php on line 226 File (/ home/user_name/public_html/wp-content/uploads/2006/12/picture.jpg) no está permitido dentro de la ruta (s): (/ home / usuario: / usr / lib / php: / usr / local / lib / php: / tmp) in / home / usuario / public_html / wp-admin / inline-uploading.php on line 226
The above error message appears on a Apache httpd web server error log (error_log) hosting Wordpress blog. El anterior mensaje de error aparece en un Apache httpd servidor web log de errores (error_log) de alojamiento de blogs de Wordpress. However, the problem may happen to all system or websites that use PHP as scripting language. Sin embargo, el problema puede ocurrir a todos los sistemas o sitios web que utilizan PHP como lenguaje de scripting.
The solution or workaround to open_basedir restriction problem is that disable the PHP open_basedir protection altogether, or to exclude the protection for certain privileged user accounts, or to allow access to the additional directory for PHP scripts. La solución o la solución a open_basedir restricción problema es que desactivar la protección PHP open_basedir por completo, o para excluir la protección de determinadas cuentas de usuario con privilegios, o para permitir el acceso al directorio adicional para los scripts PHP.
If you’re using cPanel WebHost Manager (WHM), you can easily disable PHP open_basedir protection or exclude certain users from the protection with WHM. Si utilizas cPanel WebHost Manager (WHM), puede desactivar fácilmente PHP open_basedir protección o excluir a determinados usuarios de la protección con WHM. Simply go to “Tweak Security” under the “Security” section, then select “Configure” link for “Php open_basedir Tweak”. Sólo tienes que ir a "pellizco retorcido de Seguridad" bajo la sección de "Seguridad", a continuación, seleccione "Configuración" para "Php open_basedir pellizco retorcido". Inside it, you can enable or disable php open_basedir Protection, or exclude and include hosts from the protection. Dentro de ella, puede habilitar o deshabilitar php open_basedir Protección, y excluir o incluir anfitriones de la protección.
If you’re using Plesk hosting control panel, you may need to manually edit Apache configuration file of vhost.conf and vhost_ssl.conf, and add in or edit the following php_admin_value open_basedir lines to the following: Si está usando Plesk hosting panel de control, es posible que tenga que editar manualmente el archivo de configuración de Apache de vhost.conf y vhost_ssl.conf, y en añadir o editar las siguientes líneas php_admin_value open_basedir a lo siguiente:
<Directory /full/path/to/the/directory/httpdocs> <Directory /full/path/to/the/directory/httpdocs>
php_admin_value open_basedir none php_admin_value open_basedir ninguno
</Directory> </ Directory>
<Directory /full/path/to/the/directory/httpdocs> <Directory /full/path/to/the/directory/httpdocs>
php_admin_value open_basedir /full/path/to/dir:/full/path/to/directory/httpdocs:/tmp php_admin_value open_basedir / full / ruta / al / dir: / full / ruta / al / directorio / httpdocs: / tmp
</Directory> </ Directory>
Note: For SSL hosts in the vhost_ssl.conf file, the Directory path will end with “httpsdocs” instead of “httpdocs”. Nota: Para SSL anfitriones en la vhost_ssl.conf archivo, la ruta del directorio se cerrará con "httpsdocs" en lugar de "httpdocs".
The paths (above is example only and to be replaced with real path) that behind open_basedir are the directories that specifically allowed for the PHP scripts in the vhost domain account to access, so you can add in more directories that files are been stored and needed to be opened by PHP, each seperated by color “:”. Los caminos (ejemplo anterior es sólo y que se va a sustituir con camino real) que están detrás de open_basedir de los directorios que permite específicamente para los scripts PHP vhost en la cuenta de dominio de acceso, así que usted puede agregar a más directorios que los archivos se almacenan y se necesita a ser abierta por PHP, separados por color ":". But be careful as it might expose your system to security fraud. Pero tenga cuidado, ya que podría exponer su sistema de seguridad para el fraude.
Once done, run the command below to make the changes effective, and then restart Apache httpd web server (apache2ctl restart or httpd restart): Una vez hecho, ejecute el comando a continuación para hacer los cambios efectivos y, a continuación, reinicie Apache httpd del servidor web (apache2ctl restart httpd o reiniciar):
$PRODUCT_ROOT_D/admin/sbin/websrvmng -v -a $ PRODUCT_ROOT_D / admin / sbin / websrvmng-v-a
If you have to manually edit the Apache configuration file to disable PHP open_basedir protection, simply open up the httpd.conf file, and search for the lines that starts with the following characters: Si usted tiene que editar manualmente el archivo de configuración de Apache para PHP open_basedir desactivar la protección, basta con abrir el archivo httpd.conf, y la búsqueda de líneas que comienza con los siguientes caracteres:
php_admin_value open_basedir ….. php_admin_value open_basedir… ..
Replace the whole line under the virtual host for the domain user account that you want to disable protection with the following line to disable it: Sustituir toda la línea bajo el host virtual para la cuenta de usuario de dominio que desee desactivar la protección con la siguiente línea para inhabilitarlo:
php_admin_value open_basedir none php_admin_value open_basedir ninguno
You can also opt to allow your PHP scripts to access additional directory instead without disabling the protection. También puede optar por permitir que sus scripts PHP para acceder a otros directorios en lugar sin desactivar la protección. Additional directory can be added to the line, separated with color “:”. Adicional directorio se puede añadir a la línea, separadas por color ":". For example, to add /new_directory to the allow list: Por ejemplo, para añadir / new_directory para permitir la lista:
php_admin_value open_basedir “/home/user_account/:/usr/lib/php:/usr/local/lib/php:/tmp” php_admin_value open_basedir "/ home / user_account /: / usr / lib / php: / usr / local / lib / php: / tmp"
php_admin_value open_basedir “/home/user_account/:/usr/lib/php:/usr/local/lib/php:/tmp:/new_directory” php_admin_value open_basedir "/ home / user_account /: / usr / lib / php: / usr / local / lib / php: / tmp: / new_directory"
Restart the Apache after finished editing. Reinicie el Apache, después de terminar de editar. Note that the directory allowed list restriction above is actually a prefix, not a directory name. Tenga en cuenta que el directorio permitió la lista por encima de restricción es en realidad un prefijo, no un nombre de directorio. This means that “open_basedir = /dir/incl” also allows access to “/dir/include” and “/dir/incls” if they exist. Esto significa que "open_basedir = / dir / Incluido" también permite el acceso a "/ dir / include" e "/ dir / incls" si es que existen. When you want to restrict access to only the specified directory, end with a slash. Cuando usted desea restringir el acceso a sólo el directorio especificado, terminar con una barra. For example: “open_basedir = /dir/incl/”. Por ejemplo: "open_basedir = / dir / incl /".
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Se trata de una máquina que traduzca la página se proporciona "tal cual" sin garantía. Machine translation may be difficult to understand. La traducción automática puede resultar difícil de entender. Please refer to Por favor, consulte original English article artículo original Inglés whenever possible. siempre que sea posible.
Share and contribute or get technical support and help at Compartir y contribuir o recibir apoyo técnico y ayudar a My Digital Life Forums Mi vida digital Foros .
Related Articles Artículos relacionados
- PHP Parse Error: syntax error, unexpected $end PHP Parse error: error de sintaxis, $ final inesperado
- PHP Allowed Memory Size Exchausted Fatal Error PHP permitido el tamaño de la memoria Exchausted error fatal
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 No se puede abrir la solicitud HTTP Stream con fopen o fsockopen Funciones
- Install XCache PHP Accelerator in Linux by Compiling from Source Instalar XCache acelerador de PHP en Linux compilando desde el código fuente
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL consulta SQL Error en la clase WPDB
- gmmktime Error in WordPress and MagpieRSS gmmktime Error en WordPress y MagpieRSS
- Email Bounces Back with “unrouteable mail domain” Error Email Abandonos Volver con "unrouteable mail dominio" Error
- Oracle Database Import Error 3113/3114 Bases de datos Oracle error de importación 3113/3114
- RapidLeech v2.2 Free Download RapidLeech v2.2 Descarga gratuita
- How to Customize, Modify or Change WordPress Database Connection Error Page Cómo personalizar, modificar o cambiar la conexión de bases de datos de WordPress página de error













December 3rd, 2007 16:21 3 de diciembre de 2007 16:21
[...] queréis más información sobre este tema, hay un artículo muy interesante sobre este error en My Digital Life. [...] Queréis más información sobre este tema, hay un artículo muy interesante sobre este error en mi vida digital. Etiquetas: Desarrollo, hosting, open_basedir, [...] Etiquetas: Desarrollo, alojamiento web, open_basedir, [...]
December 21st, 2007 16:58 21 de Diciembre de 2007 16:58
Great article. Gran artículo.
Thanks for the WHM tip. Gracias por el WHM punta.
You saved my ass. Ha guardado en mi culo.