power-media / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

TApplication warning with is_file php function #396

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If I use custom config file in new TApplication('path/myconfig.xml'),

the function resolvePaths($basePath) launch a warning because is_file function 
do it when try:

if (is_file(path/myconfig.xml/application.xml))

[Warning] is_file() [<a href='function.is-file'>function.is-file</a>]: 
open_basedir restriction in effect. 
File(/.../protected/myconfig.xml/application.xml) is not within the allowed 
path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) (@line 352 in file 
/.../framework/TApplication.php).

Posible solution:
@is_file in lines 352 and 354

Revision: 3126

Original issue reported on code.google.com by mario...@hotmail.com on 12 Apr 2012 at 4:33

GoogleCodeExporter commented 8 years ago
fixed in r396 ; the issue here is that is_file prints a warning for 
not-existing files when open_basedir is enabled.

Original comment by ctrlal...@gmail.com on 14 Apr 2012 at 2:56

GoogleCodeExporter commented 8 years ago
hi this fixed was reverted in r3151. 

I configure the open_base dir options, but the warning continue when the folder 
is not exists.

I try this line and work fine to me:

line 352: if(is_dir($basePath) && 
is_file($basePath.DIRECTORY_SEPARATOR.$this->getConfigurationFileName()))

Original comment by mario...@hotmail.com on 2 Jul 2012 at 11:36