kaos713 Posted July 6, 2008 Share Posted July 6, 2008 I'm trying to get OpenPhotoVR working on a local server. I've installed Apache and PHP. Source (files for the web site) can be found here: http://openphotovr.org When I try to 'upload' an image to the project, I get the error: Warning: unlink(C:\WINDOWS\TEMP\TOf1AF.tmp.jpg) [function.unlink]: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\add_image.php on line 55 Warning: unlink(C:\WINDOWS\TEMP\TOf1B0.tmp.jpg) [function.unlink]: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\add_image.php on line 55 Warning: Cannot modify header information – headers already sent by (output started at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\add_image.php:55) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\add_image.php on line 59 Can anyone help me with this? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/113417-openphotovr-php-error/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2008 Share Posted July 6, 2008 Is line 55 of add_image.php part of the code you have written or is it part of the OpenPhotoVR script? If it is part of your code, you will need to post add_image.php to get any specific help with it. The uploaded temporary file name does not contain an ending .jpg that is being shown in the error message. This means that the code has incorrectly formed a file name. Also, there is no need to unlink/delete the temporary uploaded file, it is automatically deleted by php when the script ends. Quote Link to comment https://forums.phpfreaks.com/topic/113417-openphotovr-php-error/#findComment-582893 Share on other sites More sharing options...
kaos713 Posted July 7, 2008 Author Share Posted July 7, 2008 add_image.php is part of the source code for OpenPhotoVR. The contents of it is below: <?php $tmp_name = ""; $url = $_REQUEST['url']; if ($url && preg_match('/^http:\/\//', $url)) { $tmp_name = tempnam("./data/", "tmp"); copy($url, $tmp_name); } else { $tmp_name = $_FILES['userfile']['tmp_name']; } if (!$info = getimagesize($tmp_name) or $info[2] != IMAGETYPE_JPEG) { exit; } $width = (int)$info[0]; $height = (int)$info[1]; $id = ""; $chars = "abchefghjkmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; for ($i = 0; $i < 8; $i++) $id .= substr($chars, rand() % strlen($chars), 1); mkdir("data/$id"); $fh = fopen("./data/$id/nav.js", "w"); $info = array("id" => $id, "width" => $width, "height" => $height, "links" => array()); fwrite($fh, "nav(" . json_encode($info) . ");"); fclose($fh); $levels = 1; $tw = $width; $th = $height; while (($tw > 256) || ($th > 256)) { $tw = ceil($tw/2); $th = ceil($th/2); $levels += 1; } $to_unlink = Array(); while (true) { array_push($to_unlink, $tmp_name); `convert -crop 256x256 $tmp_name ./data/$id/$levels-%d.jpg`; if ($levels == 1) break; $levels -= 1; $new_tmp_name = tempnam("./temp", $id) . ".jpg"; `convert -resize 50%x50% $tmp_name $new_tmp_name`; $tmp_name = $new_tmp_name; } foreach ($to_unlink as $name) unlink($name); <----LINE 55 `convert -resize 50%x50% ./data/$id/1-0.jpg ./data/$id/thumbnail.jpg`; header("Location: ./?edit=true&id=$id"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/113417-openphotovr-php-error/#findComment-583165 Share on other sites More sharing options...
junglemate Posted August 27, 2008 Share Posted August 27, 2008 Hi, Has this problem been resolved in any way? I am getting the same error. Running on an up-to-date XAMPP-System... Does anybody have a clue as to what to do? This OpenPhotoVR is soo nice, i really want to run it. Greets, junglemate Quote Link to comment https://forums.phpfreaks.com/topic/113417-openphotovr-php-error/#findComment-626741 Share on other sites More sharing options...
kaos713 Posted August 27, 2008 Author Share Posted August 27, 2008 Microsoft has released Photosynth so it can be used by anyone. -Sign up for a Live account -Download the Photosynth client -Create a Photosynth account (linked to you Live account) -Add photos The client does everything for you (putting pics in a 3d space) then uploads it to the Photosynth site so other people can see it and search for it (you add tags to your project). Quote Link to comment https://forums.phpfreaks.com/topic/113417-openphotovr-php-error/#findComment-627374 Share on other sites More sharing options...
junglemate Posted August 28, 2008 Share Posted August 28, 2008 Hi, Thanks for the tip. that is all very well... But i like to use open source soft, and to host my stuff myself. So i'd rather figure out whats wrong with the code in line 55 ... Anybody any idea? Quote Link to comment https://forums.phpfreaks.com/topic/113417-openphotovr-php-error/#findComment-627743 Share on other sites More sharing options...
kaos713 Posted August 28, 2008 Author Share Posted August 28, 2008 I would too, I'd like to have the functionality locally, but PhotoSynth works for me because it does image placement automatically (which OpenPhotoVR doesn't). If anyone can work out how to run OpenPhotoVR locally, I still want to know... If anyone can work out how to run PhotoSynth locally ... Quote Link to comment https://forums.phpfreaks.com/topic/113417-openphotovr-php-error/#findComment-628282 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.