From:             dj_oldfield at yahoo dot com
Operating system: MANY
PHP version:      4.3.10
PHP Bug Type:     Filesystem function related
Bug description:  This is more of a request then a bug really

Description:
------------
I currently work with 4.3 because I have trouble getting phpMyAdmin to
work with 5.x.

In regular development environments ( and as a contract developer ) I
frequently work on code that is intended to run a development environment
and a live environment.  In doing so, many of the files that I use are
interacting with a different directory structure.  To fully take advantage
of the NIX based advantages... file based templates are a MUST...
especially with PHPs automatic formatting of strings ( WHICH IS REALLY
COOL FROM A PROGRAMMERS PERSPECTIVE! ).  

The problem is... that filesystem functions require full knowledge of the
working specifications of the filesystem... which for the moment... I am
actually making a script to auto-fix.  I think that it would be nice to
have new versions of require, include, and file_get_contents functions
which are configured directly to the root directory for the website...
E.G.

include_from_root
require_from_root
file_get_contents_from_root

where the root directory is scanned from it's contents.  I fear that
writting wrapper functions would be in poor convention and could create
erroneos results, so I wanted to take this idea to the source. 
Considering that many people are using PHP on a hosted source... it would
stand to reason that this functionality would make php code more
portable... and therefore enable easier handling of php scripts.

Finally... include_path would be different on a per-site basis.  Can you
make it so that php can watch for "WEBSITE ROOT DIRECTORIES" having their
own php.ini file?  This way... hosted solutions would be better able to
cater to a more open work environment.

Reproduce code:
---------------
// the desired code:
include_from_root( '_includes/some_file.php' );
require_from_root( '_includes/some_other_file.php' );
$file_text = file_get_contents_from_root( '_includes/source_file' );
//... code here
print( $file_text );

Expected result:
----------------
// in hopes to return data from:::
this text came from
/usr/websites/www.website.com/_htdocs/_includes/some_file.php
this text came from
/usr/websites/www.website.com/_htdocs/_includes/some_other_file.php
this text came from
/usr/websites/www.website.com/_htdocs/_includes/source_file.php

Actual result:
--------------
// NOT APPLICABLE

-- 
Edit bug report at http://bugs.php.net/?id=32611&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32611&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32611&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32611&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32611&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32611&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32611&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32611&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32611&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32611&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32611&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32611&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32611&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32611&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32611&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32611&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32611&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32611&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32611&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32611&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32611&r=mysqlcfg

Reply via email to