Stanislav Malyshev
ed3c85261b
Make main.c compile again
2000-08-31 16:15:31 +00:00
Zeev Suraski
0bc2bb05d4
Safer shutdown process. Continue to shut down even if we bail out in the middle of a certain part.
2000-08-31 16:02:51 +00:00
Daniel Beulshausen
95ee791d97
should be easier when compiling the modules
2000-08-30 21:07:16 +00:00
Andi Gutmans
ca5e0330ca
- Missed a space
2000-08-30 20:32:29 +00:00
Andi Gutmans
4a2fa70fc9
- Fix bug when using safe_mode and doc_root together
2000-08-30 20:31:17 +00:00
Zeev Suraski
47f8af85f5
This is no longer relevant...
2000-08-30 18:06:17 +00:00
Zeev Suraski
0e482b1b30
- Truly fix varargs handling - the current situation was a sure-fire crash in most platforms
...
(the older code worked, even though it didn't compile well for some very odd reason, probably
a compiler bug; The new code would cause PHP to crash if both display_errors/log_errors and
track_errors were enabled)
2000-08-30 18:02:00 +00:00
Zeev Suraski
3a10285392
Go 4.0.2
2000-08-29 15:49:44 +00:00
Stig Bakken
1b4d8c0fb6
@Added PHP API for Zend's ticks
...
Added PHP API for registering tick functions. Ticks is a per-instruction
callback in Zend that allows us to implement cooperative multitasking
within PHP. Example:
In extension code:
php_add_tick_function(my_tick_func);
void my_tick_func(int count) {
php_printf("[tick %d]", count);
}
In PHP code:
<?php
declare(ticks = 1) {
print "there should be two ticks here.\n";
}
?>
2000-08-29 09:18:48 +00:00
Sascha Schumann
e783d75ed3
sizeof(old_cwd) evaluated to sizeof(char *) after last commit, so old_cwd
...
was not set correctly.
2000-08-27 20:51:30 +00:00
Andi Gutmans
ecbc0255d9
- Use do_alloca()/free_alloca() for old_cwd. This will ensure speed in
...
- non-ISAPI environments but in ISAPI will use emalloc()/efree() to save
- stack space. MS only gives us 10KB those bastards.
2000-08-27 19:56:22 +00:00
Andi Gutmans
827672cd78
- Reverting Sascha's patch although I don't like doing these kind of things
...
- but as it is Sascha who has reverted a zillion patches I don't feel that
- bad about it :)
- The patch is morally incorrect and it actually also has a crash bug which
- I won't point out because it shouldn't be there.
- SG(path_translated) should be set by the SAPI module correctly and if it
- isn't the SAPI module should be fixed and not add code to PHP. There is
- enough special case code in PHP and I would like to clean it up and not
- add more.
- Last but not least, old_cwd takes 4KB of stack space. We should probably
- malloc() it because in ISAPI we only have 10KB of stack space.
2000-08-27 19:51:50 +00:00
Sascha Schumann
390d1cd1b7
Initializing new_path once is enough
2000-08-27 19:40:21 +00:00
Sascha Schumann
3f969d0b84
If a SAPI module does not pass an absolute path as primary_file to
...
php_execute_script(), we will now change the filename to point to
the absolute path.
2000-08-27 19:38:18 +00:00
Sascha Schumann
626fc9a773
Export IS_ABSOLUTE_PATH to the outside world.
2000-08-27 19:36:35 +00:00
Sascha Schumann
ab458219ec
Real fix for this rule.
2000-08-27 19:32:28 +00:00
Andi Gutmans
eea3a56973
- This should be more efficient.
...
- Post 4.0.2 it's time to move the whole opened_path and virtual stuff
- to emalloc() and friends including some alloca() improvements where
- possible but I don't want to break anything before
2000-08-27 19:20:53 +00:00
Sascha Schumann
58abfc5426
Fix internal_functions.c rule. This should also work better with BSD make's
...
VPATH support.
2000-08-27 18:54:28 +00:00
Andi Gutmans
0b8ca80e57
- Remove some unused stuff.
2000-08-27 18:27:37 +00:00
Andi Gutmans
989203cf9c
- Test commit msg. This is Andi and it seems to come from Zeev.
2000-08-27 18:18:34 +00:00
Zeev Suraski
1f7b735290
- Forgot to fix non-ZTS CHDIR_FILE macro
2000-08-27 18:06:12 +00:00
Andi Gutmans
39770d99ea
- Try and fix problem with opening wrong file.
2000-08-27 18:01:17 +00:00
Sascha Schumann
35a9a1878e
Fix strlcpy use at this place.
2000-08-27 09:48:03 +00:00
Sascha Schumann
2eb8688f29
Refine PHP_STRLCPY comment
2000-08-27 09:38:33 +00:00
Sascha Schumann
b2cecd9d8b
newtype has a length of newlen+1, 'len' refers to the length of *mimetype
...
here.
2000-08-27 09:32:23 +00:00
Sascha Schumann
365edaddd4
Add PHP_STRLCPY macro. This macro should be used in new code instead of
...
strlcpy/strlcat which are intended for fixing broken code.
2000-08-27 09:30:15 +00:00
Stig Bakken
03471b21ee
@Added ob_get_length function (Stig)
...
Added ob_get_length() function (returns size of buffer)
2000-08-25 03:10:42 +00:00
Zeev Suraski
c542f9a3f4
- Fix IMAP build problem
...
- Allow external DLLs to use warn_not_available
2000-08-24 18:49:49 +00:00
Sascha Schumann
19741cc37a
The macro CONVERT_TO_WIN_FS is not used anywhere.
2000-08-21 09:57:13 +00:00
Sascha Schumann
8e0ae5d152
Cleaning up some mess
2000-08-21 09:50:53 +00:00
Andi Gutmans
99d3b9bfe8
- Remove old/deprecated version of expand_filepath
2000-08-21 04:30:25 +00:00
Andi Gutmans
c799959568
- Change PHP_SEPARATOR to PHP_DIR_SEPARATOR
2000-08-20 19:56:24 +00:00
Andi Gutmans
892e949196
- Checking for ".." isn't enough. include_once() could mess up even if both
...
- names didn't include ".." but were referenced different directories which
- were symlinked to each other.
2000-08-20 19:49:10 +00:00
Andi Gutmans
80d878279b
- Sascha's patch should make PHP in VIRTUAL_DIR mode also change to the
...
- right directory so this shouldn't be needed anymore.
2000-08-20 18:12:16 +00:00
Sascha Schumann
1d68a02df3
The status quo in PHP is that the current directory is initialized
...
to the directory where the executing script is located.
Since this needs to be implemented for all SAPI modules anyway, this
change moves the functionality to php_execute_script() and gets rid
of the per-module code.
2000-08-20 14:29:00 +00:00
Sascha Schumann
320105bcd8
Use size_t as parameter type in the getenv member of struct sapi_module
2000-08-20 14:20:21 +00:00
Sascha Schumann
6358dad0e1
const'ify virtual-cwd API
2000-08-20 14:11:50 +00:00
Sascha Schumann
c8b8a908ca
Provide PHP_SEPARATOR which expands to the default directory separator
...
on the target platform.
2000-08-20 14:02:57 +00:00
Sascha Schumann
d3aeebdd1f
Fix prototype of virtual_real_chdir_file.
2000-08-20 13:09:57 +00:00
Sascha Schumann
c86ec8b1a9
Add virtual_real_chdir_file. Silly name for a useful function.
2000-08-20 12:49:56 +00:00
Sascha Schumann
fbdf502307
Remove php_realpath from build.
...
It was broken and should not be used in any way.
2000-08-20 05:27:59 +00:00
Zeev Suraski
f112b68668
Avoid an endless loop situation in case of an error situation while sending headers
2000-08-19 16:38:19 +00:00
Andi Gutmans
0c57780b11
- Centralize more fopen-wrappers functionality.
2000-08-18 23:03:49 +00:00
Andi Gutmans
c675a39b73
- The beginning of an attempt to cleanup fopen-wrappers.
...
- I started with trying to localize the V_FOPEN's so that we can have a
- version which won't really open the file for include_once/require_once to
- work faster and have less chance of a race which would cause a fd leak.
- What I did will, therefore, change but I want to do this step by step
- because the code is extremley messy so first of all I want to make sure
- that the isolating of the V_FOPEN code doesn't break anything.
- How about moving URL stuff out of this file?
- php_fopen_url_wrapper() copy and pasted the second part of
- php_fopen_wrapper() (incorrectly). Please try not to copy&paste code but
- centralize functionality. Need to think of a nice way to nuke one of the
- copies and have both functions use the same one.
2000-08-16 19:26:21 +00:00
Sascha Schumann
ce635bdb3c
Fix varargs handling. The assignments are not necessary at all and
...
cause problems on various platforms, so we get rid of them.
2000-08-15 17:05:37 +00:00
Zeev Suraski
c9dca64075
Sync with Zend
2000-08-15 16:46:43 +00:00
Stanislav Malyshev
5090b1e8d5
Fix zend_fiel_handle handling. Should fix URL include
...
and various opened_path inconsistencies.
2000-08-13 18:00:50 +00:00
Andi Gutmans
26300a8ebf
- Move compat macros to php3_compat.h
2000-08-10 19:38:29 +00:00
Zeev Suraski
a6c6f6a5c3
Update to be consistent with the new Zend API
2000-08-09 19:23:53 +00:00
Stanislav Malyshev
40fd4fb21b
Standartize full path handling - everything now goes via expand_filepath
...
Add errno to open_basedir checking function
2000-08-08 16:36:25 +00:00
Stanislav Malyshev
b5f74d44e9
fix return code for virtual_file_ex
2000-08-08 16:30:42 +00:00
Zeev Suraski
97893e6a19
Reverse this patch - it really shouldn't be in the error handler, but in the place
...
that generates the error...
2000-08-06 21:42:54 +00:00
Sascha Schumann
a8a1bbe921
Including utime.h once is enough.
2000-08-06 18:14:46 +00:00
Stanislav Malyshev
d9ab6333ea
Add utime include
2000-08-06 17:53:04 +00:00
Sascha Schumann
23ebf6e916
Include <utime.h> in php_virtual_cwd.h.
2000-08-06 17:42:54 +00:00
Stanislav Malyshev
57c54a093b
Replace min() - not everyone has it
2000-08-06 16:34:37 +00:00
Stanislav Malyshev
10f300094b
fix stupid bug
2000-08-06 16:32:22 +00:00
Andi Gutmans
c756ae2d9f
Virtualize realpath, chmod, chown and utime
...
This should fix #5935 and #5904
@- Virtualize realpath, chmod, chown and utime (Stas)
2000-08-06 16:22:07 +00:00
Rasmus Lerdorf
da1b7847b3
Support content-encoding headers in file upload mime parts
...
@- Support content-encoding headers in file upload MIME parts
@ (Ragnar Kjørstad)
2000-08-06 06:40:28 +00:00
Rasmus Lerdorf
a8f0c5a316
decouple this check just in case we hit a weird system that has one
...
and not the other. And we specifically check for this, so we should
use the information.
2000-08-06 04:55:17 +00:00
Hartmut Holzgraefe
b04a02660e
changed default sendmail flags from '-t' to '-t -i' (bugid#5374)
2000-08-04 22:42:11 +00:00
Stanislav Malyshev
688268727e
If we can't find a protocol in URL wrapper, try it as a filename ( fix #5931 )
2000-08-03 15:09:27 +00:00
Rasmus Lerdorf
ff0a08f508
Leave this initialization in
2000-08-02 22:53:55 +00:00
Rasmus Lerdorf
76a2d2538c
Heads up! I have moved the headers_only and response_code checks out of
...
SAPI and down into the individual SAPI modules. I have made the
appropriate changes in all the SAPI modules, but please verify these.
The reason for this change is that Apache sometimes will feed PHP
a request_method of GET but have r->header_only set to true. This happens
in an ErrorDocument redirect. In this same scenario we want to preserve
the status code as well instead of just overwriting it with a 200 and
losing this information. For now the other sapi modules act exactly as
before since they probably do not make this distinction, and they may
not even have a valid response code this early in the request.
@ Fix HEAD request bug on an Apache ErrorDocument redirect and preserve
@ the status code across the redirect as well. (Rasmus)
2000-08-02 22:48:45 +00:00
Hartmut Holzgraefe
b59e98b87c
"undefined function" error message will now suggest similar named
...
functions as jikes compiler for java does (typo protection)
2000-08-01 07:57:19 +00:00
Zeev Suraski
c5c973d16f
- Get rid of whitespace.
2000-08-01 00:41:35 +00:00
Stanislav Malyshev
a790966b15
Fix file upload types array handling ( #5836 )
2000-07-30 11:22:18 +00:00
Rasmus Lerdorf
677df784c1
This url symbol was a bit too generic. Change it to php_url instead.
...
It was clashing with a similar typedef in the UdmSearch integration I am
working on.
2000-07-29 22:32:21 +00:00
Zeev Suraski
52ff887db5
Made ob_start() and friends reentrant. It's now possible to implement this
...
long-requested functionality, now that output buffering is re-entrant:
function eval_ret($code)
{
ob_start();
eval($code);
$retval = ob_get_contents();
ob_end_clean();
return $retval;
}
2000-07-29 14:46:09 +00:00
Zeev Suraski
d8a4278ab4
- Update .dsp's
...
- Make non ZTS Win32 build again
2000-07-29 10:48:57 +00:00
Hartmut Holzgraefe
1a7f851985
added '-l' option to command line / CGI version for 'syntax check only'
...
plus a little cleanup and rearranging in command line option parsing
@ CGI aka. command line version has now an option '-l' for syntax check
@ without execution (Hartmut)
2000-07-28 15:21:20 +00:00
Stanislav Malyshev
ba8d49dce7
Fix realpath not to die on non-existing files (bug #5790 )
...
Thanks to china@thewrittenword.com
2000-07-27 13:48:50 +00:00
Stanislav Malyshev
a9606d1d4e
Make browscap parameter names lowercase
...
Fix . handling in browscap names
2000-07-25 18:50:50 +00:00
David Croft
0836e10a15
various version 2.0 and 2.01 licenses -> 2.02
2000-07-24 05:41:02 +00:00
David Croft
83513d9580
Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.
...
Added a few RCS $Id$ tags.
# Note: I have avoided changing any .h files if the corresponding .c file
# had not already been changed as I am not sure if there are any legal
# issues here. So some extensions still have PHP 3 headers.
2000-07-24 01:40:02 +00:00
Stanislav Malyshev
b410eaf6d4
Make browscap not to lowercase its arguments
...
# Why it is doing it? Parent matching doesn't work with lowercase
# If there was any reason to it, please tell
2000-07-23 11:27:48 +00:00
Joey Smith
4caea0bb7a
BROKEN_SPRINTF should be PHP_BROKEN_SPRINTF
2000-07-23 08:25:27 +00:00
Zeev Suraski
206b83f009
Fix Win32 build
2000-07-21 15:54:10 +00:00
Stig Bakken
7bb67a6200
@Set default include_path so PEAR files can be reached (Stig)
2000-07-18 11:02:28 +00:00
Zeev Suraski
aa8d04a87c
Fix disable_functions feature
2000-07-13 17:52:00 +00:00
Thies C. Arntzen
88113794fd
(php_error) only set php_errormsg if we (still) have an active_symbol_table.
2000-07-12 11:59:09 +00:00
Zeev Suraski
168ccfc133
Disable the hash_apply() protection on hashes that persist across requests - it's unsafe
...
because we may be aborted at any point
@- Fixed a possible data corruption in case of a huge amount of aborted requests (Zeev)
2000-07-11 14:29:38 +00:00
Sascha Schumann
e8101d4f7b
Unify use of my email address
2000-07-10 10:09:15 +00:00
Sascha Schumann
2cfa840eb5
Restore INI entries after the request shutdown of modules.
...
This fixes the problems users of the session module encountered when
using a save handler other than files.
2000-07-09 13:20:27 +00:00
Uwe Steinmann
68f35d5539
- fixed handling of fdf data (application/vnd.fdf)
2000-07-05 08:57:37 +00:00
Stig Bakken
23ca7b9f1a
Added "html_errors" directive to optionally disable HTML formatting of error
...
messages. The default is on. (Stig)
2000-07-04 09:15:06 +00:00
Sascha Schumann
0db7994248
Rename macros which begin with underscore to valid macros.
2000-07-03 00:45:21 +00:00
Sascha Schumann
cd754d7825
Rename macros which begin with underscore to appropiate macros. The general
...
rule is:
macro_name=`echo $filename|tr a-z A-Z|sed 's/\./_/'`
2000-07-03 00:41:19 +00:00
Sascha Schumann
16017f6d78
Change header protection macros to conform to standard.
...
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"
All identifiers that begin with an underscore and either an uppercase
letter or another underscore are always reserved for any use by the
implementation.
2000-07-02 23:46:51 +00:00
Stanislav Malyshev
10342b4b9e
react only on CORE_ERROR
2000-07-02 16:36:31 +00:00
Stanislav Malyshev
d3afeb5b4e
Be strict on errors in modules startup
2000-07-02 16:23:43 +00:00
Rasmus Lerdorf
2b61d55b1d
This is documented to not be case sensitive and it is not case sensitive
...
in PHP 3, so let's not make it case sensitive.
@Make the special Header("http/...") response be case insensitive like 3.0 (Rasmus)
2000-07-01 18:06:11 +00:00
Zeev Suraski
397df3ca87
- Revert bogus time.h commit
...
- Fixed a problem under some versions of Windows that could cause PHP to hang
on startup if errors occured, e.g. in the php.ini file
2000-06-30 13:23:08 +00:00
Thies C. Arntzen
930b212c23
hmm, this file is not really auto-generated.
2000-06-30 12:31:24 +00:00
Zeev Suraski
37fb71b9ba
Set version number on DLLs
2000-06-30 12:16:58 +00:00
Andi Gutmans
1f828a6e88
- Fix problem with DICARD_PATH being defined in windows
2000-06-29 13:31:52 +00:00
Andi Gutmans
da8843aa55
- Fix problem with VIRTUAL_DIR and relative paths containing ..
2000-06-28 17:30:30 +00:00
Andi Gutmans
eaa2a158c8
- Fix bug with VIRTUAL_DIR, .., and symlinks.
2000-06-27 18:18:18 +00:00
Zeev Suraski
cacbf1ea28
Support boolean NOT in the php.ini processor
2000-06-26 18:15:49 +00:00
Andrei Zmievski
4010b422dd
Separate plain name returned by php_sapi_module() and pretty name
...
used for output.
2000-06-26 18:05:55 +00:00