PHP Upload files to the virtual host errors:
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpEIjcGh) is not within the allowed path(s): (/usr/local/apache/htdocs/) in /usr/local/apache/htdocs/xxxsite/upload.htm on line 21

Because web users to operate without permission belong to the “root” directory /tmp/

Apache virtual server configuration file to add add the follow info:
<Directory “/usr/local/apache/htdocs/xxxsite”>
php_admin_value open_basedir /usr/local/apache/htdocs/xxxsite/:/tmp/

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.