Skip to content
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

Cannot show image, headers have already been sent #94

Open
srikanttowakel opened this issue Jun 2, 2013 · 20 comments
Open

Cannot show image, headers have already been sent #94

srikanttowakel opened this issue Jun 2, 2013 · 20 comments

Comments

@srikanttowakel
Copy link

All the images that are being resized using adaptiveResize are not displaying anymore.
Site: www.pr-property.com

Error getting from Chrome:
Fatal error: Uncaught exception 'RuntimeException' with message 'Cannot show image, headers have already been sent' in /home/prprop1m/public_html/phpthumb/GdThumb.inc.php:569 Stack trace: #0 /home/prprop1m/public_html/en/cropSquare100.php(48): GdThumb->show() #1 {main} thrown in /home/prprop1m/public_html/phpthumb/GdThumb.inc.php on line 569

They used to display.
Kindly tell me what you need to troubleshoot.

Thanks,
Srikant

@srikanttowakel
Copy link
Author

Locallly, I am using WAMP and it is OK. When uploading to server, then they do not display.

@julioaze
Copy link

Hi srikanttowakel. You solved this problem?
I have the same problem in my website, but no found solutions
help me, please.

@cbabos
Copy link

cbabos commented Sep 17, 2013

Hi,

try this: delete the ?> sign from your php file (at the end).
I think you have an empty line at the end of your php script.

Upd.: please check all of the included files in the session.

If this doesn't help, then please compare the settings on your local machine, and on the server.

On 2013.09.17., at 14:58, julioaze [email protected] wrote:

Hi srikanttowakel. You solved this problem?
I have the same problem in my website, but no found solutions
help me, please.


Reply to this email directly or view it on GitHub.

@julioaze
Copy link

Hi cbabos. Thanks for reply.
Unfortunately, not work for me :(

@cbabos
Copy link

cbabos commented Sep 17, 2013

Is there any difference in the local config and the server config?

@julioaze
Copy link

Locally it works perfect. I do not have access to the server settings.

@cbabos
Copy link

cbabos commented Sep 17, 2013

But you can see the PHP settings with phpinfo(); :)

On 2013.09.17., at 15:29, julioaze [email protected] wrote:

Locally it works perfect. I do not have access to the server settings.


Reply to this email directly or view it on GitHub.

@cbabos
Copy link

cbabos commented Sep 17, 2013

Is your phpThumb cache directory writeable on the server?

@julioaze
Copy link

Yes! The directory CHMOD is 755

@julioaze
Copy link

On the server was working normally, then the images disappeared

@cbabos
Copy link

cbabos commented Sep 17, 2013

In this case, there must be a change in the configuration of the server (i think).
I have no exact idea what is it, so it's up to you to experiment with it. Sorry. :(

@srikanttowakel
Copy link
Author

Hi,
Yes solved the problem partially.
First thing i did was to rebuild the server. But the issue appeared again.
Then i noticed that there was a "error.log" thing file on the directory. I
had to delete all these files, mainly in the phpthump directory and the
images appeared again.

Hope this helps.

Srikant

On Tue, Sep 17, 2013 at 4:58 PM, julioaze [email protected] wrote:

Hi srikanttowakel. You solved this problem?
I have the same problem in my website, but no found solutions
help me, please.


Reply to this email directly or view it on GitHubhttps://github.com//issues/94#issuecomment-24585782
.

@cbabos
Copy link

cbabos commented Sep 17, 2013

I think, that the phpthumb cache directory has another user:group owner than the user:group owner of the apache process.
Maybe that is the change. If this is the situation, then the 755 rights isn't enough because the cache directory isn't writeable by the server. If the images disappear again try the full 777 rights. If this helps, then make sure, that the cache dir is created by the apache itself.

If this is the case, then it's not a problem with the phpThumb code, it's simply a server config issue.
Hope this helps

On 2013.09.17., at 21:37, srikanttowakel [email protected] wrote:

Hi,
Yes solved the problem partially.
First thing i did was to rebuild the server. But the issue appeared again.
Then i noticed that there was a "error.log" thing file on the directory. I
had to delete all these files, mainly in the phpthump directory and the
images appeared again.

Hope this helps.

Srikant

On Tue, Sep 17, 2013 at 4:58 PM, julioaze [email protected] wrote:

Hi srikanttowakel. You solved this problem?
I have the same problem in my website, but no found solutions
help me, please.


Reply to this email directly or view it on GitHubhttps://github.com//issues/94#issuecomment-24585782
.


Reply to this email directly or view it on GitHub.

@julioaze
Copy link

Hello and thanks again for the answers.
Srikant, I did just that. Deleted the error.log from the server, the images appeared, but then disappeared again.
Cbabos, the folders have permission 777, but not solved too.

@cbabos
Copy link

cbabos commented Sep 17, 2013

Try to enable the debug mode (fully enable, so log messages are shown), and look at the content of error.log
There must be some clue, or hint what the problem is.

On 2013.09.17., at 22:04, julioaze [email protected] wrote:

Hello and thanks again for the answers.
Srikant, I did just that. Deleted the error.log from the server, the images appeared, but then disappeared again.
Cbabos, the folders have permission 777, but not solved too.


Reply to this email directly or view it on GitHub.

@julioaze
Copy link

message on log in phpthumb folder:

Uncaught exception 'RuntimeException' with message 'Cannot show image, headers have already been sent' in /home/odontoes/public_html/thumb/GdThumb.inc.php:569
Stack trace:
#0 /home/odontoes/public_html/thumb/thumb.php(16): GdThumb->show()
#1 {main}
thrown in /home/odontoes/public_html/thumb/GdThumb.inc.php on line 569

messagem on log in thumb_plugins folder

PHP Fatal error: Class 'PhpThumb' not found in /home/odontoes/public_html/thumb/thumb_plugins/gd_reflection.inc.php on line 179

@srikanttowakel
Copy link
Author

it can be also because of memory of the virtual server hosting the website.

On Wed, Sep 18, 2013 at 12:16 AM, julioaze [email protected] wrote:

message on log in phpthumb folder:

Uncaught exception 'RuntimeException' with message 'Cannot show image,
headers have already been sent' in
/home/odontoes/public_html/thumb/GdThumb.inc.php:569
Stack trace:
#0 /home/odontoes/public_html/thumb/thumb.php(16): GdThumb->show()
#1 #1 {main}
thrown in /home/odontoes/public_html/thumb/GdThumb.inc.php on line 569

messagem on log in thumb_plugins folder

PHP Fatal error: Class 'PhpThumb' not found in
/home/odontoes/public_html/thumb/thumb_plugins/gd_reflection.inc.php on
line 179


Reply to this email directly or view it on GitHubhttps://github.com//issues/94#issuecomment-24618625
.

@workzentre
Copy link

scan your "thumb" directory for all "error_log" files or "_notes" directories, and delete them. In my case I had an error_log file at the thumb_plugins, as soon as I deleted it it worked on the remote side.

I came to this because there was no reason why it whould work differently localy and remotely, the only difference was these files.

Good Luck

@ir3nicus
Copy link

Hi, I have similar problem. I used PHPThumb on other serwer (it worked properly then and on localhost). Now I am trying to migrate whole portal to another hosting (vps on digitalocean). I've installed Ubuntu (php version 5.5.9-1ubuntu4.9), I installed gd php library too. When I execute a php script that should display image, this empty square is being shown (as on attached screenshoot):
link

@HillbillyGeek
Copy link

I also have this: It does sound like a config issue. on a new install locally, the thumbnailer will work for a while and then quit.
I drop a new copy of the core files in and replace the old ones and the problem goes away.
(GdThumb.inc.php
PhpThumb.inc.php
thumb_plugins {
gd_reflection.inc.php
gd_watermark.inc.php }
ThumbBase.inc.php
ThumbLib.inc.php)

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

No branches or pull requests

6 participants