Sascha Schumann
85b52234e4
Utility function for sapi modules (it is not in SAPI.c, because it
...
relies on php_base64_encode).
2000-10-27 10:16:54 +00:00
Sascha Schumann
f367b3dfc8
Move some code to php_handle_special_queries().
2000-10-26 21:16:12 +00:00
Sascha Schumann
5583203e91
Move some initialization code from php_execute_script() to
...
php_request_startup() where it should be. AFAICT, it does not
cause any problems, but please it test it with your favorite SAPI
module.
2000-10-26 18:32:38 +00:00
Andrei Zmievski
7b4983c8f8
Mega-patch to get better resource information for modules.
...
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
* Switched register_list_destructors() to use
zend_register_list_destructors_ex() instead
* Updated all relevant modules to provide the resource type name
to register_list_destructors() call
* Updated var_dump() to output resource type name instead of number
@- Made resource type names visible, e.g. var_dump() and
@ get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Zeev Suraski
98bbb11780
Fix a crash in CGI mode, in case no file is provided
2000-10-17 18:12:31 +00:00
Hartmut Holzgraefe
6d5f1d97f8
now it works for me as CGI and APXS, with or without --enable-debug ...
2000-10-13 10:04:17 +00:00
Hartmut Holzgraefe
cae27179ce
fopen wrappers cleanup
...
- comfiguration is now done by an ini parameter
instead of a compile time option
- the implementations of the three standard wrappers
now live in seperate files in ext/standard
- the compiler is happy again, no more warnings
2000-10-13 00:09:31 +00:00
Andi Gutmans
d37b140601
- Fix VC++ warning
2000-10-03 14:43:04 +00:00
Andi Gutmans
2622eba31d
- Cleanup some output functions
2000-09-30 16:13:48 +00:00
Zeev Suraski
ec4a36ec12
complementary PHP patch
2000-09-27 19:46:47 +00:00
Stanislav Malyshev
1ccac6ed55
Add additional parameter to parse_str for saving result (thanks to
...
John Bafford <dshadow@zort.net>)
@ Added second parameter for parse_str to save result (John Bafford)
2000-09-11 14:50:26 +00:00
Derick Rethans
eba1b6221d
- Fixed missing parameter in php_atoi
2000-09-09 23:21:44 +00:00
Zeev Suraski
b7ecaacd07
More security-related (control) patches:
...
- Avoid displaying errors during startup, unless display_startup_errors is enabled.
- Implemented post_size_max limit. Defaults to 8MB.
- Implemented file_uploads on/off directive (defaults to on).
2000-09-09 15:02:15 +00:00
Stanislav Malyshev
522aec4443
Never trust snprintf return value
2000-09-08 12:52:05 +00:00
Stanislav Malyshev
6426d1c9ce
Fix crash on very long error messages
...
Manual for snprintf says:
If the output was truncated, the return value is -1, oth-
erwise it is the number of characters stored, not includ-
ing the terminating null.
And that's a blatant lie - in reality, libc 2.1 always returns number of
characters that _would be_ stored. I hate those libc bugs. Now we should go
and check every place we trusted snprintf return value.
2000-09-08 12:32:29 +00:00
Stanislav Malyshev
df5e0cb0a5
Fix syslog call
2000-09-08 12:07:21 +00:00
Zeev Suraski
4647bbb71a
broken logic fixed. I'm getting old
2000-09-05 20:50:41 +00:00
Zeev Suraski
eb32144902
- Remove track_vars - it is now always on
...
- Make the various $HTTP_*_VARS[] arrays be defined always,
even if they're empty
- Fix Win32 build and warnings
2000-09-05 19:06:29 +00:00
Zeev Suraski
cf8e389799
@- Added support for an optional output handler function for output
...
@ buffering. This enables transparent rendering of XML through XSL,
@ transparent compression, etc. (Zeev)
2000-09-02 18:03:58 +00:00
Zeev Suraski
e065c308e9
- Fix dir.c
...
- Begin cleanup of php_error_cb()
2000-09-01 12:06:52 +00:00
Sascha Schumann
df273c9d01
Hopefully last round of fixing varargs use.
...
We don't need to create the log message twice, and by doing it only
once we also avoid the orig_args trap.
2000-09-01 09:54:32 +00:00
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
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
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
Andi Gutmans
39770d99ea
- Try and fix problem with opening wrong file.
2000-08-27 18:01:17 +00:00
Sascha Schumann
8e0ae5d152
Cleaning up some mess
2000-08-21 09:50:53 +00:00
Andi Gutmans
c799959568
- Change PHP_SEPARATOR to PHP_DIR_SEPARATOR
2000-08-20 19:56:24 +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
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
Zeev Suraski
a6c6f6a5c3
Update to be consistent with the new Zend API
2000-08-09 19:23:53 +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
Hartmut Holzgraefe
b04a02660e
changed default sendmail flags from '-t' to '-t -i' (bugid#5374)
2000-08-04 22:42:11 +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
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
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
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
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
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
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
Zeev Suraski
37fb71b9ba
Set version number on DLLs
2000-06-30 12:16:58 +00:00
Zeev Suraski
16c363182d
TRACK_VARS is really no longer necessary...
2000-06-26 17:11:28 +00:00
Zeev Suraski
6614e8edb4
- I wrote a long msg but the commit didn't go through.
...
- So here is the short version:
- a) Start moving to binary opens in Windows
- b) Give checkuid_mode() a small face lift including the fopen-wrappers.c
- The mode to this function should at least be a #define but that is for
- another day. Anyway this whole stuff should be given more face lifts in
- the future.
2000-06-25 17:02:59 +00:00
Sascha Schumann
2456af596f
Remove some unnecessary CLS_FETCH()s.
2000-06-23 00:53:33 +00:00
Zeev Suraski
c885f468aa
Improve timeout support - ini_get("max_execution_time", ...) works now
2000-06-16 02:27:47 +00:00
Zeev Suraski
f29eae1302
Move timeout code to Zend, allow Win32 timeouts
...
@- Implemented max_execution_time under Win32 (Zeev)
2000-06-16 01:53:35 +00:00
Andrei Zmievski
aa49d4af62
Plus a leak when both register_globals and track_vars are off.
2000-06-13 20:59:23 +00:00
Zeev Suraski
fce92e3ca2
Avoid using E_CORE_* errorlevels in any place which is not in the global startup sequence
2000-06-12 20:22:17 +00:00
Zeev Suraski
5be482030e
Killed <?php_track_vars?>
2000-06-12 16:07:25 +00:00
Thies C. Arntzen
bd593d3da6
(set_time_limit) converted to new API.
...
# for some weird reason this fixes a newly introduced crash.
2000-06-11 10:27:36 +00:00
Zeev Suraski
897bb1b572
- Parse errors in the php.ini files under Windows will no longer mess up the
...
HTTP headers in CGI mode and are now displayed in a message box
2000-06-09 02:18:50 +00:00
Hartmut Holzgraefe
eb8cd900a6
@ fopen_wrappers() are now extensible via modules
...
so here it finaly is, the more general approach to fopen wrappers
# see what i'll break this time
2000-06-08 09:43:12 +00:00
Zeev Suraski
34c40031ca
@- Made the short_tags, asp_tags and allow_call_time_pass_reference INI directives work
...
@ on a per-directory basis as well, e.g. from .htaccess files (Zeev)
2000-06-06 19:16:57 +00:00
Sascha Schumann
102c6ce4b8
Move main.h to php_main.h.
2000-06-05 23:24:42 +00:00
Andi Gutmans
7e0baa7a1d
- Revert Thies' locale patch. It was screwing up language level things.
...
- We could add support for locale in some specific output functions at a
- later time to make everyone happy
2000-06-05 15:34:11 +00:00
Zeev Suraski
d1f1d40527
- Make the INI entries sorted in phpinfo()
2000-06-03 03:05:29 +00:00
Zeev Suraski
06388f5181
Use the new error code
...
@- Added set_error_handler() to allow custom error handling functions,
@ instead of the built-in error handling code (Zeev, Zend Engine)
@- Renamed user_error() to trigger_error(); user_error() remains
@ defined for compatibility (Zeev, Zend Engine)
2000-06-02 12:35:53 +00:00
Thies C. Arntzen
ccacfd880b
@- ignore_user_abort=Off is now default. (Thies)
2000-05-31 14:02:36 +00:00
Zeev Suraski
8fb954ae4f
Fix startup sequence. It should do it this time.
2000-05-29 18:45:06 +00:00
Zeev Suraski
7213c743f0
- Added disable_functions php.ini support
...
- Fixed Win32 build
2000-05-29 17:22:35 +00:00
Andi Gutmans
9786b16e9f
- Move zend_activate_modules() to later on.
2000-05-28 17:19:49 +00:00
Sascha Schumann
0d9c0616f9
Use php_syslog() for system call. On OpenServer 5, syslog is defined to
...
var_syslog/sys_syslog which causes various problems.
Submitted by: Paul Gardiner <I.T.Manager@barleychalu.co.uk>
2000-05-28 16:22:28 +00:00
Thies C. Arntzen
44cf237a72
(php_execute_script) fix leak for phpinfo() images.
...
# maybe the activate/deactivate should be moved outside php_execute_script()?
2000-05-28 12:30:06 +00:00
Thies C. Arntzen
cf1d0f1844
fixed newly introduced crash
2000-05-23 10:36:18 +00:00
Hartmut Holzgraefe
1ec84f9c21
fix for bug #2852 : argc inconsistency
2000-05-22 23:24:55 +00:00
Andi Gutmans
7f689fc044
- Move activate_models() back to where it was. I don't want to make such
...
- an optimization right before 4.0.0. Who knows, maybe one of the phpinfo()
- functions depends on some information only available after RINIT.
- In any case, my fix for .phps stays in.
2000-05-21 18:05:04 +00:00
Andi Gutmans
dc5cd319e5
- Fix Apache php source highlighting mode. It was crashing due to the
...
- module shutdown functions being called when the startup functions weren't
- being called.
2000-05-21 16:36:16 +00:00
Thies C. Arntzen
92437e9db1
fix the fix (it's still a hack)
2000-05-19 10:48:05 +00:00
Thies C. Arntzen
bad35f5484
make sigchild handler more robust.
2000-05-19 10:40:34 +00:00
Thies C. Arntzen
674f4bac47
added new option "--enable-sigchild" (default is off)
...
when using this option php will setup it's own SIGCHLD handler.
when using oracle-libraries >= 8.1 on linux you need this option
if you are connecting using the BEQ interface - elsewise you will
see <defunc> processes whenever a php-script disconnects from oracle.
2000-05-18 19:45:34 +00:00
Zeev Suraski
e043439ff6
Update the license with the new clause 6
2000-05-18 15:34:45 +00:00
Hartmut Holzgraefe
31c3dfdf52
proto-takeover from php3
2000-05-17 19:45:46 +00:00
Sascha Schumann
d0f3764ee2
Change reentrancy API to always use the php prefix.
...
Check for the declaration of reentrant functions, so that we can use
them in non-ZTS mode on all platforms.
2000-05-04 10:38:17 +00:00
Sascha Schumann
fca9539d63
Preset extension_dir to the installation directory of PHP modules.
...
This effectively means that dl() will work without having an installed
configuration file.
2000-05-02 14:46:20 +00:00
Zeev Suraski
3220bb570e
- Fix an invalid trick (it was valid when header() was using
...
zend_get_parameters(), but it became invalid when someone switched it
to zend_get_parameters_ex(), and I decided to remove it anyway).
- Remove a redundant function call
2000-04-28 13:03:13 +00:00
Thies C. Arntzen
b9387791a8
(php_module_startup) is now doing setlocale(LC_ALL, "") instead of just setlocale(LC_CTYPE, ""). suggested by Jon Forsberg <zzed@cyberdude.com>
...
# this change simply seems "right" as setlocale(LC_ALL, "") also happens in RSHUTDOWN(basic)
2000-04-28 11:09:57 +00:00
Zeev Suraski
dc8980bab2
Change to using macros
2000-04-27 20:22:40 +00:00
Zeev Suraski
39aa59bdec
More error handling work (still completely disabled)
2000-04-27 18:37:02 +00:00
Colin Viebrock
7ecf70047b
*** empty log message ***
2000-04-19 23:18:15 +00:00
Zeev Suraski
9cbcade6c9
Support E_USER_* error types
2000-04-19 15:10:14 +00:00
Zeev Suraski
f0c7e0275f
Remove unnecessary argument
2000-04-15 14:30:18 +00:00
Andi Gutmans
1665cba750
- Change PHP_ to V_ (directory & file functions)
2000-04-15 14:20:01 +00:00
Zeev Suraski
81138a641a
Forgot to commit the php4 fixes
2000-04-15 13:53:20 +00:00
Rasmus Lerdorf
6727342b7a
Make error_prepend_string and error_append_string work
...
@Make error_prepend_string and error_append_string work
2000-04-14 14:00:32 +00:00
Andi Gutmans
897b413c2d
- Try and resolve the problem with current working directories not being
...
set to the script directory
2000-04-10 17:39:11 +00:00
Andi Gutmans
9df7df3293
- Baby steps... Use PHP_FOPEN()
2000-03-30 22:41:13 +00:00