Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004615 [Quercus] major always 06-14-11 03:15 06-14-11 03:15
Reporter mjguisado View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 4.0.14
Summary 0004615: Method Env.getRealPath doesn't work with path-mapping (compile mode)
Description After use the path-mapping element in the context's declaration we have detected that the __FILE__ constant doesn't work fine.

The next line:

define('ROOT_DIR', (dirname(dirname(FILE))).'/');

is translated as:

env.addConstant(const_ROOT_DIR, quercus_module_2.dirname(env, _quercus_module_2.dirname(env, env.createString(env.getRealPath(getUserPathStatic())).toStringValue(env)).toStringValue(env)).toStringBuilder(env, qv_3), false);

After debug the application we have saw that the problem is generate in the line 1490 of the com.caucho.quercus.env.Env

realPath = getRequest().getRealPath(path);

The realPath is the context's root directory plus the absolute path to the script.


<web-app id="/quercus"
      <compiling-loader path="/srv/backoffice/conf/quercus"/>

With this configuration the Env.getRealPath() for the path "/ServiciosBackoffice/app/bootstrap.php" returns "/srv/backoffice/webapps/quercussrv/www/php/ServiciosBackoffice"
Additional Information We have resin 4.0.18 Profesional with compile option enable (lazy).
With the compile mode disable it works fine.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
06-14-11 03:15 mjguisado New Issue
06-14-11 03:16 mjguisado Issue Monitored: mjguisado

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker