Hi there, I hope you can help. I am getting the following error:
Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/all4traffic.com/httpdocs/portfolio/freelanceprofile.php on line 22
Warning: getimagesize: Unable to open '/tmp/phpxe60Ds' for reading. in /home/httpd/vhosts/all4traffic.com/httpdocs/portfolio/freelanceprofile.php on line 22
I have safemode off in my php.ini file and I have installed ImageMagick this evening. The code I am using works perfectly on another server but not this one (the code is below). Can somebody tell me why they think it isn't working on this new server? Thanks in advance for your help.
if(is_uploaded_file($logo))
{
$imagearray=getimagesize($logo);
if($imagearray[0]==80 && $imagearray[1]=80)
{
$newname="logo".$MEMBER_ID;
$ext = strtolower(strrchr($logo_name, "."));
$tmp_name=$newname.$ext;
$tmp_path='logos/'.$tmp_name;
$tmp_path = preg_replace( '[\w\d.-_]', '', $tmp_path );
if(move_uploaded_file($logo, $tmp_path))
{
chmod ($tmp_path, 0755);
$result = mysql_query("UPDATE freelancers SET logo='$tmp_name' WHERE id=\"$MEMBER_ID\"",$SESS_DBH);
}
}
else
{
$msg.="<BR>Logo was not uploaded as it's not 80X80.";
}
}