Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2003-08-31, 10:55 PM
Junior Member
 
Join Date: Aug 2003
Posts: 1
pluto
Default

Hi ... I am new at this and have been wracking my brain :unsure: with trying to figure out this error:

I am getting this "read error". I have tried to everything to figure it out. Any help would be greatly appreciated. Here is the error:

[CODE>Warning: getimagesize(): Read error! in /home/adminfd/public_html/Gallery/body.php on line 27

Warning: getimagesize(): Read error! in /home/adminfd/public_html/Gallery/body.php on line 27
[/code]

When I look at the script, here is what I have (this is just a portion of the script):



PHP Code:
--------------------------------------------------------------------------------
&
#036;rep_cat = opendir($file);
                
while (false !== ($file_cat = readdir($rep_cat))) { 
                    
if($file_cat != '..' && $file_cat !='.' && $file_cat !=''){
                        
if(is_dir($file."/".$file_cat)){
                        
                            
$rep_anime = opendir($file."/".$file_cat); //I charge images of a folder
                            
while (false !== ($file_anime = readdir($rep_anime))) { 
                                
if($file_anime != '..' && $file_anime !='.' && $file_anime !=''){
                                    
if(is_file($file."/".$file_cat."/".$file_anime) && getimagesize($file."/".$file_cat."/".$file_anime)){
                                    
$images++;
                                    
}
                                }
                            }
                            
closedir($rep_anime);
                            
$totcat++; //number of categories
                        
}
                    }
                }
                
closedir($rep_cat);
                
if($images != 0){ //if the folder has images
                    
echo "<td width=\"50%&#092;"><font size=\"3\" face=\"Verdana\"><img src=\"cartella.jpg\" align=absmiddle> [b]<a href=\"index.php?cat=$file\">$file</a>[/b] <font size=1>($images)</font></font></td>";
                
}
                else{
                    echo 
"<td width=\"50%&#092;"><font size=\"3\" face=\"Verdana\"><img src=\"cartella.jpg\" align=absmiddle> [b]$file[/b] <font size=1>($images)</font></font></td>";
                
}
                
                &
#036;totimages = $totimages+$images;
                
&#036;images=0;
                
&#036;i++;
                    
                //every 2 folders comes created a new line
                
if(&#036;i==2){
                    
                    
&#036;i=0;
                    
echo "</tr><tr>";
                }
            }            
        }
    }
?> 
--------------------------------------------------------------------------------



I know it is probably right in front of my eyes :blink: ... but, any help at this point would be greatly appreciated.

Sandy
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2003-09-06, 06:04 AM
Member
 
Join Date: May 2003
Posts: 47
barand
Default

It could just be that file is physically corrupted. Try opening from command line.
__________________
Barand
Reply With Quote
  #3 (permalink)  
Old 2003-09-22, 09:15 AM
Guest
Guest
 
Posts: n/a
Default

try permissions on directory?
Reply With Quote
  #4 (permalink)  
Old 2003-11-05, 02:55 AM
Tiffany
Guest
 
Posts: n/a
Default

I am also having trouble and thought I would try posting here to see if anyone could help. I have a guestbook downloaded from x.faction and is located at etiphany.com. Anyhow, when I sign the guestbook, it shows a thank you page and this error:

Quote:
Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site4/fst/var/www/html/gb/sign_header.php:5) in /home/virtual/site4/fst/var/www/html/gb/sign.php on line 96
Thank you for your reply!
click here to go back to the guestbook
But it also posts the comment on the guestbook. I have gone through the code up and down and am clueless. :angry:

Can anyone help?

Thanks.

xoxo
tiffany
Reply With Quote
  #5 (permalink)  
Old 2003-11-05, 03:26 PM
stuart's Avatar
Administrator
 
Join Date: Jan 2003
Location: Scotland
Posts: 472
stuart will become famous soon enoughstuart will become famous soon enough
Send a message via MSN to stuart
Default

I sometimes get this error on some hosts and not on others - i think its some configuration - but not sure exactly which.

anyway.. it's probably nothing to worry about, here is a solution to remove the error:

at the very top of the page that the error is in add the following:
Code:
error_reporting(0);
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:06 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.