473,320 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

getimagesize:read error

I keep getting an error on line 43 which Is the line in which
$image_size = getimagesize($fullsized); occurs, although I cannot seem
to find the problem. Any help is much appreciated.

Sam

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>Photo Gallery</title>
<script language="javascript">
<!--
function pop(link, width, height)
{
var photoWindow = window.open(link, "photo", 'toolbar=0,
location=0, directories=0, status=0, menubar=0, scrollbars=1,
resizable=0, width='+width+', height='+height);
if (window.focus) {photoWindow.focus()}
}
//-->
</script>
</head>

<body>
<?php

$directory = "images/imagesGallery/";
$thumbnail_dir = "images/imagesGallery/thumbs/";
$data_file = "images/imagesGallery/list.photos";
$num_rows = 3;
$photos_per_row = 2;
$photos_per_page = $num_rows * $photos_per_row;

$photos =file($data_file);
$total_photos = count($photos);

if (!isSet($start)) { $start = 0; }
$i = $start;
$prev_start = $start - $photos_per_page;
$next_start = $start + $photos_per_page;

print("<table>");
for ($row=0; $row < $num_rows; $row++) {
print ("<tr>");
for ($col=0; $col < $photos_per_row; $col++){
if ($1 < $total_photos) {
list ($image_name, $title, $information) = split ('[|]',
$photos[$i]);
$thumbnail = $thumbnail_dir.trim($image_name);
$fullsized = $directory.trim($image_name);
$image_size = getimagesize($fullsized);

print ("<td align=center>")
print("<p><a
href=\"javascript:pop('photo_display.php?photo=".$ fullsized."&&information=".$information."','".($im age_size[0]+75)."','".($image_size[1]+100)."');\">");

print (<"image=src\"".$thumbnail."\">");
print ("</a>");

Apr 16 '06 #1
1 4265
Lucid77 wrote:
I keep getting an error on line 43 which Is the line in which
$image_size = getimagesize($fullsized); occurs, although I cannot seem
to find the problem. Any help is much appreciated.

Is the folder CHMOD'd correctly? Check the permissions.

--
Carl Vondrick
Web-Enginner
www.CarlSoft.net
To contact me, please use my website.
Apr 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Philip D Heady | last post by:
What is with this error message?????? First part validates, second part fails... getimagesize (filename...) failed to open stream: No such file or directory } elseif ($photo) { $ext =...
1
by: lawrence k | last post by:
I've got an intermittent bug that is very hard to trace. On my site, if I log into a new account and try to upload some images, something goes wrong the first time. Everything works fine after the...
3
by: cole007 | last post by:
Hi all, Posted this query on the PHP zone but as it might be a server issue thought I would also check here to see if anyone could help me out. Am trying to work with remote images in PHP but get...
1
by: krishna5 | last post by:
My php program to resize an jpeg image is as follows, ?php // File and new size $filename = '\bala\testPHP\Lavanya\Kids2.jpeg'; //$filename = 'Kids2.jpeg'; $percent = 0.5; // Content type
2
by: bizt | last post by:
Hi, Is it possible to obtain the width/ height of an image when that image is dyanically created using a PHP script and passing GET attributes. For example: <img...
7
by: stephcsh | last post by:
Hi, My application is working fine on server A, which is using PHP 4.4.1. However, after it is copied over to server B, which is using PHP 4.4.6, I got several problems related to pdf and xml. ...
2
by: neridaj | last post by:
Hello, I'm trying to figure out how to get rid of these errors: Notice: Undefined offset: 1 in output_fns.php on line 315 Notice: getimagesize() : Read error! in output_fns.php on line 315...
7
by: Ja NE | last post by:
(as first - thank you for all your help several years ago, and second - please apologise me for my clumsy enlgish) so, preface: some users on my photo related site sometimes enter (link) giant...
0
by: RobUK | last post by:
We have Apache on the local network managing several websites that are accessed using virtual domains (configured in the local machine's hosts file, eg. 192.168.1.10 points to dev.somedomain.com). ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.