Elxis CMS Forum
Support => General => Topic started by: sawaedy on August 13, 2012, 13:51:43
-
can help me? the website is not load and show this error: URI: index.php
Path: /includes/Core/locale.php
Line: 200
php_uname() has been disabled for security reasons
http://www.sawaedy.com/
-
According to a quick Google search, it can be fixed by configuring PHP, or the host has disallowed it.
In order to eliminate this error message you need to do ONE of the following things:
- Remove the php_uname string from the disable_functions at php.ini* file
- Ask your hosting provider to remove the string above if you don't have an access to the php.ini* file
- Change hosting provider which allows the running of the php_uname function.
php.ini is a configuration file that resides on the server that hosts your website. In some cases it can only be edited by the administrator of the server.
Few words about php_uname() function
php_uname() returns a description of the operating system PHP is running on. This is the same string you see at the very top of the phpinfo() output. For the name of just the operating system, consider using the PHP_OS constant, but keep in mind this constant will contain the operating system PHP was built on.
On some older UNIX platforms, it may not be able to determine the current OS information in which case it will revert to displaying the OS PHP was built on. This will only happen if your uname() library call either doesn't exist or doesn't work.
-
where address php.ini ?
-
Communicate with your website hosting company.
-
thanks
-
You are welcome, sawaedy.
-
im remove the ilne: $os = strtoupper(substr(php_uname(), 0, 3)); from locale.php and the site load correct
-
Dont remove it but replace it with your OS. Elxis requires this in order to use the proper line endings and slash styles.
So replace it with this:
$os = 'LIN';
or
$os = 'WIN';
or
$os = 'MAC';
-
im do but not work,please can explain more?
-
the hosting provider says: the($os = strtoupper(substr(php_uname(), 0, 3)); ) is very danger for server and should replace, what i do?
-
That line is absolutely safe, your hoster doesn't know what he says. Security does not mean creating problems on sites. If he wants he can hide details of the operating system but knowing if it is Linux, Windows or Mac wont harm anyone. This information can be easily seeing without this function. For instance I know your server runs Linux and uses Apache, it is very easy to see it without using any programming language.
I already told you what to do.
Replace that line with:
$os = 'LIN';
-
thanks from you , but show error in administrator : URI: index3.php
Path: /includes/Core/locale.php
Line: 236
php_uname() has been disabled for security reasons
and
URI: index2.php?option=com_database&task=backup
Path: /includes/Core/locale.php
Line: 236
php_uname() has been disabled for security reasons
-
Replace all function's occurrences the same way...
-
im do but not work, please can explain more?
-
Open file includes/Core/locale.php and comment lines 235 to 250.
/*
if( strtoupper(substr(php_uname(), 0, 3)) == 'WIN' ) {
.....
}
*/
return strftime($format, $ts);
-
very thanks datahell