Can't sign in to my site - error in ug-CN.localise.php Topic is solved

General questions regarding the use of languages in Joomla! 3.x.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
UYGHURMEN
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 202
Joined: Mon Jan 18, 2010 12:43 am

Can't sign in to my site - error in ug-CN.localise.php

Post by UYGHURMEN » Sun Jan 12, 2020 7:08 pm

Hi every buddies,
My site suddenly became crazy, users can't sign in.
Shown on this error message:
Failed to start the session because headers have already been sent by "/home/eynekbiz/public_html/administrator/language/ug-CN/ug-CN.localise.php" at 0 - line 1.
Failed to start the session because headers have already been sent by "/home/eynekbiz/public_html/administrator/language/ug-CN/ug-CN.localise.php" at line 1.

But that line 1 nothing, only: php.
How to fix it? any buddy help me?
Thanks.
Last edited by toivo on Mon Jan 13, 2020 3:14 am, edited 1 time in total.

Ch3vr0n
Joomla! Explorer
Joomla! Explorer
Posts: 312
Joined: Sat Sep 26, 2009 11:00 pm
Location: Belgium
Contact:

Re: Users Can't sign in my site

Post by Ch3vr0n » Sun Jan 12, 2020 7:34 pm

See the big pink box up top ? (you must have, since you got nearly 200 posts)

Post the FPA https://forumpostassistant.github.io/docs/

That said, it would be a first for me. Last time i checked language packs don't come with a "localise.php" file.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37798
Joined: Sat Apr 05, 2008 9:58 pm

Re: Users Can't sign in my site

Post by Webdongle » Sun Jan 12, 2020 10:42 pm

Have you edited the configuration.php file?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11755
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Can't sign in my site - error in ug-CN.localise.php

Post by toivo » Mon Jan 13, 2020 3:10 am

UYGHURMEN wrote:But that line 1 nothing, only: php.
If the first line of the file contains just 'php', it causes the error message. The first line should look like this:

Code: Select all

<?php
If the first line of the PHP script has changed, the question remains, how did it get changed? Did the installation file get damaged, did you edit the file or is it perhaps a failed hacking attempt? Make sure that the permissions are correct, 755 for folders and 644 for files, and that you have followed best practice in security, as set in the sticky topics of the 3.x Security forum at viewforum.php?f=714.

Ch3vr0n wrote:Last time i checked language packs don't come with a "localise.php" file.
Same here, but there it is: http://joomlacode.org/gf/project/jtrans ... e_id=20626
Toivo Talikka, Global Moderator

Ch3vr0n
Joomla! Explorer
Joomla! Explorer
Posts: 312
Joined: Sat Sep 26, 2009 11:00 pm
Location: Belgium
Contact:

Re: Can't sign in my site - error in ug-CN.localise.php

Post by Ch3vr0n » Mon Jan 13, 2020 2:18 pm

toivo wrote:
Mon Jan 13, 2020 3:10 am
Same here, but there it is: http://joomlacode.org/gf/project/jtrans ... e_id=20626
Just wondering, would it give a problem if he simple deleted that file? Afaik it shouldn't even be there to begin with.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37798
Joined: Sat Apr 05, 2008 9:58 pm

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by Webdongle » Mon Jan 13, 2020 2:29 pm

Deleting it without knowing how it got there would be silly.
https://forumpostassistant.github.io/docs/ please
And what is the url?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2636
Joined: Sun May 04, 2008 12:37 pm

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by waarnemer » Mon Jan 13, 2020 2:54 pm

Ok... this is interesting... this is the Uyghur translation.
Latest update was for 3.7.5 (http://joomlacode.org/gf/project/jtrans ... ge_id=6453)
If you or someone else made updates to the matching 3.9.x, it would be nice to have it shared.

But.. since the characters used in Uyghur are persian-arabic it may very well have happened the file has been stored in the wrong encoding.
As fair as I know PHP files need stored as UTF8 no BOM.

Anyway this should be in the file (the 3.7.5):

Code: Select all

 <?php
/**
 * @package    Joomla.Language
 * @version		$Id: ug_CN.localise.php 00199 2017-09-18 08:00:00 Akber Tursun $
 * @copyright  Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * ug-CN localise class
 *
 * @since	 1.6
 */
abstract class Ug_CNLocalise 
{
	/**
	 * Returns the potential suffixes for a specific number of items
	 *
	 * @param   integer  $count  The number of items.
	 *
	 * @return  array  An array of potential suffixes.
	 *
	 * @since   1.6
	 */
	public static function getPluralSuffixes($count)
	{
		if ($count == 0)
		{
			return array('0');
		}
		elseif ($count == 1)
		{
			return array('1');
		}
		else
		{
			return array('MORE');
		}
	}

 	/**
 	 * Returns the ignored search words
 	 *
	 * @return  array  An array of ignored search words.
   
	 * @since   1.6
 	 */
public static function getIgnoredSearchWords()
	{
		return array('ۋە', 'ئىچىدە', 'ئوچۇق');
	}

 	/**
 	 * Returns the lower length limit of search words
 	 *
	 * @return  integer  The lower length limit of search words.
   
	 * @since   1.6
 	 */
	public static function getLowerLimitSearchWord()
	{
		return 3;
	}

 	/**
 	 * Returns the upper length limit of search words
 	 *
	 * @return  integer  The upper length limit of search words.
   
	 * @since   1.6
 	 */
	public static function getUpperLimitSearchWord()
	{
		return 20;
	}

 	/**
 	 * Returns the number of chars to display when searching
 	 *
	 * @return  integer  The number of chars to display when searching.
   
	 * @since   1.6
 	 */
	public static function getSearchDisplayedCharactersNumber() 
	{
		return 200;
	}
}

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11755
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by toivo » Mon Jan 13, 2020 3:19 pm

Where did you download that file from? The first line of that file starts with a blank space, which would cause the headers to be sent, exactly as reported in the topic.
Toivo Talikka, Global Moderator

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37798
Joined: Sat Apr 05, 2008 9:58 pm

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by Webdongle » Mon Jan 13, 2020 3:32 pm

I cant see a php file in the download of http://joomlacode.org/gf/project/jtrans ... e_id=20626

But yes, blank line in php will cause the error. (that's why I asked if the configuration.php had been edited).


Addendum
Oh yeah found the files
ug-CN.localise.php in the admin and site internal zip files. Both php's have NO blank line.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11755
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by toivo » Mon Jan 13, 2020 3:44 pm

Expand the .zip file and the file is there.
php-file.jpg
A blank line is not required, one blank space is enough, similar to the file that @waarnemeer showed.

The faulty file is indeed ug-CN.localise.php from the admin_ug-CN.zip file. Fix it by removing the initial space from the first line.
You do not have the required permissions to view the files attached to this post.
Toivo Talikka, Global Moderator

UYGHURMEN
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 202
Joined: Mon Jan 18, 2010 12:43 am

Re: Can't sign in my site - error in ug-CN.localise.php

Post by UYGHURMEN » Mon Jan 13, 2020 8:09 pm

toivo wrote:
Mon Jan 13, 2020 3:10 am
UYGHURMEN wrote:But that line 1 nothing, only: php.
If the first line of the file contains just 'php', it causes the error message. The first line should look like this:

Code: Select all

<?php
Yes, like you wrote. I never change anything, suddenly happen this. And change to English, it's OK. But language change to English too.
Last edited by toivo on Tue Jan 14, 2020 12:24 am, edited 1 time in total.
Reason: mod note: added end quote

UYGHURMEN
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 202
Joined: Mon Jan 18, 2010 12:43 am

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by UYGHURMEN » Mon Jan 13, 2020 8:12 pm

waarnemer wrote:
Mon Jan 13, 2020 2:54 pm
Ok... this is interesting... this is the Uyghur translation.
Latest update was for 3.7.5 (http://joomlacode.org/gf/project/jtrans ... ge_id=6453)
If you or someone else made updates to the matching 3.9.x, it would be nice to have it shared.

But.. since the characters used in Uyghur are persian-arabic it may very well have happened the file has been stored in the wrong encoding.
As fair as I know PHP files need stored as UTF8 no BOM.

Anyway this should be in the file (the 3.7.5):

Code: Select all

 <?php
/**
 * @package    Joomla.Language
 * @version		$Id: ug_CN.localise.php 00199 2017-09-18 08:00:00 Akber Tursun $
 * @copyright  Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * ug-CN localise class
 *
 * @since	 1.6
 */
abstract class Ug_CNLocalise 
{
	/**
	 * Returns the potential suffixes for a specific number of items
	 *
	 * @param   integer  $count  The number of items.
	 *
	 * @return  array  An array of potential suffixes.
	 *
	 * @since   1.6
	 */
	public static function getPluralSuffixes($count)
	{
		if ($count == 0)
		{
			return array('0');
		}
		elseif ($count == 1)
		{
			return array('1');
		}
		else
		{
			return array('MORE');
		}
	}

 	/**
 	 * Returns the ignored search words
 	 *
	 * @return  array  An array of ignored search words.
   
	 * @since   1.6
 	 */
public static function getIgnoredSearchWords()
	{
		return array('ۋە', 'ئىچىدە', 'ئوچۇق');
	}

 	/**
 	 * Returns the lower length limit of search words
 	 *
	 * @return  integer  The lower length limit of search words.
   
	 * @since   1.6
 	 */
	public static function getLowerLimitSearchWord()
	{
		return 3;
	}

 	/**
 	 * Returns the upper length limit of search words
 	 *
	 * @return  integer  The upper length limit of search words.
   
	 * @since   1.6
 	 */
	public static function getUpperLimitSearchWord()
	{
		return 20;
	}

 	/**
 	 * Returns the number of chars to display when searching
 	 *
	 * @return  integer  The number of chars to display when searching.
   
	 * @since   1.6
 	 */
	public static function getSearchDisplayedCharactersNumber() 
	{
		return 200;
	}
}
Yes I used 3.7.5 version.

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2636
Joined: Sun May 04, 2008 12:37 pm

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by waarnemer » Mon Jan 13, 2020 8:28 pm

Do notice the space before the <?php

remove it like @toivo said.... imho it should not make a difference but make sure to save it as UTF8 no BOM

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18910
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by infograf768 » Tue Jan 14, 2020 6:31 am

folks, not only we have that space before <?php but also the site ug-CN.localise.php has the wrong class name.
As we have no News for a while from the Uygur tt, we are going to correct the pack and release a v2.

Both files are already UNIX and utf8 btw.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18910
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by infograf768 » Tue Jan 14, 2020 6:40 am

Here is a .zip
@UYGHURMEN
As you can't log in, please unzip and replace the localise.php files in admin and site and let us know if it solves your issue.
ug-CN_joomla_lang_full_3.7.5v2.zip
You do not have the required permissions to view the files attached to this post.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

UYGHURMEN
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 202
Joined: Mon Jan 18, 2010 12:43 am

Re: Can't sign in to my site - error in ug-CN.localise.php

Post by UYGHURMEN » Tue Jan 14, 2020 6:50 pm

infograf768 wrote:
Tue Jan 14, 2020 6:40 am
Here is a .zip
@UYGHURMEN
As you can't log in, please unzip and replace the localise.php files in admin and site and let us know if it solves your issue.
ug-CN_joomla_lang_full_3.7.5v2.zip
Thanks a lot, it's works.


Post Reply

Return to “Language - Joomla! 3.x”