Emoticons & Domain Problem


Subject: Re: Emoticons & Domain Problem
i think i've got the problem :D

run these sql querries

Code: [Download] [Hide] [Select]
DROP TABLE phpbb_smilies;
CREATE TABLE `phpbb_smilies` (
`smilies_id` smallint(5) unsigned NOT NULL auto_increment,
`code` varchar(50) default NULL,
`smile_url` varchar(100) default NULL,
`emoticon` varchar(75) default NULL,
`smilies_order` int(5) NOT NULL default '0',
PRIMARY KEY (`smilies_id`)
);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (1, ':D', 'icon_biggrin.gif', 'Very Happy', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (2, ':-D', 'icon_biggrin.gif', 'Very Happy', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (3, ':grin:', 'icon_biggrin.gif', 'Very Happy', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (4, ':)', 'icon_smile.gif', 'Smile', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (5, ':-)', 'icon_smile.gif', 'Smile', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (6, ':smile:', 'icon_smile.gif', 'Smile', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (7, ':(', 'icon_sad.gif', 'Sad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (8, ':-(', 'icon_sad.gif', 'Sad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (9, ':sad:', 'icon_sad.gif', 'Sad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (10, ':o', 'icon_surprised.gif', 'Surprised', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (11, ':-o', 'icon_surprised.gif', 'Surprised', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (12, ':eek:', 'icon_surprised.gif', 'Surprised', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (13, ':shock:', 'icon_eek.gif', 'Shocked', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (14, ':?', 'icon_confused.gif', 'Confused', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (15, ':-?', 'icon_confused.gif', 'Confused', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (16, ':???:', 'icon_confused.gif', 'Confused', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (17, '8)', 'icon_cool.gif', 'Cool', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (18, '8-)', 'icon_cool.gif', 'Cool', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (19, ':cool:', 'icon_cool.gif', 'Cool', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (20, ':LOL:', 'icon_lol.gif', 'Laughing', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (21, ':x', 'icon_mad.gif', 'Mad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (22, ':-x', 'icon_mad.gif', 'Mad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (23, ':mad:', 'icon_mad.gif', 'Mad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (24, ':P', 'icon_razz.gif', 'Razz', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (25, ':-P', 'icon_razz.gif', 'Razz', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (26, ':razz:', 'icon_razz.gif', 'Razz', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (27, ':oops:', 'icon_redface.gif', 'Embarassed', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (28, ':cry:', 'icon_cry.gif', 'Crying or Very sad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (32, ':wink:', 'icon_wink.gif', 'Wink', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (33, ';)', 'icon_wink.gif', 'Wink', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (34, ';-)', 'icon_wink.gif', 'Wink', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (35, ':!:', 'icon_exclaim.gif', 'Exclamation', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (36, ':?:', 'icon_question.gif', 'Question', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (37, ':idea:', 'icon_idea.gif', 'Idea', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (38, ':arrow:', 'icon_arrow.gif', 'Arrow', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (39, ':|', 'icon_neutral.gif', 'Neutral', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (40, ':-|', 'icon_neutral.gif', 'Neutral', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (41, ':neutral:', 'icon_neutral.gif', 'Neutral', 0);
INSERT INTO `phpbb_smilies` (`smilies_id`, `code`, `smile_url`, `emoticon`, `smilies_order`) VALUES (42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green', 0);

Subject: Re: Emoticons & Domain Problem
I promise i will, but tell me....i work with databases too and you are just empty it and refill it... I just want to understand what I do, dont make my wrong please!
I copy that table from another DB installation and nothing happens either!
Question is "where IP is taking that address from?"
Promise i will do it and tell you later what happend!
Thanks Zuker

Subject: Re: Emoticons & Domain Problem
i'm only checking that everything there is ok ;)

Subject: Re: Emoticons & Domain Problem
I solved this by chaging code in function_post.php and bbcode.php
Point is: why IP is resolving $_SERVER['HTTP_HOST'] as 150.150.1.75:8090 instead of www.miviajeaeuropa.com.ar?
Can I write anywhere in IP $_SERVER['HTTP_HOST']='www.miviajeaeuropa.com' somewhere???
I know that $_SERVER['HTTP_HOST'] is a PHP variable but what Can I do? I dont know if I have other problems when getting something from MySQL like emoticons... or Albums pics, my page get blank when trying uploading a pic for example.
What I mean, this solved emoticons loading in post but i had to modify bbcode.php too, because it wasn't saving it correctly in the post, it was saving as 150.150....
Here function_post.php, the bbcode was modify as CRISTINA told me to do. Thank CRISTINA!

Code: [Download] [Hide] [Select]
$parsing_template = array(
'SMILEY_CODE' => $rowset[$i]['code'],
//'SMILEY_IMG' => 'http://' . $_SERVER['HTTP_HOST'] . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $rowset[$i]['smile_url'],
'SMILEY_IMG' => 'http://www.miviajeaeuropa.com.ar' . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $rowset[$i]['smile_url'],
'SMILEY_DESC' => $rowset[$i]['emoticon']

Subject: Re: Emoticons & Domain Problem
ialvarez wrote: [View Post]
I solved this by chaging code in function_post.php and bbcode.php
Point is: why IP is resolving $_SERVER['HTTP_HOST'] as 150.150.1.75:8090 instead of www.miviajeaeuropa.com.ar?
Can I write anywhere in IP $_SERVER['HTTP_HOST']='www.miviajeaeuropa.com' somewhere???
I know that $_SERVER['HTTP_HOST'] is a PHP variable but what Can I do? I dont know if I have other problems when getting something from MySQL like emoticons... or Albums pics, my page get blank when trying uploading a pic for example.
What I mean, this solved emoticons loading in post but i had to modify bbcode.php too, because it wasn't saving it correctly in the post, it was saving as 150.150....
Here function_post.php, the bbcode was modify as CRISTINA told me to do. Thank CRISTINA!

Code: [Download] [Hide] [Select]
$parsing_template = array(
'SMILEY_CODE' => $rowset[$i]['code'],
//'SMILEY_IMG' => 'http://' . $_SERVER['HTTP_HOST'] . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $rowset[$i]['smile_url'],
'SMILEY_IMG' => 'http://www.miviajeaeuropa.com.ar' . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $rowset[$i]['smile_url'],
'SMILEY_DESC' => $rowset[$i]['emoticon']


Go to config.php and check that points to the host and not the IP

Subject: Re: Emoticons & Domain Problem
I changed as you said, did my changes back and didn't work...
Point is that the code exposed before "make" the URL from that PHP variable ignoring what i hae in config.php. Can it be posible?

Subject: Re: Emoticons & Domain Problem
I'm almost sure that your problems are related to a wrong configuration...

You may also achieve your objective by using HTACCESS to redirect wrong requests... if your server is supporting HTACCESS you may try something like this:

Code: [Download] [Hide]
  1. RewriteCond %{HTTP_HOST} ^150.150.1.22:8090  
  2. RewriteRule (.*) http://www.miviajeaeuropa.com.ar/>RewriteRule (.*) http://www.miviajeaeuropa.com.ar/$1 [R=301,L] < [R=301,L] 


I don't know if it works... but if it will, this would be the best way to go.

Subject: Re: Emoticons & Domain Problem
Nice to meet you man! I was waitng for your answer! Who if it is not the best, eh? :roll:

I will modify, try and tell you later, ok? I'm sure it is a bad configutration.
I'm learning a lot about PHP, Apache and MySQL and sometimes I think I know nothing at all!
Thanks mate!

Ignacio!

Subject: Re: Emoticons & Domain Problem
Hi MG, I left my original function_post.php and bbcode.php files and modify my .htaccess file and my file folder "forum" and It looks like this now:

Code: [Download] [Hide] [Select]
#Make sure the whole site goes to www.mysite.com instead of mysite.com. This is good for the search engines
#Edit and uncomment the below lines for your own site.
#RewriteCond %{HTTP_HOST} ^mysite.com // La de abajo es nueva NACHO
RewriteCond %{HTTP_HOST} ^150.150.1.22:8090
#RewriteRule (.*) http://www.mysite.com/> #RewriteRule (.*) http://www.mysite.com/$1 [R=301,L] // La de abajo es nueva NACHO < [R=301,L] // La de abajo es nueva NACHO
RewriteRule (.*) http://www.miviajeaeuropa.com.ar/> RewriteRule (.*) http://www.miviajeaeuropa.com.ar/$1 [R=301,L] < [R=301,L]
RewriteRule ^.+-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=> RewriteRule ^.+-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1 [L] < [L]


But when i go to post a message I see the bad path again on smiles ie. like "http://150.150.1.75:8090/forum/images/smiles/icon_surprised.gif"
Is there another file with that name anywhere else?
What else can we try MG?
Thank for your help
P/D: I changed the function_post.php and bbcode.php files again in order the site works again. You can make any test using prueba/prueba.

Subject: Re: Emoticons & Domain Problem
I have no idea... maybe the redirect doesn't work properly because of the port.

Try this instead and let me know.
Code: [Download] [Hide] [Select]
RewriteCond %{HTTP_HOST} ^150.150.1.22
#RewriteRule (.*) http://www.mysite.com/> #RewriteRule (.*) http://www.mysite.com/$1 [R=301,L] < [R=301,L]

Subject: Re: Emoticons & Domain Problem
It did not work Luca... sorry but I don't understand very well these lines you write, i don't know much about Tomcat.
I will give you more information about my site in order you can solve the problem

My site is under this address (internal IP) http://150.150.1.75:8090/forum
(External address): http://www.miviajeaeuropa.com.ar/forum

http://www.miviajeaeuropa.com.ar work under an IIS (Internet Information Server) and it is another site (mine :wink: )
but /forum point to a Tomcat Server
Same happend to http://150.150.1.75, this point to IIS and http://150.150.1.75:8090 to Tomcat.

http://150.150.1.75:9000 point to http://www.miviajeaeuropa.com.ar (IIS) and
http://150.150.1.75:8090/forum point to http://www.miviajeaeuropa.com.ar/forum (Tomcat)

Thanks for help! I hope this info helps!

Ignacio

Subject: Re: Emoticons & Domain Problem
I think your server doesn't support htaccess, that's why is not working.

Sorry, but without htaccess I have no clue on how to help you.

Subject: Re: Emoticons & Domain Problem
I think it does because when I did the changes you told me to do the site worked different.
I mean the site works different depending this configuration file!


Page 2 of 2


  
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.3284s (PHP: 10% SQL: 90%)
SQL queries: 11 - Debug Off - GZIP Enabled