thefattredd
New Member
- Messages
- 5
- Reaction score
- 0
- Points
- 0
I am trying to create a script that allows admins to update a feed that consists of an image and a bunch of text. The processing the text only works just fine, but I get the following error with the image:
Warning: copy() [function.copy]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/:/tmp) in /home/fattredd/public_html/test/newlocation.php on line 11
Error uploading
What does this mean? Heres my processing script:
I use conn.php to connect to my database and parts/header.php to format the page
Warning: copy() [function.copy]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/:/tmp) in /home/fattredd/public_html/test/newlocation.php on line 11
Error uploading
What does this mean? Heres my processing script:
PHP:
<?php
require_once 'conn.php';
include 'parts/header.php';
$name = $_POST['name'];
$link = $_POST['link'];
$description = $_POST['description'];
$image_alt - $_POST['image_alt'];
$path= "uploads/".$HTTP_POST_FILES['image']['name'];
if($image !=none) {
if(copy($HTTP_POST_FILES['image']['tmp_name'], $path)) {
echo "File Name :".$HTTP_POST_FILES['image']['name']."<BR/>";
echo "File Size :".$HTTP_POST_FILES['image']['size']."<BR/>";
echo "File Type :".$HTTP_POST_FILES['image']['type']."<BR/>";
echo "<img src=\"$path\" width=\"150\" height=\"150\"><br><br><br><br><br>";
} else {
echo "Error uploading";
}
}
$sql = "INSERT INTO `locations` (link, description, image_url, image_alt)" .
" VALUES (" . $link . ", " . $description . ", " . $path . ", " .
$image_alt . ")";
$result=mysql_query($sql);
echo "<div class=\"content_entry\">" .
"<div class=\"thumbnail\"><img src=\"" . $HTTP_POST_FILES['image']['name'] . "\" width=\"118\" height=\"88\" alt=\"" . $image_alt . "\" /></div>" .
"<div class=\"entry_text\">" .
"<h3>" .
"<a href=\"" . $link . "\">" . $name . "</a>" .
"<br />" .
"</h3>" .
"<p>" . $description . "</p>" .
"</div>" .
"<div class=\"clearthis\"> </div>" .
"</div>";
?>
I use conn.php to connect to my database and parts/header.php to format the page