Elxis CMS Forum

Support => General => Topic started by: yiannisK on July 22, 2008, 21:47:17

Title: PHP Warnings when setting ftp ON [SOLVED]
Post by: yiannisK on July 22, 2008, 21:47:17
Hi,

i am working on www.bodet.gr (http://www.bodet.gr) and i have the same php warning message described here https://forum.elxis.org/index.php?topic=2149.0 (https://forum.elxis.org/index.php?topic=2149.0), few months ago.

PHP Warning (1)
Code: [Select]
PHP: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/bodet.gr/httpdocs:/tmp)
uri: index2.php?option=com_config&hidemainmenu=1
path: /administrator/components/com_config/admin.config.php
version: Elxis 2008.0 Stable rev1891 [ Olympus ] 10-February-2008 00:39 GMT+2
WARNING(2): /var/www/vhosts/bodet.gr/httpdocs/includes/KFTP/KFTP.php, line 156

and

PHP Warning (2)
Code: [Select]
PHP: unlink() [function.unlink]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/bodet.gr/httpdocs:/tmp)
uri: index2.php?option=com_config&hidemainmenu=1
path: /administrator/components/com_config/admin.config.php
version: Elxis 2008.0 Stable rev1891 [ Olympus ] 10-February-2008 00:39 GMT+2
WARNING(2): /var/www/vhosts/bodet.gr/httpdocs/includes/KFTP/KFTP.php, line 157

When i disable the FTP function there are no warnings but in my case i can't disable this function  :-\

Here some details

PHP Version: 5.2.6 (apache2handler)
Database Version: mysql 5.0.58 (Version: 5.0.58)
Title: Re: PHP Warnings when setting ftp ON
Post by: datahell on July 22, 2008, 23:00:42
Try the following:

open /includes/KFTP/KFTP_config.php
go to line 21 and change this:
$GLOBALS['KFTP_Conf']['Tmp_Dir']='';

to point to a temporary directory in your system owned by you (the local ftp user).

For example:
$GLOBALS['KFTP_Conf']['Tmp_Dir']='/home/myusername/mytemporarydir';
Title: Re: PHP Warnings when setting ftp ON
Post by: yiannisK on July 22, 2008, 23:56:22
Thanks Yiannis,

solved!