Changeset 451

Show
Ignore:
Timestamp:
06/01/07 18:31:19 (2 years ago)
Author:
laurentj
Message:

ticket #194: basePath parameter is now guessed by Jelix. usefull only for tutorials or simple application. It should be set by hand for complex application, which use multiple entry points in different directories

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/demoxul/var/config/defaultconfig.ini.php.dist

    r424 r451  
    4949 
    5050[urlengine] 
    51 ; nom du moteur d'url :  simple ou significant 
     51; name of url engine :  "simple" or "significant" 
    5252engine        = simple 
    5353 
    54 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     54; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     55; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     56; you use the significant engine. If you use the simple url engine, you can set to off. 
    5557enableParser = on 
    5658 
    5759multiview = off 
    5860 
    59 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    60 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    61 basePath = "/" 
     61; basePath corresponds to the path to the base directory of your application. 
     62; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     63; set basePath = "/aaa/bbb/www/".  
     64; if it is http://foo.com/index.php, set basePath="/" 
     65; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     66; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     67; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     68; : basePath="/aaa/" ) 
     69basePath = "" 
     70 
    6271 
    6372defaultEntrypoint= index 
  • trunk/demoxul/var/config/defaultconfig.ini.php.dist

    r424 r451  
    4949 
    5050[urlengine] 
    51 ; nom du moteur d'url :  simple ou significant 
     51; name of url engine :  "simple" or "significant" 
    5252engine        = simple 
    5353 
    54 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     54; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     55; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     56; you use the significant engine. If you use the simple url engine, you can set to off. 
    5557enableParser = on 
    5658 
    5759multiview = off 
    5860 
    59 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    60 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    61 basePath = "/" 
     61; basePath corresponds to the path to the base directory of your application. 
     62; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     63; set basePath = "/aaa/bbb/www/".  
     64; if it is http://foo.com/index.php, set basePath="/" 
     65; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     66; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     67; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     68; : basePath="/aaa/" ) 
     69basePath = "" 
     70 
    6271 
    6372defaultEntrypoint= index 
  • trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

    r428 r451  
    5252 
    5353[urlengine] 
    54 ; nom du moteur d'url :  simple ou significant 
     54; name of url engine :  "simple" or "significant" 
    5555engine        = simple 
    5656 
    57 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     57; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     58; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     59; you use the significant engine. If you use the simple url engine, you can set to off. 
    5860enableParser = on 
    5961 
    6062multiview = off 
    6163 
    62 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    63 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    64 basePath = "/{$appname}/www" 
     64; basePath corresponds to the path to the base directory of your application. 
     65; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     66; set basePath = "/aaa/bbb/www/".  
     67; if it is http://foo.com/index.php, set basePath="/" 
     68; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     69; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     70; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     71; : basePath="/aaa/" ) 
     72basePath = "" 
     73 
    6574 
    6675defaultEntrypoint= index 
  • trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

    r428 r451  
    5252 
    5353[urlengine] 
    54 ; nom du moteur d'url :  simple ou significant 
     54; name of url engine :  "simple" or "significant" 
    5555engine        = simple 
    5656 
    57 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     57; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     58; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     59; you use the significant engine. If you use the simple url engine, you can set to off. 
    5860enableParser = on 
    5961 
    6062multiview = off 
    6163 
    62 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    63 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    64 basePath = "/{$appname}/www" 
     64; basePath corresponds to the path to the base directory of your application. 
     65; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     66; set basePath = "/aaa/bbb/www/".  
     67; if it is http://foo.com/index.php, set basePath="/" 
     68; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     69; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     70; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     71; : basePath="/aaa/" ) 
     72basePath = "" 
     73 
    6574 
    6675defaultEntrypoint= index 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r411 r451  
    9090 
    9191[urlengine] 
    92 ; nom du moteur d'url :  simple ou significant 
     92; name of url engine :  "simple" or "significant" 
    9393engine        = simple 
    9494 
    95 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     95; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     96; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     97; you use the significant engine. If you use the simple url engine, you can set to off. 
    9698enableParser = on 
    9799 
    98100multiview = off 
    99101 
    100 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    101 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    102 basePath = "/" 
     102; basePath corresponds to the path to the base directory of your application. 
     103; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     104; set basePath = "/aaa/bbb/www/".  
     105; if it is http://foo.com/index.php, set basePath="/" 
     106; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     107; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     108; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     109; : basePath="/aaa/" ) 
     110basePath = "" 
    103111 
    104112defaultEntrypoint= index 
     
    108116notfoundAct = "jelix~error_notfound" 
    109117 
    110 ;indique si vous utilisez IIS comme serveur 
     118;if you use IIS as a serveur set it to on 
    111119useIIS = off 
    112120 
    113 ;indique le paramètre dans $_GET où est indiqué le path_info 
     121;if you use IIS, indicate the parameter which contains the path_info 
    114122IISPathKey = __JELIX_URL__ 
    115123 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r411 r451  
    9090 
    9191[urlengine] 
    92 ; nom du moteur d'url :  simple ou significant 
     92; name of url engine :  "simple" or "significant" 
    9393engine        = simple 
    9494 
    95 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     95; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     96; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     97; you use the significant engine. If you use the simple url engine, you can set to off. 
    9698enableParser = on 
    9799 
    98100multiview = off 
    99101 
    100 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    101 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    102 basePath = "/" 
     102; basePath corresponds to the path to the base directory of your application. 
     103; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     104; set basePath = "/aaa/bbb/www/".  
     105; if it is http://foo.com/index.php, set basePath="/" 
     106; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     107; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     108; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     109; : basePath="/aaa/" ) 
     110basePath = "" 
    103111 
    104112defaultEntrypoint= index 
     
    108116notfoundAct = "jelix~error_notfound" 
    109117 
    110 ;indique si vous utilisez IIS comme serveur 
     118;if you use IIS as a serveur set it to on 
    111119useIIS = off 
    112120 
    113 ;indique le paramètre dans $_GET où est indiqué le path_info 
     121;if you use IIS, indicate the parameter which contains the path_info 
    114122IISPathKey = __JELIX_URL__ 
    115123 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r444 r451  
    5757        } 
    5858        $path=$config->urlengine['basePath']; 
    59         if($path!='/'){ 
     59        if($path!='/' && $path!=''){ 
    6060            if($path{0} != '/') $path='/'.$path; 
    6161            if(substr($path,-1) != '/') $path.='/'; 
     
    103103        } 
    104104        $path=$config['urlengine']['basePath']; 
    105         if($path!='/'){ 
     105        if($path!='/' && $path!=''){ 
    106106            if($path{0} != '/') $path='/'.$path; 
    107107            if(substr($path,-1) != '/') $path.='/'; 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r444 r451  
    5757        } 
    5858        $path=$config->urlengine['basePath']; 
    59         if($path!='/'){ 
     59        if($path!='/' && $path!=''){ 
    6060            if($path{0} != '/') $path='/'.$path; 
    6161            if(substr($path,-1) != '/') $path.='/'; 
     
    103103        } 
    104104        $path=$config['urlengine']['basePath']; 
    105         if($path!='/'){ 
     105        if($path!='/' && $path!=''){ 
    106106            if($path{0} != '/') $path='/'.$path; 
    107107            if(substr($path,-1) != '/') $path.='/'; 
  • trunk/lib/jelix/core/jRequest.class.php

    r426 r451  
    8585        $lastslash = strrpos ($_SERVER['SCRIPT_NAME'], '/'); 
    8686        $this->url_script_path = substr ($_SERVER['SCRIPT_NAME'], 0,$lastslash ).'/';//following is subdir/ 
    87         if(strpos($this->url_script_path,$gJConfig->urlengine['basePath']) !== 0){ 
    88             die('Jelix Error: basePath in config file doesn\'t correspond to current base path'); 
     87        if($gJConfig->urlengine['basePath'] == ''){ // for beginners or simple site, we "guess" the base path 
     88            $gJConfig->urlengine['basePath'] = $this->url_script_path; 
     89        }else if(strpos($this->url_script_path,$gJConfig->urlengine['basePath']) !== 0){ 
     90            die('Jelix Error: basePath in config file doesn\'t correspond to current base path. You should setup it to '.$this->url_script_path); 
    8991        } 
    9092 
  • trunk/lib/jelix/core/jRequest.class.php

    r426 r451  
    8585        $lastslash = strrpos ($_SERVER['SCRIPT_NAME'], '/'); 
    8686        $this->url_script_path = substr ($_SERVER['SCRIPT_NAME'], 0,$lastslash ).'/';//following is subdir/ 
    87         if(strpos($this->url_script_path,$gJConfig->urlengine['basePath']) !== 0){ 
    88             die('Jelix Error: basePath in config file doesn\'t correspond to current base path'); 
     87        if($gJConfig->urlengine['basePath'] == ''){ // for beginners or simple site, we "guess" the base path 
     88            $gJConfig->urlengine['basePath'] = $this->url_script_path; 
     89        }else if(strpos($this->url_script_path,$gJConfig->urlengine['basePath']) !== 0){ 
     90            die('Jelix Error: basePath in config file doesn\'t correspond to current base path. You should setup it to '.$this->url_script_path); 
    8991        } 
    9092 
  • trunk/myapp/var/config/defaultconfig.ini.php.dist

    r428 r451  
    5252 
    5353[urlengine] 
    54 ; nom du moteur d'url :  simple ou significant 
     54; name of url engine :  "simple" or "significant" 
    5555engine        = simple 
    5656 
    57 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     57; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     58; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     59; you use the significant engine. If you use the simple url engine, you can set to off. 
    5860enableParser = on 
    5961 
    6062multiview = off 
    6163 
    62 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    63 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    64 basePath = "/myapp/www/" 
     64; basePath corresponds to the path to the base directory of your application. 
     65; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     66; set basePath = "/aaa/bbb/www/".  
     67; if it is http://foo.com/index.php, set basePath="/" 
     68; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     69; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     70; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     71; : basePath="/aaa/" ) 
     72basePath = "" 
     73 
    6574 
    6675defaultEntrypoint= index 
  • trunk/myapp/var/config/defaultconfig.ini.php.dist

    r428 r451  
    5252 
    5353[urlengine] 
    54 ; nom du moteur d'url :  simple ou significant 
     54; name of url engine :  "simple" or "significant" 
    5555engine        = simple 
    5656 
    57 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     57; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     58; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     59; you use the significant engine. If you use the simple url engine, you can set to off. 
    5860enableParser = on 
    5961 
    6062multiview = off 
    6163 
    62 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    63 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    64 basePath = "/myapp/www/" 
     64; basePath corresponds to the path to the base directory of your application. 
     65; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     66; set basePath = "/aaa/bbb/www/".  
     67; if it is http://foo.com/index.php, set basePath="/" 
     68; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     69; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     70; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     71; : basePath="/aaa/" ) 
     72basePath = "" 
     73 
    6574 
    6675defaultEntrypoint= index 
  • trunk/testapp/var/config/defaultconfig.ini.php.dist

    r428 r451  
    5151 
    5252[urlengine] 
    53 ; nom du moteur d'url :  simple ou significant 
     53; name of url engine :  "simple" or "significant" 
    5454engine        = simple 
    5555 
    56 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     56; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     57; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     58; you use the significant engine. If you use the simple url engine, you can set to off. 
    5759enableParser = on 
    5860 
    5961multiview = off 
    6062 
    61 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    62 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    63 basePath = "/testapp/www/" 
     63; basePath corresponds to the path to the base directory of your application. 
     64; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     65; set basePath = "/aaa/bbb/www/".  
     66; if it is http://foo.com/index.php, set basePath="/" 
     67; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     68; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     69; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     70; : basePath="/aaa/" ) 
     71basePath = "" 
     72 
    6473 
    6574defaultEntrypoint= index 
  • trunk/testapp/var/config/defaultconfig.ini.php.dist

    r428 r451  
    5151 
    5252[urlengine] 
    53 ; nom du moteur d'url :  simple ou significant 
     53; name of url engine :  "simple" or "significant" 
    5454engine        = simple 
    5555 
    56 ; active l'analyse d'url (mettre à off si vous utilisez le mod_rewrite d'apache) 
     56; enable the parsing of the url. Set it to off if the url is already parsed by another program 
     57; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
     58; you use the significant engine. If you use the simple url engine, you can set to off. 
    5759enableParser = on 
    5860 
    5961multiview = off 
    6062 
    61 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour accéder à index.php etc.) 
    62 ; peut être égale à "/" si vous spécifiez www comme étant le documentRoot de votre site au niveau du serveur 
    63 basePath = "/testapp/www/" 
     63; basePath corresponds to the path to the base directory of your application. 
     64; so if the url to access to your application is http://foo.com/aaa/bbb/www/index.php, you should 
     65; set basePath = "/aaa/bbb/www/".  
     66; if it is http://foo.com/index.php, set basePath="/" 
     67; Jelix can guess the basePath, so you can keep basePath empty. But in the case where there are some 
     68; entry points which are not in the same directory (ex: you have two entry point : http://foo.com/aaa/index.php  
     69; and http://foo.com/aaa/bbb/other.php ), you MUST set the basePath (ex here, the higher entry point is index.php so 
     70; : basePath="/aaa/" ) 
     71basePath = "" 
     72 
    6473 
    6574defaultEntrypoint= index 
Download in other formats: Unified Diff Zip Archive