https://www.icyphoenix.com/viewtopic.php?f=35&t=7313&p=49868#p49868
-----------------------------------
tormentor
Sun 15 Aug, 2010 05:02

[Solved] Screenshot Generation In Downolad Page (pafiledb) Not Working, And Cache Not Working
-----------------------------------
This is an old problem, It took several hours to "solve" it, it puzzled me to death  :cry: but now I'm very happy to have it fixed (or partially fixed)  :lol: 

First of all, please check if your download (pafiledb) page generates the thumbnail (screenshot), it shouldn't...

In the download page (pafiledb) the thumbnail was never generated, I've to upload it manually and add a link to it, every time, and it was a pain.

There were two problems:

There is an old topic about it:

http://www.icyphoenix.com/viewtopic.php?f=29&t=5853

Now that I'm on a new server, I can get a reply from the debug mode and it was :

[code linenumbers=false]Array ( [error] =>  => http://www.posetteforever.com//downs/(edited).zip )

DEBUG[/code]

(I changed the name of the file with "(edited)")

I was able to get rid of the double slash erasing a couple of  '/' .

in /includes/pafiledb/functions.php

And now the reply is

[code linenumbers=false]Array ( [error] =>  => http://www.posetteforever.com/downs/(edited).zip )

DEBUG[/code]


No more double slash but still, thumbnail was not generated :cry: 

Now it comes the best part of it  :lol: 

if you choose a screenshot directory out of the main download directory it doesn't work

if my files directory is /downs the screenshot directory has to be /downs/screenshots (or whatever the name you choose)
if I put it elsewhere, it doesn't work...

But the funny thing is that the .htaccess of the downloads directory in IP says

Order Deny,Allow
Deny from All
Allow from localhost 127.0.0.1

and it goes to the subdirectories...

so the screenshot was generated, but it couldn't be shown on the browser  :roll: 

Actually I put this one in the screenshot subfolder 

Order Deny,Allow
Allow from All

and now the screenshot generation is working .... I'll find something better in order to prevent file leeching, but now it's about 5 a.m. and I'm too tired...

Anyway if this feature is working in your default IP, I don't know how it can be  :?: 

Both the modifications had to be done to get it working... 

Second thing, the cache:

This feature (download/pafiledb) should work with a cache, in that case in the main cache directory of icyphoenix (/cache) there should be a file called "pa_file_data_global.php" and a directory "templates" should appear (on a side note I could not turn on "PHP in template" by the ACP, I had to do it manually in the database...).

Ok, it is not working, I had to manually change all the values related to the cache in the pafiledb functions to point on a cache folder under the main download folder to make it work.

Don't ask me how to do it, it was a messy night, the file should be the /includes/pafiledb/functions_cache.php

Obviously this cache folder must have write permissions...

I'm not a coder, consider this a hint for the good guys.

There is another issue that I was not able to get rid of about the download page, there is another topic about it in this same subforum... A little help would be extremely appreciated   :loveit:


