How to override default php settings like "include path" etc ?
I am trying to upload file to a dir and get the following error -
Warning: move_uploaded_file(): open_basedir restriction in effect. File(/public_html/connect/fup/WSREG32.LOG) is not within the allowed path(s): (/home/qmsys3d:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/qmsys3d/public_html/connect/fup/fupload.php on line 6
Please Advice. (test url -> http://connect.qmsys.info/fup)
fupload.php code ->
-----------------
<?php
$uploadDir = '/public_html/connect/fup/';
$uploadFile = $uploadDir . $_FILES['userfile']['name'];
$userfile = $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
// print "Here's some more debugging info:\n";
// print_r($_FILES);
}
else
{
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
}
print "</pre>";
?>
I am trying to upload file to a dir and get the following error -
Warning: move_uploaded_file(): open_basedir restriction in effect. File(/public_html/connect/fup/WSREG32.LOG) is not within the allowed path(s): (/home/qmsys3d:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/qmsys3d/public_html/connect/fup/fupload.php on line 6
Please Advice. (test url -> http://connect.qmsys.info/fup)
fupload.php code ->
-----------------
<?php
$uploadDir = '/public_html/connect/fup/';
$uploadFile = $uploadDir . $_FILES['userfile']['name'];
$userfile = $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
// print "Here's some more debugging info:\n";
// print_r($_FILES);
}
else
{
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
}
print "</pre>";
?>