Subject:*
Name/Email:*
Message Icon:*
Message:*
url email imgsrc image php hide code quote
English Nederlands 
SAMPLE
alignleft aligncenter alignright bold italic underline linethrough   


 [more...]
Options:*
 

 

 
   
Re: Impresscms Trust_Path Permissions? chmod owner & group...

by avtx30 on 2008/3/7 9:02:34

Ok I see it now. We know what we are doing - that's important. Thanks
Re: Impresscms Trust_Path Permissions? chmod owner & group...

by Will on 2008/3/7 4:21:35

require '../../mainfile.php' is not dynamic. This string forces the script to look in the document root.

it would need to match your location.

in the case that you position your mainfile.php in your subroot

require '../mainfile.php'

in the case that your mainfile is in your trust_path

require XOOPS_TRUST_PATH '/mainfile.php'

etc., etc.

I am sure that GiJoe would encourage moving tha mainfile into the XOOPS_TRUST_PATH.
Re: Impresscms Trust_Path Permissions? chmod owner & group...

by avtx30 on 2008/3/7 3:27:01

oops, this does not work for one php script of D3 modules': the "module_icon.php" under XOOPS_ROOT_PATH/modules/<d3_instance_name>/ . As of it, D3 instance images (module_icon.png) will not show up.

Note: module_icon.png is dynamically created by module_icon.php (using gd). The module_icon.php reads
<?php $xoopsOption['nocommon'] = true ; require '../../mainfile.php' ; if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ; $mydirname = basename( dirname( __FILE__ ) ) ; $mydirpath = dirname( __FILE__ ) ; require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/module_icon.php' ; ?>

Re: Impresscms Trust_Path Permissions? chmod owner & group...

by avtx30 on 2008/3/6 3:24:06

Very clear now. Thanks
Re: Impresscms Trust_Path Permissions? chmod owner & group...

by davidl2 on 2008/3/6 0:55:09

If there's a certain type of server problem - which disables php running as code - then the variables of mainfile.php can be visible.

This way - the values are not as easily available in the event of this problem happening.