[Solved] Screenshot Generation In Downolad Page (pafiledb) Not Working, And Cache Not Working


Subject: [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: [Download] [Hide] [Select]
Array ( [error] => [url] => http://www.posetteforever.com//downs/(edited).zip )

DEBUG


(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: [Download] [Hide] [Select]
Array ( [error] => [url] => http://www.posetteforever.com/downs/(edited).zip )

DEBUG



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:

Subject: Re: [Solved] Screenshot Generation In Downolad Page (pafiledb) Not Working, And Cache Not Working
Thanks for the debugging, I will check the code again and try to solve it definitely.

Regarding cache and template for PA File DB, a couple of months ago I have removed dedicated functions from PA File DB and now also this feature is using common cache and template files. Thanks for the suggestion though. :wink:

Subject: Re: [Solved] Screenshot Generation In Downolad Page (pafiledb) Not Working, And Cache Not Working
I have tested on my localhost and it is working fine... :roll:

Subject: Re: [Solved] Screenshot Generation In Downolad Page (pafiledb) Not Working, And Cache Not Working
So I don't know what to say, I've installed the last stable,vanilla version on a subdirectory for testing and it's not working...

I spent hours and hours comparing everything, included the versions of the mod that are spread on the net and this is the only way I had to make it work. Anyway, what's important for me is that now it's working.

On a side note: the origin of my download page dates in 2003 so it passed through different upgrades, anyway I compared every field of the database and they are absolutely the same, included the config table.

Without what I did there was no way to have the value written in the field ssurl (if I'm not wrong) if not writing it manually or linking the file to an external source (no way to upload it).

On my place the download page and the album are more important than the forum and the rest so this is why I keep bumping my head on these "accessories"

I've also converted the database for the othee download page that comes with the package but the layout of the page is not even comparable, even if it has more functions. They look to me like good piece of code left there by the original authors that stopped the development...

Subject: Re: [Solved] Screenshot Generation In Downolad Page (pafiledb) Not Working, And Cache Not Working
If it is possible, can you attach here the files you edited? I don't need TPL files of course, since it should not be template related.

Thanks.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.0958s (PHP: 18% SQL: 82%)
SQL queries: 10 - Debug Off - GZIP Enabled