[PHP-DEV] Re: open_basedir and safe_mode_exec_dir

2002-07-16 Thread Yasuo Ohgaki

> Is there reason why these functions don't check safe_mode
> and open_basedir?
> 
> I don't have much time to test, so I didn't committed this
> patch...
> 

Oops. Wrong patch sent. Newer patch attached.

-- 
Yasuo Ohgaki


? file.c.patch
Index: file.c
===
RCS file: /repository/php4/ext/standard/file.c,v
retrieving revision 1.239
diff -u -r1.239 file.c
--- file.c  13 Jul 2002 04:45:21 -  1.239
+++ file.c  17 Jul 2002 05:50:47 -
@@ -261,8 +261,11 @@
  &filename, &filename_len, 
&use_include_path) == FAILURE) {
return;
}
-
-   php_stream_open_wrapper(filename, "rb", 0, NULL);
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   
+   php_stream_open_wrapper(filename, "rb", use_include_path | ENFORCE_SAFE_MODE | 
+REPORT_ERRORS, NULL);
 
md.stream = php_stream_open_wrapper(filename, "rb",
use_include_path | ENFORCE_SAFE_MODE | REPORT_ERRORS,
@@ -411,6 +414,10 @@
return;
}
 
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   
stream = php_stream_open_wrapper(filename, "rb", 
use_include_path | ENFORCE_SAFE_MODE | REPORT_ERRORS,
NULL);
@@ -457,6 +464,10 @@
  &filename, &filename_len, 
&use_include_path) == FAILURE) {
return;
}
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+
 
stream = php_stream_open_wrapper(filename, "rb", 
use_include_path | ENFORCE_SAFE_MODE | REPORT_ERRORS,
@@ -526,6 +537,9 @@
convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
 
+   if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(arg1), NULL, 
+CHECKUID_ALLOW_ONLY_DIR))) {
+   RETURN_FALSE;
+   }
if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)) {
RETURN_FALSE;
}
@@ -806,6 +820,10 @@
&mode, &mode_len, &use_include_path, &zcontext) == 
FAILURE) {
RETURN_FALSE;
}
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   
if (zcontext) {
context = (php_stream_context*)zend_fetch_resource(&zcontext 
TSRMLS_CC, -1, "Stream-Context", NULL, 1, le_stream_context);
ZEND_VERIFY_RESOURCE(context);
@@ -1581,6 +1599,10 @@
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg1);
+
+   if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
 
stream = php_stream_open_wrapper(Z_STRVAL_PP(arg1), "rb",
use_include_path | ENFORCE_SAFE_MODE | REPORT_ERRORS,



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] Re: open_basedir and safe_mode_exec_dir

2002-07-16 Thread Yasuo Ohgaki

Yasuo Ohgaki wrote:
> Yasuo Ohgaki wrote:
> 
>> Christian Stocker wrote:
>>
>>> another little thingie: the description to open_basedir in the 
>>> distributed
>>> php.ini is between all the safe_mode config, therfore maybe a lot of
>>> people don't know, that one can use this whithout safe_mode enabled.
>>>
>>
>> I agree. The directive name should be "safe_mode_open_dasedir"
>> in first place...
>>
>> I added note to php.ini-*
>>
>>
> 
> I didn't realized how open_basedir works and sander
> pointed out. Thanks Sander.
> 
> Anyway, php_checkuid() does not check open_basedir and
> I immediately noticed user bypass open_basedir with
> pg_lo_import(). I guess there are many functions like
> pg_lo_import().
> 

I've commited fixes to pgsql.c, and also
take a look at file.c and it seems sevral functions
do not check safe_mode and open_basedir yet.
(safe_mode/open_basedir could be faked by db command,
etc anyway, though...)

Is there reason why these functions don't check safe_mode
and open_basedir?

I don't have much time to test, so I didn't committed this
patch...

--
Yasuo Ohgaki



/usr/bin/diff: conflicting specifications of output style
--- file.c.~1.239.~ Sun Jul 14 09:14:16 2002
+++ file.c  Wed Jul 17 14:37:02 2002
@@ -261,7 +261,13 @@
  &filename, &filename_len, 
&use_include_path) == FAILURE) {
return;
}
-
+   if (PG(safe_mode) && (!php_checkuid(filename, NULL, 
+CHECKUID_CHECK_FILE_AND_DIR))) {
+   RETURN_FALSE;
+   }
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   
php_stream_open_wrapper(filename, "rb", 0, NULL);
 
md.stream = php_stream_open_wrapper(filename, "rb",
@@ -411,6 +417,13 @@
return;
}
 
+   if (PG(safe_mode) && (!php_checkuid(filename, NULL, 
+CHECKUID_CHECK_FILE_AND_DIR))) {
+   RETURN_FALSE;
+   }
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   
stream = php_stream_open_wrapper(filename, "rb", 
use_include_path | ENFORCE_SAFE_MODE | REPORT_ERRORS,
NULL);
@@ -457,6 +470,13 @@
  &filename, &filename_len, 
&use_include_path) == FAILURE) {
return;
}
+   if (PG(safe_mode) && (!php_checkuid(filename, NULL, 
+CHECKUID_CHECK_FILE_AND_DIR))) {
+   RETURN_FALSE;
+   }
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+
 
stream = php_stream_open_wrapper(filename, "rb", 
use_include_path | ENFORCE_SAFE_MODE | REPORT_ERRORS,
@@ -526,6 +546,9 @@
convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
 
+   if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(arg1), NULL, 
+CHECKUID_ONLY_DIR))) {
+   RETURN_FALSE;
+   }
if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)) {
RETURN_FALSE;
}
@@ -806,6 +829,13 @@
&mode, &mode_len, &use_include_path, &zcontext) == 
FAILURE) {
RETURN_FALSE;
}
+   if (PG(safe_mode) && (!php_checkuid(filename, NULL, 
+CHECKUID_CHECK_FILE_AND_DIR))) {
+   RETURN_FALSE;
+   }
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   
if (zcontext) {
context = (php_stream_context*)zend_fetch_resource(&zcontext 
TSRMLS_CC, -1, "Stream-Context", NULL, 1, le_stream_context);
ZEND_VERIFY_RESOURCE(context);
@@ -1581,6 +1611,14 @@
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg1);
+
+   if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(arg1), NULL, 
+CHECKUID_CHECK_FILE_AND_DIR))) {
+   RETURN_FALSE;
+   }
+
+   if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
 
stream = php_stream_open_wrapper(Z_STRVAL_PP(arg1), "rb",
use_include_path | ENFORCE_SAFE_MODE | REPORT_ERRORS,



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] Re: open_basedir and safe_mode_exec_dir

2002-07-16 Thread Yasuo Ohgaki

Yasuo Ohgaki wrote:
> Christian Stocker wrote:
> 
>> another little thingie: the description to open_basedir in the 
>> distributed
>> php.ini is between all the safe_mode config, therfore maybe a lot of
>> people don't know, that one can use this whithout safe_mode enabled.
>>
> 
> I agree. The directive name should be "safe_mode_open_dasedir"
> in first place...
> 
> I added note to php.ini-*
> 
>

I didn't realized how open_basedir works and sander
pointed out. Thanks Sander.

Anyway, php_checkuid() does not check open_basedir and
I immediately noticed user bypass open_basedir with
pg_lo_import(). I guess there are many functions like
pg_lo_import().

--
Yasuo Ohgaki




-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Re: open_basedir and safe_mode_exec_dir

2002-07-16 Thread Yasuo Ohgaki

Christian Stocker wrote:
> another little thingie: the description to open_basedir in the distributed
> php.ini is between all the safe_mode config, therfore maybe a lot of
> people don't know, that one can use this whithout safe_mode enabled.
> 

I agree. The directive name should be "safe_mode_open_dasedir"
in first place...

I added note to php.ini-*

--
Yasuo Ohgaki


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] relative xpath queries

2002-07-16 Thread Dan Allen

Garland foster ([EMAIL PROTECTED]) wrote:

> If this gets attention I'd add another request:
> Please make the nodeset an array of REFERENCES to dom nodes, so we
> wan use Xpath to locate a node and then we can change it using DOM
> functions.
> It will make a sensible difference to implement, for example, Xupdate or
> modifications
> based on Xpath expressions.
> 
> Garland

I have been using this extension for 6 months and I can tell you
that the results from xpath are definitely references...or else my
pear XML_XPath class wouldn't be working at all.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"The package said 'Windows 95 or better', so I installed Linux"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] relative xpath queries

2002-07-16 Thread Garland foster

If this gets attention I'd add another request:
Please make the nodeset an array of REFERENCES to dom nodes, so we
wan use Xpath to locate a node and then we can change it using DOM
functions.
It will make a sensible difference to implement, for example, Xupdate or
modifications
based on Xpath expressions.

Garland

- Original Message -
From: Dan Allen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 5:56 PM
Subject: [PHP-DEV] relative xpath queries


> XPath is crippled without the ability to do relative xpath queries.
> The interface is already provided by the libxml2 engine, it is just
> a matter of adding the option to xpath_eval().  If you are working
> recursively in an xml document (which you are always doing) and you
> need to run an xpath query from the current node, the only way to do
> it now is to write a function (which I did) to work back up the tree
> from the current node to determine the location path and then append
> that onto the beginning of the query and run it.  However, this is
> very inefficient and shows incompleteness of the domxml xpath
> implementation.  Any chance this could get attention?
>
> Dan
>
> --
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Daniel Allen, <[EMAIL PROTECTED]>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "I used to herd dairy cows.  Now I herd linux users.  Apart
> from the isolation, I think I preferred the cows.  They were
> better in conversation, easier to milk, and if they annoyed me
> enough, I could shoot them and eat them."
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 7/4/02


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] relative xpath queries

2002-07-16 Thread Dan Allen

XPath is crippled without the ability to do relative xpath queries.
The interface is already provided by the libxml2 engine, it is just
a matter of adding the option to xpath_eval().  If you are working
recursively in an xml document (which you are always doing) and you
need to run an xpath query from the current node, the only way to do
it now is to write a function (which I did) to work back up the tree
from the current node to determine the location path and then append
that onto the beginning of the query and run it.  However, this is
very inefficient and shows incompleteness of the domxml xpath
implementation.  Any chance this could get attention?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"I used to herd dairy cows.  Now I herd linux users.  Apart 
from the isolation, I think I preferred the cows.  They were 
better in conversation, easier to milk, and if they annoyed me 
enough, I could shoot them and eat them."
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] open_basedir and safe_mode_exec_dir

2002-07-16 Thread Christian Stocker

Hi

I prefer the php.ini option open_basedir much more over safe_mode to
provide virtual hosting for some clients of mine, but to have a little
more security, I additionally need to turn off some function with
disable_functions (exec, system, shell_exec and popen come to mind).
But it would be very convenient, if I could use sth like
safe_mode_exec_dir for non_safe_mode mode to allow nevertheless some
command line commands. I know, not the best way to enforce security :)
Would this be anyhow possible or do we open safe_mode-hell again with such
a possibility?

another little thingie: the description to open_basedir in the distributed
php.ini is between all the safe_mode config, therfore maybe a lot of
people don't know, that one can use this whithout safe_mode enabled.

chregu




-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] possible dos attack

2002-07-16 Thread Dan Stromberg

I sent this to php.dev and it didn't come through, so I'm sending it
again to the mailing list this time.  Sorry if this is a repeat.

We have a bunch of apache servers here with php compiled in.

A bunch of them have died in two different rounds, both rounds being on
the same weekend.  The servers on ports 8080 and 443 are fine; it's only
the port 80 apaches that are dying.

I did a backtrace with gdb, and I get thousands of these:

#60961 0xef7d46e8 in ?? ()
#60962 0xef7dfcc8 in ?? ()
#60963 0xef7d2d8c in ?? ()
#60964 0xef24c980 in _PROCEDURE_LINKAGE_TABLE_ () from /usr/lib/libthread.so.1
#60965 0xef239308 in kill () from /usr/lib/libthread.so.1
#60966 0x1516dc in sig_coredump ()
#60967 0xef23b928 in __sighndlr () from /usr/lib/libthread.so.1
#60968 
#60969 dbexit () at dblib.c:561
#60970 0xbb7a8 in zm_shutdown_sybase (type=-282964972, 
module_number=-277216068) at php_sybase_db.c:254

It repeats that same pattern again and again.

It seems to me that either there's a weird recursive bug in apache with
php, or someone has found a DOS attack against apache with php by
pelting it with a bad signal.  Or maybe there's a gdb bug, but... nah. :)

Any suggestions?  Restarting apaches gets old fast.  It's been so easy
to take apache's reliability for granted in the past.

TIA.

BTW, thanks for the work you guys do on apache/php.

-- 
Dan Stromberg   UCI/NACS/DCS



msg39918/pgp0.pgp
Description: PGP signature


[PHP-DEV] variables_order too powerful

2002-07-16 Thread Philip Olson

In this bug report:

  variables_order affects existence of php 
  predefined variables
* http://bugs.php.net/16155  

The following tentative plan was made by Zeev:

(a) Decouple variables_order from the $_* / $HTTP_*_VARS
completely.
(b) Make it possible to prevent $_ENV and $_SERVER from
being populated.  Something like: 
  server_autoglobal = on
  env_autoglobal = off
(c) It shouldn't be possible to prevent $_GET, $_POST,
$_COOKIE, and $_FILES from being populated.

This is a pretty interesting change, the php-dev crew 
may want to discuss it (and implement!).

Regards,
Philip Olson


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] CVS Account Request: ctrlsoft

2002-07-16 Thread Jelmer Vernooij

Maintainance of PEAR/PECL SMB module and possibly of other pear stuff as well


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] how to debug a php extension...

2002-07-16 Thread Ron Lange

Hi David, hi Joseph,
thanks a lot, I have a very helpful backtrace now.
Regards 
Ron

David Eriksson wrote:

> On Tue, 16 Jul 2002, Ron Lange wrote:
> 
>> hi,
>> in which way I could debug my extension (builtin, apachemodule)?
>> unfortunately I get segmentation faults of the forked apache proc, and I
>> can only guess where it is. It's in a particular place, where I set up a
>> socket and two fds. I don't use php_streams. Any hints?
> 
>   http://bugs.php.net/bugs-generating-backtrace.php
> 
> -\- David Eriksson -/-
> 
> "I personally refuse to use inferior tools because of ideology."
> - Linus Torvalds


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] possible dos attack

2002-07-16 Thread Adam Voigt

What version of Apache and PHP are you running?
Are you connecting to a Microsoft SQL server or a Sybase Server (I ask
because of the reference to php_sybase_db, and since both would most
likely make reference to that.) Is there a pattern to the crashing?
(Heavy database activity?) If you are using FreeTDS to connect to a
Microsoft SQL Server what version are you running?

Adam Voigt
[EMAIL PROTECTED]

On Mon, 2002-07-15 at 13:17, Dan Stromberg wrote:
> We have a bunch of apache servers here with php compiled in.
> 
> They keep dying.  I think they're all tending to die at the same time.
> The servers on ports 8080 and 443 are fine; it's only the port 80 apaches
> that are dying.
> 
> I did a backtrace with gdb, and I get thousands of these:
> 
> #60961 0xef7d46e8 in ?? ()
> #60962 0xef7dfcc8 in ?? ()
> #60963 0xef7d2d8c in ?? ()
> #60964 0xef24c980 in _PROCEDURE_LINKAGE_TABLE_ () from /usr/lib/libthread.so.1
> #60965 0xef239308 in kill () from /usr/lib/libthread.so.1
> #60966 0x1516dc in sig_coredump ()
> #60967 0xef23b928 in __sighndlr () from /usr/lib/libthread.so.1
> #60968 
> #60969 dbexit () at dblib.c:561
> #60970 0xbb7a8 in zm_shutdown_sybase (type=-282964972, 
> module_number=-277216068) at php_sybase_db.c:254
> 
> It seems to me that either there's a weird recursive bug apache with php,
> or someone has found a DOS attack against apache with php by pelting it
> with a bad signal.
> 
> Any suggestions?  Restarting our apaches is quickly getting old.  It's
> been so easy to take apaches reliability for granted.
> 
> TIA.
> 
> BTW, thanks for the work you guys do on apache/php.
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] possible dos attack

2002-07-16 Thread Dan Stromberg

We have a bunch of apache servers here with php compiled in.

They keep dying.  I think they're all tending to die at the same time.
The servers on ports 8080 and 443 are fine; it's only the port 80 apaches
that are dying.

I did a backtrace with gdb, and I get thousands of these:

#60961 0xef7d46e8 in ?? ()
#60962 0xef7dfcc8 in ?? ()
#60963 0xef7d2d8c in ?? ()
#60964 0xef24c980 in _PROCEDURE_LINKAGE_TABLE_ () from /usr/lib/libthread.so.1
#60965 0xef239308 in kill () from /usr/lib/libthread.so.1
#60966 0x1516dc in sig_coredump ()
#60967 0xef23b928 in __sighndlr () from /usr/lib/libthread.so.1
#60968 
#60969 dbexit () at dblib.c:561
#60970 0xbb7a8 in zm_shutdown_sybase (type=-282964972, 
module_number=-277216068) at php_sybase_db.c:254

It seems to me that either there's a weird recursive bug apache with php,
or someone has found a DOS attack against apache with php by pelting it
with a bad signal.

Any suggestions?  Restarting our apaches is quickly getting old.  It's
been so easy to take apaches reliability for granted.

TIA.

BTW, thanks for the work you guys do on apache/php.

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Release plans for 4.2.2 / 4.3

2002-07-16 Thread derick

On Tue, 16 Jul 2002, Robinson, Mike wrote:

> Are there any tentative release plans for 4.2.2 or 4.3?

I have a plan for 4.2.2, will elaborate tonight. :)

Derick

---
 Did I help you?   http://www.derickrethans.nl/link.php?url=giftlist
 Frequent ranting: http://www.derickrethans.nl/
---
 PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Release plans for 4.2.2 / 4.3

2002-07-16 Thread Robinson, Mike
Title: Release plans for 4.2.2 /  4.3





Are there any tentative release plans for 4.2.2 or 4.3?


Mike Robinson
IT/Developer - Torstar Media Group Television
Phone: 416.945.8786 Fax: 416.869.4566
Email: [EMAIL PROTECTED]




To find out more about what we can do for you, please visit us at:
http://www.tmgtv.ca/ and http://www.thestar.com/



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] Variable expansion in user-space

2002-07-16 Thread David Brown

Hi guys:

I've looked through the documentation and didn't see anything like this;
please do let me know if this has been implemented/discussed previously.

I'm looking for a fast mechanism to do 'user-space' string expansion.
That is, given a key/value set $a and a string $b, i'd like for every
occurance of $key in $b to be expanded to $a[$key]. This in and of itself
it easy to do with preg_replace_callback() or eval().

Both of the above methods have their disadvantages, though (eval's being
the possibility of escape-style attacks, preg_replace_callback's being
having to fire up the regex engine). 

I'd like to propose a function var_expand($str [, $namespace]). It'd be
capable of using PHP's built-in variable expansion code in a controlled
manner - saving the need to do ad-hoc string replacement or eval()
blocks. I'm willing to bet it'd also be fast.

If I'm barking up the wrong tree or am completely missing something,
please let me know. Barring any immediate vetos, would it be appropriate
if I prepared a patch later this week?


Thanks in advance,
- Dave
  [EMAIL PROTECTED]


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DEV] how to debug a php extension...

2002-07-16 Thread Joseph Tate

Which platform are you on?

Linux?  Look for 'How to generate a backtrace' on the php.net website, as
David posted.

Windows?  Limit the number of active server processes to 1, then using
MSDEV, attach to the running apache process.  (It'll help if both apache and
your extension are built in debug mode.)  Then make it crash.  Debug as you
would any windows App.

Joseph

> -Original Message-
> From: Ron Lange [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 9:47 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DEV] how to debug a php extension...
>
>
> hi,
> in which way I could debug my extension (builtin, apachemodule)?
> unfortunately I get segmentation faults of the forked apache
> proc, and I can
> only guess where it is. It's in a particular place, where I set
> up a socket
> and two fds. I don't use php_streams. Any hints?
> Regards
> Ron
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] how to debug a php extension...

2002-07-16 Thread David Eriksson

On Tue, 16 Jul 2002, Ron Lange wrote:

> hi,
> in which way I could debug my extension (builtin, apachemodule)?
> unfortunately I get segmentation faults of the forked apache proc, and I can 
> only guess where it is. It's in a particular place, where I set up a socket 
> and two fds. I don't use php_streams. Any hints?

  http://bugs.php.net/bugs-generating-backtrace.php

-\- David Eriksson -/-

"I personally refuse to use inferior tools because of ideology."
- Linus Torvalds 


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] how to debug a php extension...

2002-07-16 Thread Ron Lange

hi,
in which way I could debug my extension (builtin, apachemodule)?
unfortunately I get segmentation faults of the forked apache proc, and I can 
only guess where it is. It's in a particular place, where I set up a socket 
and two fds. I don't use php_streams. Any hints?
Regards
Ron

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php