apjs08.html 5.82 KB
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Part IV - Verifying the setup</title><link rel="stylesheet" type="text/css" href="manual.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.0"><link rel="home" href="index.html" title="JpGraph Manual"><link rel="up" href="apj.html" title="Appendix J. Setting up PHP5 in parallel with PHP4 in SuSE 10.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV - Verifying the setup</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center">Appendix J. Setting up PHP5 in parallel with PHP4 in SuSE 10.1</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="section" title="Part IV - Verifying the setup"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2655112"></a>Part IV - Verifying the setup</h2></div></div></div>
        
        <p>The only small thing remaining, in case You haven't done so already, is to create
            suitable "<code class="filename">php.ini</code>" scripts that are copied to the previous
            specified PHP4 and PHP5 config file directories,
                "<code class="filename">/etc/php4/apache2/</code>" and
                "<code class="filename">/etc/php5/apache2/</code>". </p>
        <p>
            </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
                <p>It is recommended to enable all warnings and errors in each php.ini file
                    unless You have very, very good reasons not to do this. Use the default php.ini
                    files in the PHP distribution as the initial template. For use with JpGraph it
                    is recommended to do the following modifications: </p>
                <p>
                    </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
                            <p>Increase maximum allowed memory to 32MB </p>
                        </li><li class="listitem">
                            <p>Increase maximum allowed script running time to 30s</p>
                        </li><li class="listitem">
                            <p>Set full error reporting </p>
                        </li></ol></div><p>
                </p>
            </div><p>
        </p>
        <p>Assuming the IP-addresses shown in the configuration above we are now ready to test
            out setup. In order to do this make sure that each document root have the "phpinfo.php"
            test script (see above). </p>
        <p>We can now test the different setups by using the URLs </p>
        <p>
            </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
                    <p><code class="filename">http://192.168.0.50/phpinfo.php</code>
                    </p>
                    <p>This URL would send back configuration showing that the server is running
                        PHP4. Verify that the config path used is set to
                            "<code class="filename">/etc/php4/apache2/</code>". </p>
                </li><li class="listitem">
                    <p><code class="filename">http://192.168.0.51/phpinfo.php</code>
                    </p>
                    <p>This URL would send back configuration showing that the server is running
                        PHP5 Verify that the config path used is set to
                            "<code class="filename">/etc/php5/apache2/</code>". </p>
                </li></ol></div><p>
        </p>
        <div class="section" title="Troubleshooting"><div class="titlepage"><div><div><h3 class="title"><a name="id2655206"></a>Troubleshooting</h3></div></div></div>
            
            <p>
                </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
                        <p>If your browser asks you to download content with mime-type
                                "<code class="code">mime/x-httpd-application</code>" when you try to visit the
                            PHP script it means that Apache does not yet run PHP as a module (now
                            module have accepted to handle the x-http-application mime type). Make
                            sure you have included the "php4" in the <code class="code">APACHE_MODULES</code>
                            string as described above and that you added the
                                "<code class="filename">php4.conf</code>" file in the
                                "<code class="filename">/etc/apache2/conf.d/</code>" directory. </p>
                    </li><li class="listitem">
                        <p>We had some issues with FireFox insisting on downloading
                                "<code class="filename">phpinfo.php</code>" as a file even when other browser
                            showed the page properly, using "<span class="command"><strong>etherreal</strong></span>" we could
                            confirm that Firefox was using a previous cached version before we had
                            enabled PHP in the apache configuration. To solve this we had to clear
                            the Firefox cache. </p>
                    </li></ol></div><p>
            </p>
        </div>
    </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"><a accesskey="u" href="apj.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>