Compare commits

..
4943 changed files with 66260 additions and 526843 deletions

No files matched your search

+10 -44
View File
@@ -8,7 +8,7 @@ define ____executor_globals
end
document ____executor_globals
portable way of accessing executor_globals, set $eg
portable way of accessing executor_globals
ZTS detection is automatically based on ext/standard module struct
end
@@ -39,18 +39,14 @@ define printzv
end
document printzv
prints zval contents
prints content of zval
end
define ____printzv_contents
set $zvalue = $arg0
set $type = $zvalue->type
printf "(refcount=%d", $zvalue->refcount
if $zvalue->is_ref
printf ",is_ref"
end
printf ") "
printf "(refcount=%d) ", $zvalue->refcount
if $type == 0
printf "NULL"
end
@@ -73,7 +69,7 @@ define ____printzv_contents
if ! $arg1
printf "{\n"
set $ind = $ind + 1
____print_ht $zvalue->value.ht 1
____print_ht $zvalue->value.ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
@@ -107,7 +103,7 @@ define ____printzv_contents
printf "(%d): ", $ht->nNumOfElements
printf "{\n"
set $ind = $ind + 1
____print_ht $ht 1
____print_ht $ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
@@ -192,10 +188,12 @@ define print_const_table
end
define ____print_ht
set $ht = (HashTable*)$arg0
set $ht = $arg0
set $p = $ht->pListHead
while $p != 0
set $zval = *(zval **)$p->pData
set $i = $ind
while $i > 0
printf " "
@@ -208,18 +206,8 @@ define ____print_ht
else
printf "%d => ", $p->h
end
if $arg1 == 0
printf "%p\n", (void*)$p->pData
end
if $arg1 == 1
set $zval = *(zval **)$p->pData
____printzv $zval 1
end
if $arg1 == 2
printf "%s\n", (char*)$p->pData
end
____printzv $zval 1
set $p = $p->pListNext
end
end
@@ -227,7 +215,7 @@ end
define print_ht
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0 1
____print_ht $arg0
printf "}\n"
end
@@ -235,28 +223,6 @@ document print_ht
dumps elements of HashTable made of zval
end
define print_htptr
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0 0
printf "}\n"
end
document print_htptr
dumps elements of HashTable made of pointers
end
define print_htstr
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0 2
printf "}\n"
end
document print_htstr
dumps elements of HashTable made of strings
end
define ____print_ft
set $ht = $arg0
set $p = $ht->pListHead
+1 -1
View File
@@ -256,7 +256,7 @@ that the first implementation include a file labeled 'EXPERIMENTAL'
in the function directory, and that the functions follow the
standard prefixing conventions during their initial implementation.
The file labeled 'EXPERIMENTAL' should include the following
The file labelled 'EXPERIMENTAL' should include the following
information:
Any authoring information (known bugs, future directions of the module).
Ongoing status notes which may not be appropriate for CVS comments.
+105 -92
View File
@@ -127,14 +127,32 @@ EXTENSION: dbase
MAINTENANCE: Orphaned
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dbx
PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.6
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
-------------------------------------------------------------------------------
EXTENSION: fbsql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ingres_ii
PRIMARY MAINTAINER: David Hénot <henot@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>, Jouni Ahto <jouni.ahto@exdec.fi>
MAINTENANCE: Odd fixes
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msql
@@ -159,7 +177,7 @@ STATUS: Working
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Christopher Jones <sixd@php.net>, Antony Dovgal <tony2001@php.net>
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -169,53 +187,14 @@ MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: pdo
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
EXTENSION: oracle
MAINTENANCE: Orphaned
STATUS: Working
SINCE: 5.1
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
EXTENSION: pdo_dblib
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_firebird
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_mysql
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_odbc
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_oci
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_pgsql
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_sqlite
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
EXTENSION: ovrimos
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
@@ -258,11 +237,11 @@ SINCE: 5.0
EXTENSION: soap
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Orphaned
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
@@ -270,21 +249,11 @@ PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xmlreader
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xmlrpc
PRIMARY MAINTAINER: Dan Libby
MAINTENANCE: Orphaned
MAINTENANCE: UNKNOWN
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: xmlwriter
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Pierre-Alain Joye <pajoye@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xsl
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>
MAINTENANCE: Maintained
@@ -298,7 +267,7 @@ SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
@@ -317,6 +286,11 @@ MAINTENANCE: Maintained
STATUS: Windows
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: cpdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Maintained
@@ -339,19 +313,27 @@ MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.2
-------------------------------------------------------------------------------
EXTENSION: filter
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>, Pierre-Alain Joye <pajoye@php.net>, Ilia Alshanetsky <iliaa@php.net>
EXTENSION: fam
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: fdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.2
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: filepro
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ftp
PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
MAINTENANCE: Odd fixes
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gd
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -360,11 +342,15 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gmp
PRIMARY MAINTAINER: Stanislav Malyshev <stas@php.net>, Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: hwapi
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: iconv
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
MAINTENANCE: Maintained
@@ -375,14 +361,13 @@ PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: json
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.2
EXTENSION: ircg
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -396,9 +381,14 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcve
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Unknown
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mime_magic
@@ -412,26 +402,48 @@ PRIMARY MAINTAINER: Frank M. Kromann
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: mnogosearch
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@mail.ru>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: mono
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: msession
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@mohawksoft.com>
MAINTENANCE: Maintained
STATUS: Working/Experimental
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
-------------------------------------------------------------------------------
EXTENSION: ncurses
PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: openssl
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: pcntl
MAINTENANCE: Unknown
STATUS: Working
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>, Nuno Lopes <nlopess@php.net>
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pfpro
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
@@ -465,7 +477,7 @@ STATUS: Working
EXTENSION: shmop
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: snmp
@@ -476,7 +488,7 @@ STATUS: Working
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: spl
@@ -487,30 +499,31 @@ SINCE: 5.0.0
-------------------------------------------------------------------------------
EXTENSION: sysvmsg
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: tidy
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>, Nuno Lopes <nlopess@php.net>
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: tokenizer
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: zip
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Unknown
SINCE: 4.0.1
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
+99 -154
View File
@@ -11,7 +11,7 @@ Installing PHP
Caudium
fhttpd related notes
Sun, iPlanet and Netscape servers on Sun Solaris
CGI and command line setups
CGI and commandline setups
HP-UX specific installation notes
OpenBSD installation notes
Solaris specific installation tips
@@ -20,7 +20,6 @@ Installing PHP
3. Installation on Mac OS X
Using Packages
Using the bundled PHP
Compiling for OS X Server
Compiling for MacOS X Client
@@ -29,7 +28,7 @@ Installing PHP
Introduction to PECL Installations
Downloading PECL extensions
PECL for Windows users
Compiling shared PECL extensions with the pecl command
Compiling shared PECL extensions with PEAR
Compiling shared PECL extensions with phpize
Compiling PECL extensions statically into PHP
@@ -91,7 +90,7 @@ Chapter 1. General Installation Considerations
With PHP you can also write desktop GUI applications using the PHP-GTK
extension. This is a completely different approach than writing web
pages, as you do not output any HTML, but manage Windows and objects
pages, as you do not output any HTML, but manage windows and objects
within them. For more information about PHP-GTK, please visit the site
dedicated to this extension. PHP-GTK is not included in the official
PHP distribution.
@@ -125,10 +124,10 @@ Chapter 2. Installation on Unix systems
package installation system. This can assist in setting up a standard
configuration, but if you need to have a different set of features
(such as a secure server, or a different database driver), you may need
to build PHP and/or your web server. If you are unfamiliar with
building and compiling your own software, it is worth checking to see
whether somebody has already built a packaged version of PHP with the
features you need.
to build PHP and/or your webserver. If you are unfamiliar with building
and compiling your own software, it is worth checking to see whether
somebody has already built a packaged version of PHP with the features
you need.
Prerequisite knowledge and software for compiling:
@@ -140,8 +139,8 @@ Chapter 2. Installation on Unix systems
* Any module specific components (such as gd, pdf libs, etc.)
The initial PHP setup and configuration process is controlled by the
use of the command line options of the configure script. You could get
a list of all available options along with short explanations running
use of the commandline options of the configure script. You could get a
list of all available options along with short explanations running
./configure --help. Our manual documents the different options
separately. You will find the core options in the appendix, while the
different extension specific options are descibed on the reference
@@ -346,7 +345,7 @@ stop and start:
will mean that you can compile apache separately, and don't have to
recompile everything as you add to, or change, PHP. Building PHP into
apache (static method) means that PHP will load and run faster. For
more information, see the Apache web page on DSO support.
more information, see the Apache webpage on DSO support.
Note: Apache's default httpd.conf currently ships with a section
that looks like this:
@@ -563,13 +562,13 @@ Sun, iPlanet and Netscape servers on Sun Solaris
From PHP 4.3.3 on you can use PHP scripts with the NSAPI module to
generate custom directory listings and error pages. Additional
functions for Apache compatibility are also available. For support in
current web servers read the note about subrequests.
current webservers read the note about subrequests.
You can find more information about setting up PHP for the Netscape
Enterprise Server (NES) here:
http://benoit.noss.free.fr/php/install-php4.html
To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape web servers,
To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape webservers,
enter the proper install directory for the --with-nsapi=[DIR] option.
The default directory is usually /opt/netscape/suitespot/. Please also
read /php-xxx-version/sapi/nsapi/nsapi-readme.txt.
@@ -611,7 +610,7 @@ Sun, iPlanet and Netscape servers on Sun Solaris
Configuration Instructions for Sun/iPlanet/Netscape. Firstly you may
need to add some paths to the LD_LIBRARY_PATH environment for the
server to find all the shared libs. This can best done in the start
script for your web server. The start script is often located in:
script for your webserver. The start script is often located in:
/path/to/server/https-servername/start. You may also need to edit the
configuration files that are located in:
/path/to/server/https-servername/config/.
@@ -632,7 +631,7 @@ Init fn="php4_init" LateInit="yes" errorString="Failed to initialize PHP!" [php_
ini="/path/to/php.ini"]
(PHP >= 4.3.3) The php_ini parameter is optional but with it you
can place your php.ini in your web server config directory.
can place your php.ini in your webserver config directory.
3. Configure the default object in obj.conf (for virtual server
classes [version 6.0+] in their vserver.obj.conf):
@@ -685,8 +684,8 @@ AuthTrans fn=php4_auth_trans
</Object>
Note: The stacksize that PHP uses depends on the configuration of
the web server. If you get crashes with very large PHP scripts, it
is recommended to raise it with the Admin Server (in the section
the webserver. If you get crashes with very large PHP scripts, it is
recommended to raise it with the Admin Server (in the section
"MAGNUS EDITOR").
__________________________________________________________________
@@ -694,21 +693,22 @@ CGI environment and recommended modifications in php.ini
Important when writing PHP scripts is the fact that Sun JSWS/Sun ONE
WS/iPlanet/Netscape is a multithreaded web server. Because of that all
requests are running in the same process space (the space of the web
server itself) and this space has only one environment. If you want to
get CGI variables like PATH_INFO, HTTP_HOST etc. it is not the correct
way to try this in the old PHP 3.x way with getenv() or a similar way
(register globals to environment, $_ENV). You would only get the
environment of the running web server without any valid CGI variables!
requests are running in the same process space (the space of the
webserver itself) and this space has only one environment. If you want
to get CGI variables like PATH_INFO, HTTP_HOST etc. it is not the
correct way to try this in the old PHP 3.x way with getenv() or a
similar way (register globals to environment, $_ENV). You would only
get the environment of the running webserver without any valid CGI
variables!
Note: Why are there (invalid) CGI variables in the environment?
Answer: This is because you started the web server process from the
admin server which runs the startup script of the web server, you
Answer: This is because you started the webserver process from the
admin server which runs the startup script of the webserver, you
wanted to start, as a CGI script (a CGI script inside of the admin
server!). This is why the environment of the started web server has
server!). This is why the environment of the started webserver has
some CGI environment variables in it. You can test this by starting
the web server not from the administration server. Use the command
the webserver not from the administration server. Use the command
line as root user and start it manually - you will see there are no
CGI-like environment variables.
@@ -749,8 +749,8 @@ pt.php" [inikey=value inikey=value...]
Note about nsapi_virtual() and subrequests (PHP >= 4.3.3)
The NSAPI module now supports the nsapi_virtual() function (alias:
virtual()) to make subrequests on the web server and insert the result
in the web page. This function uses some undocumented features from the
virtual()) to make subrequests on the webserver and insert the result
in the webpage. This function uses some undocumented features from the
NSAPI library. On Unix the module automatically looks for the needed
functions and uses them if available. If not, nsapi_virtual() is
disabled.
@@ -758,10 +758,10 @@ Note about nsapi_virtual() and subrequests (PHP >= 4.3.3)
Note: But be warned: Support for nsapi_virtual() is EXPERIMENTAL!!!
__________________________________________________________________
CGI and command line setups
CGI and commandline setups
The default is to build PHP as a CGI program. This creates a command
line interpreter, which can be used for CGI processing, or for
The default is to build PHP as a CGI program. This creates a
commandline interpreter, which can be used for CGI processing, or for
non-web-related PHP scripting. If you are running a web server PHP has
module support for, you should generally go for that solution for
performance reasons. However, the CGI version enables users to run
@@ -816,18 +816,62 @@ Using Variables
HP-UX specific installation notes
This section contains notes and hints specific to installing PHP on
HP-UX systems.
HP-UX systems. (Contributed by paul_mckay at clearwater-it dot co dot
uk).
There are two main options for installing PHP on HP-UX systems. Either
compile it, or install a pre-compiled binary.
Note: These tips were written for PHP 4.0.4 and Apache 1.3.9.
Official pre-compiled packages are located here:
http://software.hp.com/
1. You need gzip, download a binary distribution from
http://hpux.connect.org.uk/ftp/hpux/Gnu/gzip-1.2.4a/gzip-1.2.4a-sd-
10.20.depot.Z uncompress the file and install using swinstall.
2. You need gcc, download a binary distribution from
http://gatekeep.cs.utah.edu/ftp/hpux/Gnu/gcc-2.95.2/gcc-2.95.2-sd-1
0.20.depot.gz. uncompress this file and install gcc using
swinstall.
3. You need the GNU binutils, you can download a binary distribution
from
http://hpux.connect.org.uk/ftp/hpux/Gnu/binutils-2.9.1/binutils-2.9
.1-sd-10.20.depot.gz. uncompress this file and install binutils
using swinstall.
4. You now need bison, you can download a binary distribution from
http://hpux.connect.org.uk/ftp/hpux/Gnu/bison-1.28/bison-1.28-sd-10
.20.depot.gz, install as above.
5. You now need flex, you need to download the source from one of the
http://www.gnu.org mirrors. It is in the non-gnu directory of the
ftp site. Download the file, gunzip, then tar -xvf it. Go into the
newly created flex directory and run ./configure, followed by make,
and then make install.
If you have errors here, it's probably because gcc etc. are not in
your PATH so add them to your PATH.
6. Download the PHP and apache sources.
7. gunzip and tar -xvf them. We need to hack a couple of files so that
they can compile OK.
8. Firstly the configure file needs to be hacked because it seems to
lose track of the fact that you are a hpux machine, there will be a
better way of doing this but a cheap and cheerful hack is to put
lt_target=hpux10.20 on line 47286 of the configure script.
9. Next, the Apache GuessOS file needs to be hacked. Under
apache_1.3.9/src/helpers change line 89 from echo
"hp${HPUXMACH}-hpux${HPUXVER}"; exit 0 to: echo
"hp${HPUXMACH}-hp-hpux${HPUXVER}"; exit 0
10. You cannot install PHP as a shared object under HP-UX so you must
compile it as a static, just follow the instructions at the Apache
page.
11. PHP and Apache should have compiled OK, but Apache won't start. you
need to create a new user for Apache, e.g. www, or apache. You then
change lines 252 and 253 of the conf/httpd.conf in Apache so that
instead of
Until this manual section is rewritten, the documentation about
compiling PHP (and related extensions) on HP-UX systems has been
removed. For now, consider reading the following external resource:
Building Apache and PHP on HP-UX 11.11
User nobody
Group nogroup
you have something like
User www
Group sys
This is because you can't run Apache as nobody under hp-ux. Apache
and PHP should then work.
__________________________________________________________________
OpenBSD installation notes
@@ -1084,104 +1128,6 @@ Using Packages
* Fink: http://fink.sourceforge.net/
__________________________________________________________________
Using the bundled PHP
PHP has come standard with Macs since OS X version 10.0.0. Enabling PHP
with the default web server requires uncommenting a few lines in the
Apache configuration file httpd.conf whereas the CGI and/or CLI are
enabled by default (easily accessible via the Terminal program).
Enabling PHP using the instructions below is meant for quickly setting
up a local development environment. It's highly recommended to always
upgrade PHP to the newest version. Like most live software, newer
versions are created to fix bugs and add features and PHP being is no
different. See the appropriate MAC OS X installation documentation for
further details. The following instructions are geared towards a
beginner with details provided for getting a default setup to work. All
users are encouraged to compile, or install a new packaged version.
The standard installation type is using mod_php, and enabling the
bundled mod_php on Mac OS X for the Apache web server (the default web
server, that is accessible via System Preferences) involves the
following steps:
1. Locate and open the Apache configuration file. By default, the
location is as follows: /etc/httpd/httpd.conf
Using Finder or Spotlight to find this file may prove difficult as
by default it's private and owned by the root user.
Note: One way to open this is by using a Unix based text editor in
the Terminal, for example nano, and because the file is owned by
root we'll use the sudo command to open it (as root) so for example
type the following into the Terminal Application (after, it will
prompt for a password): sudo nano /etc/httpd/httpd.conf
Noteworthy nano commands: ^w (search), ^o (save), and ^x (exit)
where ^ represents the Ctrl key.
2. With a text editor, uncomment the lines (by removing the #) that
look similar to the following (these two lines are often not
together, locate them both in the file):
# LoadModule php4_module libexec/httpd/libphp4.so
# AddModule mod_php4.c
Notice the location/path. When building PHP in the future, the
above files should be replaced or commented out.
3. Be sure the desired extensions will parse as PHP (examples: .php
.html and .inc)
Due to the following statement already existing in httpd.conf (as
of Mac Panther), once PHP is enabled the .php files will
automatically parse as PHP.
<IfModule mod_php4.c>
# If php is turned on, we respect .php and .phps files.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# Since most users will want index.php to work we
# also automatically enable index.php
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
4. Be sure the DirectoryIndex loads the desired default index file
This is also set in httpd.conf. Typically index.php and index.html
are used. By default index.php is enabled because it's also in the
PHP check shown above. Adjust accordingly.
5. Set the php.ini location or use the default
A typical default location on Mac OS X is /usr/local/php/php.ini
and a call to phpinfo() will reveal this information. If a php.ini
is not used, PHP will use all default values. See also the related
FAQ on finding php.ini.
6. Locate or set the DocumentRoot
This is the root directory for all the web files. Files in this
directory are served from the web server so the PHP files will
parse as PHP before outputting them to the browser. A typical
default path is /Library/WebServer/Documents but this can be set to
anything in httpd.conf. Alternatively, the default DocumentRoot for
individual users is /Users/yourusername/Sites
7. Create a phpinfo() file
The phpinfo() function will display information about PHP. Consider
creating a file in the DocumentRoot with the following PHP code:
<?php phpinfo(); ?>
8. Restart Apache, and load the PHP file created above
To restart, either execute sudo apachectl graceful in the shell or
stop/start the "Personal Web Server" option in the OS X System
Preferences. By default, loading local files in the browser will
have an URL like so: http://localhost/info.php Or using the
DocumentRoot in the user directory is another option and would end
up looking like: http://localhost/~yourusername/info.php
The CLI (or CGI in older versions) is appropriately named php and
likely exists as /usr/bin/php. Open up the terminal, read the command
line section of the PHP manual, and execute php -v to check the PHP
version of this PHP binary. A call to phpinfo() will also reveal this
information.
__________________________________________________________________
Compiling for OS X Server
Mac OS X Server install.
@@ -1292,8 +1238,7 @@ Introduction to PECL Installations
These instructions assume /your/phpsrcdir/ is the path to the PHP
source distribution, and that extname is the name of the PECL
extension. Adjust accordingly. These instructions also assume a
familiarity with the pear command. The information in the PEAR manual
for the pear command also applies to the pecl command.
familiarity with the pear command.
To be useful, a shared extension must be built, installed, and loaded.
The methods described below provide you with various instructions on
@@ -1318,7 +1263,7 @@ Downloading PECL extensions
requirements and other similar details.
* pecl download extname
PECL extensions that have releases listed on the PECL web site are
available for download and installation using the pecl command.
available for download and installation using the pear command.
Specific revisions may also be specified.
* CVS
Most PECL extensions also reside in CVS. A web-based view may be
@@ -1331,9 +1276,9 @@ $ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
* Windows downloads
Windows users may find compiled PECL binaries by downloading the
Collection of PECL modules from the PHP Downloads page, or by
retrieving a PECL Snapshot or an extension DLL on PECL4WIN. To
compile PHP under Windows, read the appropriate chapter.
Collection of PECL modules from the PHP Downloads page, and by
retrieving a PECL Snapshot. To compile PHP under Windows, read the
appropriate chapter.
__________________________________________________________________
PECL for Windows users
@@ -1348,9 +1293,9 @@ PECL for Windows users
After doing this, restart the web server.
__________________________________________________________________
Compiling shared PECL extensions with the pecl command
Compiling shared PECL extensions with PEAR
PECL makes it easy to create shared PHP extensions. Using the pecl
PEAR makes it easy to create shared PHP extensions. Using the pear
command, do the following:
$ pecl install extname
@@ -1359,7 +1304,7 @@ Compiling shared PECL extensions with the pecl command
extname.so into your extension_dir. extname.so may then be loaded via
php.ini
By default, the pecl command will not install packages that are marked
By default, the pear command will not install packages that are marked
with the alpha or beta state. If no stable packages are available, you
may install a beta package using the following command:
@@ -1372,9 +1317,9 @@ Compiling shared PECL extensions with the pecl command
Compiling shared PECL extensions with phpize
Sometimes, using the pecl installer is not an option. This could be
Sometimes, using the pear installer is not an option. This could be
because you're behind a firewall, or it could be because the extension
you want to install is not available as a PECL compatible package, such
you want to install is not available as a PEAR compatible package, such
as unreleased extensions from CVS. If you need to build such an
extension, you can use the lower-level build tools to perform the build
manually.
@@ -1410,7 +1355,7 @@ Compiling PECL extensions statically into PHP
regenerate its configure script.
$ cd /your/phpsrcdir/ext
$ pecl download extname
$ pear download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
@@ -1496,9 +1441,9 @@ The configuration file
* The PHPRC environment variable. Before PHP 5.2.0 this was checked
after the registry key mentioned below.
* As of PHP 5.2.0, the following registry locations are searched in
order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath,
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath, where x, y and z
order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath\x.y.z,
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath\x.y and
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath\x, where x, y and z
mean the PHP major, minor and release versions.
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry
location)
+9 -9
View File
@@ -3,21 +3,21 @@
# Zend
#
$(builddir)/zend_language_scanner.lo: $(srcdir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
$(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
@$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
$(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c
$(srcdir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
@$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
$(srcdir)/zend_ini_parser.h: $(srcdir)/zend_ini_parser.c
$(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
@$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
$(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
@$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
+16 -39
View File
@@ -8,27 +8,27 @@ COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORK
all: $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@echo "(It is safe to ignore warnings about tempnam and tmpnam)."
@echo
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
build-modules: $(PHP_MODULES)
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
-@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp5.so
install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
if test -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
@@ -66,56 +66,33 @@ install-headers:
fi \
done; \
fi
install-su: install-pear
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
PHP_TEST_SHARED_EXTENSIONS = ` \
if test "x$(PHP_MODULES)" != "x"; then \
for i in $(PHP_MODULES)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
done; \
fi; \
if test "x$(PHP_ZEND_EX)" != "x"; then \
for i in $(PHP_ZEND_EX)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
done; \
fi`
test: all
test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
INI_SCANNED_PATH=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
rm -f libphp5.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
find . -name Makefile | xargs rm -f
+369 -1462
View File
File diff suppressed because it is too large. Load diff
+4 -6
View File
@@ -39,7 +39,9 @@ HEAD Will become PHP 6.0. This CVS branch is for active development.
PHP_5_2 Is used to release the PHP 5.2.x series. Only minor feature
enhancements may go in here, but please keep that as infrequent as
possible.
PHP_5_1 This branch is closed.
PHP_5_1 Is used to release the PHP 5.1.x series. Only bugfixes are permitted
on this branch (Consult the releasemaster prior to commit).
PHP_5_0 This branch is closed.
PHP_4_4 Is used to release the PHP 4.4.x series. Only bugfixes are permitted
on this branch (Consult the releasemaster prior to commit).
PHP_4_3 This branch is closed.
@@ -98,13 +100,9 @@ For string.c:
The # lines will be omitted from the ChangeLog automagically.
Use the [DOC] tag in your log message whenever you feel that your changes
imply a documentation modification. The php-doc team will automatically
get notified about your commit through the php-doc mailing list.
If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
bug report when developers are browsing CVS via LXR or Bonsai.
bug report when developers are browsing CVS via. LXR or Bonsai.
Example:
+1 -1
View File
@@ -70,7 +70,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
/* Gets an object of class specified by my_ce, and an optional double. */
zval *obj;
double d = 0.5;
zend_class_entry *my_ce;
zend_class_entry my_ce;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
&obj, my_ce, &d) == FAILURE) {
return;
+14 -14
View File
@@ -1,11 +1,11 @@
[IMPORTANT NOTICE]
------------------
This is an addendum to README.TESTING with additional information
specific to server-tests.php.
specific to run-tests2.php.
server-tests.php is backward compatible with tests developed for
the original run-tests.php script. server-tests is *not* used by
'make test'. server-tests was developed to provide support for
run-tests2.php is backward compatible with tests developed for
the original run-tests.php script. run-tests2 is *not* used by
'make test'. run-tests2 was developed to provide support for
testing PHP under it's primary environment, HTTP, and can run the
PHP tests under any of the SAPI modules that are direct executables,
or are accessable via HTTP.
@@ -13,12 +13,12 @@ or are accessable via HTTP.
[New features]
----------------
* Command line interface:
You can run 'php server-tests.php -h' to get all the possible options.
You can run 'php run-tests2.php -h' to get all the possible options.
* Configuration file:
the -c argument will allow you to use a configuration file. This is
handy if you are testing multiple environments and need various options
depending on the environment.
see server-tests-config.php for details.
see run-tests-config.php for details.
* CGI Emulation:
Will emulate a CGI environment when testing with the cgi sapi executable.
* HTTP testing:
@@ -39,23 +39,23 @@ make testing work.
Some (but not all!) examples of usage:
1. run tests from the php source directory
php server-tests.php -p /path/to/php-cli
php run-tests2.php -p /path/to/php-cli
2. run tests using cgi emulation
php server-tests.php -p /path/to/php-cgi
php run-tests2.php -p /path/to/php-cgi
3. run tests over http, copying test files into document root
php server-tests.php -w -u http://localhost/test -m /path/to/htdocs/test
php run-tests2.php -w -u http://localhost/test -m /path/to/htdocs/test
4. run tests over http, php sources have been aliased in web server
php server-tests.php -w -u http://localhost/test
php run-tests2.php -w -u http://localhost/test
5. run tests using configuration file
php server-tests.php -c /path/to/server-tests-config.php
php run-tests2.php -c /path/to/run-tests-config.php
6. run tests using configuration file, but overriding some settings:
(config file must be first)
php server-tests.php -c /path/to/server-tests-config.php -w -t 3 -d /path/to/testdir
php run-tests2.php -c /path/to/run-tests-config.php -w -t 3 -d /path/to/testdir
NOTE: configuration as described in README.TESTING still works.
@@ -63,7 +63,7 @@ NOTE: configuration as described in README.TESTING still works.
----------------
In addition to the traditional test sections
(see http://qa.php.net/write-test.php), several new sections are available
under server-tests.
under run-tests2.
--POST--
This is not a new section, but not multipart posts are supported for testing
@@ -97,7 +97,7 @@ include:
$scriptname this is what will become SCRIPT_NAME unless you override it
$docroot the equivelant of DOCUMENT_ROOT under Apache
$cwd the directory that the test is being initiated from
$this->conf all server-tests configuration vars
$this->conf all run-tests2 configuration vars
$this->env all environment variables that will get passed to the test
-15
View File
@@ -172,21 +172,6 @@ Items from the NEWS file explained
from your error handler in order to populate $php_errormsg. This allows
you to fine-grain the levels of the messages stored.
==============================
Regressions introduced/fixed
==============================
- In version 5.2.4 a security fix caused a regression for patterns of
the form "/foo/*/bar/*". Since version 5.2.5 instead of raising a warning the
glob() function will return false when openbase_dir restrictions are violated.
#See http://bugs.php.net/bug.php?id=41655
The warning that used to be raised looked like something as follows:
Warning: glob() [function.glob]: Unable to access /foo/*/bar/* in /foo.php on line xxx
#See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.169&r2=1.170
The patch can safely be applied to PHP 5.2.4 as well.
==============================
Backwards incompatible changes
+8
View File
@@ -96,6 +96,13 @@ ext/pcntl
* Remove all zend_extension code
* Add object callback support to pcntl_signal()
ext/pgsql
---------
For PHP 4.3.0:
* Add pg_metadata() with metadata cache feature.
* Add pg_convert() to check and convert array value for query.
* Add pg_insert/pg_update/pg_delete/pg_select for simple query.
ext/session
-----------
For PHP 4.3.0:
@@ -122,6 +129,7 @@ ext/standard
ext/wddx
--------
* See if we can support the remaining data types:
dateTime
binary
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
+20
View File
@@ -48,6 +48,26 @@ Responsibility: Shane Caraveo & each sapi module owner
Timeframe: ? (but shouldn't be much effort, most modules are probably ok)
Component: Input Filtering
- Implement a SAPI input filter hook that will get called
just before registering a variable in the
treat_data/post_handler hooks. (done)
- Make sure this is also done in mbstring (done)
- Provide access functions, or perhaps a new
$_RAW_GET/POST/Cookie set of superglobals to get at the
unfiltered data
- Provide a .ini directive which allows people to set their
input filter to one of the built-in strip_tags,
htmlspecialchars or whatever other internal function might
be useful here.
- (The main benefit of this is to make it easier for people
to solve the XSS problem once and for all without having
to go through every line of their code and adding input
validation/filtering everywhere)
Responsibility: Rasmus
Timeframe: Yesterday
Component: RPC Abstraction Layer
Porting java, com, dotnet, xmlrpc, corba, soap and python, srm
(are there more ?) to work with the new oo api and preferably
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
+7 -12
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
@@ -13,11 +13,14 @@
#ifndef TSRM_H
#define TSRM_H
#if !defined(__CYGWIN__) && defined(WIN32)
/* #ifndef WIN32 */
#ifndef WIN32
# include <tsrm_config.h>
#endif
#ifdef WIN32
# define TSRM_WIN32
# include "tsrm_config.w32.h"
#else
# include <tsrm_config.h>
#endif
#ifdef TSRM_WIN32
@@ -30,14 +33,6 @@
# define TSRM_API
#endif
#ifdef _WIN64
typedef __int64 tsrm_intptr_t;
typedef unsigned __int64 tsrm_uintptr_t;
#else
typedef long tsrm_intptr_t;
typedef unsigned long tsrm_uintptr_t;
#endif
/* Only compile multi-threading functions if we're in ZTS mode */
#ifdef ZTS
+2 -4
View File
@@ -1,10 +1,8 @@
#ifndef TSRM_CONFIG_COMMON_H
#define TSRM_CONFIG_COMMON_H
#ifndef __CYGWIN__
# if WINNT|WIN32
# define TSRM_WIN32
# endif
#if WINNT|WIN32
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
+109 -218
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -136,7 +136,7 @@ static int php_check_dots(const char *element, int n)
free((s)->cwd);
#ifdef TSRM_WIN32
CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
CWD_API int php_sys_stat(const char *path, struct stat *buf)
{
WIN32_FILE_ATTRIBUTE_DATA data;
__int64 t;
@@ -215,10 +215,9 @@ CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
buf->st_mtime = (unsigned long)((t / 10000000) - 11644473600);
return 0;
}
/* }}} */
#endif
static int php_is_dir_ok(const cwd_state *state) /* {{{ */
static int php_is_dir_ok(const cwd_state *state)
{
struct stat buf;
@@ -227,9 +226,8 @@ static int php_is_dir_ok(const cwd_state *state) /* {{{ */
return (1);
}
/* }}} */
static int php_is_file_ok(const cwd_state *state) /* {{{ */
static int php_is_file_ok(const cwd_state *state)
{
struct stat buf;
@@ -238,9 +236,8 @@ static int php_is_file_ok(const cwd_state *state) /* {{{ */
return (1);
}
/* }}} */
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
cwd_globals->realpath_cache_size = 0;
@@ -248,16 +245,14 @@ static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{
cwd_globals->realpath_cache_ttl = REALPATH_CACHE_TTL;
memset(cwd_globals->realpath_cache, 0, sizeof(cwd_globals->realpath_cache));
}
/* }}} */
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_FREE(&cwd_globals->cwd);
realpath_cache_clean(TSRMLS_C);
}
/* }}} */
static char *tsrm_strndup(const char *s, size_t length) /* {{{ */
static char *tsrm_strndup(const char *s, size_t length)
{
char *p;
@@ -271,9 +266,8 @@ static char *tsrm_strndup(const char *s, size_t length) /* {{{ */
p[length]=0;
return p;
}
/* }}} */
CWD_API void virtual_cwd_startup(void) /* {{{ */
CWD_API void virtual_cwd_startup(void)
{
char cwd[MAXPATHLEN];
char *result;
@@ -308,9 +302,8 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
cwd_mutex = tsrm_mutex_alloc();
#endif
}
/* }}} */
CWD_API void virtual_cwd_shutdown(void) /* {{{ */
CWD_API void virtual_cwd_shutdown(void)
{
#ifndef ZTS
cwd_globals_dtor(&cwd_globals TSRMLS_CC);
@@ -321,9 +314,8 @@ CWD_API void virtual_cwd_shutdown(void) /* {{{ */
free(main_cwd_state.cwd); /* Don't use CWD_STATE_FREE because the non global states will probably use emalloc()/efree() */
}
/* }}} */
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC)
{
cwd_state *state;
@@ -355,10 +347,10 @@ CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
*length = state->cwd_length;
return strdup(state->cwd);
}
/* }}} */
/* Same semantics as UNIX getcwd() */
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC) /* {{{ */
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC)
{
size_t length;
char *cwd;
@@ -377,9 +369,8 @@ CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC) /* {{{ */
free(cwd);
return buf;
}
/* }}} */
static inline unsigned long realpath_cache_key(const char *path, int path_len) /* {{{ */
static inline unsigned long realpath_cache_key(const char *path, int path_len)
{
register unsigned long h;
const char *e = path + path_len;
@@ -391,9 +382,8 @@ static inline unsigned long realpath_cache_key(const char *path, int path_len) /
return h;
}
/* }}} */
CWD_API void realpath_cache_clean(TSRMLS_D) /* {{{ */
CWD_API void realpath_cache_clean(TSRMLS_D)
{
int i;
@@ -408,9 +398,8 @@ CWD_API void realpath_cache_clean(TSRMLS_D) /* {{{ */
}
CWDG(realpath_cache_size) = 0;
}
/* }}} */
CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{ */
CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC)
{
unsigned long key = realpath_cache_key(path, path_len);
unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
@@ -429,9 +418,8 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
}
}
}
/* }}} */
static inline void realpath_cache_add(const char *path, int path_len, const char *realpath, int realpath_len, time_t t TSRMLS_DC) /* {{{ */
static inline void realpath_cache_add(const char *path, int path_len, const char *realpath, int realpath_len, time_t t TSRMLS_DC)
{
long size = sizeof(realpath_cache_bucket) + path_len + 1 + realpath_len + 1;
if (CWDG(realpath_cache_size) + size <= CWDG(realpath_cache_size_limit)) {
@@ -452,9 +440,8 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
CWDG(realpath_cache_size) += size;
}
}
/* }}} */
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC)
{
unsigned long key = realpath_cache_key(path, path_len);
unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
@@ -475,11 +462,11 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
}
return NULL;
}
/* }}} */
/* Resolve path relatively to state and put the real path into state */
/* returns 0 for ok, 1 for error */
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath) /* {{{ */
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath)
{
int path_length = strlen(path);
cwd_state old_state;
@@ -487,18 +474,10 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
realpath_cache_bucket *bucket;
time_t t = 0;
int ret;
int use_cache;
int use_relative_path = 0;
#ifdef TSRM_WIN32
int is_unc;
int exists;
#endif
TSRMLS_FETCH();
use_cache = ((use_realpath != CWD_EXPAND) && CWDG(realpath_cache_size_limit));
if (path_length == 0)
return (1);
return (0);
if (path_length >= MAXPATHLEN)
return (1);
@@ -509,33 +488,28 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
/* cwd_length can be 0 when getcwd() fails.
* This can happen under solaris when a dir does not have read permissions
* but *does* have execute permissions */
if (!IS_ABSOLUTE_PATH(path, path_length)) {
if (state->cwd_length == 0) {
use_cache = 0;
use_relative_path = 1;
} else {
int orig_path_len;
int state_cwd_length = state->cwd_length;
if (!IS_ABSOLUTE_PATH(path, path_length) && (state->cwd_length > 0)) {
int orig_path_len;
int state_cwd_length = state->cwd_length;
#ifdef TSRM_WIN32
if (IS_SLASH(path[0])) {
state_cwd_length = 2;
}
#endif
orig_path_len = path_length + state_cwd_length + 1;
if (orig_path_len >= MAXPATHLEN) {
return 1;
}
memcpy(orig_path, state->cwd, state_cwd_length);
orig_path[state_cwd_length] = DEFAULT_SLASH;
memcpy(orig_path + state_cwd_length + 1, path, path_length + 1);
path = orig_path;
path_length = orig_path_len;
if (IS_SLASH(path[0])) {
state_cwd_length = 2;
}
#endif
orig_path_len = path_length + state_cwd_length + 1;
if (orig_path_len >= MAXPATHLEN) {
return 1;
}
memcpy(orig_path, state->cwd, state_cwd_length);
orig_path[state_cwd_length] = DEFAULT_SLASH;
memcpy(orig_path + state_cwd_length + 1, path, path_length + 1);
path = orig_path;
path_length = orig_path_len;
}
if (use_cache) {
t = CWDG(realpath_cache_ttl)?time(0):0;
if (use_realpath != CWD_EXPAND && CWDG(realpath_cache_size_limit)) {
t = CWDG(realpath_cache_ttl)?time(NULL):0;
if ((bucket = realpath_cache_find(path, path_length, t TSRMLS_CC)) != NULL) {
int len = bucket->realpath_len;
@@ -564,7 +538,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
goto no_realpath;
}
use_realpath = CWD_REALPATH;
CWD_STATE_COPY(&old_state, state);
state->cwd_length = strlen(resolved_path);
@@ -575,24 +548,18 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
#endif
} else {
char *ptr, *path_copy, *free_path;
char *tok;
char *tok = NULL;
int ptr_length;
no_realpath:
#ifdef TSRM_WIN32
if (memchr(path, '*', path_length) ||
memchr(path, '?', path_length)) {
return 1;
}
int is_unc = 0;
#endif
no_realpath:
free_path = path_copy = tsrm_strndup(path, path_length);
CWD_STATE_COPY(&old_state, state);
#ifdef TSRM_WIN32
exists = (use_realpath != CWD_EXPAND);
ret = 0;
is_unc = 0;
#ifdef TSRM_WIN32
if (path_length >= 2 && path[1] == ':') {
state->cwd = (char *) realloc(state->cwd, 2 + 1);
state->cwd[0] = toupper(path[0]);
@@ -616,7 +583,6 @@ no_realpath:
}
#endif
tok = NULL;
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
while (ptr) {
ptr_length = strlen(ptr);
@@ -624,12 +590,6 @@ no_realpath:
if (IS_DIRECTORY_UP(ptr, ptr_length)) {
char save;
if (use_relative_path) {
CWD_STATE_FREE(state);
*state = old_state;
return 1;
}
save = DEFAULT_SLASH;
#define PREVIOUS state->cwd[state->cwd_length - 1]
@@ -649,38 +609,33 @@ no_realpath:
state->cwd_length--;
}
} else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) {
if (use_relative_path) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1);
use_relative_path = 0;
} else {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
#ifdef TSRM_WIN32
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if (state->cwd_length < 2 ||
(state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#elif defined(NETWARE)
/*
Below code keeps appending to state->cwd a File system seperator
cases where this appending should not happen is given below,
a) sys: should just be left as it is
b) sys:system should just be left as it is,
Colon is allowed only in the first token as volume names alone can have the : in their names.
Files and Directories cannot have : in their names
So the check goes like this,
For second token and above simply append the DEFAULT_SLASH to the state->cwd.
For first token check for the existence of :
if it exists don't append the DEFAULT_SLASH to the state->cwd.
*/
if(((state->cwd_length == 0) && (strchr(ptr, ':') == NULL)) || (state->cwd_length > 0)) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if (state->cwd_length < 2 ||
(state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
#endif
}
#elif defined(NETWARE)
/*
Below code keeps appending to state->cwd a File system seperator
cases where this appending should not happen is given below,
a) sys: should just be left as it is
b) sys:system should just be left as it is,
Colon is allowed only in the first token as volume names alone can have the : in their names.
Files and Directories cannot have : in their names
So the check goes like this,
For second token and above simply append the DEFAULT_SLASH to the state->cwd.
For first token check for the existence of :
if it exists don't append the DEFAULT_SLASH to the state->cwd.
*/
if(((state->cwd_length == 0) && (strchr(ptr, ':') == NULL)) || (state->cwd_length > 0)) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
#endif
memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1);
#ifdef TSRM_WIN32
@@ -697,17 +652,14 @@ no_realpath:
memcpy(&state->cwd[state->cwd_length], data.cFileName, length+1);
ptr_length = length;
FindClose(hFind);
ret = 0;
} else {
} else if (use_realpath == CWD_REALPATH) {
if (is_unc) {
/* skip share name */
is_unc--;
ret = 0;
} else {
exists = 0;
if (use_realpath == CWD_REALPATH) {
ret = 1;
}
free(free_path);
CWD_STATE_FREE(state);
*state = old_state;
return 1;
}
}
}
@@ -717,25 +669,8 @@ no_realpath:
}
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
free(free_path);
if (use_realpath == CWD_REALPATH) {
if (ret) {
CWD_STATE_FREE(state);
*state = old_state;
return 1;
}
} else {
#if defined(TSRM_WIN32) || defined(NETWARE)
if (path[path_length-1] == '\\' || path[path_length-1] == '/') {
#else
if (path[path_length-1] == '/') {
#endif
state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2);
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
state->cwd[state->cwd_length] = 0;
}
}
free(free_path);
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
@@ -745,12 +680,7 @@ no_realpath:
}
}
/* Store existent file in realpath cache. */
#ifdef TSRM_WIN32
if (use_cache && !is_unc && exists) {
#else
if (use_cache && (use_realpath == CWD_REALPATH)) {
#endif
if (use_realpath != CWD_EXPAND && CWDG(realpath_cache_size_limit)) {
realpath_cache_add(path, path_length, state->cwd, state->cwd_length, t TSRMLS_CC);
}
@@ -768,15 +698,13 @@ no_realpath:
#endif
return (ret);
}
/* }}} */
CWD_API int virtual_chdir(const char *path TSRMLS_DC) /* {{{ */
CWD_API int virtual_chdir(const char *path TSRMLS_DC)
{
return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH)?-1:0;
}
/* }}} */
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC) /* {{{ */
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC)
{
int length = strlen(path);
char *temp;
@@ -807,29 +735,13 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
tsrm_free_alloca(temp);
return retval;
}
/* }}} */
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{ */
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC)
{
cwd_state new_state;
char *retval;
char cwd[MAXPATHLEN];
/* realpath("") returns CWD */
if (!*path) {
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
path = cwd;
}
} else if (!IS_ABSOLUTE_PATH(path, strlen(path))) {
CWD_STATE_COPY(&new_state, &CWDG(cwd));
} else {
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
}
CWD_STATE_COPY(&new_state, &CWDG(cwd));
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)==0) {
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
@@ -845,9 +757,8 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {
return retval;
}
/* }}} */
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC) /* {{{ */
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC)
{
cwd_state new_state;
int retval;
@@ -860,15 +771,13 @@ CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_f
return retval;
}
/* }}} */
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC) /* {{{ */
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC)
{
return virtual_filepath_ex(path, filepath, php_is_file_ok TSRMLS_CC);
}
/* }}} */
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC) /* {{{ */
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC)
{
cwd_state new_state;
FILE *f;
@@ -888,9 +797,8 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC) /* {{{
CWD_STATE_FREE(&new_state);
return f;
}
/* }}} */
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC)
{
cwd_state new_state;
int ret;
@@ -911,10 +819,10 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
return ret;
}
/* }}} */
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC) /* {{{ */
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC)
{
cwd_state new_state;
int ret;
@@ -930,10 +838,9 @@ CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC) /
CWD_STATE_FREE(&new_state);
return ret;
}
/* }}} */
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC) /* {{{ */
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int ret;
@@ -949,10 +856,9 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC) /* {{{ */
CWD_STATE_FREE(&new_state);
return ret;
}
/* }}} */
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC) /* {{{ */
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC)
{
cwd_state new_state;
int ret;
@@ -976,10 +882,9 @@ CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int li
CWD_STATE_FREE(&new_state);
return ret;
}
/* }}} */
#endif
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...) /* {{{ */
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...)
{
cwd_state new_state;
int f;
@@ -1005,9 +910,8 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...) /* {{{ */
CWD_STATE_FREE(&new_state);
return f;
}
/* }}} */
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC) /* {{{ */
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int f;
@@ -1023,23 +927,22 @@ CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC) /* {{{ */
CWD_STATE_FREE(&new_state);
return f;
}
/* }}} */
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
{
cwd_state old_state;
cwd_state new_state;
int retval;
CWD_STATE_COPY(&old_state, &CWDG(cwd));
if (virtual_file_ex(&old_state, oldname, NULL, CWD_EXPAND)) {
if (virtual_file_ex(&old_state, oldname, NULL, CWD_REALPATH)) {
CWD_STATE_FREE(&old_state);
return -1;
}
oldname = old_state.cwd;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
if (virtual_file_ex(&new_state, newname, NULL, CWD_EXPAND)) {
if (virtual_file_ex(&new_state, newname, NULL, CWD_FILEPATH)) {
CWD_STATE_FREE(&old_state);
CWD_STATE_FREE(&new_state);
return -1;
@@ -1053,9 +956,8 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */
return retval;
}
/* }}} */
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
@@ -1071,16 +973,15 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
CWD_STATE_FREE(&new_state);
return retval;
}
/* }}} */
#if !defined(TSRM_WIN32)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND)) {
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) {
CWD_STATE_FREE(&new_state);
return -1;
}
@@ -1090,10 +991,9 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ *
CWD_STATE_FREE(&new_state);
return retval;
}
/* }}} */
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */
CWD_API int virtual_unlink(const char *path TSRMLS_DC)
{
cwd_state new_state;
int retval;
@@ -1109,9 +1009,8 @@ CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */
CWD_STATE_FREE(&new_state);
return retval;
}
/* }}} */
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC) /* {{{ */
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int retval;
@@ -1130,9 +1029,8 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC) /* {{{ */
CWD_STATE_FREE(&new_state);
return retval;
}
/* }}} */
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC) /* {{{ */
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC)
{
cwd_state new_state;
int retval;
@@ -1148,13 +1046,12 @@ CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC) /* {{{ */
CWD_STATE_FREE(&new_state);
return retval;
}
/* }}} */
#ifdef TSRM_WIN32
DIR *opendir(const char *name);
#endif
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC) /* {{{ */
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC)
{
cwd_state new_state;
DIR *retval;
@@ -1170,19 +1067,20 @@ CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC) /* {{{ */
CWD_STATE_FREE(&new_state);
return retval;
}
/* }}} */
#ifdef TSRM_WIN32
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
return popen_ex(command, type, CWDG(cwd).cwd, NULL);
}
/* }}} */
#elif defined(NETWARE)
/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
a VCWD_CHDIR() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
@@ -1207,9 +1105,10 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /*
return retval;
}
/* }}} */
#else /* Unix */
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
int command_length;
int dir_length, extra = 0;
@@ -1266,23 +1165,15 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /*
free(command_line);
return retval;
}
/* }}} */
#endif
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{ */
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC)
{
cwd_state new_state;
char cwd[MAXPATHLEN];
/* realpath("") returns CWD */
if (!*path) {
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
path = cwd;
}
} else if (!IS_ABSOLUTE_PATH(path, strlen(path)) &&
if (!IS_ABSOLUTE_PATH(path, strlen(path)) &&
VCWD_GETCWD(cwd, MAXPATHLEN)) {
new_state.cwd = strdup(cwd);
new_state.cwd_length = strlen(cwd);
@@ -1307,7 +1198,7 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{
return new_state.cwd;
}
}
/* }}} */
/*
* Local variables:
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
+17 -18
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -88,7 +88,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
{
if (mode == 1 /*X_OK*/) {
#if 1
/* This code is not supported by Windows 98,
/* This code is not supported by Windows 98,
* but we don't support it anymore */
DWORD type;
@@ -96,7 +96,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
#else
SHFILEINFO sfi;
return access(pathname, 0) == 0 &&
return access(pathname, 0) == 0 &&
SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1;
#endif
} else {
@@ -109,22 +109,22 @@ static process_pair *process_get(FILE *stream TSRMLS_DC)
{
process_pair *ptr;
process_pair *newptr;
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
if (ptr->stream == stream) {
break;
}
}
if (ptr < (TWG(process) + TWG(process_size))) {
return ptr;
}
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
if (newptr == NULL) {
return NULL;
}
TWG(process) = newptr;
ptr = newptr + TWG(process_size);
TWG(process_size)++;
@@ -136,7 +136,7 @@ static shm_pair *shm_get(int key, void *addr)
shm_pair *ptr;
shm_pair *newptr;
TSRMLS_FETCH();
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
if (!ptr->descriptor) {
continue;
@@ -151,12 +151,12 @@ static shm_pair *shm_get(int key, void *addr)
if (ptr < (TWG(shm) + TWG(shm_size))) {
return ptr;
}
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
if (newptr == NULL) {
return NULL;
}
TWG(shm) = newptr;
ptr = newptr + TWG(shm_size);
TWG(shm_size)++;
@@ -195,7 +195,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
return NULL;
}
memset(&startup, 0, sizeof(STARTUPINFO));
memset(&process, 0, sizeof(PROCESS_INFORMATION));
@@ -219,7 +219,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
sprintf(cmd, "%s /c %s", TWG(comspec), command);
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) {
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS, env, cwd, &startup, &process)) {
return NULL;
}
free(cmd);
@@ -228,10 +228,10 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
proc = process_get(NULL TSRMLS_CC);
if (read) {
fno = _open_osfhandle((tsrm_intptr_t)in, _O_RDONLY | mode);
fno = _open_osfhandle((long)in, _O_RDONLY | mode);
CloseHandle(out);
} else {
fno = _open_osfhandle((tsrm_intptr_t)out, _O_WRONLY | mode);
fno = _open_osfhandle((long)out, _O_WRONLY | mode);
CloseHandle(in);
}
@@ -280,6 +280,9 @@ TSRM_API int shmget(int key, int size, int flags)
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
if ((!shm_handle && !info_handle)) {
if (flags & IPC_EXCL) {
return -1;
}
if (flags & IPC_CREAT) {
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
@@ -288,10 +291,6 @@ TSRM_API int shmget(int key, int size, int flags)
if ((!shm_handle || !info_handle)) {
return -1;
}
} else {
if (flags & IPC_EXCL) {
return -1;
}
}
shm = shm_get(key, NULL);
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
+7 -28
View File
@@ -1,34 +1,13 @@
Zend Memory Manager
===================
The goal of the new memory manager (PHP 5.2 and later) is reducing memory allocation overhead and speedup memory management.
General:
--------
The new manager's "configure" has no "--disable-zend-memory-manager" option, but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG build and disabled by default in RELEASE built. It allows select malloc/emalloc at runtime. So you can use internal and external memory debuggers without recompilation.
The goal of the new memory manager (available since PHP 5.2) is to reduce memory
allocation overhead and speedup memory management.
$ sapi/cli/php -r 'leak();'
The new manager's "configure" has no "--disable-zend-memory-manager" option,
but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG
build and disabled by default in RELEASE build. when enabled it allows selecting
between malloc and emalloc at runtime so you can use internal and external memory
debuggers without recompilation.
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full -r 'leak();'
Debugging:
----------
The patch allows tweaking memory manager with ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment variables. Default values are "malloc" and "256K". Dependent on target system you can also use "mmap_anon", "mmap_zero"
and "win32" storage managers.
Normal:
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php
$ sapi/cli/php -r 'leak();'
Zend MM disabled:
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
Tweaking:
---------
The Zend MM can be tweaked using ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment
variables. Default values are "malloc" and "256K". Dependent on target system you
can also use "mmap_anon", "mmap_zero" and "win32" storage managers.
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php ..etc.
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
+6 -6
View File
@@ -23,18 +23,18 @@ var_dump(constant("test const"));
echo "Done\n";
?>
--EXPECTF--
Warning: define() expects at least 2 parameters, 0 given in %s on line %d
Warning: Wrong parameter count for define() in %s on line %d
NULL
Warning: define() expects at least 2 parameters, 1 given in %s on line %d
Warning: Wrong parameter count for define() in %s on line %d
NULL
bool(true)
Warning: define() expects parameter 3 to be boolean, array given in %s on line %d
NULL
Notice: Constant true already defined in %s on line %d
bool(false)
Warning: define() expects parameter 1 to be string, array given in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
bool(true)
bool(true)
bool(true)
bool(true)
+4 -8
View File
@@ -10,11 +10,9 @@ var_dump(get_resource_type($fp));
fclose($fp);
var_dump(get_resource_type($fp));
var_dump(get_loaded_extensions(true));
var_dump(gettype(get_loaded_extensions()));
var_dump(count(get_loaded_extensions()));
var_dump(gettype(get_loaded_extensions(true)));
var_dump(count(get_loaded_extensions(true)));
var_dump(get_loaded_extensions(true, true));
define("USER_CONSTANT", "test");
@@ -52,13 +50,11 @@ Warning: Supplied argument is not a valid resource handle in %s on line %d
bool(false)
string(6) "stream"
string(7) "Unknown"
string(5) "array"
int(%d)
string(5) "array"
int(%d)
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
Warning: Wrong parameter count for get_loaded_extensions() in %s on line %d
NULL
string(5) "array"
int(%d)
Warning: Wrong parameter count for get_defined_constants() in %s on line %d
NULL
-36
View File
@@ -1,36 +0,0 @@
--TEST--
constant() tests
--FILE--
<?php
var_dump(constant());
var_dump(constant("", ""));
var_dump(constant(""));
var_dump(constant(array()));
define("TEST_CONST", 1);
var_dump(constant("TEST_CONST"));
define("TEST_CONST2", "test");
var_dump(constant("TEST_CONST2"));
echo "Done\n";
?>
--EXPECTF--
Warning: Wrong parameter count for constant() in %s on line %d
NULL
Warning: Wrong parameter count for constant() in %s on line %d
NULL
Warning: constant(): Couldn't find constant in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
Warning: constant(): Couldn't find constant Array in %s on line %d
NULL
int(1)
string(4) "test"
Done
-1332
View File
File diff suppressed because it is too large. Load diff
-31
View File
@@ -1,31 +0,0 @@
--TEST--
func_get_arg() invalid usage
--FILE--
<?php
var_dump(func_get_arg(1,2,3));
var_dump(func_get_arg(1));
var_dump(func_get_arg());
function bar() {
var_dump(func_get_arg(1));
}
function foo() {
bar(func_get_arg(1));
}
foo(1,2);
echo "Done\n";
?>
--EXPECTF--
bool(false)
Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d
bool(false)
bool(false)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
Done
-73
View File
@@ -1,73 +0,0 @@
--TEST--
adding arrays
--FILE--
<?php
$a = array(1,2,3);
$b = array("str", "here");
$c = $a + $b;
var_dump($c);
$a = array(1,2,3);
$b = array(1,2,4);
$c = $a + $b;
var_dump($c);
$a = array("a"=>"aaa",2,3);
$b = array(1,2,"a"=>"bbbbbb");
$c = $a + $b;
var_dump($c);
$a += $b;
var_dump($c);
$a += $a;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
array(3) {
["a"]=>
string(3) "aaa"
[0]=>
int(2)
[1]=>
int(3)
}
array(3) {
["a"]=>
string(3) "aaa"
[0]=>
int(2)
[1]=>
int(3)
}
array(3) {
["a"]=>
string(3) "aaa"
[0]=>
int(2)
[1]=>
int(3)
}
Done
-19
View File
@@ -1,19 +0,0 @@
--TEST--
adding objects to arrays
--FILE--
<?php
$a = array(1,2,3);
$o = new stdclass;
$o->prop = "value";
$c = $a + $o;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Notice: Object of class stdClass could not be converted to int in %s on line %d
Fatal error: Unsupported operand types in %s on line %d
-19
View File
@@ -1,19 +0,0 @@
--TEST--
adding arrays to objects
--FILE--
<?php
$a = array(1,2,3);
$o = new stdclass;
$o->prop = "value";
$c = $o + $a;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Notice: Object of class stdClass could not be converted to int in %s on line %d
Fatal error: Unsupported operand types in %s on line %d
-14
View File
@@ -1,14 +0,0 @@
--TEST--
adding numbers to arrays
--FILE--
<?php
$a = array(1,2,3);
$c = $a + 5;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Fatal error: Unsupported operand types in %s on line %d
-22
View File
@@ -1,22 +0,0 @@
--TEST--
adding integers to doubles
--INI--
precision=14
--FILE--
<?php
$i = 75636;
$d = 2834681123.123123;
$c = $i + $d;
var_dump($c);
$c = $d + $i;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
float(2834756759.1231)
float(2834756759.1231)
Done
-49
View File
@@ -1,49 +0,0 @@
--TEST--
adding numbers to strings
--INI--
precision=14
--FILE--
<?php
$i = 75636;
$s1 = "this is a string";
$s2 = "876222numeric";
$s3 = "48474874";
$s4 = "25.68";
$c = $i + $s1;
var_dump($c);
$c = $i + $s2;
var_dump($c);
$c = $i + $s3;
var_dump($c);
$c = $i + $s4;
var_dump($c);
$c = $s1 + $i;
var_dump($c);
$c = $s2 + $i;
var_dump($c);
$c = $s3 + $i;
var_dump($c);
$c = $s4 + $i;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
int(75636)
int(951858)
int(48550510)
float(75661.68)
int(75636)
int(951858)
int(48550510)
float(75661.68)
Done
-16
View File
@@ -1,16 +0,0 @@
--TEST--
adding strings to arrays
--FILE--
<?php
$a = array(1,2,3);
$s1 = "some string";
$c = $a + $s1;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Fatal error: Unsupported operand types in %s on line %d
-39
View File
@@ -1,39 +0,0 @@
--TEST--
bitwise AND and strings
--FILE--
<?php
$s = "123";
$s1 = "234";
var_dump($s & $s1);
$s = "test";
$s1 = "some";
var_dump($s & $s1);
$s = "test long";
$s1 = "some";
var_dump($s & $s1);
$s = "test";
$s1 = "some long";
var_dump($s & $s1);
$s = "test";
$s &= "some long";
var_dump($s);
echo "Done\n";
?>
--EXPECTF--
string(3) "020"
string(4) "pead"
string(4) "pead"
string(4) "pead"
string(4) "pead"
Done
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Tests that array manipulation code is correctly dealing with copy on write and splitting on reference
--FILE--
<?php
$a=array();
$b=1;
$c=&$b;
$a[]=$b;
$b=2;
var_dump ($a);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
}
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Tests that array unshift code is correctly dealing with copy on write and splitting on reference
--FILE--
<?php
$a=array();
$b=1;
$c=&$b;
array_unshift ($a,$b);
$b=2;
var_dump ($a);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
}
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #22725 (A derived class can call a parent's protected method that calls a private method)
bug #22725 (A derived class can call a parent's protected method that calls a private method)
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #27304 (Static functions don't function properly)
Bug #27304
--FILE--
<?php
+2 -2
View File
@@ -49,12 +49,12 @@ array(1) {
}
Base::__construct
array(3) {
["Baz"]=>
int(4)
["Foo"]=>
int(1)
["Bar"]=>
int(2)
["Baz"]=>
int(3)
}
Child::__construct
array(3) {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #29104 (Function declaration in method doesn't work)
Bug #29104 Function declaration in method doesn't work
--FILE--
<?php
class A
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #29210 (Function is_callable does not support private and protected methods)
Bug #29210 Function: is_callable - no support for private and protected classes
--FILE--
<?php
class test_class {
+1 -1
View File
@@ -33,7 +33,7 @@ $obj->printVars();
===BASE===
string(4) "Base"
Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
NULL
===CHILD===
string(4) "Base"
+1 -1
View File
@@ -52,7 +52,7 @@ $baz->printFoo();
--EXPECTF--
foo: foo foo2
bar: bar
Notice: Undefined property: bar::$foo2 in %s on line %d
Notice: Undefined property: bar::$foo2 in %s on line %d
---baz--
foo: foo foo2
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30519 (Interface not existing says Class not found)
Bug #30519 Interface not existing says Class not found
--FILE--
<?php
class test implements a {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30702 (cannot initialize class variable from class constant)
Bug #30702 cannot initialize class variable from class constant
--FILE--
<?php
class foo {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30791 (magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded)
Bug #30791 magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded
--FILE--
<?php
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30889 (Conflict between __get/__set and ++ operator)
Bug #30889 Conflict between __get/__set and ++ operator
--FILE--
<?php
class overloaded
+1 -1
View File
@@ -10,4 +10,4 @@ var_dump($a instanceOf A);
echo "ok\n";
?>
--EXPECTF--
Fatal error: Interface RecurisiveFooFar cannot implement itself in %sbug30922.php on line %d
Fatal error: Interface RecurisiveFooFar cannot not implement itself in %sbug30922.php on line %d
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32296 (get_class_methods output has changed between 5.0.2 and 5.0.3)
Bug #32296 get_class_methods output has changed between 5.0.2 and 5.0.3
--FILE--
<?php
abstract class space{
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32427 (Interfaces are not allowed 'static' access modifier)
Bug #32427 Interfaces are not allowed 'static' access modifier
--FILE--
<?php
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32660 (Assignment by reference causes crash when field access is overloaded (__get))
Bug #32660 Assignment by reference causes crash when field access is overloaded (__get)
--FILE--
<?php
class A
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32674 (exception in iterator causes crash)
Bug #32674 exception in iterator causes crash
--FILE--
<?php
class collection implements Iterator {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32833 (Invalid opcode with $a[] .= '')
Bug #32833 Invalid opcode
--FILE--
<?php
$test = array();
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #33257 (array_splice() inconsistent when passed function instead of variable)
Bug #33257 array_splice() inconsistent when passed function instead of variable
--INI--
error_reporting=4095
--FILE--
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #34712 (zend.ze1_compatibility_mode = on segfault)
Bug #34712 zend.ze1_compatibility_mode = on segfault
--INI--
zend.ze1_compatibility_mode=1
error_reporting=4095
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #35437 (Segfault or Invalid Opcode 137/1/4)
Bug #35437 Segfault or Invalid Opcode 137/1/4
--FILE--
<?php
function err2exception($errno, $errstr)
+3 -1
View File
@@ -6,6 +6,8 @@ error_reporting=4095
<?php
$a = clone 0;
$a[0]->b = 0;
echo "ok\n";
?>
--EXPECTF--
Fatal error: __clone method called on non-object in %sbug36071.php on line 2
Warning: __clone method called on non-object in %sbug36071.php on line 2
ok
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #37212 (Access to protected property of common base class)
Bug #3721 (Access to protected property of common base class)
--FILE--
<?php
-29
View File
@@ -1,29 +0,0 @@
--TEST--
Bug #37715 (array pointers resetting on copy)
--FILE--
<?php
$a = array(
'a' => array(
'A', 'B', 'C', 'D',
),
'b' => array(
'AA', 'BB', 'CC', 'DD',
),
);
// Set the pointer of $a to 'b' and the pointer of 'b' to 'CC'
reset($a);
next($a);
next($a['b']);
next($a['b']);
next($a['b']);
var_dump(key($a['b']));
foreach($a as $k => $d)
{
}
// Alternatively $c = $a; and foreachloop removal will cause identical results.
var_dump(key($a['b']));
--EXPECT--
int(3)
int(3)
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #37811 (define not using toString on objects)
Bug #37811 define not using toString on objects
--FILE--
<?php
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #38220 (Crash on some object operations)
Bug #38220 Crash on some object operations
--FILE--
<?php
class drv {
-28
View File
@@ -1,28 +0,0 @@
--TEST--
Bug #38469 (Unexpected creation of cycle)
--FILE--
<?php
$a = array();
$a[0] = $a;
var_dump($a);
$b = array(array());
$b[0][0] = $b;
var_dump($b);
?>
--EXPECT--
array(1) {
[0]=>
array(0) {
}
}
array(1) {
[0]=>
array(1) {
[0]=>
array(1) {
[0]=>
array(0) {
}
}
}
}
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #39542 (Behaviour of require_once/include_once different to < 5.2.0)
--FILE--
<?php
$oldcwd = getcwd();
chdir(dirname(__FILE__));
if (substr(PHP_OS, 0, 3) == 'WIN') {
set_include_path(dirname(__FILE__).'/bug39542;.');
} else {
set_include_path(dirname(__FILE__).'/bug39542:.');
}
function __autoload($class) {
if (!require_once($class.'.php')) {
error_log('Error: Autoload class: '.$class.' not found!');
}
}
new bug39542();
chdir($oldcwd);
?>
--EXPECT--
ok
-7
View File
@@ -1,7 +0,0 @@
<?php
class bug39542 {
function bug39542() {
echo "ok\n";
}
}
?>
+1 -1
View File
@@ -4,7 +4,6 @@ Bug #39602 (Invalid session.save_handler crashes PHP)
<?php if (!extension_loaded("session")) die("skip"); ?>
--INI--
session.save_handler=qwerty
error_reporting=0
--FILE--
<?php
ini_set("session.save_handler","files");
@@ -13,3 +12,4 @@ echo "ok";
?>
--EXPECT--
ok
Fatal error: Unknown: Cannot find save handler qwerty in Unknown on line 0
-10
View File
@@ -1,10 +0,0 @@
<?php
function func1() { }
function func2() { }
function func3() { }
function func4() { }
function func5() { }
function func6() { }
function func7() { }
print ("ok\n");
?>
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #40236 (php -a function allocation eats memory)
--SKIPIF--
<?php
if (php_sapi_name() != "cli") die("skip CLI only");
if (extension_loaded("readline")) die("skip Test doesn't support readline");
?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
$cmd = "$php -d memory_limit=4M -a ".dirname(__FILE__)."/bug40236.inc";
echo `$cmd`;
?>
--EXPECTF--
Interactive %s
ok
-25
View File
@@ -1,25 +0,0 @@
--TEST--
Bug #40261 (Extremely slow data handling due to memory fragmentation)
--INI--
memory_limit=128M
--FILE--
<?php
$num = 100000;
$a = Array();
for ($i=0; $i<$num; $i++) {
$a[$i] = Array(1);
}
for ($i=0; $i<$num; $i++) {
$b[$i] = $a[$i][0];
}
unset($a);
for ($i=0; $i<$num; $i++) {
$b[$i] = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
}
echo "ok\n";
?>
--EXPECT--
ok
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #40509 (key() function changed behaviour if global array is used within function)
--FILE--
<?php
function foo()
{
global $arr;
$c = $arr["v"];
foreach ($c as $v) {}
}
$arr["v"] = array("a");
var_dump(key($arr["v"]));
foo();
var_dump(key($arr["v"]));
foreach ($arr["v"] as $k => $v) {
var_dump($k);
}
var_dump(key($arr["v"]));
--EXPECT--
int(0)
int(0)
int(0)
NULL
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #40621 (Crash when constructor called inappropriately (statically))
--FILE--
<?php
class Foo {
private function __construct() { }
function get() {
self::__construct();
}
}
Foo::get();
echo "Done\n";
?>
--EXPECTF--
Strict Standards: Non-static method Foo::get() should not be called statically in %s on line %d
Fatal error: Non-static method Foo::__construct() cannot be called statically in %s on line %d
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #40705 (Iterating within function moves original array pointer)
--FILE--
<?php
function doForeach($array)
{
foreach ($array as $k => $v) {
// do stuff
}
}
$foo = array('foo', 'bar', 'baz');
var_dump(key($foo));
doForeach($foo);
var_dump(key($foo));
foreach ($foo as $k => $v) {
var_dump($k);
}
var_dump(key($foo));
--EXPECT--
int(0)
int(0)
int(0)
int(1)
int(2)
NULL
-28
View File
@@ -1,28 +0,0 @@
--TEST--
Bug #40757 (get_object_vars() get nothing in child class)
--FILE--
<?php
class Base {
private $p1='sadf';
function getFields($obj){
return get_object_vars($obj);
}
}
class Child extends Base { }
$base=new Base();
print_r($base->getFields(new Base()));
$child=new Child();
print_r($child->getFields(new Base()));
?>
--EXPECT--
Array
(
[p1] => sadf
)
Array
(
[p1] => sadf
)
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #40770 (Apache child exits when PHP memory limit reached)
--INI--
memory_limit=8M
--SKIPIF--
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
die("skip Zend MM disabled");
}
?>
--FILE--
<?php
ini_set('display_errors',true);
$mb=148;
$var = '';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
}
?>
--EXPECTF--
Fatal error: Allowed memory size of 8388608 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #40784 (Case sensivity in constructor's fallback)
--FILE--
<?php
class A {
function A () { echo "I'm A\n"; }
}
class B extends A {
function __construct() {
parent::__construct();
parent::__constrUct();
}
}
$b = new B;
echo "Done\n";
?>
--EXPECTF--
I'm A
I'm A
Done
-33
View File
@@ -1,33 +0,0 @@
--TEST--
Bug #40809 (Poor perfomance of ".=")
--FILE--
<?php
error_reporting(E_ALL|E_STRICT);
$num_increments = 100;
$num_repeats = 1000;
$increment = 50;
/* Create some more holes to give the memory allocator something to
* work with. */
$num = 5000;
$a = Array();
for ($i=0; $i<$num; $i++) {
$a[$i] = Array(1);
}
for ($i=0; $i<$num; $i++) {
$b[$i] = $a[$i][0];
}
unset($a);
for ($i=0;$i<$num_repeats;$i++) {
$evil = "";
for ($j=0;$j<$num_increments;$j++) {
$evil .= str_repeat("a", $increment);
}
unset($evil);
}
echo "ok\n";
?>
--EXPECT--
ok
-18
View File
@@ -1,18 +0,0 @@
--TEST--
Bug #40815 (using strings like "class::func" and static methods in set_exception_handler() might result in crash).
--FILE--
<?php
class ehandle{
static public function exh ($ex) {
echo 'foo';
}
}
set_exception_handler("ehandle::exh");
throw new Exception ("Whiii");
echo "Done\n";
?>
--EXPECTF--
foo
-72
View File
@@ -1,72 +0,0 @@
--TEST--
Bug #40833 (Crash when using unset() on an ArrayAccess object retrieved via __get)
--FILE--
<?php
class entity
{
private $data;
private $modified;
function __get($name)
{
if ( isset($this->data[$name]) )
return $this->data[$name];
else
return $this->data[$name] = new set($this);
}
function __set($name, $value)
{
$this->modified[$name] = $value;
}
}
class set implements ArrayAccess
{
private $entity;
function __construct($entity)
{
$this->entity = $entity;
$this->entity->whatever = $this;
}
function clear() {
$this->entity->whatever = null;
}
function offsetUnset($offset)
{
$this->clear();
// $this->entity->{$this->name} = null;
}
function offsetSet($offset, $value)
{
}
function offsetGet($offset)
{
return 'Bogus ';
}
function offsetExists($offset)
{
}
}
$entity = new entity();
echo($entity->whatever[0]);
//This will crash
// $entity->whatever->clear();
unset($entity->whatever[0]);
//This will not crash (comment previous & uncomment this to test
// $test = $entity->whatever; unset($test[0]);
echo($entity->whatever[0]);
echo "ok\n";
?>
--EXPECT--
Bogus Bogus ok
-9
View File
@@ -1,9 +0,0 @@
--TEST--
Bug #40899 (memory leak when nesting list())
--FILE--
<?php
list(list($a,$b),$c)=array(array('a','b'),'c');
echo "$a$b$c\n";
?>
--EXPECT--
abc
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #41026 (segfault when calling "self::method()" in shutdown functions)
--FILE--
<?php
class try_class
{
static public function main ()
{
register_shutdown_function (array ("self", "on_shutdown"));
}
static public function on_shutdown ()
{
printf ("CHECKPOINT\n"); /* never reached */
}
}
try_class::main ();
echo "Done\n";
?>
--EXPECTF--
Done
Warning: (Registered shutdown functions) Unable to call self::on_shutdown() - function does not exist in Unknown on line 0
-31
View File
@@ -1,31 +0,0 @@
--TEST--
Bug #41075 (memleak when creating default object caused exception)
--FILE--
<?php
function err($errno, $errstr, $errfile, $errline)
{
throw new Exception($errstr);
}
set_error_handler("err");
class test {
function foo() {
$var = $this->blah->prop = "string";
var_dump($this->blah);
}
}
$t = new test;
try {
$t->foo();
} catch (Exception $e) {
var_dump($e->getMessage());
}
echo "Done\n";
?>
--EXPECTF--
string(40) "Creating default object from empty value"
Done
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #41117 (Altering $this via argument)
--FILE--
<?php
class foo {
function __construct($this) {
echo $this."\n";
}
}
$obj = new foo("Hello world");
?>
--EXPECTF--
Fatal error: Cannot re-assign $this in %sbug41117_1.php on line 3
-46
View File
@@ -1,46 +0,0 @@
--TEST--
Bug #41209 (Segmentation fault with ArrayAccess, set_error_handler and undefined var)
--FILE--
<?php
class env
{
public function __construct()
{
set_error_handler(array(__CLASS__, 'errorHandler'));
}
public static function errorHandler($errno, $errstr, $errfile, $errline)
{
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
}
class cache implements ArrayAccess
{
private $container = array();
public function offsetGet($id) {}
public function offsetSet($id, $value) {}
public function offsetUnset($id) {}
public function offsetExists($id)
{
return isset($this->containers[(string) $id]);
}
}
$env = new env();
$cache = new cache();
var_dump(isset($cache[$id]));
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'ErrorException' with message 'Undefined variable: id' in %s:%d
Stack trace:
#0 %s(%d): env::errorHandler()
#1 {main}
thrown in %s on line %d
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #41351 (Invalid opcode with foreach ($a[] as $b))
--FILE--
<?php
$a = array();
foreach($a[] as $b) {
}
echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot use [] for reading in %s on line %d
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #41351 (Invalid opcode with foreach ($a[] as $b)) - 2
--FILE--
<?php
$a = array();
foreach($a[]['test'] as $b) {
}
echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot use [] for reading in %s on line %d
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #41351 (Invalid opcode with foreach ($a[] as $b)) - 3
--FILE--
<?php
$a = array();
foreach($a['test'][] as $b) {
}
echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot use [] for reading in %s on line %d
-13
View File
@@ -1,13 +0,0 @@
--TEST--
Bug #41372 (Internal pointer of source array resets during array copying)
--FILE--
<?php
$Foo = array('val1', 'val2', 'val3');
end($Foo);
echo key($Foo),"\n";
$MagicInternalPointerResetter = $Foo;
echo key($Foo),"\n";
?>
--EXPECT--
2
2
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #41401 (wrong precedence for unary minus)
--FILE--
<?php
echo 1/-2*5;
echo "\n";
echo 6/+2*-3;
--EXPECT--
-2.5
-9
-29
View File
@@ -1,29 +0,0 @@
--TEST--
Bug #41421 (Uncaught exception from a stream wrapper segfaults)
--FILE--
<?php
class wrapper {
function stream_open() {
return true;
}
function stream_eof() {
throw new exception();
}
}
stream_wrapper_register("wrap", "wrapper");
$fp = fopen("wrap://...", "r");
feof($fp);
echo "Done\n";
?>
--EXPECTF--
Warning: feof(): wrapper::stream_eof is not implemented! Assuming EOF in %s on line %d
Fatal error: Uncaught exception 'Exception' in %s:%d
Stack trace:
#0 [internal function]: wrapper->stream_eof()
#1 %s(%d): feof(Resource id #6)
#2 {main}
thrown in %s on line %d
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #41633.1 (self:: doesn't work for constants)
--FILE--
<?php
class Foo {
const A = self::B;
const B = "ok";
}
echo Foo::A."\n";
?>
--EXPECT--
ok
-11
View File
@@ -1,11 +0,0 @@
--TEST--
Bug #41633.2 (Undefined class constants must not be substituted by strings)
--FILE--
<?php
class Foo {
const A = self::B;
}
echo Foo::A."\n";
?>
--EXPECTF--
Fatal error: Undefined class constant 'self::B' in %sbug41633_2.php on line 5
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #41633.3 (Crash instantiating classes with self-referencing constants)
--FILE--
<?php
class Foo {
const A = Foo::B;
const B = Foo::A;
}
echo Foo::A;
?>
--EXPECTF--
Fatal error: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php on line %d
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #41633.4 (self:: doesn't work for constants)
--FILE--
<?php
class Foo {
const A = self::B;
const B = "ok";
}
var_dump(defined("Foo::A"));
?>
--EXPECT--
bool(true)
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #41640 (get_class_vars produces error on class constants)
--FILE--
<?php
class foo {
const FOO = 1;
public $x = self::FOO;
}
var_dump(get_class_vars("foo"));
--EXPECT--
array(1) {
["x"]=>
int(1)
}
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #41813 (segmentation fault when using string offset as an object)
--FILE--
<?php
$foo = "50";
$foo[0]->bar = "xyz";
echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot use string offset as an array in %s on line %d
-11
View File
@@ -1,11 +0,0 @@
--TEST--
Bug #41919 (crash in string to array conversion)
--FILE--
<?php
$foo="50";
$foo[3]->bar[1] = "bang";
echo "ok\n";
?>
--EXPECTF--
Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #41929 (Foreach on object does not iterate over all visible properties)
--FILE--
<?php
class C {
private $priv = "ok";
function doLoop() {
echo $this->priv,"\n";
foreach ($this as $k=>$v) {
echo "$k: $v\n";
}
}
}
class D extends C {
}
$myD = new D;
$myD->doLoop();
?>
--EXPECT--
ok
priv: ok
-29
View File
@@ -1,29 +0,0 @@
--TEST--
Bug #41961 (Ensure search for hidden private methods does not stray from class hierarchy)
--FILE--
<?php
X::test();
/** Class X is related to neither ParentClass nor ChildClass. */
class X {
public static function test() {
$myChild = new ChildClass;
$myChild->secret(); // bug - invokes X::secret() instead of ChildClass::secret()
}
private function secret() {
echo "Called private " . __METHOD__ . "() on an instance of: " . get_class($this) . "\n";
}
}
class ParentClass {
private function secret() { }
}
class ChildClass extends ParentClass {
public function secret() {
echo "Called public " . __METHOD__ . "() on an instance of: " . get_class($this) . "\n";
}
}
?>
--EXPECT--
Called public ChildClass::secret() on an instance of: ChildClass
Loaded 100 of 4943 files, more files were not shown because too many files have changed in this diff. Show more