Elxis CMS Forum

Support => Installation => Topic started by: tallone on February 20, 2008, 22:35:56

Title: PHP warnings in Global Configuration and Language Manager
Post by: tallone on February 20, 2008, 22:35:56

Hi,
 after some time testing Elxis on localhost I decided to take it on-line.

I followed carefully the installation instructions.  (set dirs to 755, /tempr and /cashe to 777 and all files to 644).
I have installed Elxis in the root directory.
Everything went well during installation apart from the configuration.php which I had to edit manually as I was instructed by Elxis installation-wizard.

Problems:
1) When I click Administrator from the site's menu it doesn't take me to the Administrator's login page. (It might be due to permissions in the /administrator directory.
    I have to type in the url  http://www.mysite.gr/administrator/index.php
   Then I can login to the admin page with no problem's.  This is a minor issue but I'm stating it in case is related to a more serious problem.

2) With filezilla I change the configuration.php permissions to 777 and then I login to the admin page.
    I can see from the View System Information menu that Safe Mode is OFF (I checked this because from what I read in the forum quite a lot of problems
are related to Safe Mode running on the server). 
    When I try to go to Global Configuration I get the following warnings

Quote
PHP WARNING
PHP: main() [function.main]: open_basedir restriction in effect. File(/KFTP_Basic_Classic.php) is not within the allowed path(s): (/var/www/vhosts/mysite.gr/httpdocs:/tmp)
uri: index2.php?option=com_config&hidemainmenu=1
path: /administrator/components/com_config/admin.config.php
version: Elxis 2006.4 Stable rev1080 [ Nestor ] 04-December-2006 23:08 GMT+2
WARNING(2): /var/www/vhosts/mysite.gr/httpdocs/includes/KFTP/KFTP.php, line 181

and

Quote
PHP WARNING
PHP: main(KFTP_Basic_Classic.php) [function.main]: failed to open stream: Operation not permitted
uri: index2.php?option=com_config&hidemainmenu=1
path: /administrator/components/com_config/admin.config.php
version: Elxis 2006.4 Stable rev1080 [ Nestor ] 04-December-2006 23:08 GMT+2
WARNING(2): /var/www/vhosts/mysite.gr/httpdocs/includes/KFTP/KFTP.php, line 181

Also I get a similar warning when I try to edit a language from the Language Manager
Quote
PHP WARNING
PHP: main() [function.main]: open_basedir restriction in effect. File(/KFTP_Basic_Classic.php) is not within the allowed path(s): (/var/www/vhosts/mysite.gr/httpdocs:/tmp)
uri: index2.php
path: /administrator/components/com_languages/admin.languages.php
version: Elxis 2006.4 Stable rev1080 [ Nestor ] 04-December-2006 23:08 GMT+2
WARNING(2): /var/www/vhosts/mysite.gr/httpdocs/includes/KFTP/KFTP.php, line 181


PHP WARNING
PHP: main(KFTP_Basic_Classic.php) [function.main]: failed to open stream: Operation not permitted
uri: index2.php
path: /administrator/components/com_languages/admin.languages.php
version: Elxis 2006.4 Stable rev1080 [ Nestor ] 04-December-2006 23:08 GMT+2
WARNING(2): /var/www/vhosts/mysite.gr/httpdocs/includes/KFTP/KFTP.php, line 181

Everything else seems to work fine.
Does this have to do with setting the file permissions to 644? If I change them to 755, like the directories will this help or will this jeopardize security of the site?
Or is it something else?

Thanks
Title: Re: PHP warnings in Global Configuration and Language Manager
Post by: datahell on February 20, 2008, 23:02:06
Hi tallone!

1) Please check if there is an index.html page in administrator directory or index.php has not been set as an index file to your apache configuration. Check also if an .htaccess file causes this issue. If you had give as a URL would help us to see what is happening.

2) No file should ever have permissions more that 666!
Normally all files should have permissions 644 except those you want to be writable.

The errors shows that there is something bad on your ftp settings. Either are wrong or for some reason ftp is not working. Test it and if the problem persists disable FTP access over files.
Your FTP relative path should be: /httpdocs
Do you have it like this in your configuration.php file?

Site's absolute path should be: /var/www/vhosts/mysite.gr/httpdocs
Title: Re: PHP warnings in Global Configuration and Language Manager
Post by: tallone on February 21, 2008, 11:00:14
I'll check for the ftp settings but I'm pretty sure that they are the way you describe them. 

Something i forgot to mention is that I deleted a file called configuration.php-dist because I thought
it had to be removed prior to creating the configuration.php
Is this bad? Is configuration.php-dist necessary?

Thank you for the response

Title: Re: PHP warnings in Global Configuration and Language Manager
Post by: tallone on February 21, 2008, 11:57:48
Hi Datahell

1)
For the first problem there are 4 files inside the /administrator/
index.php
index2.php
index3.php
logout.php
and there is no .htaccess file there.

2) For the second problem I have checked the configuration.php and everything seems ok

Quote
$mosConfig_absolute_path = '/var/www/vhosts/mysite.gr/httpdocs';


$mosConfig_ftp = '1';
$mosConfig_ftp_host = 'ftp.mysite.gr';
$mosConfig_ftp_user = 'username';
$mosConfig_ftp_pass = 'password';
$mosConfig_ftp_port = '21';
$mosConfig_ftp_root = '/httpdocs';
$mosConfig_access = '1';

When you say test it you mean there is a way to perform a test in order to see if ftp is working?
It works fine when I access the site with the same settings using Filezilla. I don't know if this is relevant.

How do I disable FTP access over files? Will this restrict me for performing certain tasks?

Title: Re: PHP warnings in Global Configuration and Language Manager
Post by: tallone on February 21, 2008, 12:07:37
Well to easy to be true.

I try to disable FTP access over files as you instructed me.
I've changed

$mosConfig_ftp = '1';
  to
$mosConfig_ftp = '0';

Everything works fine now. Thank you.

What is the disadvantage though of having it dissabled?