Commit Graph

148 Commits

Author SHA1 Message Date
Sterling Hughes
a6d815fb7c fix win32 build 2002-07-07 21:51:25 +00:00
Derick Rethans
c73733c59a - Fix windows build
#- I could not test this, please try!
2002-07-03 06:45:01 +00:00
foobar
980d7a11a9 Fix the nasty crash. And Sterling..test next time before you commit? 2002-07-03 03:18:55 +00:00
Sterling Hughes
d4512030bb use access instead of manually determining file permissions.. 2002-07-02 21:02:34 +00:00
Markus Fischer
720a890f84 - ZTS gotcha 2002-05-20 17:41:35 +00:00
Markus Fischer
96bf2d1deb - Add open_basedir check for all functions using php_stat() (filesize, stat,
etc), closes #11563.
2002-05-20 17:18:18 +00:00
foobar
2f12941fac - Made all is_*() functions to return only boolean values.
- Killed the "file not found" error for is_link(). (finally..)
2002-05-16 01:07:21 +00:00
Rasmus Lerdorf
f81ec94ac0 Make sure newtime is never NULL 2002-05-13 18:11:27 +00:00
Yasuo Ohgaki
6cc8919dc4 Fixed bug #16861.
touch sets wrong atime or mtime when they are not specified.
touch silently failed when HAVE_UTIME is not defined.
(This needs more consideration. Which platform does not support it?)
# Derick, after HAVE_UTIME issue is resovled, this should be merged.
# or we can just merge 1st problem for now.
2002-04-26 23:46:51 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sascha Schumann
a1dbb4ab16 (PHP touch) Operate on a stack buffer.. no need for allocating newtime
on the heap.
2002-01-10 07:25:00 +00:00
Sascha Schumann
edfd6d0988 Add three-parameter touch() which enables users to set
mtime/atime to different values.
2002-01-10 07:21:57 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Sterling Hughes
af1c7070f7 fix execution order 2001-10-06 18:59:39 +00:00
Sterling Hughes
16da751e3b avoid TSRMLS_FETCH() 2001-10-06 18:55:09 +00:00
Sterling Hughes
1bceefb2da @ Don't through a file does not exist warning for the is_dir(), is_writeable(),
@ is_readable(), is_executable(), is_link() and is_file() functions. (Sterling)
2001-10-06 18:52:37 +00:00
Jeroen van Wolffelaar
c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
Hartmut Holzgraefe
03f7406711 proto fixes "double" -> "float" 2001-09-21 21:59:27 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Joey Smith
1c10503029 Hmmm...not sure what this was trying to do. stat() was acting like filesize(). 2001-08-21 23:58:19 +00:00
Zeev Suraski
35de326b0e Compile fix for oldie Linux systems (possibly others too) 2001-08-12 21:23:15 +00:00
Zeev Suraski
c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Jeroen van Wolffelaar
fcf57d371d Layout: revert accidentel joining of lines 2001-08-04 21:37:43 +00:00
Jeroen van Wolffelaar
2b17cd1982 Named some constants in filestat to improve readability 2001-08-04 21:34:11 +00:00
Zeev Suraski
bc42c37513 More TSRMLS_FETCH work. Got it under 400 now. 2001-07-31 06:28:05 +00:00
Zeev Suraski
797a079a95 More TSRMLS_FETCH work, and a bit of cleanup 2001-07-30 06:18:13 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Daniel Beulshausen
cae817a520 move some constants to a more appropriate place 2001-06-11 14:46:44 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Jon Parise
311278f273 @ - Fix disk_free_space() and disk_total_space() under FreeBSD. (jon)
FreeBSD defines statfs(2) in <sys/mount.h>.  Teach PHP to look for it there.
2001-05-22 02:45:04 +00:00
Jon Parise
82b31fb7a3 @ - Added disk_total_space() to return the total size of a filesystem.
@   (Patch from Steven Bower)
2001-05-15 23:43:18 +00:00
Jon Parise
6c5db8d2d7 @ - Renamed diskfreespace() to disk_free_space() to conform to established
@   naming conventions. (jon)
2001-05-15 23:28:17 +00:00
Derick Rethans
6123e2abe0 - Bumbed up the warning level to be in sync with fopen (which is E_WARNING
too) (See bug #10856)
2001-05-14 18:30:07 +00:00
Jason Greene
c115a75544 Rewrote stat() and fstat() to be memory efficient, due to a recent
thread on php-dev.

Note: I added a macro that might have use in other instances, but for now
is included in php_filestat.h
2001-05-11 19:55:44 +00:00
Jason Greene
0ed93d71b2 @fstat() and stat() now return identical output by returning a numerical and
@string indexed array (Jason)

(Andrei's suggestion to still allow backwords compatibility.)
2001-05-11 01:47:46 +00:00
Andi Gutmans
4c823e8a89 - Change macros from V_ to VCWD_ because of AIX name clash 2001-04-30 12:45:02 +00:00
Andi Gutmans
ef1835f54f - Fix filetype() and lstat() too. 2001-04-25 06:30:24 +00:00
Andi Gutmans
ef71855bc6 - Another fix 2001-04-25 05:53:45 +00:00
Andi Gutmans
502b4efb7d - Nuke warning. This signed/unsigned stuff gets really annoying sometimes. 2001-04-25 05:43:30 +00:00
Andi Gutmans
76860d4fc0 - Fix problem with is_link(), there seem to be at least another couple of
- bugs lurking around though.
- Cleaned up code a bit and optimized it a bit too.
2001-04-25 04:22:29 +00:00
foobar
83b5a2fb0c SCO (and maybe others) do not have this defined. 2001-04-03 10:51:16 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Sascha Schumann
c2fb53bed7 Finish fopen-wrappers rename. 2001-02-23 22:07:16 +00:00
Sascha Schumann
47f7795594 Correctly check for the existence of the st_rdev field.
Note that this field is required to exist for SUSv3 conformance.

Submitted by: amra@us.ibm.com
PR: #9358
2001-02-21 07:18:28 +00:00
Egon Schmid
bbe53dedcc Small typo. 2001-02-15 20:33:09 +00:00
Rasmus Lerdorf
83cf6629ec @BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
2001-01-21 17:29:15 +00:00
Sascha Schumann
4ada3dd3a0 Hardcode all functions which are mentioned in the Large File Support Spec
http://ewe3.sas.com/standards/large.file/specs/api+.007.html
2000-12-07 12:09:38 +00:00
Stanislav Malyshev
5b47d1ef7a Fix #8079 - filetype now knows about sockets 2000-12-03 13:42:54 +00:00
Andi Gutmans
d0ec3df288 - Use CHECKUID_* #define's instead of cryptic numbers in php_checkuid()
- I did not test for validity of the actual php_checkuid() calls and there
- might be mistakes in the previous code.
2000-11-02 23:08:07 +00:00
Zeev Suraski
7ab46420be mode_t fixes 2000-10-31 18:05:19 +00:00
Thies C. Arntzen
825457ae64 update my email. 2000-10-29 09:14:55 +00:00
Zak Greant
e9d946d374 Thought that I had just committed something really stupid.
On closer inspection, realized that the proto comments
for chown and chgrp were reversed. :)
I did not realize this and had only fixed chown previously
2000-09-16 05:10:03 +00:00
Zak Greant
e7b0cd7ad2 trivial change
corrected mistake in proto comment for chown fold
2000-09-16 05:02:06 +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
Stanislav Malyshev
f24c8c6f4b Fix safe mode handling by touch 2000-07-27 13:47:03 +00:00
Stanislav Malyshev
9aa854dc6e Fix memory leak in touch when safety check fails 2000-07-27 13:28:21 +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
Egon Schmid
1769d69ca3 Fixed protos. 2000-06-12 14:44:16 +00:00
Stanislav Malyshev
6cac26c21f Make chmod in safe mode not allow SUID bits 2000-06-09 10:34:53 +00:00
Andi Gutmans
3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00
Hartmut Holzgraefe
df4547a3df another bunch of proto fixes 2000-05-23 23:13:02 +00:00
Zeev Suraski
e043439ff6 Update the license with the new clause 6 2000-05-18 15:34:45 +00:00
Hartmut Holzgraefe
1e632ffdee typo fix 2000-05-17 19:36:51 +00:00
Hartmut Holzgraefe
5354940f93 correction 2000-05-17 19:27:08 +00:00
Hartmut Holzgraefe
29571bf2b1 took over missing prototypes from php3 source
(copied them only, didn't check for parameter changes!)
2000-05-17 18:14:05 +00:00
Zeev Suraski
883bd2b1de - Fix virtual cwd bug
- Add more V_STAT() V_LSTAT() changes
2000-04-20 17:24:01 +00:00
Andi Gutmans
c9911a151e - Change PHP_ to V_ (directory & file functions) 2000-04-15 14:28:48 +00:00
Andi Gutmans
9c3d6304dd - Hopefully got most of them. We also need a chdir_file function like
for Apache.
2000-03-30 22:56:34 +00:00
Hartmut Holzgraefe
1e0b71df1f is_executable() for root fixed
this is an intermediate patch, switching from stat() to
access() for is_(readable|writable|executable) shall
fix the whole topic once and for all
2000-03-17 12:41:55 +00:00
Sam Ruby
2702340dd9 Emulate user/group/other on Windows 2000-03-15 11:52:07 +00:00
Hartmut Holzgraefe
b19d1bdb0f imap_utf7_encode didn't expand international characters to 16bit
before coding
imap_fetch_overview could crash when some fields where missing
imap_fetch_overview will now take msg indices for default and
   UIDs by optional flag, as the other functions in the family
2000-03-14 20:20:43 +00:00
Stig Bakken
99e0b36321 @Cleaned up extension namespace (Stig)
Cleaned up extension namespace, and changed ext/standard into one single
extension.
2000-03-06 20:37:11 +00:00
Zeev Suraski
86fa2aade2 the pipe is breaking all the time 2000-02-19 23:41:32 +00:00
Andrei Zmievski
f71098906b Fix for filesize() and others on sockets. 2000-02-14 14:18:17 +00:00
Zeev Suraski
80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Andi Gutmans
29280bb9ec - Get rid of some more evil MSVC5's and switch standard/ to use PHP_WIN32 2000-02-10 21:53:56 +00:00
Sascha Schumann
43ae2bffbb Happy Y2K patch! Happy new year (or the new millennium, depending on whether
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Zeev Suraski
f455a484bd Make the Win32 tree compile again 1999-12-20 15:38:44 +00:00
Evan Klinger
f5d5637f72 Ex API 1999-12-20 02:09:58 +00:00
Zeev Suraski
3ee4e65c95 More php3_ annihilation 1999-12-18 04:01:20 +00:00
Zeev Suraski
fb1c77bd4f - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:55:31 +00:00
Zeev Suraski
02d3b39420 More php3_ annihilation 1999-12-17 19:16:50 +00:00
Sascha Schumann
61a6a92618 Make filestat.c thread-safe 1999-12-12 16:48:54 +00:00
Sascha Schumann
5b983c944f Clean up php3.*\.h files. The files itself are renamed, and references in all
.*\.[ch] files were changed. There is a slight chance that my script missed
a few changes, please correct them manually.
1999-12-04 19:19:57 +00:00
Thies C. Arntzen
e30a2740cf imported diskfreespace from 3.0 1999-08-17 12:32:23 +00:00
Thies C. Arntzen
94ce166244 added a few PLS_FETCH() 1999-08-15 18:52:10 +00:00
Andrey Hristov
5ae3f32b24 Fixed bug #2023. 1999-08-13 20:28:27 +00:00
Zeev Suraski
3cb1eb0471 Removed '3' from key functions in PHP (maintained compatibility through
php3_compat.h)
1999-08-02 19:17:14 +00:00
Andrey Hristov
1b2c932cc2 More symbol work.
I've defined a few macros to help with module/request init/startup function definitions.
Basically:

PHP_MINIT_FUNCTION(module)
PHP_MSHUTDOWN_FUNCTION(module)
PHP_RINIT_FUNCTION(module)
PHP_RSHUTDOWN_FUNCTION(module)
PHP_MINFO_FUNCTION(module)

These will expand to proper function prototypes.

Now to specify these in the module entry, use:

PHP_MINIT(module)
PHP_MSHUTDOWN(module)
PHP_RINIT(module)
PHP_RSHUTDOWN(module)
PHP_MINFO(module)

I've updated all modules in ext/standard and everything from ext/apache to ext/db.
If you can, please update your module to use these macros.
1999-07-26 20:09:08 +00:00
Andrey Hristov
736f4831a5 A bunch of grunt work updating function entries and declarations. 1999-07-24 22:16:54 +00:00
Zeev Suraski
c5724cbd14 License update 1999-07-16 13:13:16 +00:00
Stig Bakken
117a2fba07 * fixed some #if/#ifdef issues
* hand-patched in php3 changes from 3.0.6 to HEAD in these files:
   fopen-wrappers.[ch] ext/standard/file.[ch] ext/standard/fsock.[ch]
   ext/standard/php3_string.h ext/standard/string.c
* added some new file/socket macros for more readable code:
   FP_FGETS(buf,len,sock,fp,issock)
   FP_FREAD(buf,len,sock,fp,issock)
   FP_FEOF(sock,fp,issock)
   FP_FGETC(sock,fp,issock)
1999-06-16 17:06:53 +00:00
Sascha Schumann
39691bed9e conv_proto *.[ch] 1999-05-16 11:19:26 +00:00
Zeev Suraski
0818d96c97 A lot of cleanups... Removed old thread-safe code and other redundant code and files 1999-04-24 00:12:00 +00:00
Zeev Suraski
6f7c0edee3 Remove tls.[ch] 1999-04-23 20:06:01 +00:00
Zeev Suraski
c5af324ec3 More thread safety work 1999-04-21 04:02:11 +00:00
Stig Bakken
257de2bade First commit of re-structuring phase one. We have started using automake in
sub-directories and started to move extension code into ext/<name>.  For now,
I have moved the "standard" extension (which is quite a mix of everything
right now) and the GD extension into their own subdirs in ext/.
The configure script now also runs configure in the libzend directory
automatically and makes sure php4 and libzend use the same config.cache file.
To avoid running configure in libzend, use the --no-recursion option.
"make" in php4 also builds libzend now.
The Apache module doesn't compile right now, but a fix for that is
coming up.
1999-04-17 00:37:12 +00:00