2001-11-10 21:49:43 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2003-09-30 08:43:32 +00:00
|
|
|
<!-- $Revision: 1.28 $ -->
|
2001-07-20 18:12:03 +00:00
|
|
|
<chapter id="faq.build">
|
2001-07-21 11:42:27 +00:00
|
|
|
<title>Build Problems</title>
|
|
|
|
<titleabbrev>Build Problems</titleabbrev>
|
2001-07-20 18:12:03 +00:00
|
|
|
|
|
|
|
<para>
|
|
|
|
This section gathers most common errors that occur at
|
|
|
|
build time.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<qandaset>
|
|
|
|
<qandaentry id="faq.build.configure">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
I got the latest version of PHP using the anonymous CVS service,
|
|
|
|
but there's no configure script!
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
You have to have the GNU autoconf package installed so you can
|
2002-04-17 17:35:57 +00:00
|
|
|
generate the configure script from <filename>configure.in</filename>. Just run
|
2001-07-20 18:12:03 +00:00
|
|
|
<command>./buildconf</command> in the top-level directory after getting
|
|
|
|
the sources from the CVS server. (Also, unless you run configure
|
|
|
|
with the <literal>--enable-maintainer-mode</literal> option, the
|
|
|
|
configure script will not automatically get rebuilt when the
|
2002-04-17 17:35:57 +00:00
|
|
|
<filename>configure.in</filename> file is updated, so you should make sure to do that
|
2001-07-20 18:12:03 +00:00
|
|
|
manually when you notice configure.in has changed. One symptom
|
|
|
|
of this is finding things like @VARIABLE@ in your Makefile after
|
2002-04-17 17:35:57 +00:00
|
|
|
configure or <filename>config.status</filename> is run.)
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.configuring">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
I'm having problems configuring PHP to work with Apache.
|
2002-04-17 17:35:57 +00:00
|
|
|
It says it can't find <filename>httpd.h</filename>, but it's right where I said it is!
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
You need to tell the configure/setup script the location of the
|
|
|
|
top-level of your Apache source tree. This means that
|
2002-04-17 17:35:57 +00:00
|
|
|
you want to specify <literal>--with-apache=/path/to/apache</literal>
|
|
|
|
and <emphasis>not</emphasis> <literal>--with-apache=/path/to/apache/src</literal>.
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
2002-11-15 09:49:56 +00:00
|
|
|
<qandaentry id="faq.build.lex">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
While configuring PHP (<literal>./configure</literal>), you come across
|
|
|
|
an error similar to the following:
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<screen>
|
|
|
|
checking lex output file root... ./configure: lex: command not found
|
|
|
|
configure: error: cannot find output from lex; giving up
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
Be sure to read the <link linkend="install.unix">installation</link>
|
|
|
|
instructions carefully and note that you need both flex and bison
|
|
|
|
installed to compile PHP. Depending on your setup you will install
|
|
|
|
bison and flex from either source or a package, such as a RPM.
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
2002-10-25 00:15:09 +00:00
|
|
|
<qandaentry id="faq.build.apache-sharedcore">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When I try to start Apache, I get the the following
|
|
|
|
message:
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<screen>
|
|
|
|
fatal: relocation error: file /path/to/libphp4.so:
|
|
|
|
symbol ap_block_alarms: referenced symbol not found
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
This error usually comes up when one compiles the Apache
|
|
|
|
core program as a DSO library for shared usage. Try to
|
|
|
|
reconfigure apache, making sure to use at least the
|
|
|
|
following flags:
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<screen>
|
|
|
|
--enable-shared=max --enable-rule=SHARED_CORE
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
For more information, read the top-level Apache
|
|
|
|
<filename>INSTALL</filename> file or the Apache
|
|
|
|
<ulink url="&url.apachedso;">DSO manual page</ulink>.
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
2001-09-30 18:36:39 +00:00
|
|
|
<qandaentry id="faq.build.not-found">
|
2001-07-20 18:12:03 +00:00
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When I run configure, it says that it can't find the
|
|
|
|
include files or library for GD, gdbm, or some other package!
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
You can make the configure script looks for header files and libraries
|
|
|
|
in non-standard locations by specifying additional flags to pass to
|
|
|
|
the C preprocessor and linker, such as:
|
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
2001-07-20 18:12:03 +00:00
|
|
|
CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
|
2002-05-23 13:11:57 +00:00
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
|
|
|
If you're using a csh-variant for your login shell (why?), it would be:
|
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
2001-07-20 18:12:03 +00:00
|
|
|
env CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
|
2002-05-23 13:11:57 +00:00
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.yytname">
|
|
|
|
<question>
|
|
|
|
<para>
|
2002-04-17 17:35:57 +00:00
|
|
|
When it is compiling the file <filename>language-parser.tab.c</filename>, it gives me errors
|
|
|
|
that say <literal>yytname undeclared</literal>.
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
2003-02-01 01:33:47 +00:00
|
|
|
You need to update your version of Bison. You can find the latest version
|
2003-02-04 09:38:22 +00:00
|
|
|
at <ulink url="&url.bison;">&url.bison;</ulink>.
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.link">
|
|
|
|
<question>
|
|
|
|
<para>
|
2002-04-17 17:35:57 +00:00
|
|
|
When I run <command>make</command>, it seems to run fine but then fails when it tries
|
2001-07-20 18:12:03 +00:00
|
|
|
to link the final application complaining that it can't find some files.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
Some old versions of make that don't correctly put the compiled
|
|
|
|
versions of the files in the functions directory into that same
|
2002-04-17 17:35:57 +00:00
|
|
|
directory. Try running <command>cp *.o functions</command> and then
|
|
|
|
re-running <command>make</command> to see if that helps. If it does, you should really
|
2001-07-20 18:12:03 +00:00
|
|
|
upgrade to a recent version of GNU make.
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.undefined">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When linking PHP, it complains about a number of undefined references.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
Take a look at the link line and make sure that all of the appropriate
|
|
|
|
libraries are being included at the end. Common ones that you might have
|
|
|
|
missed are '-ldl' and any libraries required for any database support
|
|
|
|
you included.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If you're linking with Apache 1.2.x, did you remember to add the
|
|
|
|
appropriate information to the EXTRA_LIBS line of the Configuration
|
|
|
|
file and re-rerun Apache's Configure script? See the
|
2003-02-04 09:38:22 +00:00
|
|
|
<ulink url="&url.file.installation;">INSTALL</ulink> file that
|
2001-07-20 18:12:03 +00:00
|
|
|
comes with the distribution for more information.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Some people have also reported that they had to add '-ldl' immediately
|
2002-04-17 17:35:57 +00:00
|
|
|
following <filename>libphp4.a</filename> when linking with Apache.
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.Apache">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
I can't figure out how to build PHP with Apache 1.3.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
This is actually quite easy. Follow these steps carefully:
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Grab the latest Apache 1.3 distribution from
|
2003-02-04 09:38:22 +00:00
|
|
|
<ulink url="&url.apache.source;">&url.apache.source;</ulink>.
|
2001-07-20 18:12:03 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Ungzip and untar it somewhere, for example
|
|
|
|
<filename>/usr/local/src/apache-1.3</filename>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Compile PHP by first running
|
|
|
|
<command>./configure --with-apache=/<path>/apache-1.3</command>
|
|
|
|
(substitute <path> for the actual path to your apache-1.3 directory.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2002-04-17 17:42:18 +00:00
|
|
|
Type <command>make</command> followed by <command>make install</command>
|
2001-07-20 18:12:03 +00:00
|
|
|
to build PHP and copy the necessary files to the Apache distribution tree.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Change directories into to your <filename>/<path>/apache-1.3/src</filename>
|
|
|
|
directory and edit the <filename>Configuration</filename> file.
|
2002-02-08 00:46:53 +00:00
|
|
|
Add to the file:
|
|
|
|
<literal>AddModule modules/php4/libphp4.a</literal>.
|
2001-07-20 18:12:03 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2003-02-01 01:25:15 +00:00
|
|
|
Type: <command>./configure</command> followed by <literal>make</literal>.
|
2001-07-20 18:12:03 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
You should now have a PHP-enabled httpd binary!
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
<para>
|
2002-04-17 17:35:57 +00:00
|
|
|
<emphasis>Note:</emphasis> You can also use the new Apache
|
2001-07-20 18:12:03 +00:00
|
|
|
<literal>./configure</literal> script. See the instructions in
|
|
|
|
the <literal>README.configure</literal> file which is part of
|
|
|
|
your Apache distribution. Also have a look at the <filename>INSTALL</filename>
|
|
|
|
file in the PHP distribution.
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
2001-09-30 18:36:39 +00:00
|
|
|
<qandaentry id="faq.build.not-running">
|
2001-07-20 18:12:03 +00:00
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
I have followed all the steps to install the Apache module version on
|
|
|
|
UNIX, and my PHP scripts show up in my browser or I am being asked to
|
|
|
|
save the file.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
This means that the PHP module is not getting invoked for some reason.
|
|
|
|
Three things to check before asking for further help:
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Make sure that the httpd binary you are running is the actual
|
|
|
|
new httpd binary you just built. To do this, try running:
|
|
|
|
<literal>/path/to/binary/httpd -l</literal>
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
2002-02-08 00:46:53 +00:00
|
|
|
If you don't see <filename>mod_php4.c</filename> listed then
|
|
|
|
you are not running the right binary. Find and install the
|
|
|
|
correct binary.
|
2001-07-20 18:12:03 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Make sure you have added the correct Mime Type to one of your
|
|
|
|
<literal>Apache .conf</literal> files. It should be:
|
|
|
|
<literal>AddType application/x-httpd-php3 .php3</literal> (for PHP 3)
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
or <literal>AddType application/x-httpd-php .php</literal> (for PHP 4)
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
Also make sure that this AddType line is not hidden away inside a
|
2003-02-01 01:33:47 +00:00
|
|
|
<Virtualhost> or <Directory> block which would
|
|
|
|
prevent it from applying to the location of your test script.
|
2001-07-20 18:12:03 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Finally, the default location of the Apache configuration files
|
|
|
|
changed between Apache 1.2 and Apache 1.3. You should check to
|
|
|
|
make sure that the configuration file you are adding the AddType
|
|
|
|
line to is actually being read. You can put an obvious syntax error
|
2003-05-21 10:34:23 +00:00
|
|
|
into your &httpd.conf; file or some other obvious change that will
|
2001-07-20 18:12:03 +00:00
|
|
|
tell you if the file is being read correctly.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
2001-09-30 18:36:39 +00:00
|
|
|
<qandaentry id="faq.build.activate-module">
|
2001-07-20 18:12:03 +00:00
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
It says to use: <literal>--activate-module=src/modules/php4/libphp4.a</literal>,
|
|
|
|
but that file doesn't exist, so I changed it to
|
|
|
|
<literal>--activate-module=src/modules/php4/libmodphp4.a</literal> and it
|
|
|
|
doesn't work!? What's going on?
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
2003-02-01 01:33:47 +00:00
|
|
|
Note that the <filename>libphp4.a</filename> file is not supposed to exist. The
|
|
|
|
apache process will create it!
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.ansi">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When I try to build Apache with PHP as a static module using
|
|
|
|
<literal>--activate-module=src/modules/php4/libphp4.a</literal>
|
|
|
|
it tells me that my compiler is not ANSI compliant.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
This is a misleading error message from Apache that has been fixed
|
|
|
|
in more recent versions.
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.apxs">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When I try to build PHP using <literal>--with-apxs</literal>
|
|
|
|
I get strange error messages.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
There are three things to check here. First, for some reason
|
|
|
|
when Apache builds the apxs Perl script, it sometimes ends up
|
|
|
|
getting built without the proper compiler and flags variables.
|
2003-02-04 09:38:22 +00:00
|
|
|
Find your apxs script (try the command <command>which apxs</command>),
|
2002-04-17 17:35:57 +00:00
|
|
|
it's sometimes found in <filename>/usr/local/apache/bin/apxs</filename>
|
|
|
|
or <filename>/usr/sbin/apxs</filename>.
|
2002-01-26 18:16:56 +00:00
|
|
|
Open it and check for lines similar to these:
|
2001-07-20 18:12:03 +00:00
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
|
|
|
my $CFG_CFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl
|
|
|
|
my $CFG_LD_SHLIB = ' '; # substituted via Makefile.tmpl
|
|
|
|
my $CFG_LDFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl
|
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
2002-01-26 18:16:56 +00:00
|
|
|
If this is what you see, you have found your problem. They may
|
|
|
|
contain just spaces or other incorrect values, such as 'q()'. Change
|
|
|
|
these lines to say:
|
2001-07-20 18:12:03 +00:00
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
2002-01-26 18:16:56 +00:00
|
|
|
my $CFG_CFLAGS_SHLIB = '-fpic -DSHARED_MODULE'; # substituted via Makefile.tmpl
|
2002-05-23 13:11:57 +00:00
|
|
|
my $CFG_LD_SHLIB = 'gcc'; # substituted via Makefile.tmpl
|
|
|
|
my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl
|
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
2002-02-11 23:52:19 +00:00
|
|
|
The second possible problem should only be an issue on Red Hat 6.1
|
|
|
|
and 6.2. The apxs script Red Hat ships is broken. Look for this line:
|
2001-07-20 18:12:03 +00:00
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
2002-01-26 18:16:56 +00:00
|
|
|
my $CFG_LIBEXECDIR = 'modules'; # substituted via APACI install
|
2002-05-23 13:11:57 +00:00
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
|
|
|
If you see the above line, change it to this:
|
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
2002-01-26 18:16:56 +00:00
|
|
|
my $CFG_LIBEXECDIR = '/usr/lib/apache'; # substituted via APACI install
|
2002-05-23 13:11:57 +00:00
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
2002-04-17 17:35:57 +00:00
|
|
|
Last, if you reconfigure/reinstall Apache, add a <command>make clean</command>
|
|
|
|
to the process after <command>./configure</command> and before <command>make</command>.
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.microtime">
|
|
|
|
<question>
|
|
|
|
<para>
|
2003-02-01 01:33:47 +00:00
|
|
|
During <command>make</command>, I get errors in microtime,
|
|
|
|
and a lot of <literal>RUSAGE_</literal> stuff.
|
2001-07-20 18:12:03 +00:00
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
2003-02-01 01:33:47 +00:00
|
|
|
During the <command>make</command> portion of installation,
|
|
|
|
if you encounter problems that look similar to this:
|
2001-07-20 18:12:03 +00:00
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
|
|
|
microtime.c: In function `php_if_getrusage':
|
|
|
|
microtime.c:94: storage size of `usg' isn't known
|
|
|
|
microtime.c:97: `RUSAGE_SELF' undeclared (first use in this function)
|
|
|
|
microtime.c:97: (Each undeclared identifier is reported only once
|
|
|
|
microtime.c:97: for each function it appears in.)
|
|
|
|
microtime.c:103: `RUSAGE_CHILDREN' undeclared (first use in this function)
|
|
|
|
make[3]: *** [microtime.lo] Error 1
|
|
|
|
make[3]: Leaving directory `/home/master/php-4.0.1/ext/standard'
|
|
|
|
make[2]: *** [all-recursive] Error 1
|
|
|
|
make[2]: Leaving directory `/home/master/php-4.0.1/ext/standard'
|
|
|
|
make[1]: *** [all-recursive] Error 1
|
|
|
|
make[1]: Leaving directory `/home/master/php-4.0.1/ext'
|
|
|
|
make: *** [all-recursive] Error 1
|
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
<para>
|
2003-02-01 01:33:47 +00:00
|
|
|
Your system is broken. You need to fix your <filename>/usr/include</filename> files by
|
|
|
|
installing a glibc-devel package that matches your glibc. This has
|
|
|
|
absolutely nothing to do with PHP. To prove this to yourself, try this
|
|
|
|
simple test:
|
2001-07-20 18:12:03 +00:00
|
|
|
<programlisting>
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
|
|
|
$ cat >test.c <<X
|
|
|
|
#include <sys/resource.h>
|
|
|
|
X
|
|
|
|
$ gcc -E test.c >/dev/null
|
|
|
|
]]>
|
2001-07-20 18:12:03 +00:00
|
|
|
</programlisting>
|
|
|
|
If that spews out errors, you know your include files are messed up.
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
2002-02-28 14:31:20 +00:00
|
|
|
|
2003-03-15 18:30:06 +00:00
|
|
|
<qandaentry id="faq.build.mysql.tempnam">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When compiling PHP with MySQL, configure runs fine but during
|
|
|
|
<literal>make</literal> I get an error similar to the following:
|
|
|
|
<emphasis>ext/mysql/libmysql/my_tempnam.o(.text+0x46): In function
|
|
|
|
my_tempnam': /php4/ext/mysql/libmysql/my_tempnam.c:103: the
|
|
|
|
use of tempnam' is dangerous, better use mkstemp'</emphasis>,
|
|
|
|
what's wrong?
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
First, it's important to realize that this is a <literal>
|
|
|
|
Warning</literal> and not a fatal error. Because this is
|
|
|
|
often the last output seen during <literal>make</literal>,
|
|
|
|
it may seem like a fatal error but it's not. Of course, if
|
|
|
|
you set your compiler to die on Warnings, it will. Also
|
|
|
|
keep in mind that MySQL support is enabled by default.
|
|
|
|
</para>
|
2003-05-31 14:33:43 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
As of PHP 4.3.2, you'll also see the following text after
|
|
|
|
the build (make) completes:
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<screen>
|
|
|
|
Build complete.
|
|
|
|
(It is safe to ignore warnings about tempnam and tmpnam).
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
</note>
|
2003-03-15 18:30:06 +00:00
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
|
|
|
|
2002-02-28 14:31:20 +00:00
|
|
|
<qandaentry id="faq.build.upgrade">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
I want to upgrade my PHP. Where can I find the <command>./configure</command>
|
|
|
|
line that was used to build my current PHP installation?
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
Either you look at config.nice file, in the source tree of your current PHP
|
|
|
|
installation or, if this is not available, you simply run a
|
2003-09-30 08:43:32 +00:00
|
|
|
<programlisting role="php">
|
2002-05-23 13:11:57 +00:00
|
|
|
<![CDATA[
|
2002-02-28 14:31:20 +00:00
|
|
|
<?php phpinfo(); ?>
|
2002-05-23 13:11:57 +00:00
|
|
|
]]>
|
2002-02-28 14:31:20 +00:00
|
|
|
</programlisting>
|
|
|
|
script. On top of the output the <command>./configure</command> line, that was used
|
2002-02-28 14:42:53 +00:00
|
|
|
to build this PHP installation is shown.
|
2002-02-28 14:31:20 +00:00
|
|
|
</para>
|
|
|
|
</answer>
|
2002-07-07 17:10:05 +00:00
|
|
|
</qandaentry>
|
|
|
|
|
|
|
|
<qandaentry id="faq.build.gdlibs">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When building PHP with the GD library it either gives strange compile errors
|
|
|
|
or segfaults on execution.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
Make sure your GD library and PHP are linked against the same depending
|
|
|
|
libraries (e.g. libpng).
|
|
|
|
</para>
|
|
|
|
</answer>
|
2002-02-28 14:31:20 +00:00
|
|
|
</qandaentry>
|
2002-07-07 17:10:05 +00:00
|
|
|
|
2003-07-18 19:16:58 +00:00
|
|
|
<qandaentry id="faq.installation.needgnu">
|
|
|
|
<question>
|
|
|
|
<para>
|
|
|
|
When compiling PHP I seemingly get random errors, like it hangs.
|
|
|
|
I'm using Solaris if that matters.
|
|
|
|
</para>
|
|
|
|
</question>
|
|
|
|
<answer>
|
|
|
|
<para>
|
|
|
|
Using non-GNU utilities while compiling PHP may cause problems. Be
|
|
|
|
sure to use GNU tools in order to be certain that compiling PHP will
|
|
|
|
work. For example, on Solaris, using either the SunOS BSD-compatible
|
|
|
|
or Solaris versions of <literal>sed</literal> will not work, but using
|
|
|
|
the GNU or Sun POSIX (xpg4) versions of <literal>sed</literal> will
|
|
|
|
work. Links: <ulink url="&url.sed;">GNU sed</ulink>,
|
|
|
|
<ulink url="&url.flex;">GNU flex</ulink>, and
|
|
|
|
<ulink url="&url.bison;">GNU bison</ulink>.
|
|
|
|
</para>
|
|
|
|
</answer>
|
|
|
|
</qandaentry>
|
2001-07-20 18:12:03 +00:00
|
|
|
</qandaset>
|
|
|
|
</chapter>
|
|
|
|
|
2001-09-21 22:47:49 +00:00
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
2001-12-12 20:47:43 +00:00
|
|
|
indent-tabs-mode:nil
|
2001-09-21 22:47:49 +00:00
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|