Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: banquer on September 26, 2007, 11:42:14 AM

Title: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: banquer on September 26, 2007, 11:42:14 AM
Hello Guys.

This is my first post on SMF forum because my site (http://www.rc-gojar-z.net/) are working ok last 2 years.
After an upgrade on server hosting (www.mecahost.com), the funcionality of linking and image on a server outsite our host, server response with Error 501. Bad Gateway, when showing a post that content using img][/img] code (I erase first [ to view it) to show a image inside a post.
I think is problem of the Hosting Server, but, why?

Best regards from Granada (Spain).
Title: Re: Error 501 (Bad Gateway) on Hosting linking an Image
Post by: jerm on October 02, 2007, 10:34:16 PM
Have you tried to contact the hosting site to explain this to them?
Title: Re: Error 501 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 03, 2007, 02:37:03 PM
Yes, and the hosting support drives me to software error  :-\
Any ideas?
Title: Re: Error 501 (Bad Gateway) on Hosting linking an Image
Post by: metallica48423 on October 03, 2007, 11:29:05 PM
there was someone not long ago with the same problem, and it was the hosting.  Another indicator is that it was working fine beforehand... so, i'd have to say its probably the hosting.

Ask them if theres any errors being logged in the webserver's error log
Title: Re: Error 501 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 04, 2007, 02:20:44 AM
Ok. Thank you very much.
Title: Re: Error 501 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 14, 2007, 12:14:40 AM
Doing some investigation, I found that if I put the img tag directly on the smf messages table, smf shows the image correctly.
In other words, the error is when the front end tries to put the image tag on the database.
Any ideas?

PD: Sorry for the subject. Error is 502 not 501.
Best regards from Spain.
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: metallica48423 on October 14, 2007, 12:59:23 AM
ok.  Can you ask your host if their error log is catching anything from when this happens?
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 17, 2007, 01:02:13 PM
The error happens in eweather module and posting and img tag on smf forum. Hosting drives me to a permission question.
Is this possible? Where?
Best regards from Spain .
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: metallica48423 on October 17, 2007, 02:18:26 PM
well, i was thinking similar, -- but i was asking for the error log entries so we could see more in depth what was happening

make sure all your images have the correct owner and viewable permissions (your host will need to help you with this if you need help -- as they are certainly capable of doing this)
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 17, 2007, 06:23:39 PM
Ok. I'll look for permisions info but if I post a link to a image located in an external server ... What permisions must it have?

Best regards and I'll ask for log entries.
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: metallica48423 on October 17, 2007, 06:37:32 PM
the files would have to be readable at minimum, and the server would have to allow hotlinking images (otherwise they won't work)
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 18, 2007, 01:17:38 AM
Ok. I look for this info and then post here.
Thank you very much for you very quickly support.
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 23, 2007, 04:58:55 PM
I attach log file with 3 of this errors.
I hope you can find where is the errors, because my eyes don't found it  :'(
Best regards from Spain.


#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2007-10-14 00:00:54
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken



2007-10-18 14:19:30 W3SVC4651 VLAN-O7G2CSL5J5 80.231.170.130 POST /index.php option=com_smf&Itemid=88888905&action=post2;start=0;board=14 80 - 88.24.84.173 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+es-ES;+rv:1.8.1.7)+Gecko/20070914+Firefox/2.0.0.7 8cd9b2cc1f496d671d261d17f580b7a9=e8426afc88884bcfc9694f81af9aae4f95bff8b4ce0a10603aa8309661b1fa1265;+locale=es;+fontSize=70;+SMFCookie449=a%3A4%3A%7Bi%3A0%3Bs%3A2%3A%2265%22%3Bi%3A1%3Bs%3A40%3A%22ef9d94ba336a2652ef489e62d6c224856b349efd%22%3Bi%3A2%3Bi%3A1380993218%3Bi%3A3%3Bi%3A0%3B%7D;+vsid=3X04X1005237342;+PHPSESSID=e83138570b57d674aee9005caf1c3bd6;+6bd619abf9409c444774a1eff141f13a=eb535d73e18f90fbcf1a9bb5701e54b1;+mosvisitor=1;+PLESKSESSID=1f546a88e6874e204a2c0fb8c885b48a;+psaContext=domains http://www.rc-gojar-z.net/index.php?option=com_smf&Itemid=88888905&action=post;board=14.0 www.rc-gojar-z.net 502 2 0 1227 2619 11484

2007-10-18 14:46:12 W3SVC4651 VLAN-O7G2CSL5J5 80.231.170.130 POST /smf/index.php action=post2;board=14;preview;xml 80 - 88.24.84.173 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+es-ES;+rv:1.8.1.7)+Gecko/20070914+Firefox/2.0.0.7 8cd9b2cc1f496d671d261d17f580b7a9=e8426afc88884bcfc9694f81af9aae4f95bff8b4ce0a10603aa8309661b1fa1265;+locale=es;+fontSize=70;+SMFCookie449=a%3A4%3A%7Bi%3A0%3Bs%3A2%3A%2265%22%3Bi%3A1%3Bs%3A40%3A%22ef9d94ba336a2652ef489e62d6c224856b349efd%22%3Bi%3A2%3Bi%3A1380993218%3Bi%3A3%3Bi%3A0%3B%7D;+vsid=3X04X1005237342;+PHPSESSID=e83138570b57d674aee9005caf1c3bd6;+6bd619abf9409c444774a1eff141f13a=eb535d73e18f90fbcf1a9bb5701e54b1;+mosvisitor=1;+PLESKSESSID=1f546a88e6874e204a2c0fb8c885b48a;+psaContext=domains;+0372988ac0775fc54cdce44f22a2dee6=86491a6e444e2c02fe53d87c985a15a1 http://www.rc-gojar-z.net/index.php?option=com_smf&Itemid=88888905&action=post;board=14.0 www.rc-gojar-z.net 502 2 0 1227 1439 11625

2007-10-18 14:46:23 W3SVC4651 VLAN-O7G2CSL5J5 80.231.170.130 POST /index.php option=com_smf&Itemid=88888905&action=post2;start=0;board=14 80 - 88.24.84.173 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+es-ES;+rv:1.8.1.7)+Gecko/20070914+Firefox/2.0.0.7 8cd9b2cc1f496d671d261d17f580b7a9=e8426afc88884bcfc9694f81af9aae4f95bff8b4ce0a10603aa8309661b1fa1265;+locale=es;+fontSize=70;+SMFCookie449=a%3A4%3A%7Bi%3A0%3Bs%3A2%3A%2265%22%3Bi%3A1%3Bs%3A40%3A%22ef9d94ba336a2652ef489e62d6c224856b349efd%22%3Bi%3A2%3Bi%3A1380993218%3Bi%3A3%3Bi%3A0%3B%7D;+vsid=3X04X1005237342;+PHPSESSID=e83138570b57d674aee9005caf1c3bd6;+6bd619abf9409c444774a1eff141f13a=eb535d73e18f90fbcf1a9bb5701e54b1;+mosvisitor=1;+PLESKSESSID=1f546a88e6874e204a2c0fb8c885b48a;+psaContext=domains;+0372988ac0775fc54cdce44f22a2dee6=86491a6e444e2c02fe53d87c985a15a1 http://www.rc-gojar-z.net/index.php?option=com_smf&Itemid=88888905&action=post;board=14.0 www.rc-gojar-z.net 502 2 0 1227 2716 11375
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: banquer on October 30, 2007, 03:36:57 PM
Because i'd the same error on eweather module, this error are about allow_url_fopen param in php.ini are disabled.
I modified code that use file_get_contents() using functions in cURL libraries are resolved the problem.
I think it could be the same error.
What do you think about and where in smf code must I modify this function?

Best regards from Spain.
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: SleePy on November 06, 2007, 12:45:54 PM
Did the above suggestion help?

This also can occur if you set height and width limit on images, as it has to get the information about the image, and if your host is blocking this from happening, things don't work.
Title: Re: Error 502 (Bad Gateway) on Hosting linking an Image
Post by: banquer on November 07, 2007, 02:51:07 AM
Thank you very much. I'd limited photos to 800x600. I erased this limits and everything works ok.
Thank you another time.
Best regards from Granada(Spain).