-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it fails to resize https images #39
Comments
I'm running
Additionally, searching in the project revealed, that |
I'm on the road right now and not easily able to examine your issue. If you play with it and figure out what's causing the problem, please feel free to submit a patch. |
That's probably not all there is to be changed. But here's what make it work for me: --- phpThumb-1.7.13/phpthumb.functions.php (revision 569)
+++ phpThumb-1.7.13/phpthumb.functions.php (working copy)
@@ -634,7 +634,7 @@
$errstr = 'fsockopen() unavailable';
return false;
}
- if ($fp = @fsockopen($host, $port, $errno, $errstr, $timeout)) {
+ if ($fp = @fsockopen(($port == 443 ? 'ssl://' : '') . $host, $port, $errno, $errstr, $timeout)) {
$out = 'GET '.$file.' HTTP/1.0'."\r\n";
$out .= 'Host: '.$host."\r\n";
$out .= 'Connection: Close'."\r\n\r\n"; There are two more occurrences of |
Looks good enough for me, thanks. |
Steps to reproduce:
set
high_security_password
, andnohotlink_enabled
to falseopen
/1.php
in browserThe second img fails to resize. But if I enable debug mode (
disable_debug = false
), refresh the page, and disable it back again, both images are resized. From what I can tell, that happens because in debug mode it doesn't stop on encountering an error. That is, it's able to resize https images, but some supposedly security check prevents it from doing so.I tried checking the master version (
70c706f19dcbbcf5a6f7a91cea95e0fe2156ade0
). But with with it even the local image resize fails.After some debugging it turned out that this statement fails:
Because
fgets
returnsFALSE
:What is this block of code even trying to achieve? Can you suggest any workaround among other things?
On a side note,
phpThumb-1.7.13
hasphpThumb.config.php
withdefine('phpThumbConfigFileVersion', '1.7.12');
in it.The text was updated successfully, but these errors were encountered: