Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4615 | major | always | 06-14-11 03:15 | 06-14-11 03:15 | |
|
|||||
Reporter: | mjguisado | Platform: | |||
Assigned To: | OS: | ||||
Priority: | normal | OS Version: | |||
Status: | new | Product Version: | 4.0.14 | ||
Product Build: | Resolution: | open | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
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. Example: <web-app id="/quercus" root-directory="/srv/backoffice/webapps/quercus" temp-dir="/tmp/resin/tmp/${resin.hostName}/quercus"> <work-dir>/tmp/resin/workdir/${resin.hostName}/quercus</work-dir> <prologue> <class-loader> <compiling-loader path="/srv/backoffice/conf/quercus"/> </class-loader> <path-mapping url-pattern="/ServiciosBackoffice/*" real-path="/srv/www/php/ServiciosBackoffice"/> </prologue> </web-app> With this configuration the Env.getRealPath() for the path "/ServiciosBackoffice/app/bootstrap.php" returns "/srv/backoffice/webapps/quercussrv/www/php/ServiciosBackoffice" |
||||
Steps To Reproduce: | |||||
Additional Information: |
We have resin 4.0.18 Profesional with compile option enable (lazy). With the compile mode disable it works fine. |
||||
Relationships | |||||
Attached Files: |
There are no notes attached to this issue. |