| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 1:03 am Post subject: Warning: posix_getpwuid() |
|
Hi
When I try installing dragonfly CMS through "mysite".com/install.php I get
Warning: posix_getpwuid() has been disabled for security reasons in /home/pubsters/public_html/includes/cmsinit.inc on line 38
I was wondering why that is there? And maybe how to remove it so I can install the cms? Or is there another way to install the CMS without removing any part of the code?
Thanks
Jiao.
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Tue Aug 14, 2007 3:11 am Post subject: Re: Warning: posix_getpwuid() |
|
Its just a warning and it doesn't effect your install.
Hopefully your host hasn't disabled other functions, if so then they are too scared of their own system configuration.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 3:43 am Post subject: Re: Warning: posix_getpwuid() |
|
But how do I continue the Install? I can't seem to get past that page warning.
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Tue Aug 14, 2007 3:49 am Post subject: Re: Warning: posix_getpwuid() |
|
Windows, Linux, Unix .... ?
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 3:52 am Post subject: Re: Warning: posix_getpwuid() |
|
I'm using Windows. Not sure about the hoster's system. If that's what you mean.
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Tue Aug 14, 2007 3:57 am Post subject: Re: Warning: posix_getpwuid() |
|
I mean your host or wherever DragonflyCMS is being installed.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Tue Aug 14, 2007 4:07 am Post subject: Re: Warning: posix_getpwuid() |
|
Anyways hopefully you are not going to use Notepad or any Microsoft products to modify this file, use Notepad2, UltraEdit32, Notepad++ or anything else then open includes/cmsinit.inc and change line 31 with
| Code:: |
if (!function_exists('posix_getpwuid') || WINDOWS || strpos(ini_get('disable_functions'), 'posix_getpwuid') !== false) {
|
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 5:03 am Post subject: Re: Warning: posix_getpwuid() |
|
I'm not too sure, I'll email them now and find out
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 5:30 am Post subject: Re: Warning: posix_getpwuid() |
|
| NanoCaiordo wrote: |
Anyways hopefully you are not going to use Notepad or any Microsoft products to modify this file, use Notepad2, UltraEdit32, Notepad++ or anything else then open includes/cmsinit.inc and change line 31 with
| Code:: |
if (!function_exists('posix_getpwuid') || WINDOWS || strpos(ini_get('disable_functions'), 'posix_getpwuid') !== false) {
|
|
Oh okayz. Lol. Well I duno how I'll edit that then. >.<
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 5:40 am Post subject: Re: Warning: posix_getpwuid() |
|
Okay nvm. I edited the file using notepad 2. Found it ^.^ But if i go back to /install.php via web browser, I still can't access the install.
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Tue Aug 14, 2007 7:35 am Post subject: Re: Warning: posix_getpwuid() |
|
All right my fault sorry, the correct one should be:
| PHP: |
if (strpos(ini_get('disable_functions'), 'posix_getpwuid') !== false || !function_exists('posix_getpwuid') || WINDOWS) {
|
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 7:46 am Post subject: Re: Warning: posix_getpwuid() |
|
Okay I replaced 31 with:
if (strpos(ini_get('disable_functions'), 'posix_getpwuid') !== false || !function_exists('posix_getpwuid') || WINDOWS) {
But I still get
Warning: posix_getpwuid() has been disabled for security reasons in /home/pubsters/public_html/includes/cmsinit.inc on line 38
When I try to access install.php
But I can access the directories, like /install if that helps.
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Tue Aug 14, 2007 8:30 am Post subject: Re: Warning: posix_getpwuid() |
|
Silly me, if a function is disabled then the function_exists return false, so even the original script will work.
Somehow they are disabling this and probably other functions from somewhere that its not php.ini.
if on top of the cmsinit.inc you put the below piece of code and then go to install.php do you see anything else?
| PHP: |
echo ini_get('disable_functions');
|
after you do this you can safely restore an original cmsinit.inc
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 8:38 am Post subject: Re: Warning: posix_getpwuid() |
|
I'm assuming when you said to put the code on top of the cmsinit.inc code to put that code umm...:
<?php
/*********************************************
CPG Dragonfly™ CMS
********************************************
Copyright © 2004 - 2005 by CPG-Nuke Dev Team
dragonflycms.org
Dragonfly is released under the terms and conditions
of the GNU GPL version 2 or any later version
$Source: /cvs/html/includes/cmsinit.inc,v $
$Revision: 9.117 $
$Author: djmaze $
$Date: 2007/03/17 16:06:16 $
**********************************************/
echo ini_get('disable_functions');
# Disable DOS Attacks and any other strange behavior
.
.
.
Like that, where I made it bold, then I still see the msg, just now it's on line 39. But I'm assuming I put it in wrong >.<!
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
jiaoxiao Newbie


Offline Joined: Aug 05, 2007 Posts: 20
|
Posted: Tue Aug 14, 2007 8:39 am Post subject: Re: Warning: posix_getpwuid() |
|
Oh yeah and if I just put it in front of <?php then I just get:
echo ini_get('disable_functions');
Warning: posix_getpwuid() has been disabled for security reasons in /home/pubsters/public_html/includes/cmsinit.inc on line 39
But yeah I'm assuming I'm doing it wrong as i said >.<!!!
jiaoxiao's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL
|
|
| Back to top |
|
 |
|
|