mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-14 04:30:50 +00:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a286e992fd | ||
|
|
6118b0b738 | ||
|
|
2fe662392a | ||
|
|
7a48dfb28e | ||
|
|
67bf61b087 | ||
|
|
e3d3eaddf1 | ||
|
|
c4bf1f8f65 | ||
|
|
e1d1c8d901 | ||
|
|
805a596542 | ||
|
|
5663cf0e81 |
No files matched your search
@@ -3,6 +3,7 @@ Installing PHP
|
||||
_________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
Preface
|
||||
1. General Installation Considerations
|
||||
2. Installation on Unix systems
|
||||
|
||||
@@ -44,6 +45,13 @@ Installing PHP
|
||||
How to change configuration settings
|
||||
_________________________________________________________________
|
||||
|
||||
Preface
|
||||
|
||||
These installation instructions were generated from the HTML version
|
||||
of the PHP Manual so formatting and linking have been altered. See the
|
||||
online and updated version at: http://php.net/install.unix
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 1. General Installation Considerations
|
||||
|
||||
Before starting the installation, first you need to know what do you
|
||||
@@ -360,9 +368,9 @@ Apache 2.0 on Unix systems
|
||||
|
||||
Warning
|
||||
|
||||
Do not use Apache 2.0.x and PHP in a production environment neither on
|
||||
Unix nor on Windows. For information on why, read the following FAQ
|
||||
entry
|
||||
We do not recommend using a threaded MPM in production with Apache2.
|
||||
Use the prefork MPM instead, or use Apache1. For information on why,
|
||||
read the related FAQ entry on using Apache2 with a threaded MPM
|
||||
|
||||
You are highly encouraged to take a look at the Apache Documentation
|
||||
to get a basic understanding of the Apache 2.0 Server.
|
||||
@@ -486,7 +494,8 @@ Apache 2.0 on Unix systems
|
||||
about the consequences and understand what you are doing. For more
|
||||
information read the Apache documentation about the MPM-Modules.
|
||||
|
||||
Note: If you want to use content negotiation, read related FAQ.
|
||||
Note: If you want to use content negotiation, read the Apache
|
||||
MultiViews FAQ.
|
||||
|
||||
Note: To build a multithreaded version of Apache your system must
|
||||
support threads. This also implies to build PHP with experimental
|
||||
@@ -870,7 +879,7 @@ Group sys
|
||||
OpenBSD installation notes
|
||||
|
||||
This section contains notes and hints specific to installing PHP on
|
||||
OpenBSD 3.4.
|
||||
OpenBSD 3.6.
|
||||
_________________________________________________________________
|
||||
|
||||
Using Binary Packages
|
||||
@@ -881,27 +890,27 @@ Using Binary Packages
|
||||
others. The files you need can be found on your OpenBSD CD or on the
|
||||
FTP site.
|
||||
|
||||
The main package you need to install is php4-core-4.3.3.tgz, which
|
||||
The main package you need to install is php4-core-4.3.8.tgz, which
|
||||
contains the basic engine (plus gettext and iconv). Next, take a look
|
||||
at the module packages, such as php4-mysql-4.3.3.tgz or
|
||||
php4-imap-4.3.3.tgz. You need to use the phpxs command to activate and
|
||||
at the module packages, such as php4-mysql-4.3.8.tgz or
|
||||
php4-imap-4.3.8.tgz. You need to use the phpxs command to activate and
|
||||
deactivate these modules in your php.ini.
|
||||
|
||||
Example 2-6. OpenBSD Package Install Example
|
||||
# pkg_add php4-core-4.3.3.tgz
|
||||
# pkg_add php4-core-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -s
|
||||
# cp /usr/local/share/doc/php4/php.ini-recommended /var/www/conf/php.ini
|
||||
(add in mysql)
|
||||
# pkg_add php4-mysql-4.3.3.tgz
|
||||
# pkg_add php4-mysql-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -a mysql
|
||||
(add in imap)
|
||||
# pkg_add php4-imap-4.3.3.tgz
|
||||
# pkg_add php4-imap-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -a imap
|
||||
(remove mysql as a test)
|
||||
# pkg_delete php4-mysql-4.3.3
|
||||
# pkg_delete php4-mysql-4.3.8
|
||||
# /usr/local/sbin/phpxs -r mysql
|
||||
(install the PEAR libraries)
|
||||
# pkg_add php4-pear-4.3.3.tgz
|
||||
# pkg_add php4-pear-4.3.8.tgz
|
||||
|
||||
Read the packages(7) manual page for more information about binary
|
||||
packages on OpenBSD.
|
||||
@@ -931,9 +940,9 @@ Common Problems
|
||||
automatically installs into the correct chroot directories, so no
|
||||
special modification is needed there. More information on the
|
||||
OpenBSD Apache is available in the OpenBSD FAQ.
|
||||
* The OpenBSD 3.4 package for the gd extension requires XFree86 to
|
||||
* The OpenBSD 3.6 package for the gd extension requires XFree86 to
|
||||
be installed. If you do not wish to use some of the font features
|
||||
that require X11, install the php4-gd-4.3.3-no_x11.tgz package
|
||||
that require X11, install the php4-gd-4.3.8-no_x11.tgz package
|
||||
instead.
|
||||
_________________________________________________________________
|
||||
|
||||
@@ -1002,7 +1011,7 @@ Using Portage (emerge)
|
||||
|
||||
The first decision you need to make is whether you want to install
|
||||
Apache 1.3.x or Apache 2.x. While both can be used with PHP, the steps
|
||||
given bellow will use Apache 1.3.x. Another thing to consider is
|
||||
given below will use Apache 1.3.x. Another thing to consider is
|
||||
whether your local Portage tree is up to date. If you have not updated
|
||||
it recently, you need to run emerge sync before anything else. This
|
||||
way, you will be using the most recent stable version of Apache and
|
||||
@@ -1444,7 +1453,7 @@ Running PHP as an Apache module
|
||||
you to change the PHP configuration from within the Apache
|
||||
configuration files. For a listing of which directives are
|
||||
PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM, have a look at the
|
||||
table found within the ini_set() documentation.
|
||||
List of php.ini directives appendix.
|
||||
|
||||
Note: With PHP 3, there are Apache directives that correspond to
|
||||
each configuration setting in the php3.ini name, except the name is
|
||||
@@ -1509,7 +1518,8 @@ Changing PHP configuration via the Windows registry
|
||||
active for any script running from this directory or any subdirectory
|
||||
of it. The values under the key should have the name of the PHP
|
||||
configuration directive and the string value. PHP constants in the
|
||||
values are not parsed.
|
||||
values are not parsed. However, only configuration values changeable
|
||||
in PHP_INI_USER can be set this way, PHP_INI_PERDIR values can not.
|
||||
_________________________________________________________________
|
||||
|
||||
Other interfaces to PHP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
24 Mar 2005, PHP 5.0.4RC2
|
||||
31 Mar 2005, PHP 5.0.4
|
||||
- Added SNMPv2 support. (harrie)
|
||||
- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
|
||||
- Added length and charsetnr for field array and object in mysqli. (Georg)
|
||||
@@ -41,8 +41,6 @@ PHP NEWS
|
||||
- Fixed bug #32210 (proc_get_status() sets "running" always to true). (Ilia)
|
||||
- Fixed bug #32200 (Prevent using both --with-apxs2 and --with-apxs2filter).
|
||||
(Jani)
|
||||
- Fixed bug #32160 (file truncation in copy() when source & destination are
|
||||
the same). (Ilia)
|
||||
- Fixed bug #32134 (Overloading offsetGet/offsetSet). (Marcus)
|
||||
- Fixed bug #32130 (ArrayIterator::seek() does not throw an Exception on
|
||||
invalid index). (Marcus)
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
MAJOR_VERSION=5
|
||||
MINOR_VERSION=0
|
||||
RELEASE_VERSION=4
|
||||
EXTRA_VERSION="RC2"
|
||||
EXTRA_VERSION=""
|
||||
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
|
||||
|
||||
dnl Define where extension directories are located in the configure context
|
||||
|
||||
+11
-11
@@ -57,7 +57,7 @@ CHECK_OBJECT(); \
|
||||
p = (MYSQL_STMT *)((MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->stmt
|
||||
|
||||
#define MYSQLI_MAP_PROPERTY_FUNC_LONG( __func, __int_func, __get_type, __ret_type)\
|
||||
int __func(mysqli_object *obj, zval **retval TSRMLS_DC) \
|
||||
static int __func(mysqli_object *obj, zval **retval TSRMLS_DC) \
|
||||
{\
|
||||
__ret_type l;\
|
||||
__get_type;\
|
||||
@@ -77,7 +77,7 @@ int __func(mysqli_object *obj, zval **retval TSRMLS_DC) \
|
||||
}
|
||||
|
||||
#define MYSQLI_MAP_PROPERTY_FUNC_STRING(__func, __int_func, __get_type)\
|
||||
int __func(mysqli_object *obj, zval **retval TSRMLS_DC)\
|
||||
static int __func(mysqli_object *obj, zval **retval TSRMLS_DC)\
|
||||
{\
|
||||
char *c;\
|
||||
__get_type;\
|
||||
@@ -95,7 +95,7 @@ int __func(mysqli_object *obj, zval **retval TSRMLS_DC)\
|
||||
}
|
||||
|
||||
/* {{{ property link_client_version_read */
|
||||
int link_client_version_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int link_client_version_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
ALLOC_ZVAL(*retval);
|
||||
ZVAL_LONG(*retval, MYSQL_VERSION_ID);
|
||||
@@ -104,7 +104,7 @@ int link_client_version_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ property link_client_info_read */
|
||||
int link_client_info_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int link_client_info_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
ALLOC_ZVAL(*retval);
|
||||
ZVAL_STRING(*retval, MYSQL_SERVER_VERSION, 1);
|
||||
@@ -113,7 +113,7 @@ int link_client_info_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ property link_connect_errno_read */
|
||||
int link_connect_errno_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int link_connect_errno_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
ALLOC_ZVAL(*retval);
|
||||
ZVAL_LONG(*retval, (long)MyG(error_no));
|
||||
@@ -122,7 +122,7 @@ int link_connect_errno_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ property link_connect_error_read */
|
||||
int link_connect_error_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int link_connect_error_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
ALLOC_ZVAL(*retval);
|
||||
ZVAL_STRING(*retval, MyG(error_msg), 1);
|
||||
@@ -131,7 +131,7 @@ int link_connect_error_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ property link_affected_rows_read */
|
||||
int link_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int link_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
MY_MYSQL *mysql;
|
||||
my_ulonglong rc;
|
||||
@@ -175,7 +175,7 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQ
|
||||
/* result properties */
|
||||
|
||||
/* {{{ property result_type_read */
|
||||
int result_type_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int result_type_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
MYSQL_RES *p;
|
||||
|
||||
@@ -194,7 +194,7 @@ int result_type_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ property result_lengths_read */
|
||||
int result_lengths_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int result_lengths_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
MYSQL_RES *p;
|
||||
|
||||
@@ -229,7 +229,7 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(result_num_rows_read, mysql_num_rows, MYSQLI_GET_R
|
||||
/* statement properties */
|
||||
|
||||
/* {{{ property stmt_id_read */
|
||||
int stmt_id_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int stmt_id_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
MY_STMT *p;
|
||||
|
||||
@@ -248,7 +248,7 @@ int stmt_id_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ property stmt_affected_rows_read */
|
||||
int stmt_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
static int stmt_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
MY_STMT *stmt;
|
||||
my_ulonglong rc;
|
||||
|
||||
@@ -1479,8 +1479,11 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
|
||||
if ((*attr)->fixed && strcmp((*attr)->fixed,dummy->children->content) != 0) {
|
||||
soap_error3(E_ERROR, "Encoding: Attribute '%s' has fixed value '%s' (value '%s' is not allowed)", (*attr)->name, (*attr)->fixed, dummy->children->content);
|
||||
}
|
||||
if ((*attr)->namens) {
|
||||
/*
|
||||
if ((*attr)->namens &&
|
||||
(type->ns == NULL || strcmp((*attr)->namens, type->ns))) {
|
||||
*/
|
||||
xmlNsPtr nsp = encode_add_ns(xmlParam, (*attr)->namens);
|
||||
|
||||
xmlSetNsProp(xmlParam, nsp, (*attr)->name, dummy->children->content);
|
||||
|
||||
+5
-1
@@ -423,6 +423,10 @@ static sdlSoapBindingFunctionHeaderPtr wsdl_soap_binding_header(sdlCtx* ctx, xml
|
||||
h->ns = estrdup(h->element->namens);
|
||||
}
|
||||
}
|
||||
if (h->element->name) {
|
||||
efree(h->name);
|
||||
h->name = estrdup(h->element->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!fault) {
|
||||
@@ -1061,7 +1065,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
|
||||
return ctx.sdl;
|
||||
}
|
||||
|
||||
#define WSDL_CACHE_VERSION 0x0b
|
||||
#define WSDL_CACHE_VERSION 0x0c
|
||||
|
||||
#define WSDL_CACHE_GET(ret,type,buf) memcpy(&ret,*buf,sizeof(type)); *buf += sizeof(type);
|
||||
#define WSDL_CACHE_GET_INT(ret,buf) ret = ((unsigned char)(*buf)[0])|((unsigned char)(*buf)[1]<<8)|((unsigned char)(*buf)[2]<<16)|((int)(*buf)[3]<<24); *buf += 4;
|
||||
|
||||
@@ -18,7 +18,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -19,7 +19,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -21,7 +21,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -22,7 +22,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -19,7 +19,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" ns1:int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["_"]=>
|
||||
int(123)
|
||||
|
||||
@@ -26,7 +26,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" ns1:int="123" ns1:int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (3) {
|
||||
["_"]=>
|
||||
int(123)
|
||||
|
||||
@@ -19,7 +19,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" ns1:int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["_"]=>
|
||||
int(123)
|
||||
|
||||
@@ -26,7 +26,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" ns1:int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["_"]=>
|
||||
int(123)
|
||||
|
||||
@@ -26,7 +26,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" ns1:int="123" ns1:int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (3) {
|
||||
["_"]=>
|
||||
int(123)
|
||||
|
||||
@@ -24,7 +24,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int2="123"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" ns1:int2="123"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["int"]=>
|
||||
int(123)
|
||||
|
||||
@@ -26,7 +26,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" ns1:int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["_"]=>
|
||||
int(123)
|
||||
|
||||
@@ -19,7 +19,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:nil="1" int="123" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:nil="1" ns1:int="123" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["_"]=>
|
||||
NULL
|
||||
|
||||
@@ -16,7 +16,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -16,7 +16,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -16,7 +16,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" int="5" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:str="str" ns1:int="5" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -17,7 +17,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -19,7 +19,7 @@ echo "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
object(stdClass)#%d (2) {
|
||||
["str"]=>
|
||||
string(3) "str"
|
||||
|
||||
@@ -1619,12 +1619,6 @@ PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC)
|
||||
{
|
||||
php_stream *srcstream = NULL, *deststream = NULL;
|
||||
int ret = FAILURE;
|
||||
struct stat src_s, dest_s;
|
||||
|
||||
/* safety check to ensure that source & destination files are not the same file */
|
||||
if (stat(src, &src_s) || (stat(dest, &dest_s) == 0 && src_s.st_ino == dest_s.st_ino)) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
srcstream = php_stream_open_wrapper(src, "rb", STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS, NULL);
|
||||
|
||||
|
||||
+2
-2
@@ -3,5 +3,5 @@
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 0
|
||||
#define PHP_RELEASE_VERSION 4
|
||||
#define PHP_EXTRA_VERSION "RC2"
|
||||
#define PHP_VERSION "5.0.4RC2"
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.0.4"
|
||||
+24
-2
@@ -68,6 +68,11 @@
|
||||
// SparcStation 20 Solaris 8:
|
||||
// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc SUNW,SPARCstation-20
|
||||
//
|
||||
// Mac OS X (Darwin)
|
||||
// Darwin home-eden.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh
|
||||
//
|
||||
// Mac OS X early versions
|
||||
//
|
||||
|
||||
// }}}
|
||||
|
||||
@@ -97,11 +102,11 @@ class OS_Guess
|
||||
static $sysmap = array(
|
||||
'HP-UX' => 'hpux',
|
||||
'IRIX64' => 'irix',
|
||||
// Darwin?
|
||||
);
|
||||
static $cpumap = array(
|
||||
'i586' => 'i386',
|
||||
'i686' => 'i386',
|
||||
'ppc' => 'powerpc',
|
||||
);
|
||||
if ($uname === null) {
|
||||
$uname = php_uname();
|
||||
@@ -138,6 +143,24 @@ class OS_Guess
|
||||
// use only the first two digits from the kernel version
|
||||
$release = ereg_replace('^([[:digit:]]+\.[[:digit:]]+).*', '\1', $parts[2]);
|
||||
break;
|
||||
case 'Mac' :
|
||||
$sysname = 'darwin';
|
||||
$nodename = $parts[2];
|
||||
$release = $parts[3];
|
||||
if ($cpu == 'Macintosh') {
|
||||
if ($parts[$n - 2] == 'Power') {
|
||||
$cpu = 'powerpc';
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'Darwin' :
|
||||
if ($cpu == 'Macintosh') {
|
||||
if ($parts[$n - 2] == 'Power') {
|
||||
$cpu = 'powerpc';
|
||||
}
|
||||
}
|
||||
$release = ereg_replace('^([[:digit:]]+\.[[:digit:]]+).*', '\1', $parts[2]);
|
||||
break;
|
||||
default:
|
||||
$release = ereg_replace('-.*', '', $parts[2]);
|
||||
break;
|
||||
@@ -255,7 +278,6 @@ class OS_Guess
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* indent-tabs-mode: nil
|
||||
|
||||
+89
-9
@@ -59,7 +59,7 @@ $GLOBALS['_PEAR_destructor_object_list'] = array();
|
||||
$GLOBALS['_PEAR_shutdown_funcs'] = array();
|
||||
$GLOBALS['_PEAR_error_handler_stack'] = array();
|
||||
|
||||
ini_set('track_errors', true);
|
||||
@ini_set('track_errors', true);
|
||||
|
||||
/**
|
||||
* Base class for other PEAR classes. Provides rudimentary
|
||||
@@ -152,7 +152,7 @@ class PEAR
|
||||
*/
|
||||
function PEAR($error_class = null)
|
||||
{
|
||||
$classname = get_class($this);
|
||||
$classname = strtolower(get_class($this));
|
||||
if ($this->_debug) {
|
||||
print "PEAR constructor called, class=$classname\n";
|
||||
}
|
||||
@@ -164,6 +164,10 @@ class PEAR
|
||||
if (method_exists($this, $destructor)) {
|
||||
global $_PEAR_destructor_object_list;
|
||||
$_PEAR_destructor_object_list[] = &$this;
|
||||
if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
|
||||
register_shutdown_function("_PEAR_call_destructors");
|
||||
$GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
$classname = get_parent_class($classname);
|
||||
@@ -187,7 +191,7 @@ class PEAR
|
||||
*/
|
||||
function _PEAR() {
|
||||
if ($this->_debug) {
|
||||
printf("PEAR destructor called, class=%s\n", get_class($this));
|
||||
printf("PEAR destructor called, class=%s\n", strtolower(get_class($this)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,6 +565,77 @@ class PEAR
|
||||
}
|
||||
|
||||
// }}}
|
||||
function staticPushErrorHandling($mode, $options = null)
|
||||
{
|
||||
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
|
||||
$def_mode = &$GLOBALS['_PEAR_default_error_mode'];
|
||||
$def_options = &$GLOBALS['_PEAR_default_error_options'];
|
||||
$stack[] = array($def_mode, $def_options);
|
||||
switch ($mode) {
|
||||
case PEAR_ERROR_EXCEPTION:
|
||||
case PEAR_ERROR_RETURN:
|
||||
case PEAR_ERROR_PRINT:
|
||||
case PEAR_ERROR_TRIGGER:
|
||||
case PEAR_ERROR_DIE:
|
||||
case null:
|
||||
$def_mode = $mode;
|
||||
$def_options = $options;
|
||||
break;
|
||||
|
||||
case PEAR_ERROR_CALLBACK:
|
||||
$def_mode = $mode;
|
||||
// class/object method callback
|
||||
if (is_callable($options)) {
|
||||
$def_options = $options;
|
||||
} else {
|
||||
trigger_error("invalid error callback", E_USER_WARNING);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error("invalid error mode", E_USER_WARNING);
|
||||
break;
|
||||
}
|
||||
$stack[] = array($mode, $options);
|
||||
return true;
|
||||
}
|
||||
|
||||
function staticPopErrorHandling()
|
||||
{
|
||||
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
|
||||
$setmode = &$GLOBALS['_PEAR_default_error_mode'];
|
||||
$setoptions = &$GLOBALS['_PEAR_default_error_options'];
|
||||
array_pop($stack);
|
||||
list($mode, $options) = $stack[sizeof($stack) - 1];
|
||||
array_pop($stack);
|
||||
switch ($mode) {
|
||||
case PEAR_ERROR_EXCEPTION:
|
||||
case PEAR_ERROR_RETURN:
|
||||
case PEAR_ERROR_PRINT:
|
||||
case PEAR_ERROR_TRIGGER:
|
||||
case PEAR_ERROR_DIE:
|
||||
case null:
|
||||
$setmode = $mode;
|
||||
$setoptions = $options;
|
||||
break;
|
||||
|
||||
case PEAR_ERROR_CALLBACK:
|
||||
$setmode = $mode;
|
||||
// class/object method callback
|
||||
if (is_callable($options)) {
|
||||
$setoptions = $options;
|
||||
} else {
|
||||
trigger_error("invalid error callback", E_USER_WARNING);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error("invalid error mode", E_USER_WARNING);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// {{{ pushErrorHandling()
|
||||
|
||||
/**
|
||||
@@ -665,6 +740,9 @@ function _PEAR_call_destructors()
|
||||
sizeof($_PEAR_destructor_object_list))
|
||||
{
|
||||
reset($_PEAR_destructor_object_list);
|
||||
if (@PEAR::getStaticProperty('PEAR', 'destructlifo')) {
|
||||
$_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
|
||||
}
|
||||
while (list($k, $objref) = each($_PEAR_destructor_object_list)) {
|
||||
$classname = get_class($objref);
|
||||
while ($classname) {
|
||||
@@ -738,7 +816,9 @@ class PEAR_Error
|
||||
$this->mode = $mode;
|
||||
$this->userinfo = $userinfo;
|
||||
if (function_exists("debug_backtrace")) {
|
||||
$this->backtrace = debug_backtrace();
|
||||
if (@!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) {
|
||||
$this->backtrace = debug_backtrace();
|
||||
}
|
||||
}
|
||||
if ($mode & PEAR_ERROR_CALLBACK) {
|
||||
$this->level = E_USER_NOTICE;
|
||||
@@ -929,14 +1009,16 @@ class PEAR_Error
|
||||
E_USER_ERROR => 'error');
|
||||
if ($this->mode & PEAR_ERROR_CALLBACK) {
|
||||
if (is_array($this->callback)) {
|
||||
$callback = get_class($this->callback[0]) . '::' .
|
||||
$callback = (is_object($this->callback[0]) ?
|
||||
strtolower(get_class($this->callback[0])) :
|
||||
$this->callback[0]) . '::' .
|
||||
$this->callback[1];
|
||||
} else {
|
||||
$callback = $this->callback;
|
||||
}
|
||||
return sprintf('[%s: message="%s" code=%d mode=callback '.
|
||||
'callback=%s prefix="%s" info="%s"]',
|
||||
get_class($this), $this->message, $this->code,
|
||||
strtolower(get_class($this)), $this->message, $this->code,
|
||||
$callback, $this->error_message_prefix,
|
||||
$this->userinfo);
|
||||
}
|
||||
@@ -954,7 +1036,7 @@ class PEAR_Error
|
||||
}
|
||||
return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.
|
||||
'prefix="%s" info="%s"]',
|
||||
get_class($this), $this->message, $this->code,
|
||||
strtolower(get_class($this)), $this->message, $this->code,
|
||||
implode("|", $modes), $levels[$this->level],
|
||||
$this->error_message_prefix,
|
||||
$this->userinfo);
|
||||
@@ -963,8 +1045,6 @@ class PEAR_Error
|
||||
// }}}
|
||||
}
|
||||
|
||||
register_shutdown_function("_PEAR_call_destructors");
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: php
|
||||
|
||||
+56
-22
@@ -150,6 +150,49 @@ class PEAR_Builder extends PEAR_Common
|
||||
}
|
||||
// }}}
|
||||
|
||||
// {{{ _harventInstDir
|
||||
/**
|
||||
* @param string
|
||||
* @param string
|
||||
* @param array
|
||||
* @access private
|
||||
*/
|
||||
function _harvestInstDir($dest_prefix, $dirname, &$built_files)
|
||||
{
|
||||
$d = opendir($dirname);
|
||||
if (!$d)
|
||||
return false;
|
||||
|
||||
$ret = true;
|
||||
while (($ent = readdir($d)) !== false) {
|
||||
if ($ent{0} == '.')
|
||||
continue;
|
||||
|
||||
$full = $dirname . DIRECTORY_SEPARATOR . $ent;
|
||||
if (is_dir($full)) {
|
||||
if (!$this->_harvestInstDir(
|
||||
$dest_prefix . DIRECTORY_SEPARATOR . $ent,
|
||||
$full, $built_files)) {
|
||||
$ret = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$dest = $dest_prefix . DIRECTORY_SEPARATOR . $ent;
|
||||
$built_files[] = array(
|
||||
'file' => $full,
|
||||
'dest' => $dest,
|
||||
'php_api' => $this->php_api_version,
|
||||
'zend_mod_api' => $this->zend_module_api_no,
|
||||
'zend_ext_api' => $this->zend_extension_api_no,
|
||||
);
|
||||
}
|
||||
}
|
||||
closedir($d);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
// {{{ build()
|
||||
|
||||
/**
|
||||
@@ -231,14 +274,20 @@ class PEAR_Builder extends PEAR_Common
|
||||
}
|
||||
$build_basedir = "/var/tmp/pear-build-$user";
|
||||
$build_dir = "$build_basedir/$info[package]-$info[version]";
|
||||
$inst_dir = "$build_basedir/install-$info[package]-$info[version]";
|
||||
$this->log(1, "building in $build_dir");
|
||||
if (is_dir($build_dir)) {
|
||||
System::rm("-rf $build_dir");
|
||||
System::rm(array('-rf', $build_dir));
|
||||
}
|
||||
if (!System::mkDir("-p $build_dir")) {
|
||||
if (!System::mkDir(array('-p', $build_dir))) {
|
||||
return $this->raiseError("could not create build dir: $build_dir");
|
||||
}
|
||||
$this->addTempFile($build_dir);
|
||||
if (!System::mkDir(array('-p', $inst_dir))) {
|
||||
return $this->raiseError("could not create temporary install dir: $inst_dir");
|
||||
}
|
||||
$this->addTempFile($inst_dir);
|
||||
|
||||
if (getenv('MAKE')) {
|
||||
$make_command = getenv('MAKE');
|
||||
} else {
|
||||
@@ -247,10 +296,13 @@ class PEAR_Builder extends PEAR_Common
|
||||
$to_run = array(
|
||||
$configure_command,
|
||||
$make_command,
|
||||
"$make_command INSTALL_ROOT=\"$inst_dir\" install",
|
||||
"find \"$inst_dir\" -ls"
|
||||
);
|
||||
if (!@chdir($build_dir)) {
|
||||
return $this->raiseError("could not chdir to $build_dir");
|
||||
}
|
||||
putenv('PHP_PEAR_VERSION=@PEAR-VER@');
|
||||
foreach ($to_run as $cmd) {
|
||||
$err = $this->_runCommand($cmd, $callback);
|
||||
if (PEAR::isError($err)) {
|
||||
@@ -267,26 +319,8 @@ class PEAR_Builder extends PEAR_Common
|
||||
return $this->raiseError("no `modules' directory found");
|
||||
}
|
||||
$built_files = array();
|
||||
while ($ent = readdir($dp)) {
|
||||
if ($ent{0} == '.' || substr($ent, -3) == '.la') {
|
||||
continue;
|
||||
}
|
||||
// harvest!
|
||||
if (@copy("modules/$ent", "$dir/$ent")) {
|
||||
$built_files[] = array(
|
||||
'file' => "$dir/$ent",
|
||||
'php_api' => $this->php_api_version,
|
||||
'zend_mod_api' => $this->zend_module_api_no,
|
||||
'zend_ext_api' => $this->zend_extension_api_no,
|
||||
);
|
||||
|
||||
$this->log(1, "$ent copied to $dir/$ent");
|
||||
} else {
|
||||
chdir($old_cwd);
|
||||
return $this->raiseError("failed copying $ent to $dir");
|
||||
}
|
||||
}
|
||||
closedir($dp);
|
||||
$prefix = exec("php-config --prefix");
|
||||
$this->_harvestInstDir($prefix, $inst_dir . DIRECTORY_SEPARATOR . $prefix, $built_files);
|
||||
chdir($old_cwd);
|
||||
return $built_files;
|
||||
}
|
||||
|
||||
+102
-34
@@ -15,6 +15,7 @@
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Stig Bakken <ssb@php.net> |
|
||||
// | Martin Jansen <mj@php.net> |
|
||||
// | Greg Beaver <cellog@php.net> |
|
||||
// +----------------------------------------------------------------------+
|
||||
//
|
||||
// $Id$
|
||||
@@ -159,7 +160,16 @@ use the "slide" option to move the release tag.
|
||||
'recur' => array(
|
||||
'shortopt' => 'r',
|
||||
'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum',
|
||||
)
|
||||
),
|
||||
'ini' => array(
|
||||
'shortopt' => 'i',
|
||||
'doc' => 'actual string of settings to pass to php in format " -d setting=blah"',
|
||||
'arg' => 'SETTINGS'
|
||||
),
|
||||
'realtimelog' => array(
|
||||
'shortopt' => 'l',
|
||||
'doc' => 'Log test runs/results as they are run',
|
||||
),
|
||||
),
|
||||
'doc' => '[testfile|dir ...]
|
||||
Run regression tests with PHP\'s regression testing script (run-tests.php).',
|
||||
@@ -438,6 +448,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
|
||||
{
|
||||
include_once 'PEAR/RunTest.php';
|
||||
$log = new PEAR_Common;
|
||||
$log->ui = &$this->ui; // slightly hacky, but it will work
|
||||
$run = new PEAR_RunTest($log);
|
||||
$tests = array();
|
||||
if (isset($options['recur'])) {
|
||||
@@ -445,6 +456,9 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
|
||||
} else {
|
||||
$depth = 1;
|
||||
}
|
||||
if (!count($params)) {
|
||||
$params[] = '.';
|
||||
}
|
||||
foreach ($params as $p) {
|
||||
if (is_dir($p)) {
|
||||
$dir = System::find(array($p, '-type', 'f',
|
||||
@@ -452,45 +466,99 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
|
||||
'-name', '*.phpt'));
|
||||
$tests = array_merge($tests, $dir);
|
||||
} else {
|
||||
$tests[] = $p;
|
||||
if (!@file_exists($p)) {
|
||||
if (!preg_match('/\.phpt$/', $p)) {
|
||||
$p .= '.phpt';
|
||||
}
|
||||
$dir = System::find(array(dirname($p), '-type', 'f',
|
||||
'-maxdepth', $depth,
|
||||
'-name', $p));
|
||||
$tests = array_merge($tests, $dir);
|
||||
} else {
|
||||
$tests[] = $p;
|
||||
}
|
||||
}
|
||||
}
|
||||
$ini_settings = '';
|
||||
if (isset($options['ini'])) {
|
||||
$ini_settings .= $options['ini'];
|
||||
}
|
||||
if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) {
|
||||
$ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}";
|
||||
}
|
||||
if ($ini_settings) {
|
||||
$this->ui->outputData('Using INI settings: "' . $ini_settings . '"');
|
||||
}
|
||||
$skipped = $passed = $failed = array();
|
||||
$this->ui->outputData('Running ' . count($tests) . ' tests', $command);
|
||||
$start = time();
|
||||
if (isset($options['realtimelog'])) {
|
||||
@unlink('run-tests.log');
|
||||
}
|
||||
foreach ($tests as $t) {
|
||||
$run->run($t);
|
||||
if (isset($options['realtimelog'])) {
|
||||
$fp = @fopen('run-tests.log', 'a');
|
||||
if ($fp) {
|
||||
fwrite($fp, "Running test $t...");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
$result = $run->run($t, $ini_settings);
|
||||
if (OS_WINDOWS) {
|
||||
for($i=0;$i<2000;$i++) {
|
||||
$i = $i; // delay - race conditions on windows
|
||||
}
|
||||
}
|
||||
if (isset($options['realtimelog'])) {
|
||||
$fp = @fopen('run-tests.log', 'a');
|
||||
if ($fp) {
|
||||
fwrite($fp, "$result\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
if ($result == 'FAILED') {
|
||||
$failed[] = $t;
|
||||
}
|
||||
if ($result == 'PASSED') {
|
||||
$passed[] = $t;
|
||||
}
|
||||
if ($result == 'SKIPPED') {
|
||||
$skipped[] = $t;
|
||||
}
|
||||
}
|
||||
$total = date('i:s', time() - $start);
|
||||
if (count($failed)) {
|
||||
$output = "TOTAL TIME: $total\n";
|
||||
$output .= count($passed) . " PASSED TESTS\n";
|
||||
$output .= count($skipped) . " SKIPPED TESTS\n";
|
||||
$output .= count($failed) . " FAILED TESTS:\n";
|
||||
foreach ($failed as $failure) {
|
||||
$output .= $failure . "\n";
|
||||
}
|
||||
if (isset($options['realtimelog'])) {
|
||||
$fp = @fopen('run-tests.log', 'a');
|
||||
} else {
|
||||
$fp = @fopen('run-tests.log', 'w');
|
||||
}
|
||||
if ($fp) {
|
||||
fwrite($fp, $output, strlen($output));
|
||||
fclose($fp);
|
||||
$this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command);
|
||||
}
|
||||
} elseif (@file_exists('run-tests.log') && !@is_dir('run-tests.log')) {
|
||||
@unlink('run-tests.log');
|
||||
}
|
||||
$this->ui->outputData('TOTAL TIME: ' . $total);
|
||||
$this->ui->outputData(count($passed) . ' PASSED TESTS', $command);
|
||||
$this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command);
|
||||
if (count($failed)) {
|
||||
$this->ui->outputData(count($failed) . ' FAILED TESTS:', $command);
|
||||
foreach ($failed as $failure) {
|
||||
$this->ui->outputData($failure, $command);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
/*
|
||||
$cwd = getcwd();
|
||||
$php = $this->config->get('php_bin');
|
||||
putenv("TEST_PHP_EXECUTABLE=$php");
|
||||
// all core PEAR tests use this constant to determine whether they should be run or not
|
||||
putenv("PHP_PEAR_RUNTESTS=1");
|
||||
$ip = ini_get("include_path");
|
||||
$ps = OS_WINDOWS ? ';' : ':';
|
||||
$run_tests = $rtsts = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . 'run-tests.php';
|
||||
if (!file_exists($run_tests)) {
|
||||
$run_tests = PEAR_INSTALL_DIR . DIRECTORY_SEPARATOR . 'run-tests.php';
|
||||
if (!file_exists($run_tests)) {
|
||||
return $this->raiseError("No run-tests.php file found. Please copy this ".
|
||||
"file from the sources of your PHP distribution to $rtsts");
|
||||
}
|
||||
}
|
||||
if (OS_WINDOWS) {
|
||||
// note, this requires a slightly modified version of run-tests.php
|
||||
// for some setups
|
||||
// unofficial download location is in the pear-dev archives
|
||||
$argv = $params;
|
||||
array_unshift($argv, $run_tests);
|
||||
$argc = count($argv);
|
||||
include $run_tests;
|
||||
} else {
|
||||
$plist = implode(' ', $params);
|
||||
$cmd = "$php -d include_path=$cwd$ps$ip -f $run_tests -- $plist";
|
||||
system($cmd);
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
+17
-4
@@ -69,7 +69,7 @@ $GLOBALS['_PEAR_Common_dependency_types'] = array('pkg','ext','php','prog','ldli
|
||||
* Valid dependency relations
|
||||
* @var array
|
||||
*/
|
||||
$GLOBALS['_PEAR_Common_dependency_relations'] = array('has','eq','lt','le','gt','ge','not');
|
||||
$GLOBALS['_PEAR_Common_dependency_relations'] = array('has','eq','lt','le','gt','ge','not', 'ne');
|
||||
|
||||
/**
|
||||
* Valid file roles
|
||||
@@ -1129,18 +1129,31 @@ class PEAR_Common extends PEAR
|
||||
if (!empty($d['optional'])) {
|
||||
if (!in_array($d['optional'], array('yes', 'no'))) {
|
||||
$errors[] = "dependency $i: invalid relation optional attribute '$d[optional]', should be one of: yes no";
|
||||
} else {
|
||||
if (($d['rel'] == 'not' || $d['rel'] == 'ne') && $d['optional'] == 'yes') {
|
||||
$errors[] = "dependency $i: 'not' and 'ne' dependencies cannot be " .
|
||||
"optional";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($d['rel'] != 'has' && empty($d['version'])) {
|
||||
if ($d['rel'] != 'not' && $d['rel'] != 'has' && empty($d['version'])) {
|
||||
$warnings[] = "dependency $i: missing version";
|
||||
} elseif ($d['rel'] == 'has' && !empty($d['version'])) {
|
||||
$warnings[] = "dependency $i: version ignored for `has' dependencies";
|
||||
} elseif (($d['rel'] == 'not' || $d['rel'] == 'has') && !empty($d['version'])) {
|
||||
$warnings[] = "dependency $i: version ignored for `$d[rel]' dependencies";
|
||||
}
|
||||
if ($d['rel'] == 'not' && !empty($d['version'])) {
|
||||
$warnings[] = "dependency $i: 'not' defines a total conflict, to exclude " .
|
||||
"specific versions, use 'ne'";
|
||||
}
|
||||
if ($d['type'] == 'php' && !empty($d['name'])) {
|
||||
$warnings[] = "dependency $i: name ignored for php type dependencies";
|
||||
} elseif ($d['type'] != 'php' && empty($d['name'])) {
|
||||
$errors[] = "dependency $i: missing name";
|
||||
}
|
||||
if ($d['type'] == 'php' && $d['rel'] == 'not') {
|
||||
$errors[] = "dependency $i: PHP dependencies cannot use 'not' " .
|
||||
"rel, use 'ne' to exclude versions";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ class PEAR_Dependency
|
||||
}
|
||||
foreach ($deps as $dep) {
|
||||
if ($dep['type'] == 'pkg' && strcasecmp($dep['name'], $package) == 0) {
|
||||
if ($dep['rel'] == 'ne') {
|
||||
if ($dep['rel'] == 'ne' || $dep['rel'] == 'not') {
|
||||
continue;
|
||||
}
|
||||
if (isset($dep['optional']) && $dep['optional'] == 'yes') {
|
||||
@@ -244,7 +244,7 @@ class PEAR_Dependency
|
||||
}
|
||||
|
||||
if (!extension_loaded($name)) {
|
||||
if ($relation == 'ne') {
|
||||
if ($relation == 'not') {
|
||||
return false;
|
||||
}
|
||||
if ($opt) {
|
||||
@@ -322,7 +322,8 @@ class PEAR_Dependency
|
||||
return false;
|
||||
}
|
||||
if ($relation == 'not') {
|
||||
$errmsg = "Invalid dependency - 'not' is allowed when specifying PHP, you must run PHP in PHP";
|
||||
$errmsg = 'Invalid dependency - "not" is not allowed for php dependencies, ' .
|
||||
'php cannot conflict with itself';
|
||||
return PEAR_DEPENDENCY_BAD_DEPENDENCY;
|
||||
}
|
||||
if (substr($req, 0, 2) == 'v.') {
|
||||
|
||||
+44
-17
@@ -122,6 +122,10 @@ define('PEAR_ERRORSTACK_LOG', 3);
|
||||
* If this is returned, then the error is completely ignored.
|
||||
*/
|
||||
define('PEAR_ERRORSTACK_IGNORE', 4);
|
||||
/**
|
||||
* If this is returned, then the error is logged and die() is called.
|
||||
*/
|
||||
define('PEAR_ERRORSTACK_DIE', 5);
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
@@ -308,7 +312,11 @@ class PEAR_ErrorStack {
|
||||
*/
|
||||
function setDefaultLogger(&$log)
|
||||
{
|
||||
$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
|
||||
if (is_object($log) && method_exists($log, 'log') ) {
|
||||
$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
|
||||
} elseif (is_callable($log)) {
|
||||
$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -317,7 +325,11 @@ class PEAR_ErrorStack {
|
||||
*/
|
||||
function setLogger(&$log)
|
||||
{
|
||||
$this->_logger = &$log;
|
||||
if (is_object($log) && method_exists($log, 'log') ) {
|
||||
$this->_logger = &$log;
|
||||
} elseif (is_callable($log)) {
|
||||
$this->_logger = &$log;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -369,7 +381,7 @@ class PEAR_ErrorStack {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an error code => error message mapping callback
|
||||
* Set a callback that generates context information (location of error) for an error stack
|
||||
*
|
||||
* This method sets the callback that can be used to generate context
|
||||
* information for an error. Passing in NULL will disable context generation
|
||||
@@ -446,10 +458,11 @@ class PEAR_ErrorStack {
|
||||
*/
|
||||
function staticPopCallback()
|
||||
{
|
||||
array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']);
|
||||
$ret = array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']);
|
||||
if (!is_array($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'])) {
|
||||
$GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array();
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -536,6 +549,7 @@ class PEAR_ErrorStack {
|
||||
$err['repackage'] = $repackage;
|
||||
}
|
||||
$push = $log = true;
|
||||
$die = false;
|
||||
// try the overriding callback first
|
||||
$callback = $this->staticPopCallback();
|
||||
if ($callback) {
|
||||
@@ -564,6 +578,9 @@ class PEAR_ErrorStack {
|
||||
case PEAR_ERRORSTACK_LOG:
|
||||
$push = false;
|
||||
break;
|
||||
case PEAR_ERRORSTACK_DIE:
|
||||
$die = true;
|
||||
break;
|
||||
// anything else returned has the same effect as pushandlog
|
||||
}
|
||||
}
|
||||
@@ -576,6 +593,9 @@ class PEAR_ErrorStack {
|
||||
$this->_log($err);
|
||||
}
|
||||
}
|
||||
if ($die) {
|
||||
die();
|
||||
}
|
||||
if ($this->_compat && $push) {
|
||||
return $this->raiseError($msg, $code, null, null, $err);
|
||||
}
|
||||
@@ -626,7 +646,15 @@ class PEAR_ErrorStack {
|
||||
* @param array $levels Error level => Log constant map
|
||||
* @access protected
|
||||
*/
|
||||
function _log($err, $levels = array(
|
||||
function _log($err)
|
||||
{
|
||||
if ($this->_logger) {
|
||||
$logger = &$this->_logger;
|
||||
} else {
|
||||
$logger = &$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'];
|
||||
}
|
||||
if (is_a($logger, 'Log')) {
|
||||
$levels = array(
|
||||
'exception' => PEAR_LOG_CRIT,
|
||||
'alert' => PEAR_LOG_ALERT,
|
||||
'critical' => PEAR_LOG_CRIT,
|
||||
@@ -634,17 +662,15 @@ class PEAR_ErrorStack {
|
||||
'warning' => PEAR_LOG_WARNING,
|
||||
'notice' => PEAR_LOG_NOTICE,
|
||||
'info' => PEAR_LOG_INFO,
|
||||
'debug' => PEAR_LOG_DEBUG))
|
||||
{
|
||||
if (isset($levels[$err['level']])) {
|
||||
$level = $levels[$err['level']];
|
||||
} else {
|
||||
$level = PEAR_LOG_INFO;
|
||||
}
|
||||
if ($this->_logger) {
|
||||
$this->_logger->log($err['message'], $level, $err);
|
||||
} else {
|
||||
$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']->log($err['message'], $level, $err);
|
||||
'debug' => PEAR_LOG_DEBUG);
|
||||
if (isset($levels[$err['level']])) {
|
||||
$level = $levels[$err['level']];
|
||||
} else {
|
||||
$level = PEAR_LOG_INFO;
|
||||
}
|
||||
$logger->log($err['message'], $level, $err);
|
||||
} else { // support non-standard logs
|
||||
call_user_func($logger, $err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,7 +775,8 @@ class PEAR_ErrorStack {
|
||||
* @static
|
||||
* @return array
|
||||
*/
|
||||
function staticGetErrors($purge = false, $level = false, $merge = false, $sortfunc = array('PEAR_ErrorStack', '_sortErrors'))
|
||||
function staticGetErrors($purge = false, $level = false, $merge = false,
|
||||
$sortfunc = array('PEAR_ErrorStack', '_sortErrors'))
|
||||
{
|
||||
$ret = array();
|
||||
if (!is_callable($sortfunc)) {
|
||||
|
||||
+10
-4
@@ -224,10 +224,16 @@ class PEAR_Exception extends Exception
|
||||
public function getCauseMessage(&$causes)
|
||||
{
|
||||
$trace = $this->getTraceSafe();
|
||||
$causes[] = array('class' => get_class($this),
|
||||
'message' => $this->message,
|
||||
'file' => $trace[0]['file'],
|
||||
'line' => $trace[0]['line']);
|
||||
$cause = array('class' => get_class($this),
|
||||
'message' => $this->message,
|
||||
'file' => 'unknown',
|
||||
'line' => 'unknown');
|
||||
if (isset($trace[0])) {
|
||||
if (isset($trace[0]['file'])) {
|
||||
$cause['file'] = $trace[0]['file'];
|
||||
$cause['line'] = $trace[0]['line'];
|
||||
}
|
||||
}
|
||||
if ($this->cause instanceof PEAR_Exception) {
|
||||
$this->cause->getCauseMessage($causes);
|
||||
}
|
||||
|
||||
+33
-18
@@ -797,28 +797,43 @@ class PEAR_Installer extends PEAR_Downloader
|
||||
$this->log(1, "\nBuild process completed successfully");
|
||||
foreach ($built as $ext) {
|
||||
$bn = basename($ext['file']);
|
||||
list($_ext_name, ) = explode('.', $bn);
|
||||
if (extension_loaded($_ext_name)) {
|
||||
$this->raiseError("Extension '$_ext_name' already loaded. Please unload it ".
|
||||
"in your php.ini file prior to install or upgrade it.");
|
||||
list($_ext_name, $_ext_suff) = explode('.', $bn);
|
||||
if ($_ext_suff == '.so' || $_ext_suff == '.dll') {
|
||||
if (extension_loaded($_ext_name)) {
|
||||
$this->raiseError("Extension '$_ext_name' already loaded. " .
|
||||
'Please unload it in your php.ini file ' .
|
||||
'prior to install or upgrade');
|
||||
}
|
||||
$role = 'ext';
|
||||
} else {
|
||||
$role = 'src';
|
||||
}
|
||||
// extension dir must be created if it doesn't exist
|
||||
// patch by Tomas Cox (modified by Greg Beaver)
|
||||
$ext_dir = $this->config->get('ext_dir');
|
||||
if (!@is_dir($ext_dir) && !System::mkdir(array('-p', $ext_dir))) {
|
||||
$this->log(3, "+ mkdir -p $ext_dir");
|
||||
return $this->raiseError("failed to create extension dir '$ext_dir'");
|
||||
}
|
||||
$dest = $ext_dir . DIRECTORY_SEPARATOR . $bn;
|
||||
$this->log(1, "Installing '$bn' at ext_dir ($dest)");
|
||||
$this->log(3, "+ cp $ext[file] ext_dir ($dest)");
|
||||
$dest = $ext['dest'];
|
||||
$this->log(1, "Installing '$ext[file]'");
|
||||
$copyto = $this->_prependPath($dest, $this->installroot);
|
||||
if (!@copy($ext['file'], $copyto)) {
|
||||
$this->rollbackFileTransaction();
|
||||
return $this->raiseError("failed to copy $bn to $copyto");
|
||||
$copydir = dirname($copyto);
|
||||
if (!@is_dir($copydir)) {
|
||||
if (!$this->mkDirHier($copydir)) {
|
||||
return $this->raiseError("failed to mkdir $copydir",
|
||||
PEAR_INSTALLER_FAILED);
|
||||
}
|
||||
$this->log(3, "+ mkdir $copydir");
|
||||
}
|
||||
if (!@copy($ext['file'], $copyto)) {
|
||||
return $this->raiseError("failed to write $copyto", PEAR_INSTALLER_FAILED);
|
||||
}
|
||||
$this->log(3, "+ cp $ext[file] $copyto");
|
||||
if (!OS_WINDOWS) {
|
||||
$mode = 0666 & ~(int)octdec($this->config->get('umask'));
|
||||
$this->addFileOperation('chmod', array($mode, $copyto));
|
||||
if (!@chmod($copyto, $mode)) {
|
||||
$this->log(0, "failed to change mode of $copyto");
|
||||
}
|
||||
}
|
||||
$this->addFileOperation('rename', array($ext['file'], $copyto));
|
||||
|
||||
$pkginfo['filelist'][$bn] = array(
|
||||
'role' => 'ext',
|
||||
'role' => $role,
|
||||
'installed_as' => $dest,
|
||||
'php_api' => $ext['php_api'],
|
||||
'zend_mod_api' => $ext['zend_mod_api'],
|
||||
|
||||
@@ -314,7 +314,9 @@ class PEAR_Registry extends PEAR
|
||||
function _unlock()
|
||||
{
|
||||
$ret = $this->_lock(LOCK_UN);
|
||||
fclose($this->lock_fp);
|
||||
if (is_resource($this->lock_fp)) {
|
||||
fclose($this->lock_fp);
|
||||
}
|
||||
$this->lock_fp = null;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,363 @@
|
||||
<?php
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 5 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2004 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 3.0 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at the following url: |
|
||||
// | http://www.php.net/license/3_0.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Tomas V.V.Cox <cox@idecnet.com> |
|
||||
// | Greg Beaver <cellog@php.net> |
|
||||
// | |
|
||||
// +----------------------------------------------------------------------+
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
/**
|
||||
* Simplified version of PHP's test suite
|
||||
* -- EXPERIMENTAL --
|
||||
|
||||
Try it with:
|
||||
|
||||
$ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);'
|
||||
|
||||
|
||||
TODO:
|
||||
|
||||
Actually finish the development and testing
|
||||
|
||||
*/
|
||||
|
||||
require_once 'PEAR.php';
|
||||
require_once 'PEAR/Config.php';
|
||||
|
||||
define('DETAILED', 1);
|
||||
putenv("PHP_PEAR_RUNTESTS=1");
|
||||
|
||||
class PEAR_RunTest
|
||||
{
|
||||
var $_logger;
|
||||
|
||||
/**
|
||||
* An object that supports the PEAR_Common->log() signature, or null
|
||||
* @param PEAR_Common|null
|
||||
*/
|
||||
function PEAR_RunTest($logger = null)
|
||||
{
|
||||
$this->_logger = $logger;
|
||||
}
|
||||
|
||||
//
|
||||
// Run an individual test case.
|
||||
//
|
||||
|
||||
function run($file, $ini_settings = '')
|
||||
{
|
||||
$cwd = getcwd();
|
||||
$conf = &PEAR_Config::singleton();
|
||||
$php = $conf->get('php_bin');
|
||||
//var_dump($php);exit;
|
||||
global $log_format, $info_params, $ini_overwrites;
|
||||
|
||||
$info_params = '';
|
||||
$log_format = 'LEOD';
|
||||
|
||||
// Load the sections of the test file.
|
||||
$section_text = array(
|
||||
'TEST' => '(unnamed test)',
|
||||
'SKIPIF' => '',
|
||||
'GET' => '',
|
||||
'ARGS' => '',
|
||||
);
|
||||
|
||||
if (!is_file($file) || !$fp = fopen($file, "r")) {
|
||||
return PEAR::raiseError("Cannot open test file: $file");
|
||||
}
|
||||
|
||||
$section = '';
|
||||
while (!feof($fp)) {
|
||||
$line = fgets($fp);
|
||||
|
||||
// Match the beginning of a section.
|
||||
if (ereg('^--([A-Z]+)--',$line,$r)) {
|
||||
$section = $r[1];
|
||||
$section_text[$section] = '';
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add to the section text.
|
||||
$section_text[$section] .= $line;
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
$shortname = str_replace($cwd.'/', '', $file);
|
||||
$tested = trim($section_text['TEST'])." [$shortname]";
|
||||
|
||||
$tmp = realpath(dirname($file));
|
||||
$tmp_skipif = $tmp . uniqid('/phpt.');
|
||||
$tmp_file = ereg_replace('\.phpt$','.php',$file);
|
||||
$tmp_post = $tmp . uniqid('/phpt.');
|
||||
|
||||
@unlink($tmp_skipif);
|
||||
@unlink($tmp_file);
|
||||
@unlink($tmp_post);
|
||||
|
||||
// unlink old test results
|
||||
@unlink(ereg_replace('\.phpt$','.diff',$file));
|
||||
@unlink(ereg_replace('\.phpt$','.log',$file));
|
||||
@unlink(ereg_replace('\.phpt$','.exp',$file));
|
||||
@unlink(ereg_replace('\.phpt$','.out',$file));
|
||||
|
||||
// Check if test should be skipped.
|
||||
$info = '';
|
||||
$warn = false;
|
||||
if (array_key_exists('SKIPIF', $section_text)) {
|
||||
if (trim($section_text['SKIPIF'])) {
|
||||
$this->save_text($tmp_skipif, $section_text['SKIPIF']);
|
||||
//$extra = substr(PHP_OS, 0, 3) !== "WIN" ?
|
||||
// "unset REQUEST_METHOD;": "";
|
||||
|
||||
//$output = `$extra $php $info_params -f $tmp_skipif`;
|
||||
$output = `$php $info_params -f $tmp_skipif`;
|
||||
unlink($tmp_skipif);
|
||||
if (eregi("^skip", trim($output))) {
|
||||
$skipreason = "SKIP $tested";
|
||||
$reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE;
|
||||
if ($reason) {
|
||||
$skipreason .= " (reason: $reason)";
|
||||
}
|
||||
$this->_logger->log(0, $skipreason);
|
||||
if (isset($old_php)) {
|
||||
$php = $old_php;
|
||||
}
|
||||
return 'SKIPPED';
|
||||
}
|
||||
if (eregi("^info", trim($output))) {
|
||||
$reason = (ereg("^info[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE;
|
||||
if ($reason) {
|
||||
$info = " (info: $reason)";
|
||||
}
|
||||
}
|
||||
if (eregi("^warn", trim($output))) {
|
||||
$reason = (ereg("^warn[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^warn[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE;
|
||||
if ($reason) {
|
||||
$warn = true; /* only if there is a reason */
|
||||
$info = " (warn: $reason)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We've satisfied the preconditions - run the test!
|
||||
$this->save_text($tmp_file,$section_text['FILE']);
|
||||
|
||||
$args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : '';
|
||||
|
||||
$cmd = "$php$ini_settings -f $tmp_file$args 2>&1";
|
||||
if (isset($this->_logger)) {
|
||||
$this->_logger->log(2, 'Running command "' . $cmd . '"');
|
||||
}
|
||||
|
||||
$savedir = getcwd(); // in case the test moves us around
|
||||
if (isset($section_text['RETURNS'])) {
|
||||
ob_start();
|
||||
system($cmd, $return_value);
|
||||
$out = ob_get_contents();
|
||||
ob_end_clean();
|
||||
@unlink($tmp_post);
|
||||
$section_text['RETURNS'] = (int) trim($section_text['RETURNS']);
|
||||
$returnfail = ($return_value != $section_text['RETURNS']);
|
||||
} else {
|
||||
$out = `$cmd`;
|
||||
$returnfail = false;
|
||||
}
|
||||
chdir($savedir);
|
||||
// Does the output match what is expected?
|
||||
$output = trim($out);
|
||||
$output = preg_replace('/\r\n/', "\n", $output);
|
||||
|
||||
if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) {
|
||||
if (isset($section_text['EXPECTF'])) {
|
||||
$wanted = trim($section_text['EXPECTF']);
|
||||
} else {
|
||||
$wanted = trim($section_text['EXPECTREGEX']);
|
||||
}
|
||||
$wanted_re = preg_replace('/\r\n/',"\n",$wanted);
|
||||
if (isset($section_text['EXPECTF'])) {
|
||||
$wanted_re = preg_quote($wanted_re, '/');
|
||||
// Stick to basics
|
||||
$wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy
|
||||
$wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re);
|
||||
$wanted_re = str_replace("%d", "[0-9]+", $wanted_re);
|
||||
$wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re);
|
||||
$wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re);
|
||||
$wanted_re = str_replace("%c", ".", $wanted_re);
|
||||
// %f allows two points "-.0.0" but that is the best *simple* expression
|
||||
}
|
||||
/* DEBUG YOUR REGEX HERE
|
||||
var_dump($wanted_re);
|
||||
print(str_repeat('=', 80) . "\n");
|
||||
var_dump($output);
|
||||
*/
|
||||
if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) {
|
||||
@unlink($tmp_file);
|
||||
$this->_logger->log(0, "PASS $tested$info");
|
||||
if (isset($old_php)) {
|
||||
$php = $old_php;
|
||||
}
|
||||
return 'PASSED';
|
||||
}
|
||||
|
||||
} else {
|
||||
$wanted = trim($section_text['EXPECT']);
|
||||
$wanted = preg_replace('/\r\n/',"\n",$wanted);
|
||||
// compare and leave on success
|
||||
$ok = (0 == strcmp($output,$wanted));
|
||||
if (!$returnfail && $ok) {
|
||||
@unlink($tmp_file);
|
||||
$this->_logger->log(0, "PASS $tested$info");
|
||||
if (isset($old_php)) {
|
||||
$php = $old_php;
|
||||
}
|
||||
return 'PASSED';
|
||||
}
|
||||
}
|
||||
|
||||
// Test failed so we need to report details.
|
||||
if ($warn) {
|
||||
$this->_logger->log(0, "WARN $tested$info");
|
||||
} else {
|
||||
$this->_logger->log(0, "FAIL $tested$info");
|
||||
}
|
||||
|
||||
if (isset($section_text['RETURNS'])) {
|
||||
$GLOBALS['__PHP_FAILED_TESTS__'][] = array(
|
||||
'name' => $file,
|
||||
'test_name' => $tested,
|
||||
'output' => ereg_replace('\.phpt$','.log', $file),
|
||||
'diff' => ereg_replace('\.phpt$','.diff', $file),
|
||||
'info' => $info,
|
||||
'return' => $return_value
|
||||
);
|
||||
} else {
|
||||
$GLOBALS['__PHP_FAILED_TESTS__'][] = array(
|
||||
'name' => $file,
|
||||
'test_name' => $tested,
|
||||
'output' => ereg_replace('\.phpt$','.log', $file),
|
||||
'diff' => ereg_replace('\.phpt$','.diff', $file),
|
||||
'info' => $info,
|
||||
);
|
||||
}
|
||||
|
||||
// write .exp
|
||||
if (strpos($log_format,'E') !== FALSE) {
|
||||
$logname = ereg_replace('\.phpt$','.exp',$file);
|
||||
if (!$log = fopen($logname,'w')) {
|
||||
return PEAR::raiseError("Cannot create test log - $logname");
|
||||
}
|
||||
fwrite($log,$wanted);
|
||||
fclose($log);
|
||||
}
|
||||
|
||||
// write .out
|
||||
if (strpos($log_format,'O') !== FALSE) {
|
||||
$logname = ereg_replace('\.phpt$','.out',$file);
|
||||
if (!$log = fopen($logname,'w')) {
|
||||
return PEAR::raiseError("Cannot create test log - $logname");
|
||||
}
|
||||
fwrite($log,$output);
|
||||
fclose($log);
|
||||
}
|
||||
|
||||
// write .diff
|
||||
if (strpos($log_format,'D') !== FALSE) {
|
||||
$logname = ereg_replace('\.phpt$','.diff',$file);
|
||||
if (!$log = fopen($logname,'w')) {
|
||||
return PEAR::raiseError("Cannot create test log - $logname");
|
||||
}
|
||||
fwrite($log, $this->generate_diff($wanted, $output,
|
||||
isset($section_text['RETURNS']) ? array(trim($section_text['RETURNS']),
|
||||
$return_value) : null));
|
||||
fclose($log);
|
||||
}
|
||||
|
||||
// write .log
|
||||
if (strpos($log_format,'L') !== FALSE) {
|
||||
$logname = ereg_replace('\.phpt$','.log',$file);
|
||||
if (!$log = fopen($logname,'w')) {
|
||||
return PEAR::raiseError("Cannot create test log - $logname");
|
||||
}
|
||||
fwrite($log,"
|
||||
---- EXPECTED OUTPUT
|
||||
$wanted
|
||||
---- ACTUAL OUTPUT
|
||||
$output
|
||||
---- FAILED
|
||||
");
|
||||
if ($returnfail) {
|
||||
fwrite($log,"
|
||||
---- EXPECTED RETURN
|
||||
$section_text[RETURNS]
|
||||
---- ACTUAL RETURN
|
||||
$return_value
|
||||
");
|
||||
}
|
||||
fclose($log);
|
||||
//error_report($file,$logname,$tested);
|
||||
}
|
||||
|
||||
if (isset($old_php)) {
|
||||
$php = $old_php;
|
||||
}
|
||||
|
||||
return $warn ? 'WARNED' : 'FAILED';
|
||||
}
|
||||
|
||||
function generate_diff($wanted, $output, $return_value)
|
||||
{
|
||||
$w = explode("\n", $wanted);
|
||||
$o = explode("\n", $output);
|
||||
$w1 = array_diff_assoc($w,$o);
|
||||
$o1 = array_diff_assoc($o,$w);
|
||||
$w2 = array();
|
||||
$o2 = array();
|
||||
foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val;
|
||||
foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1).$val;
|
||||
$diff = array_merge($w2, $o2);
|
||||
ksort($diff);
|
||||
if ($return_value) {
|
||||
$extra = "##EXPECTED: $return_value[0]\r\n##RETURNED: $return_value[1]";
|
||||
} else {
|
||||
$extra = '';
|
||||
}
|
||||
return implode("\r\n", $diff) . $extra;
|
||||
}
|
||||
|
||||
//
|
||||
// Write the given text to a temporary file, and return the filename.
|
||||
//
|
||||
|
||||
function save_text($filename, $text)
|
||||
{
|
||||
if (!$fp = fopen($filename, 'w')) {
|
||||
return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)");
|
||||
}
|
||||
fwrite($fp,$text);
|
||||
fclose($fp);
|
||||
if (1 < DETAILED) echo "
|
||||
FILE $filename {{{
|
||||
$text
|
||||
}}}
|
||||
";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
+50
-31
@@ -48,26 +48,15 @@
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<release>
|
||||
<version>1.3.3</version>
|
||||
<date>2004-10-28</date>
|
||||
<version>1.3.5</version>
|
||||
<date>2005-02-18</date>
|
||||
<state>stable</state>
|
||||
<license>PHP License</license>
|
||||
<notes>
|
||||
Installer:
|
||||
* fix Bug #1186 raise a notice error on PEAR::Common $_packageName
|
||||
* fix Bug #1249 display the right state when using --force option
|
||||
* fix Bug #2189 upgrade-all stops if dependancy fails
|
||||
* fix Bug #1637 The use of interface causes warnings when packaging with PEAR
|
||||
* fix Bug #1420 Parser bug for T_DOUBLE_COLON
|
||||
* fix Request #2220 pear5 build fails on dual php4/php5 system
|
||||
* fix Bug #1163 pear makerpm fails with packages that supply role="doc"
|
||||
|
||||
Other:
|
||||
* add PEAR_Exception class for PHP5 users
|
||||
* fix critical problem in package.xml for linux in 1.3.2
|
||||
* fix staticPopCallback() in PEAR_ErrorStack
|
||||
* fix warning in PEAR_Registry for windows 98 users
|
||||
</notes>
|
||||
* fix Bug #3505: pecl can't install PDO
|
||||
* enhance pear run-tests dramatically
|
||||
* fix Bug #3506: pear install should export the pear version into the environment
|
||||
</notes>
|
||||
<provides type="class" name="OS_Guess" />
|
||||
<provides type="class" name="System" />
|
||||
<provides type="function" name="md5_file" />
|
||||
@@ -98,11 +87,14 @@ Other:
|
||||
<file role="php" name="Downloader.php"/>
|
||||
<file role="php" name="Exception.php"/>
|
||||
<file role="php" name="ErrorStack.php"/>
|
||||
<file role="php" name="Builder.php"/>
|
||||
<file role="php" name="Builder.php">
|
||||
<replace from="@PEAR-VER@" to="version" type="package-info"/>
|
||||
</file>
|
||||
<file role="php" name="Installer.php"/>
|
||||
<file role="php" name="Packager.php"/>
|
||||
<file role="php" name="Registry.php"/>
|
||||
<file role="php" name="Remote.php"/>
|
||||
<file role="php" name="RunTest.php"/>
|
||||
</dir>
|
||||
<dir name="scripts" baseinstalldir="/">
|
||||
<file role="script" install-as="pear" name="pear.sh">
|
||||
@@ -160,22 +152,49 @@ PEAR_ErrorStack:
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<version>1.3</version>
|
||||
<date>2004-02-20</date>
|
||||
<version>1.3.3</version>
|
||||
<date>2004-10-28</date>
|
||||
<state>stable</state>
|
||||
<notes>
|
||||
PEAR Installer:
|
||||
|
||||
* Bug #171 --alldeps with a rel="eq" should install the required version, if possible
|
||||
* Bug #249 installing from an url doesnt work
|
||||
* Bug #248 --force command does not work as expected
|
||||
* Bug #293 [Patch] PEAR_Error not calling static method callbacks for error-handler
|
||||
* Bug #324 pear -G gives Fatal Error (PHP-GTK not installed, but error is at engine level)
|
||||
* Bug #594 PEAR_Common::analyzeSourceCode fails on string with $var and {
|
||||
* Bug #521 Incorrect filename in naming warnings
|
||||
* Moved download code into its own class
|
||||
* Fully unit tested the installer, packager, downloader, and PEAR_Common
|
||||
Installer:
|
||||
* fix Bug #1186 raise a notice error on PEAR::Common $_packageName
|
||||
* fix Bug #1249 display the right state when using --force option
|
||||
* fix Bug #2189 upgrade-all stops if dependancy fails
|
||||
* fix Bug #1637 The use of interface causes warnings when packaging with PEAR
|
||||
* fix Bug #1420 Parser bug for T_DOUBLE_COLON
|
||||
* fix Request #2220 pear5 build fails on dual php4/php5 system
|
||||
* fix Bug #1163 pear makerpm fails with packages that supply role="doc"
|
||||
|
||||
Other:
|
||||
* add PEAR_Exception class for PHP5 users
|
||||
* fix critical problem in package.xml for linux in 1.3.2
|
||||
* fix staticPopCallback() in PEAR_ErrorStack
|
||||
* fix warning in PEAR_Registry for windows 98 users
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<version>1.3.3.1</version>
|
||||
<date>2004-11-08</date>
|
||||
<state>stable</state>
|
||||
<notes>
|
||||
add RunTest.php to package.xml, make run-tests display failed tests, and use ui
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<version>1.3.4</version>
|
||||
<date>2005-01-01</date>
|
||||
<state>stable</state>
|
||||
<notes>
|
||||
* fix a serious problem caused by a bug in all versions of PHP that caused multiple registration
|
||||
of the shutdown function of PEAR.php
|
||||
* fix Bug #2861: package.dtd does not define NUMBER
|
||||
* fix Bug #2946: ini_set warning errors
|
||||
* fix Bug #3026: Dependency type "ne" is needed, "not" is not handled
|
||||
properly
|
||||
* fix Bug #3061: potential warnings in PEAR_Exception
|
||||
* implement Request #2848: PEAR_ErrorStack logger extends, PEAR_ERRORSTACK_DIE
|
||||
* implement Request #2914: Dynamic Include Path for run-tests command
|
||||
* make pear help listing more useful (put how-to-use info at the bottom of the listing)
|
||||
</notes>
|
||||
</release>
|
||||
</changelog>
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Id: package.dtd,v 1.35 2004-01-25 23:36:28 pajoye Exp $
|
||||
$Id: package.dtd,v 1.35.4.1 2005-03-28 16:46:06 cellog Exp $
|
||||
|
||||
This is the PEAR package description, version 1.0.
|
||||
It should be used with the informal public identifier:
|
||||
@@ -20,7 +20,7 @@
|
||||
Stig S. Bakken <ssb@php.net>
|
||||
|
||||
-->
|
||||
|
||||
<!ENTITY % NUMBER "CDATA">
|
||||
<!ELEMENT package (name|summary|description|license|maintainers|release|changelog)+>
|
||||
<!ATTLIST package type (source|binary|empty) "empty"
|
||||
version CDATA #REQUIRED>
|
||||
@@ -65,8 +65,8 @@
|
||||
<!ATTLIST file role (php|ext|src|test|doc|data|script) 'php'
|
||||
debug (na|on|off) 'na'
|
||||
zts (na|on|off) 'na'
|
||||
phpapi NUMBER #IMPLIED
|
||||
zendapi NUMBER #IMPLIED
|
||||
phpapi %NUMBER; #IMPLIED
|
||||
zendapi %NUMBER; #IMPLIED
|
||||
format CDATA #IMPLIED
|
||||
baseinstalldir CDATA #IMPLIED
|
||||
platform CDATA #IMPLIED
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,7 +29,7 @@ if ('@include_path@' != '@'.'include_path'.'@') {
|
||||
}
|
||||
ini_set('allow_url_fopen', true);
|
||||
if (!ini_get('safe_mode')) {
|
||||
set_time_limit(0);
|
||||
@set_time_limit(0);
|
||||
}
|
||||
ob_implicit_flush(true);
|
||||
ini_set('track_errors', true);
|
||||
@@ -75,6 +75,11 @@ if ($progname == 'gpear' || $progname == 'pear-gtk') {
|
||||
PEAR_Command::setFrontendType($fetype);
|
||||
$ui = &PEAR_Command::getFrontendObject();
|
||||
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError"));
|
||||
if (ini_get('safe_mode')) {
|
||||
$ui->outputData('WARNING: running in safe mode requires that all files created ' .
|
||||
'be the same uid as the current script. PHP reports this script is uid: ' .
|
||||
@getmyuid() . ', and current user is: ' . @get_current_user());
|
||||
}
|
||||
|
||||
$pear_user_config = '';
|
||||
$pear_system_config = '';
|
||||
@@ -212,9 +217,6 @@ function usage($error = null, $helpsubject = null)
|
||||
$put = cmdHelp($helpsubject);
|
||||
} else {
|
||||
$put =
|
||||
"Usage: $progname [options] command [command-options] <parameters>\n".
|
||||
"Type \"$progname help options\" to list all options.\n".
|
||||
"Type \"$progname help <command>\" to get the help for the specified command.\n".
|
||||
"Commands:\n";
|
||||
$maxlen = max(array_map("strlen", $all_commands));
|
||||
$formatstr = "%-{$maxlen}s %s\n";
|
||||
@@ -222,6 +224,11 @@ function usage($error = null, $helpsubject = null)
|
||||
foreach ($all_commands as $cmd => $class) {
|
||||
$put .= sprintf($formatstr, $cmd, PEAR_Command::getDescription($cmd));
|
||||
}
|
||||
$put .=
|
||||
"Usage: $progname [options] command [command-options] <parameters>\n".
|
||||
"Type \"$progname help options\" to list all options.\n".
|
||||
"Type \"$progname help shortcuts\" to list all command shortcuts.\n".
|
||||
"Type \"$progname help <command>\" to get the help for the specified command.";
|
||||
}
|
||||
fputs($stderr, "$put\n");
|
||||
fclose($stderr);
|
||||
|
||||
+12
-8
@@ -30,25 +30,29 @@ pear -v -c %{buildroot}/pearrc \
|
||||
%build
|
||||
echo BuildRoot=%{buildroot}
|
||||
|
||||
%clean
|
||||
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||
|
||||
%postun
|
||||
pear uninstall --nodeps -r @package@
|
||||
rm @rpm_xml_dir@/@package@.xml
|
||||
|
||||
%post
|
||||
pear install --nodeps -r @rpm_xml_dir@/@package@.xml
|
||||
|
||||
%install
|
||||
pear -c %{buildroot}/pearrc install --nodeps -R %{buildroot} \
|
||||
$RPM_SOURCE_DIR/@package@-%{version}.tgz
|
||||
pear -c "%{buildroot}/pearrc" install --nodeps -R "%{buildroot}" \
|
||||
"$RPM_SOURCE_DIR/@package@-%{version}.tgz"
|
||||
rm %{buildroot}/pearrc
|
||||
rm %{buildroot}/%{_libdir}/php/pear/.filemap
|
||||
rm %{buildroot}/%{_libdir}/php/pear/.lock
|
||||
rm -rf %{buildroot}/%{_libdir}/php/pear/.registry
|
||||
if [ -d "%{buildroot}/docs/@package@/doc" ]; then
|
||||
rm -rf $RPM_BUILD_DIR/doc
|
||||
mv %{buildroot}/docs/@package@/doc $RPM_BUILD_DIR
|
||||
rm -rf %{buildroot}/docs
|
||||
fi
|
||||
for DOCDIR in docs doc examples; do
|
||||
if [ -d "%{buildroot}/docs/@package@/$DOCDIR" ]; then
|
||||
rm -rf $RPM_BUILD_DIR/$DOCDIR
|
||||
mv %{buildroot}/docs/@package@/$DOCDIR $RPM_BUILD_DIR
|
||||
rm -rf %{buildroot}/docs
|
||||
fi
|
||||
done
|
||||
mkdir -p %{buildroot}@rpm_xml_dir@
|
||||
tar -xzf $RPM_SOURCE_DIR/@package@-%{version}.tgz package.xml
|
||||
cp -p package.xml %{buildroot}@rpm_xml_dir@/@package@.xml
|
||||
|
||||
+352
-169
@@ -3,6 +3,7 @@ Installing PHP
|
||||
_________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
Preface
|
||||
1. General Installation Considerations
|
||||
2. Installation on Windows systems
|
||||
|
||||
@@ -10,7 +11,7 @@ Installing PHP
|
||||
Manual Installation Steps
|
||||
ActiveScript
|
||||
Microsoft IIS / PWS
|
||||
Apache 1.3.x on Microsft Windows
|
||||
Apache 1.3.x on Microsoft Windows
|
||||
Apache 2.0.x on Microsoft Windows
|
||||
Sun, iPlanet and Netscape servers on Microsoft Windows
|
||||
OmniHTTPd Server
|
||||
@@ -18,18 +19,34 @@ Installing PHP
|
||||
Xitami on Microsoft Windows
|
||||
Installation of extensions on Windows
|
||||
|
||||
3. Problems?
|
||||
3. Installation of PECL extensions
|
||||
|
||||
Introduction to PECL Installations
|
||||
Downloading PECL extensions
|
||||
PECL for Windows users
|
||||
Compiling shared PECL extensions with PEAR
|
||||
Compiling shared PECL extensions with phpize
|
||||
Compiling PECL extensions statically into PHP
|
||||
|
||||
4. Problems?
|
||||
|
||||
Read the FAQ
|
||||
Other problems
|
||||
Bug reports
|
||||
|
||||
4. Runtime Configuration
|
||||
5. Runtime Configuration
|
||||
|
||||
The configuration file
|
||||
How to change configuration settings
|
||||
_________________________________________________________________
|
||||
|
||||
Preface
|
||||
|
||||
These installation instructions were generated from the HTML version
|
||||
of the PHP Manual so formatting and linking have been altered. See the
|
||||
online and updated version at: http://php.net/install.windows
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 1. General Installation Considerations
|
||||
|
||||
Before starting the installation, first you need to know what do you
|
||||
@@ -129,12 +146,9 @@ Windows Installer
|
||||
can, and advanced, which asks questions as it goes along.
|
||||
|
||||
The installation wizard gathers enough information to set up the
|
||||
php.ini file, and configure certain web servers to use PHP. With IIS
|
||||
or PWS on a NT Workstation, a list of all the nodes on the server with
|
||||
script map settings is displayed, and you can choose those nodes to
|
||||
which you wish to add the PHP script mappings. One of the web servers
|
||||
the PHP installer does not configure for is Apache, so you'll need to
|
||||
configure it manually.
|
||||
php.ini file, and configure certain web servers to use PHP. One of the
|
||||
web servers the PHP installer does not configure for is Apache, so
|
||||
you'll need to configure it manually.
|
||||
|
||||
Once the installation has completed, the installer will inform you if
|
||||
you need to restart your system, restart the server, or just start
|
||||
@@ -401,7 +415,7 @@ c:\php
|
||||
follow the next step. Set the doc_root to point to your web
|
||||
servers document_root. For example:
|
||||
|
||||
doc_root = c:\inetpub // for IIS/PWS
|
||||
doc_root = c:\inetpub\wwwroot // for IIS/PWS
|
||||
|
||||
doc_root = c:\apache\htdocs // for Apache
|
||||
|
||||
@@ -430,7 +444,7 @@ ActiveScript
|
||||
ASP/ASP.NET, Windows Script Components or Microsoft Scriptlet control.
|
||||
|
||||
As of PHP 5.0.1, ActiveScript has been moved to the PECL repository.
|
||||
You may download this PECL extensions DLL from the PHP Downloads page
|
||||
You may download this PECL extension DLL from the PHP Downloads page
|
||||
or at http://snaps.php.net/.
|
||||
|
||||
Note: You should read the manual installation steps first!
|
||||
@@ -466,12 +480,7 @@ ActiveScript
|
||||
Microsoft IIS / PWS
|
||||
|
||||
This section contains notes and hints specific to IIS (Microsoft
|
||||
Internet Information Server). We have included installation
|
||||
instructions for PWS/IIS 3, PWS 4 or newer and IIS 4 or newer
|
||||
versions.
|
||||
|
||||
Important for CGI users: Read the faq on cgi.force_redirect for
|
||||
important details. This directive needs to be set to 0.
|
||||
Internet Information Server).
|
||||
|
||||
Warning
|
||||
|
||||
@@ -480,6 +489,124 @@ Microsoft IIS / PWS
|
||||
yourself from those attacks.
|
||||
_________________________________________________________________
|
||||
|
||||
General considerations for all installations of PHP with IIS
|
||||
|
||||
* First, read the Manual Installation Instructions. Do not skip this
|
||||
step as it provides crucial information for installing PHP on
|
||||
Windows.
|
||||
* CGI users must set the cgi.force_redirect PHP directive to 0
|
||||
inside php.ini. Read the faq on cgi.force_redirect for important
|
||||
details. Also, CGI users should set the cgi.redirect_status_env
|
||||
directive to ENV_VAR_NAME. Be sure these directives aren't
|
||||
commented out inside php.ini.
|
||||
* The PHP 4 CGI is named php.exe while in PHP 5 it's php-cgi.exe. In
|
||||
PHP 5, php.exe is the CLI, and not the CGI.
|
||||
* Modify the Windows PATH environment variable to include the PHP
|
||||
directory. This way the PHP DLL files, PHP executables, and
|
||||
php.ini can all remain in the PHP directory without cluttering up
|
||||
the Windows system directory. For more details, see the FAQ on
|
||||
Setting the PATH.
|
||||
* Be sure the extension_dir and doc_root PHP directives are
|
||||
appropriately set in php.ini. These directives depend on the
|
||||
system that PHP is being installed on. In PHP 4, the extension_dir
|
||||
is extensions while with PHP 5 it's ext. So, an example PHP 5
|
||||
extensions_dir value is "c:\php\ext" and an example IIS doc_root
|
||||
value is "c:\Inetpub\wwwroot".
|
||||
* PHP extension DLL files, such as php_mysql.dll and php_curl.dll,
|
||||
are found in the zip package of the PHP download (not the PHP
|
||||
installer). In PHP 5, many extensions are part of PECL and can be
|
||||
downloaded in the "Collection of PECL modules" package. Files such
|
||||
as php_zip.dll and php_ssh2.dll. Download PHP files here.
|
||||
* When defining the executable, the 'check that file exists' box may
|
||||
also be checked. For a small performance penalty, the IIS (or PWS)
|
||||
will check that the script file exists and sort out authentication
|
||||
before firing up PHP. This means that the web server will provide
|
||||
sensible 404 style error messages instead of CGI errors
|
||||
complaining that PHP did not output any data.
|
||||
_________________________________________________________________
|
||||
|
||||
Windows NT/200x/XP and IIS 4 or newer
|
||||
|
||||
PHP may be installed as a CGI binary, or with the ISAPI module. In
|
||||
either case, you need to start the Microsoft Management Console (may
|
||||
appear as 'Internet Services Manager', either in your Windows NT 4.0
|
||||
Option Pack branch or the Control Panel=>Administrative Tools under
|
||||
Windows 2000/XP). Then right click on your Web server node (this will
|
||||
most probably appear as 'Default Web Server'), and select
|
||||
'Properties'.
|
||||
|
||||
If you want to use the CGI binary, do the following:
|
||||
|
||||
* Under 'Home Directory', 'Virtual Directory', or 'Directory', do
|
||||
the following:
|
||||
* Change the Execute Permissions to 'Scripts only'
|
||||
* Click on the 'Configuration' button, and choose the Application
|
||||
Mappings tab. Click Add and set the Executable path to the
|
||||
appropriate CGI file. An example PHP 5 value is:
|
||||
C:\php\php-cgi.exe Supply .php as the extension. Leave 'Method
|
||||
exclusions' blank, and check the 'Script engine' checkbox. Now,
|
||||
click OK a few times.
|
||||
* Set up the appropriate security. (This is done in Internet Service
|
||||
Manager), and if your NT Server uses NTFS file system, add execute
|
||||
rights for I_USR_ to the directory that contains php.exe /
|
||||
php-cgi.exe.
|
||||
|
||||
To use the ISAPI module, do the following:
|
||||
|
||||
* If you don't want to perform HTTP Authentication using PHP, you
|
||||
can (and should) skip this step. Under ISAPI Filters, add a new
|
||||
ISAPI filter. Use PHP as the filter name, and supply a path to the
|
||||
php4isapi.dll / php5isapi.dll.
|
||||
* Under 'Home Directory', 'Virtual Directory', or 'Directory', do
|
||||
the following:
|
||||
* Change the Execute Permissions to 'Scripts only'
|
||||
* Click on the 'Configuration' button, and choose the Application
|
||||
Mappings tab. Click Add and set the Executable path to the
|
||||
appropriate ISAPI DLL. An example PHP 5 value is:
|
||||
C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method
|
||||
exclusions' blank, and check the 'Script engine' checkbox. Now,
|
||||
click OK a few times.
|
||||
* Stop IIS completely (NET STOP iisadmin)
|
||||
* Start IIS again (NET START w3svc)
|
||||
|
||||
With IIS 6 (2003 Server), open up the IIS Manager, go to Web Service
|
||||
Extensions, choose "Add a new Web service extension", enter in a name
|
||||
such as PHP, choose the Add button and for the value browse to either
|
||||
the ISAPI file (php4isapi.dll or php5isapi.dll) or CGI (php.exe or
|
||||
php-cgi.exe) then check "Set extension status to Allowed" and click
|
||||
OK.
|
||||
|
||||
In order to use index.php as a default content page, do the following:
|
||||
From within the Documents tab, choose Add. Type in index.php and click
|
||||
OK. Adjust the order by choosing Move Up or Move Down. This is similar
|
||||
to setting DirectoryIndex with Apache.
|
||||
|
||||
The steps above must be repeated for each extension that is to be
|
||||
associated with PHP scripts. .php is the most common although .php3
|
||||
may be required for legacy applications.
|
||||
|
||||
If you experience 100% CPU usage after some time, turn off the IIS
|
||||
setting Cache ISAPI Application.
|
||||
_________________________________________________________________
|
||||
|
||||
Windows and PWS 4
|
||||
|
||||
PWS 4 does not support ISAPI, only PHP CGI should be used.
|
||||
|
||||
* Edit the enclosed pws-php4cgi.reg / pws-php5cgi.reg file (look
|
||||
into the SAPI folder for PHP 4, or in the main folder for PHP 5)
|
||||
to reflect the location of your php.exe / php-cgi.exe. Backslashes
|
||||
should be escaped, for example:
|
||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parame
|
||||
ters\Script Map] ".php"="C:\\php\\php.exe" (change to
|
||||
C:\\php\\php-cgi.exe if you are using PHP 5) Now merge this
|
||||
registery file into your system; you may do this by
|
||||
double-clicking it.
|
||||
* In the PWS Manager, right click on a given directory you want to
|
||||
add PHP support to, and select Properties. Check the 'Execute'
|
||||
checkbox, and confirm.
|
||||
_________________________________________________________________
|
||||
|
||||
Windows and PWS/IIS 3
|
||||
|
||||
The recommended method for configuring these servers is to use the REG
|
||||
@@ -541,106 +668,17 @@ Windows and PWS/IIS 3
|
||||
maps.
|
||||
_________________________________________________________________
|
||||
|
||||
Windows and PWS 4 or newer
|
||||
|
||||
When installing PHP on Windows with PWS 4 or newer version, you have
|
||||
two options. One to set up the PHP CGI binary, the other is to use the
|
||||
ISAPI module DLL.
|
||||
|
||||
If you choose the CGI binary, do the following:
|
||||
|
||||
* Edit the enclosed pws-php4cgi.reg / pws-php5cgi.reg file (look
|
||||
into the SAPI folder for PHP 4, or in the main folder for PHP 5)
|
||||
to reflect the location of your php.exe / php-cgi.exe. Backslashes
|
||||
should be escaped, for example:
|
||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parame
|
||||
ters\Script Map] ".php"="C:\\php\\php.exe" (change to
|
||||
C:\\php\\php-cgi.exe if you are using PHP 5) Now merge this
|
||||
registery file into your system; you may do this by
|
||||
double-clicking it.
|
||||
* In the PWS Manager, right click on a given directory you want to
|
||||
add PHP support to, and select Properties. Check the 'Execute'
|
||||
checkbox, and confirm.
|
||||
|
||||
If you choose the ISAPI module, do the following:
|
||||
|
||||
* Edit the enclosed pws-php4isapi.reg / pws-php5isapi.reg file (look
|
||||
into the SAPI folder for PHP 4, or in the main folder for PHP 5)
|
||||
to reflect the location of your php4isapi.dll / php5isapi.dll.
|
||||
Backslashes should be escaped, for example:
|
||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parame
|
||||
ters\Script Map] ".php"="C:\\php\\sapi\\php4isapi.dll" (or
|
||||
C:\\php\\php5isapi.dll for PHP 5) Now merge this registery file
|
||||
into your system; you may do this by double-clicking it.
|
||||
* In the PWS Manager, right click on a given directory you want to
|
||||
add PHP support to, and select Properties. Check the 'Execute'
|
||||
checkbox, and confirm.
|
||||
_________________________________________________________________
|
||||
|
||||
Windows NT/2000/XP and IIS 4 or newer
|
||||
|
||||
To install PHP on an NT/2000/XP Server running IIS 4 or newer, follow
|
||||
these instructions. You have two options to set up PHP, using the CGI
|
||||
binary (php.exe in PHP 4, or php-cgi.exe in PHP 5) or with the ISAPI
|
||||
module.
|
||||
|
||||
In either case, you need to start the Microsoft Management Console
|
||||
(may appear as 'Internet Services Manager', either in your Windows NT
|
||||
4.0 Option Pack branch or the Control Panel=>Administrative Tools
|
||||
under Windows 2000/XP). Then right click on your Web server node (this
|
||||
will most probably appear as 'Default Web Server'), and select
|
||||
'Properties'.
|
||||
|
||||
If you want to use the CGI binary, do the following:
|
||||
|
||||
* Under 'Home Directory', 'Virtual Directory', or 'Directory', click
|
||||
on the 'Configuration' button, and then enter the App Mappings
|
||||
tab.
|
||||
* Click Add, and in the Executable box, type: C:\php\php.exe for PHP
|
||||
4 or C:\php\php-cgi.exe for PHP 5 (assuming that you have unziped
|
||||
PHP in c:\php\).
|
||||
* In the Extension box, type the file name extension you want
|
||||
associated with PHP scripts. Leave 'Method exclusions' blank, and
|
||||
check the 'Script engine' checkbox. You may also like to check the
|
||||
'check that file exists' box - for a small performance penalty,
|
||||
IIS (or PWS) will check that the script file exists and sort out
|
||||
authentication before firing up PHP. This means that you will get
|
||||
sensible 404 style error messages instead of CGI errors
|
||||
complaining that PHP did not output any data.
|
||||
You must start over from the previous step for each extension you
|
||||
want associated with PHP scripts. .php and .phtml are common,
|
||||
although .php3 may be required for legacy applications.
|
||||
* Set up the appropriate security. (This is done in Internet Service
|
||||
Manager), and if your NT Server uses NTFS file system, add execute
|
||||
rights for I_USR_ to the directory that contains php.exe /
|
||||
php-cgi.exe.
|
||||
|
||||
To use the ISAPI module, do the following:
|
||||
|
||||
* If you don't want to perform HTTP Authentication using PHP, you
|
||||
can (and should) skip this step. Under ISAPI Filters, add a new
|
||||
ISAPI filter. Use PHP as the filter name, and supply a path to the
|
||||
php4isapi.dll / php5isapi.dll.
|
||||
* Under 'Home Directory', click on the 'Configuration' button. Add a
|
||||
new entry to the Application Mappings. Use the path to the
|
||||
php4isapi.dll / php5isapi.dll as the Executable, supply .php as
|
||||
the extension, leave 'Method exclusions' blank, and check the
|
||||
'Script engine' checkbox.
|
||||
* Stop IIS completely (NET STOP iisadmin)
|
||||
* Start IIS again (NET START w3svc)
|
||||
_________________________________________________________________
|
||||
|
||||
Apache 1.3.x on Microsft Windows
|
||||
Apache 1.3.x on Microsoft Windows
|
||||
|
||||
This section contains notes and hints specific to Apache 1.3.x
|
||||
installs of PHP on Microsoft Windows systems. We also have
|
||||
installs of PHP on Microsoft Windows systems. There are also
|
||||
instructions and notes for Apache 2 on a separate page.
|
||||
|
||||
Note: You should read the manual installation steps first!
|
||||
Note: Please read the manual installation steps first!
|
||||
|
||||
There are two ways to set up PHP to work with Apache 1.3.x on Windows.
|
||||
One is to use the CGI binary (php.exe for PHP 4 and php-cgi.exe for
|
||||
PHP 5), the other is to use the Apache module DLL. In either case you
|
||||
PHP 5), the other is to use the Apache Module DLL. In either case you
|
||||
need to edit your httpd.conf to configure Apache to work with PHP, and
|
||||
then restart the server.
|
||||
|
||||
@@ -662,13 +700,44 @@ Apache 1.3.x on Microsft Windows
|
||||
c:/directory/file.ext.
|
||||
_________________________________________________________________
|
||||
|
||||
Installing as an Apache module
|
||||
|
||||
You should add the following lines to your Apache httpd.conf file:
|
||||
|
||||
Example 2-3. PHP as an Apache 1.3.x module
|
||||
|
||||
This assumes PHP is installed to c:\php. Adjust the path if this is
|
||||
not the case.
|
||||
|
||||
For PHP 4:
|
||||
# Add to the end of the LoadModule section
|
||||
LoadModule php4_module "c:/php/php4apache.dll"
|
||||
|
||||
# Add to the end of the AddModule section
|
||||
AddModule mod_php4.c
|
||||
|
||||
For PHP 5:
|
||||
# Add to the end of the LoadModule section
|
||||
LoadModule php5_module "c:/php/php5apache.dll"
|
||||
|
||||
# Add to the end of the AddModule section
|
||||
AddModule mod_php5.c
|
||||
|
||||
For both:
|
||||
# Add this line inside the <IfModule mod_mime.c> conditional brace
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
# For syntax highlighted .phps files, also add
|
||||
AddType application/x-httpd-php-source .phps
|
||||
_________________________________________________________________
|
||||
|
||||
Installing as a CGI binary
|
||||
|
||||
If you unziped the PHP package to C:\php\ as described in the Manual
|
||||
If you unzipped the PHP package to C:\php\ as described in the Manual
|
||||
Installation Steps section, you need to insert these lines to your
|
||||
Apache configuration file to set up the CGI binary:
|
||||
|
||||
Example 2-3. PHP and Apache 1.3.x as CGI
|
||||
Example 2-4. PHP and Apache 1.3.x as CGI
|
||||
ScriptAlias /php/ "c:/php/"
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
@@ -692,44 +761,11 @@ SetEnv PHPRC C:/php
|
||||
yourself from those attacks.
|
||||
|
||||
If you would like to present PHP source files syntax highlighted,
|
||||
there is no such convinient option as with the module version of PHP.
|
||||
there is no such convenient option as with the module version of PHP.
|
||||
If you chose to configure Apache to use PHP as a CGI binary, you will
|
||||
need to use the show_source() function. To do this simply create a PHP
|
||||
script file and add this code: <?php
|
||||
show_source("original_php_script.php"); ?>. Substitute
|
||||
original_php_script.php with the name of the file you wish to show the
|
||||
source of.
|
||||
_________________________________________________________________
|
||||
|
||||
Installing as an Apache module
|
||||
|
||||
You should add the following lines to your Apache httpd.conf file:
|
||||
|
||||
Example 2-4. PHP as an Apache 1.3.x module
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
# For PHP 4
|
||||
LoadModule php4_module "c:/php/sapi/php4apache.dll"
|
||||
|
||||
# For PHP 5
|
||||
LoadModule php5_module "c:/php/php5apache.dll"
|
||||
|
||||
# specify the directory where php.ini is
|
||||
SetEnv PHPRC C:/php
|
||||
|
||||
You may find after using the Windows installer for Apache that you
|
||||
need to define the AddModule directive for mod_php4.c. This is
|
||||
especially important if the ClearModuleList directive is defined,
|
||||
which you will find by scrolling down a few lines. You will see a list
|
||||
of AddModule entries, add the following line at the end of the list:
|
||||
AddModule mod_php4.c. For PHP 5, instead use AddModule mod_php5.c
|
||||
|
||||
If you would like to use the source code highlighting feature, you
|
||||
need to add the following line to your httpd.conf: AddType
|
||||
application/x-httpd-php-source .phps. This should be inserted at the
|
||||
same place where you inserted AddType application/x-httpd-php .php
|
||||
above). With this setup, all files served with the .phps extension
|
||||
will be syntax highlighted for the browser.
|
||||
need to use the highlight_file() function. To do this simply create a
|
||||
PHP script file and add this code: <?php
|
||||
highlight_file('some_php_script.php'); ?>.
|
||||
_________________________________________________________________
|
||||
|
||||
Apache 2.0.x on Microsoft Windows
|
||||
@@ -742,9 +778,9 @@ Apache 2.0.x on Microsoft Windows
|
||||
|
||||
Warning
|
||||
|
||||
Do not use Apache 2.0.x and PHP in a production environment neither on
|
||||
Unix nor on Windows. For information on why, read the following FAQ
|
||||
entry
|
||||
We do not recommend using a threaded MPM in production with Apache2.
|
||||
Use the prefork MPM instead, or use Apache1. For information on why,
|
||||
read the following FAQ entry
|
||||
|
||||
You are highly encouraged to take a look at the Apache Documentation
|
||||
to get a basic understanding of the Apache 2.0.x Server. Also consider
|
||||
@@ -820,7 +856,7 @@ Installing as an Apache module
|
||||
|
||||
Example 2-6. PHP and Apache 2.0 as Module
|
||||
# For PHP 4 do something like this:
|
||||
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
|
||||
LoadModule php4_module "c:/php/php4apache2.dll"
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
# For PHP 5 do something like this:
|
||||
@@ -836,6 +872,8 @@ PHPIniDir "C:/php"
|
||||
php4apache.dll or php5apache.dll as the latter ones are designed to
|
||||
run with Apache 1.3.x.
|
||||
|
||||
Note: If you want to use content negotiation, read related FAQ.
|
||||
|
||||
Warning
|
||||
|
||||
Don't mix up your installation with DLL files from different PHP
|
||||
@@ -1159,7 +1197,7 @@ extension_dir = c:/php/extensions/
|
||||
|
||||
* Enable the extension(s) in php.ini you want to use by uncommenting
|
||||
the extension=php_*.dll lines in php.ini. This is done by deleting
|
||||
the leading ; form the extension you want to load.
|
||||
the leading ; from the extension you want to load.
|
||||
|
||||
Example 2-8. Enable Bzip2 extension for PHP-Windows
|
||||
// change the following line from ...
|
||||
@@ -1176,6 +1214,11 @@ extension=php_bz2.dll
|
||||
bundled DLLs from C:\php\dlls folder to the main C:\php folder.
|
||||
Don't forget to include C:\php in the system PATH (this process is
|
||||
explained in a separate FAQ entry).
|
||||
* Some of these DLLs are not bundled with the PHP distribution. See
|
||||
each extensions documentation page for details. Also, read the
|
||||
manual section titled Installation of PECL extensions for details
|
||||
on PECL. An increasingly large number of PHP extensions are found
|
||||
in PECL, and these extensions require a separate download.
|
||||
|
||||
Note: If you are running a server module version of PHP remember to
|
||||
restart your webserver to reflect your changes to php.ini.
|
||||
@@ -1201,7 +1244,8 @@ extension=php_bz2.dll
|
||||
php_domxml.dll DOM XML functions PHP <= 4.2.0 requires: libxml2.dll
|
||||
(bundled) PHP >= 4.3.0 requires: iconv.dll (bundled)
|
||||
php_dotnet.dll .NET functions PHP <= 4.1.1
|
||||
php_exif.dll Read EXIF headers from JPEG None
|
||||
php_exif.dll EXIF functions php_mbstring.dll. And, php_exif.dll must
|
||||
be loaded after php_mbstring.dll in php.ini.
|
||||
php_fbsql.dll FrontBase functions PHP <= 4.2.0
|
||||
php_fdf.dll FDF: Forms Data Format functions. Requires: fdftk.dll
|
||||
(bundled)
|
||||
@@ -1235,8 +1279,8 @@ extension=php_bz2.dll
|
||||
php_mssql.dll MSSQL functions Requires: ntwdblib.dll (bundled)
|
||||
php_mysql.dll MySQL functions PHP >= 5.0.0, requires libmysql.dll
|
||||
(bundled)
|
||||
php_mysqli.dll MySQLi functions PHP >= 5.0.0, requires libmysqli.dll
|
||||
(bundled)
|
||||
php_mysqli.dll MySQLi functions PHP >= 5.0.0, requires libmysql.dll
|
||||
(libmysqli.dll in PHP <= 5.0.2) (bundled)
|
||||
php_oci8.dll Oracle 8 functions Requires: Oracle 8.1+ client libraries
|
||||
php_openssl.dll OpenSSL functions Requires: libeay32.dll (bundled)
|
||||
php_oracle.dll Oracle functions Requires: Oracle 7 client libraries
|
||||
@@ -1262,7 +1306,145 @@ extension=php_bz2.dll
|
||||
php_zlib.dll ZLib compression functions Built in since PHP 4.3.0
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 3. Problems?
|
||||
Chapter 3. Installation of PECL extensions
|
||||
|
||||
Introduction to PECL Installations
|
||||
|
||||
PHP extensions may be installed in a variety of ways. PECL is a
|
||||
repository of PHP extensions living within the PEAR structure, and the
|
||||
following demonstrates how to install these extensions.
|
||||
|
||||
These instructions assume /your/phpsrcdir/ is the path to the PHP
|
||||
source, and extname is the name of the PECL extension. Adjust
|
||||
accordingly. These instructions also assume a familiarity with the
|
||||
pear command.
|
||||
|
||||
Shared extensions may be installed by including them inside of php.ini
|
||||
using the extension PHP directive. See also the extensions_dir
|
||||
directive, and dl(). The installation methods described below do not
|
||||
automatically configure PHP to include these extensions, this step
|
||||
must be done manually.
|
||||
|
||||
When building PHP modules, it's important to have the appropriate
|
||||
versions of the required tools (autoconf, automake, libtool, etc.) See
|
||||
the Anonymous CVS Instructions for details on the required tools, and
|
||||
required versions.
|
||||
_________________________________________________________________
|
||||
|
||||
Downloading PECL extensions
|
||||
|
||||
There are several options for downloading PECL extensions, such as:
|
||||
|
||||
* http://pecl.php.net
|
||||
Listed here is information like the ChangeLog, release
|
||||
information, requirements, revisions, etc. Although not every PECL
|
||||
extension has a webpage, most do.
|
||||
* pear download extname
|
||||
The pear command may also be used to download source files.
|
||||
Specific revisions may also be specified.
|
||||
* CVS
|
||||
All PECL files reside in CVS. A web-based view may be seen at
|
||||
http://cvs.php.net/pecl/. To download straight from CVS, consider
|
||||
the following where phpfi is the password for user cvsread:
|
||||
|
||||
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
|
||||
$ 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, and by
|
||||
retrieving a PECL Snapshot. To compile PHP under Windows, read the
|
||||
Win32 Build README.
|
||||
_________________________________________________________________
|
||||
|
||||
PECL for Windows users
|
||||
|
||||
Like with any other PHP extension DLL, to install move the PECL
|
||||
extension DLLs into the extension_dir folder and include them within
|
||||
php.ini. For example:
|
||||
|
||||
extension=php_extname.dll
|
||||
|
||||
After doing this, restart the web server.
|
||||
_________________________________________________________________
|
||||
|
||||
Compiling shared PECL extensions with PEAR
|
||||
|
||||
PEAR makes it easy to create shared PHP extensions. Using the pear
|
||||
command, do the following:
|
||||
|
||||
$ pear install extname
|
||||
|
||||
That will download the source for extname, and compile it on the
|
||||
system. This results in an extname.so file that may then be included
|
||||
in php.ini
|
||||
|
||||
In case the systems preferred_state is set higher than an available
|
||||
extname version, like it's set to stable and the extension is still in
|
||||
beta, either alter the preferred_state via pear config-set or specify
|
||||
a specific version of the PECL extension. For example:
|
||||
|
||||
$ pear install extname-0.1.1
|
||||
|
||||
Regardless, pear will copy this extname.so into the extensions
|
||||
directory. Adjust php.ini accordingly.
|
||||
_________________________________________________________________
|
||||
|
||||
Compiling shared PECL extensions with phpize
|
||||
|
||||
If using pear is not an option, like for building shared PECL
|
||||
extensions from CVS, or for unreleased PECL packages, then creating a
|
||||
shared extension may also be done by manually using the phpize
|
||||
command. The pear command essentially does this but it may also be
|
||||
done manually. Assuming the source file is named extname.tgz, and that
|
||||
it was downloaded into the current directory, consider the following:
|
||||
|
||||
$ pear download extname
|
||||
$ gzip -d < extname.tgz | tar -xvf -
|
||||
$ cd extname
|
||||
$ phpize
|
||||
$ ./configure && make
|
||||
|
||||
Upon success, this will create extname.so and put it into the modules/
|
||||
and/or .libs/ directory within the extname/ source. Move this shared
|
||||
extension (extname.so) into the PHP extensions directory, and adjust
|
||||
php.ini accordingly.
|
||||
_________________________________________________________________
|
||||
|
||||
Compiling PECL extensions statically into PHP
|
||||
|
||||
To statically include the extension within the PHP build, put the
|
||||
extensions source into the ext/ directory found in the PHP source. For
|
||||
example:
|
||||
|
||||
$ cd /your/phpsrcdir/ext
|
||||
$ pear download extname
|
||||
$ gzip -d < extname.tgz | tar -xvf -
|
||||
$ mv extname-x.x.x extname
|
||||
$ rm package.xml
|
||||
|
||||
This will result in the following directory:
|
||||
|
||||
/your/phpsrcdir/ext/extname
|
||||
|
||||
From here, build PHP as normal:
|
||||
|
||||
$ cd /your/phpsrcdir
|
||||
$ ./buildconf
|
||||
$ ./configure --help
|
||||
$ ./configure --with-extname --enable-someotherext --with-foobar
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
Whether --enable-extname or --with-extname is used depends on the
|
||||
extension. Typically an extension that does not require external
|
||||
libraries uses --enable. To be sure, run the following after
|
||||
buildconf:
|
||||
|
||||
$ ./configure --help | grep extname
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 4. Problems?
|
||||
|
||||
Read the FAQ
|
||||
|
||||
@@ -1301,7 +1483,7 @@ Bug reports
|
||||
reports!
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 4. Runtime Configuration
|
||||
Chapter 5. Runtime Configuration
|
||||
|
||||
The configuration file
|
||||
|
||||
@@ -1324,14 +1506,14 @@ The configuration file
|
||||
filesystem if it exists.
|
||||
|
||||
The php.ini directives handled by extensions are documented
|
||||
respectively on the pages of the extensions themselfs. The list of the
|
||||
core directives is available in the appendix. Probably not all the PHP
|
||||
directives are documented in the manual though. For a completel list
|
||||
of directives available in your PHP version, please read your well
|
||||
commented php.ini file. Alternatively, you may find the the latest
|
||||
php.ini from CVS helpful too.
|
||||
respectively on the pages of the extensions themselves. The list of
|
||||
the core directives is available in the appendix. Probably not all the
|
||||
PHP directives are documented in the manual though. For a completel
|
||||
list of directives available in your PHP version, please read your
|
||||
well commented php.ini file. Alternatively, you may find the the
|
||||
latest php.ini from CVS helpful too.
|
||||
|
||||
Example 4-1. php.ini example
|
||||
Example 5-1. php.ini example
|
||||
; any text on a line after an unquoted semicolon (;) is ignored
|
||||
[php] ; section markers (text within square brackets) are also ignored
|
||||
; Boolean values can be set to either:
|
||||
@@ -1360,7 +1542,7 @@ Running PHP as an Apache module
|
||||
you to change the PHP configuration from within the Apache
|
||||
configuration files. For a listing of which directives are
|
||||
PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM, have a look at the
|
||||
table found within the ini_set() documentation.
|
||||
List of php.ini directives appendix.
|
||||
|
||||
Note: With PHP 3, there are Apache directives that correspond to
|
||||
each configuration setting in the php3.ini name, except the name is
|
||||
@@ -1390,7 +1572,7 @@ Running PHP as an Apache module
|
||||
php_admin_flag can not be overridden by .htaccess or
|
||||
virtualhost directives.
|
||||
|
||||
Example 4-2. Apache configuration example
|
||||
Example 5-2. Apache configuration example
|
||||
<IfModule mod_php5.c>
|
||||
php_value include_path ".:/usr/local/lib/php"
|
||||
php_admin_flag safe_mode on
|
||||
@@ -1425,7 +1607,8 @@ Changing PHP configuration via the Windows registry
|
||||
active for any script running from this directory or any subdirectory
|
||||
of it. The values under the key should have the name of the PHP
|
||||
configuration directive and the string value. PHP constants in the
|
||||
values are not parsed.
|
||||
values are not parsed. However, only configuration values changeable
|
||||
in PHP_INI_USER can be set this way, PHP_INI_PERDIR values can not.
|
||||
_________________________________________________________________
|
||||
|
||||
Other interfaces to PHP
|
||||
|
||||
Reference in new issue
Block a user