10.5 Installation
10 FAQ : Foire Aux Questions
Manuel PHP
.
Unix/Windows: Where should my .
Unix: I installed PHP, but every time I load a document, I get the
message 'Document Contains No Data'! What's going on here?
.
Unix: I installed PHP using RPMS, but Apache isn't processing the
PHP pages! What's going on here?
->
Unix: I installed PHP 3 using RPMS, but it doesn't compile with
the database support I need! What's going on here?
.
Unix: I patched Apache with the FrontPage extensions patch, and
suddenly PHP stopped working. Is PHP incompatible with the
Apache FrontPage extensions?
.
Unix/Windows: I have installed PHP, but when I try to
access a PHP script file via my browser, I get a blank screen.
.
Unix/Windows: I have installed PHP, but when try to
access a PHP script file via my browser, I get a
server 500 error.
.
Some operating systems: I have installed PHP without errors,
but when I try to start apache I get undefined symbol errors:
.
Windows: I have installed PHP, but when I to access
a PHP script file via my browser, I get the error:
.
Windows: I've followed all the instructions, but still can't
get PHP and IIS to work together!
.
When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami,
I get the following error: .
How do I know if my
|
10.5.4
Unix: I installed PHP 3 using RPMS, but it doesn't compile with
the database support I need! What's going on here?
Due to the way PHP 3 built, it is not easy to build a
complete flexible PHP RPM. This issue is addressed in PHP 4.
For PHP 3, we currently suggest you use the mechanism described in the
INSTALL.REDHAT file in the PHP distribution. If you insist on using
an RPM version of PHP 3, read on...
The RPM packagers are setting up the RPMS to install
without database support to simplify installations
and
because RPMS use /usr/ instead of the standard /usr/local/ directory for
files. You need to tell the RPM spec file which databases to support
and the location of the top-level of your database server.
This example will explain the process of adding support for the
popular MySQL database server, using the mod installation for Apache.
Of course all of this information can be adjusted for any database
server that PHP supports. We will assume you installed MySQL and Apache
completely with RPMS for this example as well.
-
First remove mod_php3 :
rpm -e mod_php3
-
Then get the source rpm and INSTALL it, NOT --rebuild
rpm -Uvh mod_php3-3.0.5-2.src.rpm
-
Then edit the
/usr/src/redhat/SPECS/mod_php3.spec
file
In the %build section add the database support you want, and the path.
For MySQL you would add
--with-mysql=/usr \
The %build section will look something like this:
./configure --prefix=/usr \ --with-apxs=/usr/sbin/apxs \ --with-config-file-path=/usr/lib \ --enable-debug=no \ --enable-safe-mode \ --with-exec-dir=/usr/bin \ --with-mysql=/usr \ --with-system-regex
-
Once this modification is made then build the binary rpm as follows:
rpm -bb /usr/src/redhat/SPECS/mod_php3.spec
-
Then install the rpm
rpm -ivh /usr/src/redhat/RPMS/i386/mod_php3-3.0.5-2.i386.rpm
Make sure you restart Apache, and you now have PHP 3 with MySQL support
using RPM's. Note that it is probably much easier to just build
from the distribution tarball of PHP 3 and follow the instructions in
INSTALL.REDHAT
found in that distribution.
|