• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [SOLVED|Moved server install: new problem with youtubeplayer
PostPosted: Wed Jul 20, 2011 3:37 am 
Offline
New Member
New Member

Joined: Fri Feb 20, 2009 2:21 am
Posts: 8
I recently moved my CMSMS install to a new server setup.
The old setup was debian lenny with apache and php5.2.
The new setup is very similar ubuntu with apache and php5.3.

I barely use any functionality of youtubeplayer module, only for conveniently encoding youtube links within the cmsms site.

However, since the move, I am getting lots of this in my error.log
Code:
[Wed Jul 20 03:11:58 2011] [error] [client 75.160.xxx.xx] PHP Notice:  Undefined variable: userids in snipped/public/modules/youtubeplayer/lang/en_US.php on line 276
[Wed Jul 20 03:11:58 2011] [error] [client 75.160.xxx.xx] PHP Notice:  Undefined variable: userids in snipped/public/modules/youtubeplayer/lang/en_US.php on line 287
[Wed Jul 20 03:12:01 2011] [error] [client 75.160.xxx.xx] PHP Notice:  Undefined variable: userids in snipped/public/modules/youtubeplayer/lang/en_US.php on line 276, referer: http://crptruck.com/
[Wed Jul 20 03:12:01 2011] [error] [client 75.160.xxx.xx] PHP Notice:  Undefined variable: userids in snipped/public/modules/youtubeplayer/lang/en_US.php on line 287, referer: http://crptruck.com/


I looked at those lines in the en_US.php, but I don't know what to do with them..... I am guessing it may be the change to php5.3; which I need for a different project...

If anyone can point out some help or a fix, I'd appreciate it. Thanks!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [SOLVED|Moved server install: new problem with youtubepl
PostPosted: Thu Jul 21, 2011 9:27 pm 
Offline
New Member
New Member

Joined: Fri Feb 20, 2009 2:21 am
Posts: 8
So, upon further inspection the offending section was part of a 'help' that was giving code examples of how to use the module. Somehow example code was not escaped enough for PHP5.3, and throwing the errors. I just deleted the section, and all is well.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [SOLVED|Moved server install: new problem with youtubepl
PostPosted: Fri Sep 02, 2011 1:15 pm 
Offline
Translator
Translator

Joined: Tue Jan 22, 2008 9:57 am
Posts: 170
I experienced this issue, too. The problem is the use of double quotes for the language strings:
Code:
----------------v here
$lang["help"] = "<h3>What Does This Do?</h3>
            <p>This module manages…

In PHP single quotes and double quotes are treated differently in that variables in strings that are defined in double quotes are parsed while they are printed as they are in single quotes:

Code:
$var = 1;
$string1 = "I’m text and this is a variable: $var"; // Resulting text is “I’m text and this is a variable: 1”
$string2 = 'I’m text and this is a variable: $var'; // Resulting text is “I’m text and this is a variable: $var”


So, to avoid the above mentioned error without removing any important info from the language file you can change the surrounding double quotes of the string to single quotes. This way you can also remove all these escape backslashes for the occurrences of double quotes in that string. However, look for other occurrences of other single quotes inside the string and escape them appropriately.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: bing


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting