-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path problem on shared server #10
Comments
Hi, Try this, in filemanager/connectors/php/default.config.php :
and in filemanager/scripts/filemanager.config.js :
Tell me if it works for you. |
Thanks for the response, I have changed with you said but still is not working. I have putted this code But on other hosting server for another site , is still working , but is not showing the picture in url : |
So that means that publicPath() doesn't work in this case of "public_html". |
In my case yes. |
$folderPath = 'youdomainname.com/filemanager/userfiles/'. config('filemanager.folder_path'); |
Ok, your file manager is great and is working fine on localhost , but on server I don't know what is the problem :(
My shared tree from the server in the image below
http://cleverideas.ro/serverarhitecture.jpg
I get this error The directory / does not exist.
The problem is in default.config.php
This line of code :
$folderPath = $app->basePath() . '/public/filemanager/userfiles/';
The code frome default.config.php
`<?php
/**
*/
// Laravel init
require getcwd() . '/../../../../laravel/bootstrap/autoload.php';
$app = require_once getcwd() . '/../../../../laravel/bootstrap/app.php';
$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$id = $app['encrypter']->decrypt($_COOKIE[$app['config']['session.cookie']]);
$app['session']->driver()->setId($id);
$app['session']->driver()->start();
// Folder path
$folderPath = $app->basePath() . '/public_html/filemanager/userfiles/';
// Check if user in authentified
if(!$app['auth']->check())
{
$laravelAuth = false;
}
else
{
// Check if user has all access
if($app['auth']->user()->accessMediasAll())
{
$laravelAuth = true;
}
elseif(method_exists($app['auth']->user(), 'accessMediasFolder'))
{
// Check if user has access to one folder
if($app['auth']->user()->accessMediasFolder())
{
// Folder name with user id
$folderPath .= 'user' . $app['auth']->id();
// Create folder if doesn't exist
if (!is_dir($folderPath))
{
mkdir($folderPath);
}
$laravelAuth = true;
}
else
{
$laravelAuth = false;
}
}
else
{
$laravelAuth = false;
}
}
/**
*/
function auth()
{
return $GLOBALS['laravelAuth'];
}
$fm = new Filemanager();
$fm->setFileRoot($folderPath);
?>`
The text was updated successfully, but these errors were encountered: