[PHP-DOC] Bug #16930: Add line to install.txt
From: [EMAIL PROTECTED] Operating system: windows + apache PHP version: 4.2.0 PHP Bug Type: Documentation problem Bug description: Add line to install.txt install.txt of php4.2.0-win32 says on installing php with apache on windows: Then you should add the following three lines to your Apache conf file: (swap c:/php/ for your PHP install path) LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php To get it working I had to add theses lines, too: ScriptAlias/php4/"C:/php/" Action application/x-httpd-php/php4/sapi/php.exe I use: apache_1.3.24-win32-x86-no_src.msi Thank you for developing this software! thomas -- Edit bug report at http://bugs.php.net/?id=16930&edit=1 -- Fixed in CVS:http://bugs.php.net/fix.php?id=16930&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=16930&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16930&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16930&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16930&r=support Expected behavior: http://bugs.php.net/fix.php?id=16930&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16930&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16930&r=submittedtwice
[PHP-DOC] #25489 [NEW]: wrong array_splice() equivalents given
From: postings-php-bug at hans-spath dot de
Operating system: Irrelevant
PHP version: 4.3.3
PHP Bug Type: Documentation problem
Bug description: wrong array_splice() equivalents given
Description:
The documentation for array_splice gives some "equivalents" for special
cases in Table 1.
These are WRONG.
array_pop and array_shift return single *VALUES*, array_splice returns an
array.
array_pop and array_shift do NOT perform the same action.
In "$a[$x] = $y", $x is a KEY.
In array_splice($input, $x, 1, $y), $x is a POSITION.
Reproduce code:
---
D:\PHP>cat test\array_splice.php
'first element',
2 => 'second element',
'3rd' => 'third element'
);
$x = 2;
$y = 'replaced element';
echo "\n$test\n";
eval( "\$z = $test ;" );
var_dump( $z );
}
Expected result:
*I* expect it to work as it works, but people misled by the documentation
could expect something else.
Actual result:
--
D:\PHP>4.3.3\php-cli.exe -n test\array_splice.php
array_shift($input)
string(13) "first element"
array_pop($input)
string(13) "third element"
array_splice($input, -1)
array(1) {
["3rd"]=>
string(13) "third element"
}
$a[$x] = $y
string(16) "replaced element"
array_splice($input, $x, 1, $y)
array(1) {
["3rd"]=>
string(13) "third element"
}
--
Edit bug report at http://bugs.php.net/?id=25489&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25489&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25489&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25489&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25489&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25489&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25489&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=25489&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25489&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=25489&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=25489&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25489&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25489&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25489&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25489&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=25489&r=gnused
[PHP-DOC] #25489 [Opn]: wrong array_splice() equivalents given
ID: 25489
User updated by: postings-php-bug at hans-spath dot de
Reported By: postings-php-bug at hans-spath dot de
Status: Open
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: 4.3.3
New Comment:
The last 2 tests in my example code do not show the problem, to fix
this, replace '$a[$x] = $y' by '$input[$x] = $y' and add var_dump(
$input ); after var_dump( $z );.
Previous Comments:
[2003-09-11 07:55:53] postings-php-bug at hans-spath dot de
Description:
The documentation for array_splice gives some "equivalents" for special
cases in Table 1.
These are WRONG.
array_pop and array_shift return single *VALUES*, array_splice returns
an array.
array_pop and array_shift do NOT perform the same action.
In "$a[$x] = $y", $x is a KEY.
In array_splice($input, $x, 1, $y), $x is a POSITION.
Reproduce code:
---
D:\PHP>cat test\array_splice.php
'first element',
2 => 'second element',
'3rd' => 'third element'
);
$x = 2;
$y = 'replaced element';
echo "\n$test\n";
eval( "\$z = $test ;" );
var_dump( $z );
}
Expected result:
*I* expect it to work as it works, but people misled by the
documentation could expect something else.
Actual result:
--
D:\PHP>4.3.3\php-cli.exe -n test\array_splice.php
array_shift($input)
string(13) "first element"
array_pop($input)
string(13) "third element"
array_splice($input, -1)
array(1) {
["3rd"]=>
string(13) "third element"
}
$a[$x] = $y
string(16) "replaced element"
array_splice($input, $x, 1, $y)
array(1) {
["3rd"]=>
string(13) "third element"
}
--
Edit this bug report at http://bugs.php.net/?id=25489&edit=1
[PHP-DOC] #36622 [Opn->Bgs]: fopen() wrappers accessible per se
ID: 36622
User updated by: php-bug at t43 dot mine dot nu
Reported By: php-bug at t43 dot mine dot nu
-Status: Open
+Status: Bogus
-Bug Type: Filesystem function related
+Bug Type: Documentation problem
Operating System: all
PHP Version: 5.1.2
New Comment:
Above is not true. file:// and php:// coexist with
allow_url_fopen=Off.
I give up. Take the bug# as how difficult it is... for a newcomer.
Previous Comments:
[2006-03-26 04:21:33] php-bug at t43 dot mine dot nu
file:// und php:// are documented as unrestricted by allow_url_fopen,
see appendix M, tables M-1 and M-6. However there is a bug in Windows
consisting in that file:// is restricted in Windows when
allow_url_fopen=Off.
http:// and ftp:// are available thru CURL in similar ways as thru
fopen(), just there is no example for FTP in the PHP Manual, only for
http:// .
[2006-03-26 03:43:11] php-bug at t43 dot mine dot nu
I believe http:// and ftp:// can be done using CURL, gzip is also
available directly.
Just a question of documentation and helpful books (which aren't) thru
the phpmaze.
[2006-03-26 00:48:42] php-bug at t43 dot mine dot nu
Delving into source code,
main/streams/plain_wrapper.c
ext/standard/basic_functions.c
ext/standard/http_fopen_wrapper.c
it becomes obvious that the predefined streams (file, http,..) are not
made in php with stream_register_wrapper('protocol',php_class), and
therefore there is no class of which a new instance could be simply
created.
http_fopen_wrapper.c teaches me that it would be not trivial to do http
myself.
[2006-03-05 23:42:52] php-bug at t43 dot mine dot nu
Maybe I was not writing too clear. I would like to access the protocol
wrappers one way or the other, but not only mangled into fopen(). It
would love to say allow_url_fopen=Off, and still do
ftp/http->stream_open (ftp/http://host.tld/myfile.txt) for example.
I looked into Streams (chapter CXLV. Stream Functions), but there the
wrappers, or the class names of the wrappers, or the objects, are not
available for use.
[2006-03-05 22:30:43] php-bug at t43 dot mine dot nu
Description:
The protocol:// wrappers are availabe only thru fopen() and similar
calls, right now, which can be unsafe...
It would be great if they where callable by themselfes, as not everyone
will easily write the protocols. They can be useful despite
allow_url_fopen .
(In other words, allow_url_fopen=false will block fopen(), but does not
hinder the knowing of doing it manually, however hinders the less
knowing of securing fopen() easily AND using explicitely wrappers. I'm
in this situation.)
--
Edit this bug report at http://bugs.php.net/?id=36622&edit=1
[PHP-DOC] #25489 [Bgs->Opn]: wrong array_splice() equivalents given
ID: 25489
User updated by: postings-php-bug at hans-spath dot de
Reported By: postings-php-bug at hans-spath dot de
-Status: Bogus
+Status: Open
Bug Type: Documentation problem
Operating System: Irrelevant
-PHP Version: 4.3.3
+PHP Version: 4.3.6
New Comment:
"... they behave exactly as the original functions"
( ( (( BULLSHIT ALARM )) ) )
THEY DO NOT.
TEST VALUES:
|| $input = array(
||'1st' => 'first element',
||2 => 'second element',
||'3rd' => 'third element'
|| );
|| $x = 2;
|| $y = 'replaced element';
*** array_push($input, $x, $y)
*** vs.
*** array_splice($input, count($input), 0, array($x, $y))
array_push($input, $x, $y)
$input => array (
'1st' => 'first element',
2 => 'second element',
'3rd' => 'third element',
3 => 2,
4 => 'replaced element',
)
array_splice($input, count($input), 0, array($x, $y))
$input => array (
'1st' => 'first element',
0 => 'second element',
'3rd' => 'third element',
1 => 2,
2 => 'replaced element',
)
--- EQUAL / EQUIVALENT ?!?
- differing return value (irrelevant)
- renumbered array-keys
*** array_pop($input)
*** vs.
*** array_splice($input, -1)
$z => 'third element'
$input => array (
'1st' => 'first element',
2 => 'second element',
)
array_splice($input, -1)
$z => array (
'3rd' => 'third element',
)
$input => array (
'1st' => 'first element',
0 => 'second element',
)
--- EQUAL / EQUIVALENT ?!?
- return value differs (plain value vs. single-element array)
- renumbered array-keys
*** array_shift($input)
*** vs.
*** array_splice($input, 0, 1)
array_shift($input)
$z => 'first element'
$input => array (
0 => 'second element',
'3rd' => 'third element',
)
array_splice($input, 0, 1)
$z => array (
'1st' => 'first element',
)
$input => array (
0 => 'second element',
'3rd' => 'third element',
)
--- EQUAL / EQUIVALENT ?!?
- return value differs (plain value vs. single-element array)
*** $a[$x] = $y
*** vs.
*** array_splice($input, $x, 1, $y)
$input[$x] = $y
$z => 'replaced element'
$input => array (
'1st' => 'first element',
2 => 'replaced element',
'3rd' => 'third element',
)
array_splice($input, $x, 1, $y)
$z => array (
'3rd' => 'third element',
)
$input => array (
'1st' => 'first element',
0 => 'second element',
1 => 'replaced element',
)
--- EQUAL / EQUIVALENT ?!?
- return value differs (new value vs. replaced value) (irrelevant)
- what the hell is $a?
- OVERWRITE OF WRONG ELEMENT (because $x is a positon for array_splice,
not a key)
- renumbered array-keys
Previous Comments:
--------
[2004-07-05 12:30:27] [EMAIL PROTECTED]
Uhm.. They say equivalents, not equal. However, when that equivalents
are used in a separate line, they behave exactly as the original
functions.
[2003-09-11 10:16:45] postings-php-bug at hans-spath dot de
The last 2 tests in my example code do not show the problem, to fix
this, replace '$a[$x] = $y' by '$input[$x] = $y' and add var_dump(
$input ); after var_dump( $z );.
[2003-09-11 07:55:53] postings-php-bug at hans-spath dot de
Description:
The documentation for array_splice gives some "equivalents" for special
cases in Table 1.
These are WRONG.
array_pop and array_shift return single *VALUES*, array_splice returns
an array.
array_pop and array_shift do NOT perform the same action.
In "$a[$x] = $y", $x is a KEY.
In array_splice($input, $x, 1, $y), $x is a POSITION.
Reproduce code:
---
D:\PHP>cat test\array_splice.php
'first element',
2 => 'second element',
'3rd' => 'third element'
);
$x = 2;
$y = 'replaced element';
echo "\n$test\n";
eval( "\$z = $test ;" );
var_dump( $z );
}
Expected result:
*I* expect it to work as it works, but people misled by the
documentation could expect something else.
Actual result:
--
D:\PHP>4.3.3\php-cli.exe -n test\array_splice.php
array_shift($input)
string(13) "first element"
array_pop($input)
string(13) "third element"
array_splice($input, -1)
array(1) {
["3rd"]=>
string(13) "third element"
}
$a[$x] = $y
string(16) "replaced element"
array_splice($input, $x, 1, $y)
array(1) {
["3rd"]=>
string(13) "third element"
}
--
Edit this bug report at http://bugs.php.net/?id=25489&edit=1
[PHP-DOC] #36018 [Com]: variable variable reference to superglobal only works after non-variable ref
ID: 36018
Comment by: postings-php-bug at hans-spath dot de
Reported By: ozone at cname dot com
Status: Feedback
Bug Type: Documentation problem
Operating System: linux 2.6.13.2
PHP Version: 5.1.2
New Comment:
I can reproduce the error message using the given code.
PHP_VERSION == "5.2.3-0.dotdeb.1"
(on Debian Etch, Kernel 2.6.18-4-686)
Previous Comments:
[2007-08-20 12:41:47] [EMAIL PROTECTED]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Can you please try it in a new version?
[2006-01-15 12:12:39] [EMAIL PROTECTED]
The behavior is expected. PHP will only handle super globals correctly
if use their full name. The documentation is wrong on this. (The reason
for this particular behavior is that PHP will only populate the super
globals when they are first used, but PHP can only detect that when
you're using the full name only).
[2006-01-15 06:38:35] ozone at cname dot com
Description:
environment: generic apache 2.0.55 / php 5.1.2 on linux
(can reproduce with 5.0.5 on solaris9; it's not the os)
yes, i've read the "variable variable references to superglobals aren't
supported in functions"; this isn't in a function, and the behavior is
very very strange.
see attached code. the var-var-refs to $_SERVER works as expected IF
AND ONLY IF that superglobal is referred to elsewhere in the code by its
real name -- anywhere in the code is fine, even after the var-var-ref.
this behavior suggests that the $_SERVER superglobal isn't instantiated
(or made available) if the interpreter decides (wrongly) that it's not
necessary.
the parser does complain thusly:
PHP Warning: Invalid argument supplied for foreach() in
/home/web/docs/bug.php on line 11
Reproduce code:
---
";
foreach(array( "_GET" => "#f0c0f0",
"_POST" => "#f0c0c0",
"_SESSION" => "#c0f0f0",
"_SERVER" => "#f0f0c0") as $a => $c) {
echo "\n$a";
foreach(${$a} as $k => $v) if($k)
echo "\n$k$v";
}
echo "\n";
?>
Expected result:
should have a table of all variables related to the request (i use this
bit of code where i catch errors, it tends to be helpful).
Actual result:
--
nothing.
--
Edit this bug report at http://bugs.php.net/?id=36018&edit=1
