login
• January 16, 2018, 08:46:55 am
• Welcome, Guest. Please login or register.
 
News: Posting problems?
If for some reasons you can not create your own topics, please see the problem thread in the "Site news & updates" board.

Author Topic: "open_basedir restriction in effect" when installing eFiction5  (Read 617 times)

holls

  • Member
  • **
  • Posts: 15
  • Country: it
"open_basedir restriction in effect" when installing eFiction5
« on: January 25, 2017, 08:47:53 pm »
Hello,
last week I tried to install eFiction5, but I encountered some errors. First of all, I have to say that my site is hosted in some sort of "limited" host site (Altervista), so I don't have full access on directories or on htaccess.
I download the installer project from GitHub and copied all files and folders on my site root folder, then I try to open "index.php", but I get a 500 error:

Code: [Select]
Internal Server Error

realpath(): open_basedir restriction in effect. File(/var/www/html) is not within the allowed path(s): (/membri/heartbreakerz/:/membri2/heartbreakerz/:/membri/.dummy/)

I supposed that the installer tries to write something on those folder, but I don't have write permission and so it raise an exception.
Am I doing something wrong? Are there any other steps I should do before opening "index.php" (if it is the correct step, of course)?

Thanks,
Simona

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 288
  • Country: de
  • Thanked: 50 times
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #1 on: January 25, 2017, 11:05:40 pm »
Now "open_basedir" is not really something limited, it's quite usual for webservers to restrict users to their path.

The fact that it tries to open /var/www/html which is a system-ish folder is weird and might indicate a bad configuration.

On second thought though, try opening the .htaccess file and un-comment the line
Code: [Select]
# RewriteBase / to look like
Code: [Select]
RewriteBase "/" or in case you are using a sub-directory use
Code: [Select]
RewriteBase "/sub". Since it works without on my server, it's hard to tell. Number 2 worked for me also, so this could be a thing.
If this is not helping, I need to check with the framework guys if this is a known issue with your host.

As stated by the framework guys, this is only required in some cases.
« Last Edit: January 25, 2017, 11:13:31 pm by Sheepcontrol »
I speak the worlds most widely used language: bad english

holls

  • Member
  • **
  • Posts: 15
  • Country: it
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #2 on: January 26, 2017, 07:36:18 am »
Thank you very much for your reply, you are really kind! Unfortunately, un-commenting that line on htaccess didin't work.
As for now, my htaccess looks like this:

Code: [Select]
# Enable rewrite engine and route requests to framework
RewriteEngine On

# Some servers require you to specify the `RewriteBase` directive
# In such cases, it should be the path (relative to the document root)
# containing this .htaccess file
#
RewriteBase "/"

RewriteRule ^(tmp)\/|\.ini$ - [R=404]

RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

# # av:php5-engine
AddHandler av-php56 .php

On my root folder, I have the following folders: cfg, inc, lib, ui_en. I don't have any folder related to fresh install or upgrade install, is it normal?
Entering the cfg folder, I have a config.ini file that looks like this:

Code: [Select]
[globals]

DEBUG = 2
UI = ui_en/
CACHE = FALSE
STRICT = TRUE
AUTOLOAD = "./inc/"

[routes]

;Landing page
GET @upgrade: /upgrade = upgrade->base
GET /fresh = installer->base

;upgrade config
GET @config: /upgrade/config = upgrade->config
POST /upgrade/config = upgrade->saveConfig

;fresh config
GET @freshconfig: /fresh/config = installer->config
POST /fresh/config = installer->saveConfig

;chapter storage
GET /upgrade/chapters/@where = upgrade->storage
GET /fresh/chapters/@where = installer->storage

;actual upgrade steps
GET /upgrade/steps/@step = upgrade->steps
GET /upgrade/steps/@step/@sub = upgrade->steps

GET /fresh/steps/@step = installer->steps
GET /fresh/steps/@step/@sub = installer->steps

I think I edited the "strict" value, hoping to have more information about the error, but I can't remember. Is there anything on this configuration I need to edit?

Thanks again,
Simona

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 288
  • Country: de
  • Thanked: 50 times
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #3 on: January 26, 2017, 12:11:39 pm »
First of all, the installer itself will only attempt to copy the old data to the new format in a new database location.
The actual script has to be uploaded manually so far, since it's still stuck in development at this point. Once done, there will be one handsome package.

But it seems you are stuck way before that - and I can't figure out why.

The config.ini is only for the framework, there's nothing to be configured there.

I just saw that the lib files are not up to date on the installer, let me fix this, maybe this will help. Has to be done anyway, I'll post once it's done.
I speak the worlds most widely used language: bad english

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 288
  • Country: de
  • Thanked: 50 times
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #4 on: January 26, 2017, 05:51:31 pm »
Ok, github has a new installer with latest library, please check it out and tell me if that works for you.
I speak the worlds most widely used language: bad english

holls

  • Member
  • **
  • Posts: 15
  • Country: it
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #5 on: January 26, 2017, 09:16:00 pm »
Thank you very much for your reply! Updating the library didn't help, but I made a step forward.
At the beginning of lib/base.php, I added the following line:

Code: [Select]
$_SERVER['DOCUMENT_ROOT'] = '/membri/heartbreakerz/';
The previous error disappeared, but now I have this one:

Code: [Select]
Internal Server Error

Fatal error: Unknown: open_basedir restriction in effect. File(/.htaccess) is not within the allowed path(s): (/membri:/membri2)

Unfortunately, it seems somewhat related to the other one. My .htaccess is on the root folder (that should be "membri/heartbreakerz").

Any idea? :sad1:

Thanks,
Simona

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 288
  • Country: de
  • Thanked: 50 times
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #6 on: January 26, 2017, 10:05:42 pm »
Well you shouldn't need to edit the lib/ files, $_SERVER are populated by the server.

Could you create a file with this content
Code: [Select]
<?php phpinfo(); ?>, run it, save the content and send it to me?

Maybe this can shed some light on it.
I speak the worlds most widely used language: bad english

holls

  • Member
  • **
  • Posts: 15
  • Country: it
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #7 on: January 26, 2017, 10:19:11 pm »
Here you are: *removed from public eyes* (I feel dumb, but I didn't find the attachment button in the "Post reply" section...  :oops:).

Thanks again for your help!

Simona
« Last Edit: January 28, 2017, 10:29:26 am by Sheepcontrol »

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 288
  • Country: de
  • Thanked: 50 times
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #8 on: January 28, 2017, 10:43:22 am »
Well, there's two things:

Some of the parts that are supposed to be in the phpinfo() ( Core and _SERVER ) are missing, maybe by choice of the provider.
And if you search for "AlterVista open basedir" you will see, that a lot of people are having this problem with different software. Well they seem to have a support forum but it's italian, and "Mi dispiace, non parlo italiano." <- had to google that.

So maybe you can check there http://forum.it.altervista.org/php-mysql-e-apache-htaccess/ and tell me how others solved their problems, might work here, too.

Sorry for not being too much of a help, at least looking into the installer made me find an error that might have made a big mess and ended up in doing a huge change (as in improvement) to the SQL stuff involved  :cool2:

And on a side note: You can't attach stuff in PM here - my bad  :ohboy:
I speak the worlds most widely used language: bad english

holls

  • Member
  • **
  • Posts: 15
  • Country: it
Re: "open_basedir restriction in effect" when installing eFiction5
« Reply #9 on: January 28, 2017, 02:11:36 pm »
You are really kind, thanks for all your effort! I'll check the link you gave me, hoping to find a solution.
If I won't solve it, I'll think about migrating on other hosting site (I chose Altervista because it's free :down:).

I'm glad that, after all, the whole situation brought to you some positive side notes: a blessing in disguise  :biggrin:

I'll let you know if I manage to solve the situation  :happy:

Thanks,
Simona

 

anything