Hi, I got the script to work. The issue was related to the php resize function that you use to resize the image. That function did not work with PHP version 5.4, which is the one I use. I removed that function and it all worked fine.
A regular license allows an item to be used in one project for either personal or commercial use by you or on behalf of a client. The item cannot be offered for resale either on its own or as part of a project. Distribution of source files is not permitted.
An extended license allows an item to be used in unlimited projects for either personal or commercial use. The item cannot be offered for resale "as-is". It is allowed to distribute/sublicense the source files as part of a larger project.