umutphp

umutphp does not currently provide support for this item.

18 comments found.

this look like something I was looking for… I have 2 questions: does this create cryptic filenames for the generated thumbs ? and does it need anoer domain or subdomain to work ? Tnx in advance !

Hi, Question 1: There is no encryption for names of the thumbnails.

Question 2: Yes it needs another domain or sub-domain.

that was a prompt reply ! so what is the filename of the thumbnail from an image by the name of “NewYorkVacation0001.jpg” ? And does it use GD or IM ? ;-)

Sorry for the reply.

The name of thumbnail are the same with the original image but the thumbnails are created under folders named with dimensions.

Let me give you an example with your file. Your original file is “NewYorkVacation0001.jpg”. And you use the following URL for a thumbnail. ”/100×120/NewYorkVacation0001.jpg”. So a folder named “100×120” will be created and the thumbnail “NewYorkVacation0001.jpg” is created under that directory.

I hope this is not a prompt reply :-)

Amazing reply ! ;-) and does it do GD ?

Yes it use PHP -GD extension.

bbm

bbm Purchased

Congratz, you have your first sale !! ;-)

Many thanks :-)

bbm

bbm Purchased

First support question: in your example, what is the web-root ?

'GENERATED_IMAGE_FOLDER' => realpath(dirname(__FILE__)) . "/www/"

mine is /home/username/public_html/, is that equivalent to your /www/ ?

and your /data/original/ to my /home/username/data/original/ ?

1) web root is the web root for the Fast Image Server. For example if you unzip the package to a folder ”/home/username/fast_image_server/”, the web root should be ”/home/username/fast_image_server/www/”.

2) The original folder should be point the directory where the original images saved. For example you have a site and the images of the site that you want to serve with Fast image Server are under folder ”/home/username/site/uploads/images/”, then you should configure “data” folder as ”/home/username/site/uploads/images/” . The default configuration is for demonstration.

In the case of someone serving 10,000+ images, maybe the option to implement a better directory structure could be added and optional? An example using NewYorkVacation0001.jpg then might be placing it in ./100×120/n/e/w/y/NewYorkVacation0001.jpg

Hi, The directory structure is the first thing I will add in the next version.

Thanks for your comment.

There is a workaround for your problem. You can configure different sub-domain for sscb directory.

Just to be clear, the first time the thumbnail is to be generated, the 404.php file is simply to generate the thumbnail, correct?

The first person page refresh of a new thumbnail won’t see a dead image, right?

Yes to both questions. The first call creates the thumbnail and also sees the thumbnail.

That’s also the question I wanted to ask ^

Looks like a great script, I may be getting this soon! :)

So how does it deal with changing images… at some point there will be a bunch of stale and invalid thumbs and variations saved even though the original images was deleted or updated via other scripts…

There is a thumbnail removal service. You can either remove the thumbnails of an image or remove all the thumbnails in the system by calling the removal service.

There is a section in documentation for removal.

Removal of Thumbnail Images

You can remove thumbnails by calling delete service. To remove thumbnails of a single image, you should call the URL “http://pimages.example.com?hash=HASH&file=file.jpg”. To remove all the thumbnails, you should call the call the URL “http://pimages.example.com?hash=HASH”. HASH is the value of the static constant DELETE _HASH in config.php

My original image is a remote url. I want to create locally stored thumbnails using your script. Does it support a remote url as the original source for the image?

Here is why I ask: I get data feeds daily with data and a url for the data’s image. I don’t want to download the image locally and then thumbnail it. I want to use the remote url as the image for you script to thumbnail on demand for viewing on my site that day. Each day alot of my content changes, so the old thumbnail is no longer relevant and a new url for the content is provided and I need a new thumb until that content is refreshed yet again.

Also, since you keep the names the same, what happens when I have two originals called photo1.jpg and I want them thumbnailed. It would appear that the second instance of photo1.jpg as a source file would cause the system to show the thumb for the first instance of photo1.jpg It is amazing how many photos are using the same name. Digital cameras are famous for using the same naming convention.

How does you script handle these issues?

It does not support remote URLs. So you need to download the remote images.

You can remove original by yourself and thumbnails by removal service when the content is changed.

This version can only serve image under same directory. I will add multiple directory support for the server in the next version. So you will be able to serve images with same name under different folders.

I will upload next version of the application in a week.

I have a workaround for your case.

If possible download the original images and save the images by using a unique identifier of the content in your system as a name.

You can remove the thumbnails, when a content is removed or renewed.

Anyway to still have control over the 404 page?

I changed your demo URL with random characters and got a mess of code errors. (Since it was still trying to process your image script on a legit 404 page.)

Well it would be any page that would normally display the 404 error page.

So just putting a “2” behind your demo url like so:

http://fts.zfgoodies.com/doc.html2

Should normally display the URLs 404 page, but instead it shows this:

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /var/www/fts.zfgoodies.com/SimpleImage.php on line 142

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /var/www/fts.zfgoodies.com/SimpleImage.php on line 143

Warning: Cannot modify header information – headers already sent by (output started at /var/www/fts.zfgoodies.com/SimpleImage.php:142) in /var/www/fts.zfgoodies.com/SimpleImage.php on line 52

Warning: imagejpeg(): supplied argument is not a valid Image resource in /var/www/fts.zfgoodies.com/SimpleImage.php on line 53

What I seeing is that if I use this script, I lose the ability to have actual 404 error pages if someone really has been redirected to a dead link on the server that uses this script.

I wondering if this can be fixed in your demo so I can see that 404 error pages still work, as well as the fast loading images.

I have resolved the problem. As this is an image server, all the 404 errors will create an error image. Please check the following urls

http://fts.zfgoodies.com/doc2.html http://fts.zfgoodies.com/ss2 http://fts.zfgoodies.com/file.png

Hi,

If you use this script in a sub-domain as you can set custom 404 page for sub-domains, you won’t lose the ability to have 404 error pages for your domain.

“What I seeing is that if I use this script, I lose the ability to have actual 404 error pages if someone really has been redirected to a dead link on the server that uses this script.”

Hello,

I’ve bought the script and put on my shared hosting server. First of all i cant point my subdomain to /image_server/www. I can set it only to /image_server. I’ve changed the ORIGINAL _IMAGE_FOLDER to the folder when i have images. In

readme.txt it is also this:

<VirtualHost *:80> ServerName pimages.example.com DocumentRoot /var/www/pimages/www/ ErrorDocument 404 /e404.php SetEnv APPLICATION _ENV production

<Directory /var/www/pimages/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
            RewriteEngine On
    </Directory>
</VirtualHost>
ErrorLog /var/log/apache2/pimages_error.log
  1. Possible values include: debug, info, notice, warn, error, crit,
  2. alert, emerg. LogLevel warn
CustomLog /var/log/apache2/pimages_access.log combined

Where to put it? And moreover i don’t understand how images are actually served. In www folder there is a file index.php but how does it happen that when i will type http://quizz.pl/image_server/www/1/400X300/Amika113.jpg it will pass the execution to the index.php?

As for now it does not work for me. What should i do?

Hi,

First you should point the document root to the /image_server/www directory. You can ask your hosting company to do so.

Secondly, you should configure the 404 directive of the subdomain. You can also ask your hosting company to configure www/e405.php as 404 page for you subdomain.

Thanks. Ive managed it to do using .htaccess file with: ErrorDocument 404 /e404.php and it workded :)

Hi tomaszs3,

I am sorry because I have forgotten to mention .htaccess file in my previous post.

Dear friend,

I am using opencart e-commerce… lets say www.example.com its up and running

I am using image.example.com as a images already up and currently running ….

I am very basic user and I love to speed up my shared website… I already bought your software …. and did the following

extract your files to /public_html/image/ (here my subdomain image.example.com pointed in config.php)

After extract your file i just load from browser image.example.com/www nothing is there after this step i am confusing following things

Configure environment variable APPLICATION _ENV for domain or subdomain. Value must be an index of the config array in the configuration file (config.php). (((what is this? how can i do this? where can i do this? any step by step guide?))

Configure e404.php in www folder as 404 error page for the domain or subdomain ((( how can i do this? where can i do this? any step by step guide?))

Give write permision to /srv/www/image_server/www/ so that the web server user can create folder and files under /srv/www/image_server/www/. Edit the configuration file and give valid directory paths for folders \

((( how can i do this? where can i do this? any step by step guide?))

Configuring environment variable APPLICATION _ENV

In “config.php” you can configure different environments. This may be usefull for testing and developing processes. If you do not want to use different environments, you can set same values for all environments.

APPLICATION _PATH is the path of the document root of image.example.com. You can either write it statically or leave it the default value.

ORIGINAL _IMAGE_FOLDER is the folder of your images. You should write full path of the directory of your images.

GENERATED _IMAGE_FOLDER if the folder that the application creates the thumbnail. Also leave this value as default value.

Configure e404.php

The application is strictly based on 404 error handling of webservers. So you should configure e404.php as the 404 handler for your subdomain. You can do it by yourself if you are managing your web server or you can ask the hosting company to do so.

Give write permision to /srv/www/image_server/www/

The applications creates the thumbnails under the document root folder of your subdomain. So you should give write permission so that the application can creates the thumbnails.

Just a note that with a little massaging I was able to get this to work nicely within my app, and the author was responsive and helpful.

Can this script check for the existence of an image and if it dosen’t exist return a default image?

Hi,

Sorry for late response.

You can update the default 404 error image to give custom image when the image is not found.

I hope I do not misunderstand your question.

My directory tree hosting is / home / user / public_html /

their example the installation is / srv / www / image_server / data /

How can I configure Fast Image Server in my type of hosting

you snake your support for installation script? make how much?

by
by
by
by
by
by