Jump to content

Recommended Posts

Hi, I have problem with elfinder file manager. The problem comes when I upload script on the server, then the text file preview does not work all text files are empty, newly created or old, edited or not. When in fact they are not empty. Strange thing is that when I try to edit the text, there I can see  text but  not in preview.

On the local server all works normally. So please if someone is familiar with this problem let me know. Thanks.

I have posted the connector script in witch is the root to the file.

 

 

<?php

error_reporting(0); // Set E_ALL for debuging

if (function_exists('date_default_timezone_set')) {
date_default_timezone_set('ce');
}

include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinder.class.php';


$dbhost = '-----------';
$dbuser = '----------';
$dbpass = '-----------;

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

$dbname = '-----------';


mysql_select_db($dbname);


session_start();


		error_reporting(0);

		     $number_dos = $_SESSION['dosje'];
			 $q = "SELECT * FROM albums";
			 $results = mysql_query($q);
			 $data = mysql_fetch_array($results);
			 $diro = $data['dosjeid'];
               
                                 
                 	if($number_dos = $_SESSION['dosje']){
				$dir_name = "store";

				}







$opts = array(
'root'            => '../../'.$dir_name.'/'.$number_dos,// path to root directory
        'URL'             => 'http://www.next-it.co.cc/'.$dir_name.'/'.$number_dos.'/', // root directory URL
'rootAlias'       => 'Home',       // display this instead of root directory name
//'uploadAllow'   => array('images/*'),
//'uploadDeny'    => array('all'),
//'uploadOrder'   => 'deny,allow'
// 'disabled'     => array(),      // list of not allowed commands
// 'dotFiles'     => false,        // display dot files
// 'dirSize'      => true,         // count total directories sizes
// 'fileMode'     => 0666,         // new files mode
// 'dirMode'      => 0777,         // new folders mode
// 'mimeDetect'   => 'internal',       // files mimetypes detection method (finfo, mime_content_type, linux (file -ib), bsd (file -Ib), internal (by extensions))
// 'uploadAllow'  => array(),      // mimetypes which allowed to upload
// 'uploadDeny'   => array(),      // mimetypes which not allowed to upload
// 'uploadOrder'  => 'deny,allow', // order to proccess uploadAllow and uploadAllow options
// 'imgLib'       => 'mogrify',       // image manipulation library (imagick, mogrify, gd)
// 'tmbDir'       => '.tmb',       // directory name for image thumbnails. Set to "" to avoid thumbnails generation
// 'tmbCleanProb' => 1,            // how frequiently clean thumbnails dir (0 - never, 100 - every init request)
// 'tmbAtOnce'    => 5,            // number of thumbnails to generate per request
// 'tmbSize'      => 48,           // images thumbnails size (px)
// 'fileURL'      => true,         // display file URL in "get info"
// 'dateFormat'   => 'j M Y H:i',  // file modification date format
// 'logger'       => null,         // object logger
// 'defaults'     => array(        // default permisions
// 	'read'   => true,
// 	'write'  => true,
// 	'rm'     => true
// 	),
// 'perms'        => array(),      // individual folders/files permisions    
// 'debug'        => true,         // send debug to client
// 'archiveMimes' => array(),      // allowed archive's mimetypes to create. Leave empty for all available types.
// 'archivers'    => array()       // info about archivers to use. See example below. Leave empty for auto detect
// 'archivers' => array(
// 	'create' => array(
// 		'application/x-gzip' => array(
// 			'cmd' => 'tar',
// 			'argc' => '-czf',
// 			'ext'  => 'tar.gz'
// 			)
// 		),
// 	'extract' => array(
// 		'application/x-gzip' => array(
// 			'cmd'  => 'tar',
// 			'argc' => '-xzf',
// 			'ext'  => 'tar.gz'
// 			),
// 		'application/x-bzip2' => array(
// 			'cmd'  => 'tar',
// 			'argc' => '-xjf',
// 			'ext'  => 'tar.bz'
// 			)
// 		)
// 	)
);

$fm = new elFinder($opts); 
$fm->run();

?>

Link to comment
https://forums.phpfreaks.com/topic/257310-elfinder-text-preview-empty/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.