Remove more PHP 4 content

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340962 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Maciej Sobaczewski 2016-11-12 08:04:07 +00:00
parent bd7f3aaf26
commit ae6be5bb4f
5 changed files with 10 additions and 252 deletions

View file

@ -873,8 +873,15 @@ Action application/x-httpd-php "/php/php-cgi.exe"
</para>
<para>
In PHP 5 the MySQL client libraries are not bundled, because of license
problems and some others. For more information, read the <link
linkend="faq.databases.mysql.php5">FAQ entry</link>.
and maintenance problems. MySQL is supported with the only
change being that MySQL support is no longer enabled by
<emphasis>default</emphasis> in PHP 5. This essentially means that
PHP doesn't include the <option role="configure">--with-mysql</option>
option in the <link linkend="configuration">configure</link> line so
that you must now manually do this when compiling PHP. Windows users will
need to edit &php.ini; and enable the <filename>php_mysql.dll</filename>
DLL as in PHP 4 no such DLL existed, it was simply built into your Windows
PHP binaries.
</para>
<para>
There is also a new extension, <link linkend="ref.mysqli">MySQLi (Improved

View file

@ -179,89 +179,6 @@
</answer>
</qandaentry>
<qandaentry xml:id="faq.databases.mysql.php5">
<question>
<para>
PHP 5 no longer bundles MySQL client libraries, what does this mean to
me? Can I still use MySQL with PHP? I try to use MySQL and get
"function undefined" errors, what gives?
</para>
</question>
<answer>
<para>
Yes. There will always be MySQL support in PHP of one kind or
another. The only change in PHP 5 is that we are no longer bundling
the client library itself. Some reasons in no particular order:
</para>
<itemizedlist>
<listitem>
<para>
Most systems these days already have the client library installed.
</para>
</listitem>
<listitem>
<para>
Given the above, having multiple versions of the library can get
messy. For example, if you link mod_auth_mysql against one version
and PHP against another, and then enable both in Apache, you get a
nice fat crash. Also, the bundled library didn't always play well
with the installed server version. The most obvious symptom of this
being disagreement over where to find the mysql.socket Unix domain
socket file.
</para>
</listitem>
<listitem>
<para>
Maintenance was somewhat lax and it was falling further and further
behind the released version.
</para>
</listitem>
<listitem>
<para>
Future versions of the library are under the GPL and thus we don't
have an upgrade path since we cannot bundle a GPL'ed library in a
BSD/Apache-style licensed project. A clean break in PHP 5 seemed
like the best option.
</para>
</listitem>
</itemizedlist>
<para>
This won't actually affect that many people. Unix users, at least the
ones who know what they are doing, tend to always build PHP against
their system's libmysqlclient library simply by adding the <option
role="configure">--with-mysql=/usr</option> option
when building PHP. Windows users may enable the extension
<filename>php_mysql.dll</filename> inside &php.ini;.
For more details, see the <link linkend="ref.mysql">MySQL Reference</link>
for installation instructions. Also, be sure
<filename>libmysql.dll</filename> is available to the system's <envar>PATH</envar>.
For more details on how, read the FAQ on
<link linkend="faq.installation.addtopath">setting up the Windows
systems PATH</link>. Because <filename>libmysql.dll</filename> (and
many other PHP related files) exist in the PHP folder, you'll want to
add the PHP folder to your system's <envar>PATH</envar>.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="faq.databases.shared-mysql">
<question>
<para>
After installing shared MySQL support, Apache dumps core as soon
as libphp4.so is loaded. Can this be fixed?
</para>
</question>
<answer>
<para>
If your MySQL libs are linked against pthreads this will happen. Check
using ldd. If they are, grab the MySQL tarball and compile from source,
or recompile from the source rpm and remove the switch in the spec file
that turns on the threaded client code. Either of these suggestions will
fix this. Then recompile PHP with the new MySQL libs.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="faq.databases.mysqlresource">
<question>
<para>

View file

@ -72,49 +72,6 @@
</answer>
</qandaentry>
<qandaentry xml:id="faq.general.differences-45">
<question>
<para>What are the differences between PHP 4 and PHP 5?</para>
</question>
<answer>
<para>
While PHP 5 was purposely designed to be as compatible as
possible with previous versions, there are some significant
changes. Some of these changes include:
<itemizedlist>
<listitem>
<simpara>A <link linkend="language.oop5">new OOP model</link>
based on the <emphasis>Zend Engine 2.0</emphasis></simpara>
</listitem>
<listitem>
<simpara>A new extension for improved MySQL support</simpara>
</listitem>
<listitem>
<simpara>Built-in native support for SQLite</simpara>
</listitem>
<listitem>
<simpara>A new error reporting constant,
<link linkend="migrating5.errorrep">E_STRICT</link>,
for run-time code suggestions
</simpara>
</listitem>
<listitem>
<simpara>A host of new
<link linkend="migration5.functions">functions</link>
to simplify code authoring (and reduce the need to write your own
functions for many common procedures)
</simpara>
</listitem>
</itemizedlist>
For more detailed information, please view the section on
<link linkend="faq.migration5">Migrating from PHP 4 to
PHP 5</link> and the section on
<link linkend="migration5.incompatible">Backwards
Incompatible Changes</link>.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="faq.general.bug">
<question>
<para>

View file

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="faq.migration5" xmlns="http://docbook.org/ns/docbook">
<title>Migrating from PHP 4 to PHP 5</title>
<titleabbrev>Migrating from PHP 4 to PHP 5</titleabbrev>
<para>
This faq section will help you migrate from PHP 4 to PHP 5.
</para>
<qandaset>
<qandaentry xml:id="faq.migration5.php45">
<question>
<para>
Migrating from PHP 4 to PHP 5
</para>
</question>
<answer>
<para>
Although PHP 5 offers many new features, it's designed to be as
compatible with earlier versions of PHP as possible with little
functionality being broken in the process.
</para>
<para>
Be sure to read the appropriate <link linkend="migration5">PHP 5
migration appendix</link> of this manual as it contains even more
information on the topic of migrating to PHP 5.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="faq.migration5.mysql">
<question>
<para>
Does MySQL work in PHP 5? It seemed to have disappeared.
</para>
</question>
<answer>
<para>
<link linkend="ref.mysql">MySQL</link> is supported with the only
change being that MySQL support is no longer enabled by
<emphasis>default</emphasis> in PHP 5. This essentially means that
PHP doesn't include the <option role="configure">--with-mysql</option>
option in the <link linkend="configuration">configure</link> line so
that you must now manually do this when compiling PHP. Windows users will
edit &php.ini; and enable the <filename>php_mysql.dll</filename> DLL as
in PHP 4 no such DLL existed, it was simply built into your Windows
PHP binaries.
</para>
<para>
Also, the MySQL client libraries are no longer bundled with PHP. More
details on this topic are covered in
<link linkend="faq.databases.mysql.php5">the following FAQ</link> and
be sure to read the <link linkend="ref.mysql">MySQL section</link>
for details on installing MySQL. An example configure line would be
<option role="configure">--with-mysql=/usr</option> while Windows users
will need the <filename>libmySQL.dll</filename> available to the system.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="faq.migration5.oop">
<question>
<para>
I hear PHP 5 has an entirely new OOP model, will my existing OOP code
work? Where do I find information on these new OOP features?
</para>
</question>
<answer>
<para>
The main change in PHP 5 is to the OOP model as PHP 5 now uses
the <emphasis>Zend Engine 2.0</emphasis>. The <link
linkend="ini.zend.ze1-compatibility-mode">
zend.ze1_compatibility_mode</link> directive enables compatability
with the <literal>Zend Engine 1.0</literal> (PHP 4).
</para>
<para>
The new OOP model is documented in the <link linkend="language.oop5">
OOP language reference</link> and <link linkend="migration5.oop">OOP
migration appendix</link> sections.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="faq.migration5.changes">
<question>
<para>
So besides the new OOP model, what else has changed in PHP 5? Also, is
there a PHP 5 specific version of the PHP manual?
</para>
</question>
<answer>
<para>
Few other changes exist, see the <link linkend="migration5">migration
5 appendix</link> for details. There won't be a PHP 5 specific
version of the manual as the bulk of PHP remains the same.
</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<!-- 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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/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
-->

View file

@ -57,7 +57,7 @@
<entry><option role="configure">--with-mysql=[DIR]</option></entry>
<entry>
MySQL is no longer enabled by default, and the MySQL client libraries
are <link linkend="faq.databases.mysql.php5">no longer bundled</link>
are no longer bundled
</entry>
</row>
<row>