There are many topic about this here, but none of them resolved and as some of regulars here made Osclass or helped making it, there is no better place to ask and solve this once and for all.
It's about having multiple subdomains using same database. I've managed to edit everything by following
this topic, so images are taken from main domain's folder. But the problem remains when an user wants to post a new ad on subdomain, where I can't redirect images to be uploaded to main domain's upload folder.
After going through every osclass file I've come up to this:
Everywhere where uploads are mentioned, they are called with
function osc_uploads_path(),
which is defined in hDefines.php to call:
function osc_uploads_path() {
return(UPLOADS_PATH);
}
while UPLOADS_PATH is defined in default-constants.php:
if( !defined('UPLOADS_PATH') ) {
define('UPLOADS_PATH', CONTENT_PATH . 'uploads/');
}
UPLOADS_PATH uses CONTENT_PATH, which is:
if( !defined('CONTENT_PATH') ) {
define('CONTENT_PATH', ABS_PATH . 'oc-content/');
}
What I've tried:
- Editing uploads-path by removing CONTENT_PATH part and extending 'uploads/' to 'maindomain.com/oc-content/uploads/'
- Editing uploads-path by removing CONTENT_PATH part and extending 'uploads/' to 'httpdocs/domainfolder/oc-content/uploads/'
- Editing CONTENT_PATH by removing ABS_PATH and externding oc-content the same as for uploads above, while keeping UPLOADS_PATH intact.
But none of this worked. I still can't attach images while placing an ad on subdomain. Main domain upload folder has permission 777.
I would really appreciate all the help, as this problem is making me nervous for about a month now.