Re: Image list performance ISSUE

From: Date: Mon, 07 Aug 2006 07:44:03 +0000
Subject: Re: Image list performance ISSUE
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-240210@lists.php.net to get a copy of this message
Sorry for the late answer, I have different applications and the users are kept in DB so I cannot make for every user a directory. I made a solution with .htaccess from apache and redirection to a php script that outputs the image if the user has rights to the images. I will still have to check the performance of the system in this case, but I think it will be the same. The performance Issue that I asked was: Is there a difference if apache sends the image or If I output it with php with readfile. Andy. ----- Original Message ----- From: "WeberSites LTD" <berber@weber-sites.com> To: "'Andy'" <frum@ar-sd.net>; <php-general@lists.php.net> Sent: Thursday, August 03, 2006 9:32 PM Subject: RE: [PHP] Image list performance ISSUE
Why don't you name the images with the GUID of the user? I want to see someone try to guess another user's GUID... -----Original Message----- From: Andy [mailto:frum@ar-sd.net] Sent: Wednesday, August 02, 2006 11:16 AM To: php-general@lists.php.net Subject: [PHP] Image list performance ISSUE Hi, I have tons of images, which belongs to different users. In the software we show to the users only the images that they have, but If they take the image links manually they can also see the other images if they modify the image name in the link. Now, I can override the image request with apache rewrite and send the request to a php file, which analizes the user rights and if the user has rights to see that image. After that I output the image file with php this way:
           header("Content-Type: image/jpeg");
           header("Content-Length: ".filesize($fname));
           readfile($fname);
... where fname is the image file. I want to know... is this a big performance issue or not(the image is handled by php and not by apache directly) OR... Is there any other way to handle this situation??? Thanx, Andy.


« previous php.general (#240210) next »