[ Index ]
 

Code source de PHPonTrax 2.6.6-svn

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/doc/tutorials/PHPonTrax/ -> troubleshoot.pkg (source)

   1  {@toc}
   2  <refsect1 id="{@id troubleshoot}">
   3   <title>Troubleshooting</title>
   4    <refsect2 id="{@id troubleshoot_noindex.html}">
   5     <title>Can't see index.html after installation</title>
   6     <orderedlist>
   7      <listitem>Verify that Apache is actually running.  On a Linux or
   8       Unix platform, Apache usually runs as
   9       <literal>httpd</literal>, so try:
  10       <example>
  11  $ <important>ps -ef|grep httpd</important>
  12       </example>
  13       The normal result is a list of several processes running
  14       <literal>httpd</literal>.  If Apache is not running, start it.
  15       The usual way to start Apache is to run, as superuser:
  16       <example>
  17  # <important>apachectl start</important>
  18       </example>
  19  </listitem>
  20  
  21      <listitem>Find the Apache configuration file that is actually
  22       being used by the running Apache.  The usual location is
  23       <literal>/etc/httpd/conf/httpd.conf</literal> but it may be
  24       elsewhere. Don't ignore the possibility that there is more than
  25       one <literal>httpd.conf</literal> on the system, in which case
  26       you need to figure out which is in use.  Examine the value
  27       assigned to <literal>DocumentRoot</literal> in the configuration
  28       and verify that it is what you expected.</listitem>
  29  
  30      <listitem>Examine the Apache log files for clues.  The location of
  31       the error log file is determined by the value assigned to
  32       <literal>ErrorLog</literal> in
  33       <literal>httpd.conf</literal>.</listitem> 
  34  
  35      <listitem>Is Apache able to access
  36       <literal>index.html</literal>?  Check the Unix permissions on that
  37       file and all the directories that contain it.  The permissions
  38       must permit Apache to read all containing directories and
  39       the file.</listitem>  
  40     </orderedlist>
  41    </refsect2>
  42    <refsect2 id="{@id troubleshoot_}">
  43     <title>Don't see 'Controller not found' after deleting index.html</title>
  44     <para>Normal Trax processing of a request goes through the following
  45      steps:</para> 
  46     <orderedlist>
  47      <listitem>The browser sends Apache a URL which is in the area of
  48       the Trax application.</listitem> 
  49  
  50      <listitem>Apache starts visiting the directories in that area,
  51       starting with the top (leftmost in the URL).</listitem> 
  52  
  53      <listitem>In the top Trax application directory it finds file
  54       <literal>.htaccess</literal> which contains Apache configuration
  55        directives, which Apache interprets.  The
  56        {@link http://www.php.net/manual/en/configuration.changes.php php_value}
  57        directive sets the list of
  58        directories where Apache should look for PHP files.  The
  59        following <literal>Rewrite...</literal> directives are the steps
  60        that Apache is to take in transforming the URL into a Trax
  61        command. Apache rewrites the URL, with the result that file
  62        {@link dispatch.php} is loaded and
  63        executed.</listitem> 
  64  
  65       <listitem><literal>dispatch.php</literal> loads the Trax
  66        application description file
  67        {@link environment.php}, which it finds in one of the
  68        directories listed in the <literal>php_value</literal>
  69        directive.</listitem>
  70  
  71      <listitem>With the Trax environment established, an instance of 
  72       {@link Dispatcher} is created and its
  73       {@link Dispatcher::dispatch() dispatch()}
  74       method is invoked.  This finds and calls the Trax action
  75       controller which interprets the URL.</listitem> 
  76     </orderedlist>
  77     <para>Do the following to check the various places where the
  78      process can break down:</para>
  79  
  80    <orderedlist>
  81     <listitem>
  82     Verify the name of the per-directory configuration file.
  83     File <literal>httpd.conf</literal> should contain a line
  84     like:
  85     <example>
  86  AccessFileName .htaccess
  87     </example>
  88     If <literal>AccessFileName</literal> is not
  89     <literal>.htaccess</literal>, change the name of file
  90     <literal>.htaccess</literal> to whatever the configuration wants.
  91     </listitem>
  92  
  93     <listitem>
  94     Verify that Apache is configured to follow commands from a
  95     <literal>.htaccess</literal> file in the Trax application
  96     directory.  File <literal>httpd.conf</literal> should permit the
  97     access file (normally <literal>.htaccess</literal> unless changed)
  98     to override the configuration.  The Apache directive is
  99     {@link http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride AllowOverride}
 100     all and it must apply to the
 101     directory with the Trax application.</listitem>
 102  
 103     <listitem>Verify that <literal>dispatch.php</literal> is being
 104      loaded and executed by editting it to insert
 105      <literal>echo</literal> statements before and after
 106      <literal>require_once("environment.php");</literal>.  The browser
 107      should display the output of both <literal>echo</literal>
 108      statements.  If neither is displayed then there is a problem with
 109      the rewrite rules.  If only the first <literal>echo</literal> is
 110      displayed then the <literal>require</literal> failed, meaning that
 111      <literal>mod_php</literal> couldn't find
 112      <literal>environment.php</literal> in the directories listed in
 113      the <literal>php_value</literal> statement.</listitem>
 114  
 115    <listitem>If you need to test the Apache Rewrite rules, the way to
 116     watch them operate is with the
 117     {@link http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritelog RewriteLog} 
 118     and
 119     {@link http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteloglevel RewriteLogLevel} 
 120     directives.  You must add them to
 121     <literal>httpd.conf</literal> since Apache won't honor them if they
 122     appear in <literal>.htaccess</literal>.  An example of what you
 123     might add is:
 124     <example>
 125  RewriteLog /tmp/rewrite
 126  RewriteLogLevel 9
 127     </example>
 128     This will write a description of each stage of rewrite processing
 129     to file <literal>/tmp/rewrite</literal>.  The overhead is
 130     considerable so be sure to remove this from the configuration when
 131     you don't need it.</listitem>
 132  
 133    <listitem>If <literal>require_once("environment.php");</literal>
 134     fails, check that the list of directories set by
 135     <literal>php_value</literal> in
 136     <literal>.htaccess</literal> matches the actual location of 
 137     <literal>environment.php</literal> and that the permissions on the
 138     files and directories permit Apache to read them.  Check the
 139     Apache error log for relevant messages.  Since one of the functions
 140     of <literal>environment.php</literal> is to switch Apache error
 141     logging to the Trax log selected by the configured value of
 142     TRAX_MODE, check the Trax logs for relevant messages.
 143    </listitem>
 144   
 145    </orderedlist>
 146    </refsect2>
 147    <refsect2 id="{@id troubleshoot_}">
 148     <title></title>
 149    </refsect2>
 150    <refsect2 id="{@id troubleshoot_}">
 151     <title></title>
 152    </refsect2>
 153    <refsect2 id="{@id troubleshoot_}">
 154     <title></title>
 155    </refsect2>
 156  
 157  <!--
 158  Local variables:
 159  mode: xml
 160  c-basic-offset: 1
 161  indent-tabs-mode: nil
 162  End:
 163  -->
 164  
 165  </refsect1>  


Généré le : Sun Feb 25 20:04:38 2007 par Balluche grâce à PHPXref 0.7