pronto icon indicating copy to clipboard operation
pronto copied to clipboard

[Win] template file is being wrong recognized if DIR_FS_BASE contains disk letter

Open tomilee opened this issue 14 years ago • 1 comments

/app/config/config.php

instead of: 60. define('DIR_FS_BASE', '/srv/http/pronto'); try: 60. define('DISK_FS_BASE', 'c:' // only for windows); 61. define('DIR_FS_BASE', DISK_FS_BASE.DS.'path/to/pronto');

/pronto/core/template.php

instead of: 137. if(substr($filename, 0, 1) == DS) {;

try: 137. if(substr($filename, strlen(DISK_FS_BASE), 1) == DS) {;

tomilee avatar Apr 28 '11 09:04 tomilee

I also ran into this issue when moving a Pronto project to a GoDaddy IIS7 account. My quick fix was to change line 137 in file /pronto/core/template/php to read as follows:

  1.    if(substr($filename, 0, 1) == DS <strong>|| substr($filename,1,1) == ':' </strong>) {
    

Looking at the second character for the colon allows the code to recognize the Windows drive designator -- e.g. C: -- in the path as a "root" path. This worked fine for the particular instance, although I wonder if it may be too broad for including as a general fix in Pronto?

spectrum-nashville avatar Apr 16 '12 18:04 spectrum-nashville