Commit Graph

3314 Commits

Author SHA1 Message Date
Pierre Joye
11941b3fd2 - not desired yt 2011-04-19 21:57:01 +00:00
Pierre Joye
600c9498f9 - fix build >(btw, has novell man pages too?) 2011-04-19 21:43:22 +00:00
Hannes Magnusson
e9bc36522a Expose PHP_MANDIR
Useful for apps (like the pear installer, phd, .. etc) to install their manpages into the same dir as php did :]
2011-04-18 09:50:32 +00:00
Pierrick Charron
1368364469 Fix common typos in the source code (Reported in Bug #54065)
# External libraries were excluded
# Thanks eitan at eitanadler dot com for the first patch :)
2011-04-03 21:46:52 +00:00
Pierre Joye
264d2b3480 - Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent, windows fix 2011-03-28 16:43:49 +00:00
Ilia Alshanetsky
e42662039f Fixed a crash inside dtor for error handling. 2011-03-24 12:57:38 +00:00
Gustavo André dos Santos Lopes
0de2e61cab - Added socket_import_stream().
- Fixed socket_strerror.phpt
- Made php_set_sock_blocking return FAILURE on fcntl error.
- Made socket_set_block()/socket_set_nonblock() emit warning on error.
2011-03-22 00:44:23 +00:00
Gustavo André dos Santos Lopes
7f2937223d - Make fclose() actually close stream, even when the resource refcount is > 1.
This reverts the fix for bug #24557.
- Make php_stream_free delete the stream from the resources list, not merely
  decrease its refcount, as a single call to zend_list_delete does.           
#Not worth the risk merging to 5.3. While change #2 may prevent some segfaults,
#a quick and dirty survey to the codebase only showed calls to php_stream_close
#or php_stream_free on streams allocated in the same function, which would have
#refcount == 1. May be reconsidered.
2011-03-21 02:58:54 +00:00
Pierre Joye
406dd6e8ca - windows only 2011-03-15 17:14:32 +00:00
Pierre Joye
9319359dc9 - make setlocale thread only, drastically reduce TS related crashes in error mgt and other parts like pcre, and actually a good thing (tm) 2011-03-15 17:13:44 +00:00
Pierrick Charron
4a0831743d Remove unused variable 2011-03-13 05:25:45 +00:00
Moriyoshi Koizumi
b2ddc6de23 Fix ZTS build. 2011-03-06 07:06:55 +00:00
Moriyoshi Koizumi
cdb9ee0d1a Fix zend.multibyte oddities. Hope this will address all the known problems. 2011-03-06 07:00:30 +00:00
Pierre Joye
12bdec05a4 - fix regression (carsten_sttgt@gmx.de) 2011-02-25 11:28:33 +00:00
Gustavo André dos Santos Lopes
2a6968e43a - Fixed bug #54055 (buffer overrun with high values for precision ini
setting).
#This fix (for g/G/k/H modes) is done at a different level than that for the
#modes e/E/f/F, at a bit higher level and therefore with less coverage. I
#chose this because it addresses the problem where it is -- the calling function
#that passes a buffer too small to php_gcvt.
2011-02-21 06:53:24 +00:00
Gustavo André dos Santos Lopes
a3a5157286 - PHP_STREAM_OPTION_WRITE_BUFFER no longer disables the read buffer of a plain
stream when 0 is given as the value.
- PHP_STREAM_OPTION_WRITE_BUFFER no longer changes the chunk size in socket
  streams.
- Added stream_set_chunk_size() function.
- Some signedness fixes.
- Test for commit r308474, now that it's possible to actually test it.
2011-02-19 01:28:37 +00:00
Gustavo André dos Santos Lopes
3759331276 - Changed return value in userspace stream set_option to "not implemented",
instead of failure.
#Currently, there's no way to test this, because the only operations that have
#a default implementation, set_chunk_size and set_read_buffer are either not
#exposed or, in the 2nd case, completely delegated to the user implementation,
#which can only return true/false, not "not implemented" (and not implementing
#the set_option method in the userspace stream results in error).
2011-02-18 17:53:26 +00:00
Gustavo André dos Santos Lopes
9bbc114b59 - Classes that implement stream wrappers can define a method called
stream_truncate that will respond to truncation, e.g. through ftruncate.
  Closes feature request #53888.
2011-02-17 00:25:32 +00:00
Gustavo André dos Santos Lopes
257b994fdc - Changed default serialize_precision from 100 to 17, as discussed in internals. 2011-02-08 21:40:51 +00:00
Adam Harvey
2b4fb94e8e Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.
2011-02-04 10:47:41 +00:00
Kalle Sommer Nielsen
c5e86e5a8e Fix ZTS build 2011-02-03 23:57:59 +00:00
Scott MacVicar
ca378eefa0 Add header_register_callback(), allows a userland function
to be called as all the headers are being sent and after all
of the default headers have been merged.

headers_list(), header_remove() and header() can all be used
inside the callback.

<?php

header('Content-Type: text/plain');
header('X-Test: foo');

function foo() {
  foreach (headers_list() as $header) {
    if (strpos($header, 'X-Powered') !== false) {
      header_remove('X-Powered-By');
    }
    header_remove('X-Test');
  }
}

$result = header_register_callback('foo');
echo "a";
2011-02-03 16:47:28 +00:00
Gustavo André dos Santos Lopes
1f49902999 - Fixed bug #53903 (userspace stream stat callback does not separate the
elements of the returned array before converting them).
2011-02-01 22:55:17 +00:00
Gustavo André dos Santos Lopes
c6ccc43285 - Fixed several comparisons that always result in true of false
due to signedness of one of the operands, either by removing
  dead code or fixing it.
- Thrown some comments around in php_stream_get_record.
- See http://www.mail-archive.com/internals@lists.php.net/msg49525.html
2011-02-01 18:11:16 +00:00
Felipe Pena
96996ec557 - Removed accidental changes 2011-01-20 12:32:41 +00:00
Pierre Joye
5c38e6cc40 - should not have been applied 2011-01-20 12:23:30 +00:00
Pierre Joye
657c934513 - don't continue if no valid option value 2011-01-20 07:38:00 +00:00
Pierre Joye
966a82c776 - no need of assert here 2011-01-20 06:32:59 +00:00
Pierre Joye
af0c734f4f - check if strdup succeeds 2011-01-20 06:23:35 +00:00
Pierre Joye
458ce08ab3 - path len check and fix buffer overrun 2011-01-19 14:21:46 +00:00
Ilia Alshanetsky
86550a9fed Win32 build fix 2011-01-19 13:09:05 +00:00
Pierre Joye
95388b7cda - fix regression introduced in 5.3.4 in open_basedir on windows/novell with trailing fwd slash 2011-01-18 22:20:09 +00:00
Ilia Alshanetsky
b5e12bd4da Fixed variable re-declaration 2011-01-18 13:17:23 +00:00
Pierre Joye
52aa5735f1 - path len sanity check 2011-01-17 14:29:16 +00:00
Andrey Hristov
0048446fdd gcc barks about these, so clean it 2011-01-14 12:32:27 +00:00
Ilia Alshanetsky
93fd1bf53f Fixed variable re-declaration 2011-01-13 12:56:28 +00:00
Ilia Alshanetsky
d5af830385 Added missing success check around chmod() for windows during temp file creation 2011-01-11 12:57:19 +00:00
Pierre Joye
80e5f0f774 - remove local redeclaration 2011-01-10 08:28:47 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Jani Taskinen
dfb0e70844 - Typos, WS, CS 2010-12-16 12:25:27 +00:00
Ilia Alshanetsky
9c30a3398a Fixed bug #53541 (format string bug in ext/phar). 2010-12-14 17:00:36 +00:00
Pierre Joye
a7ffa09e18 - add PHP_INSTALL_HEADERS to all parts (core&exts) exposing headers, generate the install-headers cmd 2010-12-11 22:18:10 +00:00
Gustavo André dos Santos Lopes
6654a4ade5 - Added enable_post_data_reading ini option to allow inhibiting POST data consumption. 2010-12-09 20:35:59 +00:00
Dmitry Stogov
755c2cd0d8 Removed compile time dependency from ext/mbstring 2010-12-08 11:27:34 +00:00
Jani Taskinen
72ae65bc9d - CS and "de-facto" style of returning NULL for failing parse-params, sync partially with PHP_5_3 too (reordering part :) 2010-12-03 15:34:24 +00:00
Dmitry Stogov
dcb65e76da WS and cosmethic changes 2010-12-02 09:40:53 +00:00
Pierre Joye
722457594b - Fixed #53409, sleep() return NULL on Windows 2010-11-26 18:25:13 +00:00
Dmitry Stogov
ab93d8c621 Added multibyte suppport by default. Previosly php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini 2010-11-24 05:41:23 +00:00
Pierre Joye
1f454695a4 - fixed #53352 2010-11-23 22:14:54 +00:00
Kalle Sommer Nielsen
547691766a Fixed gettimeofday() usage for Ilia's REQUEST_TIME improvement on Windows 2010-11-22 15:43:46 +00:00