Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Images stop showing #518

Open
MESWEB opened this issue Nov 26, 2018 · 3 comments
Open

Images stop showing #518

MESWEB opened this issue Nov 26, 2018 · 3 comments

Comments

@MESWEB
Copy link
Contributor

MESWEB commented Nov 26, 2018

Warning [2] fopen(o_1cobirdfddfsdf1e2nrpgmh9hud.jpg): failed to open stream: No such file or directory on public_html/getthumb.php line 27

@renlok
Copy link
Owner

renlok commented Nov 27, 2018

Any more details? Are any images loading? What version are you using?

@MESWEB
Copy link
Contributor Author

MESWEB commented Nov 27, 2018

Last version. I was download updatef files and run in my localhost server.
This code is faulty:
if (!isset($_GET['fromfile']) || !isset($_GET['auction_id']) || !is_numeric($auction_id)) { ErrorPNG($ERR_716); exit; } elseif (!file_exists($_GET['fromfile']) && !fopen($_GET['fromfile'], 'r')) { ErrorPNG($ERR_716); exit; }

If I delete this code pictures are showing again.

@hungryfrankie
Copy link

on the 1.2.2.2 this problem is caused because it is only checking with the filename and it dose not have the path.
if (!isset($_GET['fromfile']) || !isset($_GET['auction_id']) || !is_numeric($auction_id)) { ErrorPNG($ERR_716); exit; } elseif (!file_exists($_GET['fromfile']) && !fopen($_GET['fromfile'], 'r')) { ErrorPNG($ERR_716)
you have to
bring this code up if ($fromfile != '') { // clean fromfile $fromfile = basename($fromfile); // build file path $file_path = UPLOAD_FOLDER . $auction_id . '/' . $fromfile; } else { // if empty filename just show default image $file_path = MAIN_PATH . 'images/email_alerts/default_item_img.jpg'; }
and put it to around line 20
and change $fromfile to $file_path in the if statement mentioned

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants