Advertisement:

Author Topic: Several installations sharing same database and images folder [Solved]  (Read 10125 times)

okaka14

  • Newbie
  • *
  • Posts: 2
Re: Upload path
« Reply #60 on: April 26, 2018, 09:26:45 am »
Whoa teseo, amazing work! Thank you so much! Where do you accept donations? :) 8) 8)

Although I haven't manage to confirm it's working for me, I edited functions as told and now I finally have something in my error log: "PHP Warning:  mkdir(): open_basedir restriction in effect."  ..so basically it was always permission problem and I should edit that, but since my host does not allow config, I'll have to wait until monday to let them make changes.

But I'm sure this will finally solve my problems ;)
hi,
i have the same problem like you "PHP Warning:  mkdir(): open_basedir restriction in effect."
so how to fix this problem ?
Tq

Aficionado

  • Guest
Re: Upload path
« Reply #61 on: April 26, 2018, 10:42:09 am »

hi,
i have the same problem like you "PHP Warning:  mkdir(): open_basedir restriction in effect."
so how to fix this problem ?
Tq

Ask your hosting provider to remove that restriction and fix it.

okaka14

  • Newbie
  • *
  • Posts: 2
Re: Upload path
« Reply #62 on: April 26, 2018, 11:06:44 am »

hi,
i have the same problem like you "PHP Warning:  mkdir(): open_basedir restriction in effect."
so how to fix this problem ?
Tq

Ask your hosting provider to remove that restriction and fix it.

i use vps, and vestaCp as control panel .
so what should i do to remove that restriction and fix it.
Tq  :D
« Last Edit: April 26, 2018, 11:17:20 am by okaka14 »

Aficionado

  • Guest
Re: Upload path
« Reply #63 on: April 26, 2018, 11:31:21 am »

hi,
i have the same problem like you "PHP Warning:  mkdir(): open_basedir restriction in effect."
so how to fix this problem ?
Tq

Ask your hosting provider to remove that restriction and fix it.

i use vps, and vestaCp as control panel .
so what should i do to remove that restriction and fix it.
Tq  :D

I'm sorry this is beyond the scope of this forum and Osclass support. You better ask your support guy at your hosting company.

Also this is a RESOLVED topic, don't hijack it. Open a new topic if you want.

« Last Edit: April 26, 2018, 11:32:55 am by Aficionado »

NewbiE25

  • Newbie
  • *
  • Posts: 16
Re: Upload path
« Reply #64 on: May 01, 2018, 11:11:10 pm »
***CORRECTED***
This should work provided all your Osclass installation are in the same server.
Hello!
Thank you, everything works, but there was a problem: in the admin panel -> ads -> view media files, all the photos became bad. Links to photos have become: mydomain.com/ad_number_thumbnail.jpg (disappeared oc-content/uploads/ etc.) Tell me please how to repair it?
« Last Edit: May 01, 2018, 11:22:20 pm by NewbiE25 »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Hi,

That can be fixed modifying this function:

Replace:

Code: [Select]
function cust_change_resource_path($url) {

    $mainUrl = 'http://mydomain.com/'; // Change to your main domain URL
    return $mainUrl.osc_resource_field("s_path");
}

With:

Code: [Select]
function cust_change_resource_path($url) {

    $mainUrl = 'http://mydomain.com/'; // Change to your main domain URL
    return str_replace(osc_base_url(), $mainUrl, $url);
}

(Remember to change $mainUrl value).

Regards

NewbiE25

  • Newbie
  • *
  • Posts: 16
Hi,

That can be fixed modifying this function:

Replace:

Code: [Select]
function cust_change_resource_path($url) {

    $mainUrl = 'http://mydomain.com/'; // Change to your main domain URL
    return $mainUrl.osc_resource_field("s_path");
}

With:

Code: [Select]
function cust_change_resource_path($url) {

    $mainUrl = 'http://mydomain.com/'; // Change to your main domain URL
    return str_replace(osc_base_url(), $mainUrl, $url);
}

(Remember to change $mainUrl value).

Regards
Thank you, everything works!