Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:04 pm EST
Geeklog Forums
Error in page dokuwiki with image
Status: offline
manowar
Forum User
Regular Poster
Registered: 11/07/07
Posts: 81
Location:Santiago - Chile
if I insert an image into a page of dokuwiki and save the image is perfect like the rest of the content, but when I click on the image gives this error
An error has ocurred
(This text is only displayed t ousers in the group 'Root'
2 – require once(/path/geeklog/public_html/dokuwiki/lib/exe/../../inc/lang/lang.php) unction.require-once]: fialed to open stream:No existe el fichero o el directorio @
/path/geeklog/ public_html/dokuwiki/lib/exe/detail-php line 7
Saludos desde Chile
An error has ocurred
(This text is only displayed t ousers in the group 'Root'
2 – require once(/path/geeklog/public_html/dokuwiki/lib/exe/../../inc/lang/lang.php) unction.require-once]: fialed to open stream:No existe el fichero o el directorio @
/path/geeklog/ public_html/dokuwiki/lib/exe/detail-php line 7
Saludos desde Chile
3
4
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hello
It's a bug require_once '../../../lib-common.php'; is missing in detail.php and in mediamanager.php.
Please replace the 2 following files in public_html/wiki/lib/exec
detail.php
<?php
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
define('DOKU_MEDIADETAIL',1);
require_once '../../../lib-common.php';
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/lang/en/lang.php');
require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php');
require_once(DOKU_INC.'inc/JpegMeta.php');
require_once(DOKU_INC.'inc/html.php');
require_once(DOKU_INC.'inc/template.php');
require_once(DOKU_INC.'inc/auth.php');
//close session
session_write_close();
$IMG = getID('media');
$ID = cleanID($_REQUEST['id']);
if($conf['allowdebug'] && $_REQUEST['debug']){
print '<pre>';
foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
print '$'."conf['$x'] = '".$conf[$x]."';\n";
}
foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '.
'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){
print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n";
}
print "getID('media'): ".getID('media')."\n";
print "getID('media',false): ".getID('media',false)."\n";
print '</pre>';
}
$ERROR = false;
// check image permissions
$AUTH = auth_quickaclcheck($IMG);
if($AUTH >= AUTH_READ){
// check if image exists
$SRC = mediaFN($IMG);
if(!@file_exists($SRC)){
//doesn't exist!
}
}else{
// no auth
$ERROR = p_locale_xhtml('denied');
}
/*if(!$ERROR){
// load EXIF/IPTC/image details
$INFO = array();
$INFO['std']['']
imagesize
}*/
//start output and load template
header('Content-Type: text/html; charset=utf-8');
include(template('detail.php'));
?>
mediamanager.php
<?php
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
define('DOKU_MEDIAMANAGER',1);
require_once '../../../lib-common.php';
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/lang/en/lang.php');
require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php');
require_once(DOKU_INC.'inc/media.php');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/search.php');
require_once(DOKU_INC.'inc/template.php');
require_once(DOKU_INC.'inc/auth.php');
session_write_close(); //close session
// handle passed message
if($_REQUEST['msg1']) msg(hsc($_REQUEST['msg1']),1);
// get namespace to display (either direct or from deletion order)
if($_REQUEST['delete']){
$DEL = cleanID($_REQUEST['delete']);
$IMG = $DEL;
$NS = getNS($DEL);
}elseif($_REQUEST['edit']){
$IMG = cleanID($_REQUEST['edit']);
$NS = getNS($IMG);
}elseif($_REQUEST['img']){
$IMG = cleanID($_REQUEST['img']);
$NS = getNS($IMG);
}else{
$NS = $_REQUEST['ns'];
$NS = cleanID($NS);
}
// check auth
$AUTH = auth_quickaclcheck("$NS:*");
// create the given namespace (just for beautification)
if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$NS:xxx", 'media'); }
// handle upload
if($_FILES['upload']['tmp_name']){
$JUMPTO = media_upload($NS,$AUTH);
if($JUMPTO) $NS = getNS($JUMPTO);
}
// handle meta saving
if($IMG && $_REQUEST['do']['save']){
$JUMPTO = media_metasave($IMG,$AUTH,$_REQUEST['meta']);
}
// handle deletion
if($DEL) {
$INUSE = media_delete($DEL,$AUTH);
}
// finished - start output
header('Content-Type: text/html; charset=utf-8');
include(template('mediamanager.php'));
Thanks,
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
It's a bug require_once '../../../lib-common.php'; is missing in detail.php and in mediamanager.php.
Please replace the 2 following files in public_html/wiki/lib/exec
detail.php
Text Formatted Code
<?php
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
define('DOKU_MEDIADETAIL',1);
require_once '../../../lib-common.php';
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/lang/en/lang.php');
require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php');
require_once(DOKU_INC.'inc/JpegMeta.php');
require_once(DOKU_INC.'inc/html.php');
require_once(DOKU_INC.'inc/template.php');
require_once(DOKU_INC.'inc/auth.php');
//close session
session_write_close();
$IMG = getID('media');
$ID = cleanID($_REQUEST['id']);
if($conf['allowdebug'] && $_REQUEST['debug']){
print '<pre>';
foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
print '$'."conf['$x'] = '".$conf[$x]."';\n";
}
foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '.
'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){
print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n";
}
print "getID('media'): ".getID('media')."\n";
print "getID('media',false): ".getID('media',false)."\n";
print '</pre>';
}
$ERROR = false;
// check image permissions
$AUTH = auth_quickaclcheck($IMG);
if($AUTH >= AUTH_READ){
// check if image exists
$SRC = mediaFN($IMG);
if(!@file_exists($SRC)){
//doesn't exist!
}
}else{
// no auth
$ERROR = p_locale_xhtml('denied');
}
/*if(!$ERROR){
// load EXIF/IPTC/image details
$INFO = array();
$INFO['std']['']
imagesize
}*/
//start output and load template
header('Content-Type: text/html; charset=utf-8');
include(template('detail.php'));
?>
mediamanager.php
Text Formatted Code
<?php
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
define('DOKU_MEDIAMANAGER',1);
require_once '../../../lib-common.php';
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/lang/en/lang.php');
require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php');
require_once(DOKU_INC.'inc/media.php');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/search.php');
require_once(DOKU_INC.'inc/template.php');
require_once(DOKU_INC.'inc/auth.php');
session_write_close(); //close session
// handle passed message
if($_REQUEST['msg1']) msg(hsc($_REQUEST['msg1']),1);
// get namespace to display (either direct or from deletion order)
if($_REQUEST['delete']){
$DEL = cleanID($_REQUEST['delete']);
$IMG = $DEL;
$NS = getNS($DEL);
}elseif($_REQUEST['edit']){
$IMG = cleanID($_REQUEST['edit']);
$NS = getNS($IMG);
}elseif($_REQUEST['img']){
$IMG = cleanID($_REQUEST['img']);
$NS = getNS($IMG);
}else{
$NS = $_REQUEST['ns'];
$NS = cleanID($NS);
}
// check auth
$AUTH = auth_quickaclcheck("$NS:*");
// create the given namespace (just for beautification)
if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$NS:xxx", 'media'); }
// handle upload
if($_FILES['upload']['tmp_name']){
$JUMPTO = media_upload($NS,$AUTH);
if($JUMPTO) $NS = getNS($JUMPTO);
}
// handle meta saving
if($IMG && $_REQUEST['do']['save']){
$JUMPTO = media_metasave($IMG,$AUTH,$_REQUEST['meta']);
}
// handle deletion
if($DEL) {
$INUSE = media_delete($DEL,$AUTH);
}
// finished - start output
header('Content-Type: text/html; charset=utf-8');
include(template('mediamanager.php'));
Thanks,
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
5
5
Quote
All times are EST. The time is now 01:04 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content