[PHP-DEV] Bug #12264 Updated: PATH_INFO and PATH_TRANSLATED not being correctly set

2001-07-19 Thread jah

ID: 12264
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: IIS related
Operating System: Win2K Server
PHP Version: 4.0.6
New Comment:

Hmm, looks like my patch thing didn't quite work [for one, PATH_INFO isn't being set 
right, then I think there are also some memory leaks]) ... I had an old very hacky 
patch around here that I ended up reverting to for now.

A proper fix for this problem would be great :)

Previous Comments:


[2001-07-19 14:29:07] [EMAIL PROTECTED]

Hello,

The scripts that we are running use PATH_INFO to determine where a user is trying to 
access, and this became a problem when we switched over from using Apache to using 
IIS. Once we made the switch from Apache to IIS we were getting continual CGI Errors 
(like virtually every single hit was a CGI Error) [ and this was not because of 
permissions ]

As it turns out, the only pages where we would not get a CGI error was the root page, 
which had an empty PATH_INFO. Here's an example:

Our root script is /test.php. If I requested /test.php everything would work fine; 
However if I requested /test.php/hello/world I
would get a CGI Error (under IIS). Under Apache I would get the proper results -- it 
would run /test.php and PATH_INFO would be 
/hello/world.

But anyways - after spending some time poking around the PHP source I found that PHP 
was trying to execute the wrong file! In the above example, it was attempting to run 
/test.php/hello/world instead of /test.php (SCRIPT_NAME was being to /test.php). To me 
it looked like IIS was setting PATH_INFO and PATH_TRANSLATED differently than PHP was 
expecting, so I made a change the the source so that it would modify those two until 
they were in working order. I'm not sure if my change is correct - but it did fix the 
problem).

(Note: The problem is independent of the actual script - any script where you put 
stuff on the URL in this manner will have this problem)

=

What follows now is the output that I had PHP give on what it was trying to run. The 
first is the original version that didn't work, followed by the version with the 
changes that I made, and the proper results:

In both of the cases, the requested URL was:

http://192.168.1.2/test.php/hello/world


Original (non-working) version
--
PHP Output follows

SG(request_info).path_translated: (null)
PATH_INFO  : /test.php/hello/world
SCRIPT_NAME: /test.php
SG(request_info).request_uri = /test.php/hello/world
php_fopen_primary_script(): filename  = C:\web\fcsweb\test.php\hello\world
php_fopen_primary_script(): path_info = /test.php/hello/world

=

So you can see that in the original request it is trying to run the wrong script. With 
the changes I made, I now get the following:

New (working) version
-
PHP Output follows

SG(request_info).path_translated: C:\web\fcsweb\test.php
PATH_INFO  : /hello/world
SCRIPT_NAME: /test.php
SG(request_info).request_uri = /hello/world
php_fopen_primary_script(): filename  = C:\web\fcsweb\test.php
php_fopen_primary_script(): path_info = /hello/world

=

Some more information on our system:

OS: Win2k Server SP1
Webserver: IIS4
PHP: 4.0.6 CGI mode

And finally, the patch for the changes I made to cgi_main.c are at:

http://div.dyndns.org/jah/php/iis_cgi_path_fix.patch

I've never submitted a patch before, so I don't know if it's done in the right 
manner...

Hopefully I've analyzed this whole issue somewhat correctly... :)

Thanks!

-Jah





Edit this bug report at http://bugs.php.net/?id=12264&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12270: php4ts.dll crashes due to null-pointer assignment on shutdown

2001-07-19 Thread zimpel

From: [EMAIL PROTECTED]
Operating system: Win32
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  php4ts.dll crashes due to null-pointer assignment on shutdown

The crash may be only reproducible in release builds with activated bcmath.
(In debug builds
the Zend efree() function returns prior actual freeing something, if the
thread which calls efree()
isn't the thread which original allocated the resource).

The "call stack" of this issue is:
php_module_shutdown_wrapper() // pi3web_sapi.c
php_module_shutdown() // main.c
zend_shutdown()// zend.c
zend_hash_destroy(&module_registry) // zend_hash.c
pefree(ht->arBuckets, ht->persistent) // zend_hash.c
...
PHP_MSHUTDOWN_FUNCTION(bcmath) // bcmath.c
bc_free_num (num) // init.c, the global bcnum value is _two_
efree ((*num)->n_ptr); // zend_alloc.c

In efree() the code in macro  REMOVE_POINTER_FROM_LIST() crashes

#define REMOVE_POINTER_FROM_LIST(p) \
if (!p->persistent && p==AG(head)) {\
AG(head) = p->pNext;\
} else if (p->persistent && p==AG(phead)) { \
AG(phead) = p->pNext;   \
} else {\
p->pLast->pNext = p->pNext; \
}   \
if (p->pNext) { \
p->pNext->pLast = p->pLast; \
}

The reason of the crash is 

} else {\
p->pLast->pNext = p->pNext; \

if the pointer pLast == NULL. This is true for the last allocated
persistent
resource. This code is only called when bcmath performs shutdown,
because in other calls of efree() the condition p==AG(head) seems to
be always true.

A probable fix is:

} else if (p->pLast) {  \
p->pLast->pNext = p->pNext; \

---
regards,
Holger Zimmermann

-- 
Edit bug report at: http://bugs.php.net/?id=12270&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Sorry

2001-07-19 Thread Er Galvão Abbott

On Fri, 20 Jul 2001 14:02:25 +1000 (EST), [EMAIL PROTECTED] (Gavin
Sherry) wrote:

>Er Galv=E3o Abbott,
>
>Please direct this to the correct list - PHP General Users List. The
>developer's list is for people interested in/working on the PHP hypertext
>processor itself.
>
>Gavin
>


I'm very sorry. I've messed thing up.

I hope you guys excuse me.

Best regards,


   Er Galvão Abbott
 Webdeveloper
  [EMAIL PROTECTED]
-
To send me an e-mail just remove
the CAPITAL TEXT.
-

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12269: session/oracle

2001-07-19 Thread hjhuangjun

From: [EMAIL PROTECTED]
Operating system: win2000
PHP version:  4.0.6
PHP Bug Type: OCI8 related
Bug description:  session/oracle 

win2000+php4.06+apache1.3.20
1,"c:\php\php_oci8.dll" file Exists but systemp report cannot load
c:\php\php_oci8.dll module.
2,session cannot pass to another page
page1.php
 
 session_start();
 session_register("logon");
 Header("location:page2.php);
 
page2

session_start();
session_is_register("logon") return false; 
why?
-- 
Edit bug report at: http://bugs.php.net/?id=12269&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Simple (I hope) updating contents question

2001-07-19 Thread Gavin Sherry

Er Galvão Abbott,

Please direct this to the correct list - PHP General Users List. The
developer's list is for people interested in/working on the PHP hypertext
processor itself.

Gavin


--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Simple (I hope) updating contents question

2001-07-19 Thread Er Galvão Abbott

Greetings.

First of all I'm a PHP bginner so take it easy on me :)

I'm trying to make a script that does the following:

* open a text file
* read its contents
* For each line on the file make a input tag with its contents, like

* Take the modified contents - modifyied in the input fields - and
update the text file

So, I've begun with:

1 

One thing I didn't understood is the length part of the fgets
command... Why use length with it? So, what I'm trying to do in lines
4 and 7 is to make sure it gets the contents by setting length = file
size... Am I right on this?

How do I split the contents of the file? Because I'm getting the
content of both lines in the $content variable...

I'm originally a Perl programmer so I know that the "split mark" must
be the end of line, but I'm really lost here.

Can someone help me?

Thanks in advance,


   Er Galvão Abbott
 Webdeveloper
  [EMAIL PROTECTED]
-
To send me an e-mail just remove
the CAPITAL TEXT.
-

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Application Function

2001-07-19 Thread Hartmut Holzgraefe

Patrick Pease wrote:
> Could you guys implement a function from asp?
> 
> the Application() function (i dont realy know what it
> does) but i need it for a chat app.

sounds like a task for ext/cristalball to me ;)

-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Application Function

2001-07-19 Thread Patrick Pease

Could you guys implement a function from asp?

the Application() function (i dont realy know what it
does) but i need it for a chat app.

thanks
Patrick


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12268 Updated: Security bug in php 4.0.5+

2001-07-19 Thread rasmus

ID: 12268
Updated by: rasmus
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: *Mail Related
Operating System: Any
PHP Version: 4.0.5
New Comment:

Fixed a while ago in CVS

Previous Comments:


[2001-07-19 19:29:34] [EMAIL PROTECTED]

http://www.net-security.org/text/bugs/995534103,28541,.shtml:


PHP Mail Function Vulnerability
Posted on 19.7.2001
php mail() function does not do check for escape shell commandes, even if
php is running in safe_mode.
So it's may be possible to bypass the safe_mode restriction and gain shell
access.
Affected:
php4.0.6
php4.0.5
Significatives lines of ext/standard/mail.c:
>extra_cmd = (*argv[4])->value.str.val;
>strcat (sendmail_cmd, extra_cmd);
>sendmail = popen(sendmail_cmd, "w");
Exploit:
mail("[EMAIL PROTECTED]",
"test",
"test",
"test", "; shell_cmd");





Edit this bug report at http://bugs.php.net/?id=12268&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] === Question

2001-07-19 Thread John Donagher


Check out: http://www.php.net/manual/en/language.operators.comparison.php

Also, this list is for the development of the language, not development with
the language. You probably want to be at php-general.

John

On Thu, 19 Jul 2001, Patrick Pease wrote:

> What does the === operator do
> 
> and whats the difference between == and ===?
> 
> any help?
> 
> Thanks
> Patrick PEase
> 
> 
> 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] === Question

2001-07-19 Thread Patrick Pease

What does the === operator do

and whats the difference between == and ===?

any help?

Thanks
Patrick PEase


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] ext_skel and php_.c vs. .c

2001-07-19 Thread Jon Parise

On Thu, Jul 19, 2001 at 05:50:42PM -0600, Joey Smith wrote:

> I had thought the decision was that php_.c was the correct way
> to name the .c file for an extension, so that we are less likely to
> conflict with any files from the package itself?
> 
> ext_skel creates a .c file using the bare extname.

I thought that convention only applied to the header files.

-- 
Jon Parise ([EMAIL PROTECTED])  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] ext_skel and php_.c vs. .c

2001-07-19 Thread Joey Smith

I had thought the decision was that php_.c was the correct way
to name the .c file for an extension, so that we are less likely to
conflict with any files from the package itself?

ext_skel creates a .c file using the bare extname.


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] namespace/package feature in PHP 5?

2001-07-19 Thread Zeev Suraski

Sure, [EMAIL PROTECTED]

At 23:39 19/07/2001, James E. Flemer wrote:
>Are (any of) the Zend lists public? (either to browse or
>submit.)
>
>-James
>
>On Thu, 19 Jul 2001, Zeev Suraski wrote:
>
> > Language-level things like this one are being discussed at
> > [EMAIL PROTECTED]  This feature was actually discussed quite a lot in
> >
> > Zeev
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Zeev Suraski <[EMAIL PROTECTED]>
CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12268: Security bug in php 4.0.5+

2001-07-19 Thread hard . disk

From: [EMAIL PROTECTED]
Operating system: Any
PHP version:  4.0.5
PHP Bug Type: *Mail Related
Bug description:  Security bug in php 4.0.5+

http://www.net-security.org/text/bugs/995534103,28541,.shtml:


PHP Mail Function Vulnerability
Posted on 19.7.2001
php mail() function does not do check for escape shell commandes, even if
php is running in safe_mode.
So it's may be possible to bypass the safe_mode restriction and gain
shell
access.
Affected:
php4.0.6
php4.0.5
Significatives lines of ext/standard/mail.c:
>extra_cmd = (*argv[4])->value.str.val;
>strcat (sendmail_cmd, extra_cmd);
>sendmail = popen(sendmail_cmd, "w");
Exploit:
mail("[EMAIL PROTECTED]",
"test",
"test",
"test", "; shell_cmd");
-- 
Edit bug report at: http://bugs.php.net/?id=12268&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #12267 Updated: Session (concurrency ?) problem

2001-07-19 Thread Sascha Schumann

> The fact is a similar problem is happening with the mm module,
> but here I can't insert error_log to be sure... is this session
> handler "race safe" ?

Nope.

> And I'm surprised that this concurrency issue has to be solved
> on a per handler basis : isn't it functionnality duplication ?
> isn't this a tricky trap for handler programmers ? is this
> mentionned in the documentation ?

Locking a record in your database is not duplication of
functionality.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12267 Updated: Session (concurrency ?) problem

2001-07-19 Thread thomas . morin

ID: 12267
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: Linux
PHP Version: 4.0.6
New Comment:

The fact is a similar problem is happening with the mm module, but here I can't insert 
error_log to be sure... is this session handler "race safe" ?

And I'm surprised that this concurrency issue has to be solved on a per handler basis 
: isn't it functionnality duplication ? isn't this a tricky trap for handler 
programmers ? is this mentionned in the documentation ?

Previous Comments:


[2001-07-19 15:49:12] [EMAIL PROTECTED]

Sorry for the layout, my 2 columns are broken.
I also changed the 'Type' of the bug to 'Session related'.



[2001-07-19 15:47:46] [EMAIL PROTECTED]

While testing a php apllication, I found that I had some trouble with session 
variables (php4 native sessions, not phplib's crappy ones), at this point I was using 
a custom MySQL session handler (with session_set_save_handler).

After adding some error_log calls in my custom session handler functions, I managed to 
see that the problem was coming from  the fact that a session was reopened before the 
current one was written to the database :

(in chronological order)

 request Arequest B

 HTTP request A is made on page1.php
 session open by session_start:
session variable A equals 0
 request A is being treated:
session variable A is set to 1
 redirection is made with header()
to page2.php   --> request B is made on page2.phpA
 exit()
   session open by session _start
   session variable A equals 0
   treatment made by my application:
   no change to make to variable A if
   variable A is 0
 php saves the session
  => A is stored with value 1  exit()

   php saves the session
=> A is stored with value 0

And in the end, A ends up being 0, which is not what it should be.

I found a way of making the bug go away (for a moment) : make a sleep(2) in my session 
'open' handler.   :)))

This "solved" the problem and I concluded the bug was only due to my fault : I should 
have locked my session table (or row...) to avoid race conditions and concurrency 
problems.

Then I thought that such a locking should have been done by the php session layer 
itself, because this issue is common to all session handlers you can use or define. 
And I found in the online documentation session_end and session_readonly which 
seemingly were tackling with similar concurrency issue, and I concluded this was 
worked on and would probably be solved in some next release, but php 4.0.6 doesn't 
solve the problem, and the session_end and session_readonly functions - though they 
appear in the documentation - are not even appearing in the CVS code.

So my question : is this really a known issue ? is a fix for this planned soon ?

Thank you !!






Edit this bug report at http://bugs.php.net/?id=12267&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] namespace/package feature in PHP 5?

2001-07-19 Thread James E. Flemer

Are (any of) the Zend lists public? (either to browse or
submit.)

-James

On Thu, 19 Jul 2001, Zeev Suraski wrote:

> Language-level things like this one are being discussed at
> [EMAIL PROTECTED]  This feature was actually discussed quite a lot in
>
> Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] persistent mysql connection on a LAMP-System

2001-07-19 Thread Zeev Suraski

At 23:18 19/07/2001, Rasmus Lerdorf wrote:
> > "A pconnect has a running time of 8 hours.
>
>There is no such time limit.

There is, actually (MySQL imposes it, it can be configured).

> > Apache has a threading concept, which doesn't cancel the thread. You can
> > configure it but the thread will live till the last connection is closed.
> > ( 8 hours after a pconnect ).
>
>Huh?  If we are talking about Apache on any UNIX platform then there are
>no threads.

True, but it doesn't change much in the explanation...

Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12255 Updated: (In safe mode) The UID check in chdir don't test the good directory

2001-07-19 Thread jflemer

ID: 12255
Updated by: jflemer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Duplicate
Bug Type: Directory function related
Operating System: Debian GNU/Linux sid
PHP Version: 4.0.6
New Comment:

I fixed this in CVS. This is a duplicate bug report.

Previous Comments:


[2001-07-19 10:55:20] [EMAIL PROTECTED]

In safe mode, when you chdir a specific directory, it does not test the UID of 
directory but the UID of the directory below.

Let's say we do a chdir ("/home/benoit");
In safe mode, it will test the UID of /home against the one of the script so it fails.

If we do a chdir ("/home/benoit/."); , PHP test the UID of /home/benoit/ against the 
UID of the script and succeed.

But, logically, the two commands should succeed the same way.

I think it's related to the code in "ext/standard/dir.c" around line 286 :
> if (PG(safe_mode) && !php_checkuid((*arg)->value.str.val, NULL, 
>CHECKUID_ALLOW_ONLY_DIR)) {
and the way php_checkuid handle CHECKUID_ALLOW_ONLY_DIR.







Edit this bug report at http://bugs.php.net/?id=12255&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] persistent mysql connection on a LAMP-System

2001-07-19 Thread Rasmus Lerdorf

> "A pconnect has a running time of 8 hours.

There is no such time limit.

> A close function will be ignored.

True

> Apache has a threading concept, which doesn't cancel the thread. You can
> configure it but the thread will live till the last connection is closed.
> ( 8 hours after a pconnect ).

Huh?  If we are talking about Apache on any UNIX platform then there are
no threads.

> Every new URL rquest will lead to a new thread with a new database connection
> with a live evalution of 8 hours. To say it simple: "if 10 user clicks on 5
> sites with php scripts -> 50 pconnects will stay active."

Not unless there is a bug somewhere.  The whole point of pconnects is that
they are re-used.  Assuming each pconnect uses the same auth credentials
then the most concurrent connections you will ever have would be equal to
your MAX_CLIENTS setting in your Apache httpd.conf

-Rasmus


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12168 Updated: mysql_select_db() won't work

2001-07-19 Thread DeadEye5000

ID: 12168
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: MySQL related
Operating System: Windows 2000
PHP Version: 4.0.6


Previous Comments:


[2001-07-14 12:24:43] [EMAIL PROTECTED]

This is a two part script, query.php and mysqltest.php.  It's a script that executes a 
query on the selected database.  But I get an error that says that there is no 
database selected.  I'm using IIS 5.  This is the first page:



PHP Code Tester






Please select the database for query:

" . 
mysql_tablename($dbTable, $i) . "\n";
}
?>


Please input the SQL Query to be executed:






Sorry if this is a bit long, but this is the second page:



PHP SQL Code Tester






Results of query 

Error " . mysql_errno() . ": " . mysql_error() . "";
elseif (mysql_num_rows($result) == 0):
echo "Query executed successfully!";
else:
?>


" . mysql_field_name($result, $i) . "";
}
?>

";
$rowArray = mysql_fetch_rows($result);
for ($j = 0; $j < mysql_num_fields($result); $j++) {
echo "" . $rowArray[$j] . "";
}
echo "";
}
?>











I'm using the win32 binary of PHP.  While I was installing PHP it ran into an error 
saying it couldn't configure for IIS, and that I had to manually do it.  I set it up 
and all the scripts run fine except for when I have to select a database.






Edit this bug report at http://bugs.php.net/?id=12168&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: URL rewriter outputs a spurious " /"

2001-07-19 Thread colin mcdonald

I'm not sure what the url rewriter does,

but I know XHTML and XML requires a trailing slash in tag that have no 
end tags (like img, input, etc)

something like this is valid:



maybe that is what this code is writing?

my 2c,

colin

[EMAIL PROTECTED] wrote:

> From: [EMAIL PROTECTED]
> Operating system: linux suse 6.4
> PHP version:  4.0.6
> PHP Bug Type: Session related
> Bug description:  URL rewriter outputs a spurious " /"
> 
> the rewriter adds a " /" befor the closing bracket in the  rewriting.
> following a diff to patch it.
> sincerely Daniel S.
> 
> *** ext/standard/url_scanner_ex.c   Thu Jun 21 08:29:04 2001
> --- ext/standard/url_scanner_ex_modif.c   Thu Jul 19 14:14:34 2001
> *** static inline void handle_form(STD_PARA)
> *** 178,182 
>  smart_str_appends(&ctx->result, "\"value=\"");
>  smart_str_append(&ctx->result,&ctx->q_value);
> !smart_str_appends(&ctx->result, "\"/>");
>}
> }
> --- 178,182 
>  smart_str_appends(&ctx->result, "\"value=\"");
>  smart_str_append(&ctx->result,&ctx->q_value);
> !smart_str_appends(&ctx->result,"\">");
>}
> }
> 



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12168 Updated: mysql_select_db() won't work

2001-07-19 Thread DeadEye5000

ID: 12168
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: MySQL related
Operating System: Windows 2000
PHP Version: 4.0.6
New Comment:

i actually fixed the problem...i dunno if this is why it wasn't working, but all i did 
was delete the mysql_connect() that was in the second page...now it works fine.

Previous Comments:


[2001-07-14 12:24:43] [EMAIL PROTECTED]

This is a two part script, query.php and mysqltest.php.  It's a script that executes a 
query on the selected database.  But I get an error that says that there is no 
database selected.  I'm using IIS 5.  This is the first page:



PHP Code Tester






Please select the database for query:

" . 
mysql_tablename($dbTable, $i) . "\n";
}
?>


Please input the SQL Query to be executed:






Sorry if this is a bit long, but this is the second page:



PHP SQL Code Tester






Results of query 

Error " . mysql_errno() . ": " . mysql_error() . "";
elseif (mysql_num_rows($result) == 0):
echo "Query executed successfully!";
else:
?>


" . mysql_field_name($result, $i) . "";
}
?>

";
$rowArray = mysql_fetch_rows($result);
for ($j = 0; $j < mysql_num_fields($result); $j++) {
echo "" . $rowArray[$j] . "";
}
echo "";
}
?>











I'm using the win32 binary of PHP.  While I was installing PHP it ran into an error 
saying it couldn't configure for IIS, and that I had to manually do it.  I set it up 
and all the scripts run fine except for when I have to select a database.






Edit this bug report at http://bugs.php.net/?id=12168&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: Bug #12264: PATH_INFO and PATH_TRANSLATED not being correctly set

2001-07-19 Thread colin mcdonald


just to confirm, I'm using php 4.0.6 with IIS as an ISAPI module and I 
get this error when using this url:

url: ev.php/hello/world

Warning: Failed opening 'c:\inetpub\wwwroot\EV30\ev.php\hello\world' for 
inclusion (include_path='.') in Unknown on line 0





[EMAIL PROTECTED] wrote:

> From: [EMAIL PROTECTED]
> Operating system: Win2K Server
> PHP version:  4.0.6
> PHP Bug Type: IIS related
> Bug description:  PATH_INFO and PATH_TRANSLATED not being correctly set


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #12267: Session (concurrency ?) problem

2001-07-19 Thread Sascha Schumann

> This "solved" the problem and I concluded the bug was only due to my fault
> : I should have locked my session table (or row...) to avoid race
> conditions and concurrency problems.

That is right.  The session storage handlers have to perform
locking themselves, if they are supposed to be suited for
concurrent accesses.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12267 Updated: Session (concurrency ?) problem

2001-07-19 Thread thomas . morin

ID: 12267
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Old Bug Type: Unknown/Other Function
Bug Type: Session related
Operating System: Linux
PHP Version: 4.0.6
New Comment:

Sorry for the layout, my 2 columns are broken.
I also changed the 'Type' of the bug to 'Session related'.

Previous Comments:


[2001-07-19 15:47:46] [EMAIL PROTECTED]

While testing a php apllication, I found that I had some trouble with session 
variables (php4 native sessions, not phplib's crappy ones), at this point I was using 
a custom MySQL session handler (with session_set_save_handler).

After adding some error_log calls in my custom session handler functions, I managed to 
see that the problem was coming from  the fact that a session was reopened before the 
current one was written to the database :

(in chronological order)

 request Arequest B

 HTTP request A is made on page1.php
 session open by session_start:
session variable A equals 0
 request A is being treated:
session variable A is set to 1
 redirection is made with header()
to page2.php   --> request B is made on page2.phpA
 exit()
   session open by session _start
   session variable A equals 0
   treatment made by my application:
   no change to make to variable A if
   variable A is 0
 php saves the session
  => A is stored with value 1  exit()

   php saves the session
=> A is stored with value 0

And in the end, A ends up being 0, which is not what it should be.

I found a way of making the bug go away (for a moment) : make a sleep(2) in my session 
'open' handler.   :)))

This "solved" the problem and I concluded the bug was only due to my fault : I should 
have locked my session table (or row...) to avoid race conditions and concurrency 
problems.

Then I thought that such a locking should have been done by the php session layer 
itself, because this issue is common to all session handlers you can use or define. 
And I found in the online documentation session_end and session_readonly which 
seemingly were tackling with similar concurrency issue, and I concluded this was 
worked on and would probably be solved in some next release, but php 4.0.6 doesn't 
solve the problem, and the session_end and session_readonly functions - though they 
appear in the documentation - are not even appearing in the CVS code.

So my question : is this really a known issue ? is a fix for this planned soon ?

Thank you !!






Edit this bug report at http://bugs.php.net/?id=12267&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12267: Session (concurrency ?) problem

2001-07-19 Thread thomas . morin

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  Session (concurrency ?) problem

While testing a php apllication, I found that I had some trouble with
session variables (php4 native sessions, not phplib's crappy ones), at this
point I was using a custom MySQL session handler (with
session_set_save_handler).

After adding some error_log calls in my custom session handler functions, I
managed to see that the problem was coming from  the fact that a session
was reopened before the current one was written to the database :

(in chronological order)

 request Arequest B

 HTTP request A is made on page1.php
 session open by session_start:
session variable A equals 0
 request A is being treated:
session variable A is set to 1
 redirection is made with header()
to page2.php   --> request B is made on
page2.phpA
 exit()
   session open by session _start
   session variable A equals 0
   treatment made by my
application:
   no change to make to
variable A if
   variable A is 0
 php saves the session
  => A is stored with value 1  exit()

   php saves the session
=> A is stored with value 0

And in the end, A ends up being 0, which is not what it should be.

I found a way of making the bug go away (for a moment) : make a sleep(2) in
my session 'open' handler.   :)))

This "solved" the problem and I concluded the bug was only due to my fault
: I should have locked my session table (or row...) to avoid race
conditions and concurrency problems.

Then I thought that such a locking should have been done by the php session
layer itself, because this issue is common to all session handlers you can
use or define. And I found in the online documentation session_end and
session_readonly which seemingly were tackling with similar concurrency
issue, and I concluded this was worked on and would probably be solved in
some next release, but php 4.0.6 doesn't solve the problem, and the
session_end and session_readonly functions - though they appear in the
documentation - are not even appearing in the CVS code.

So my question : is this really a known issue ? is a fix for this planned
soon ?

Thank you !!

-- 
Edit bug report at: http://bugs.php.net/?id=12267&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Header with target

2001-07-19 Thread Cleberson

Hello:

How I send a header with location and target ?



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] persistent mysql connection on a LAMP-System

2001-07-19 Thread Mark Walter

I was informed from a local provider about the following issue concerning
pconnects with php:

"A pconnect has a running time of 8 hours. A close function will be ignored.
Apache has a threading concept, which doesn't cancel the thread. You can 
configure it but the thread will live till the last connection is closed.
( 8 hours after a pconnect ).
Every new URL rquest will lead to a new thread with a new database connection
with a live evalution of 8 hours. To say it simple: "if 10 user clicks on 5 
sites with php scripts -> 50 pconnects will stay active."

To be honest: I don't have a clue how a pconnect is executed on a LAMP-System.
All I know is that I can limit the counts of pconnects within the php.ini.  
The Question I now have is if it's true that scripts should contain a mysql_connect
instead of a pconnect or can I avoid this overhead ? ( Every book recommends to
use pconnect especially for high frequented sites. )

-- 
Best Regards,

Mark

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12266 Updated: max execution time reached during session_start with mm session handler

2001-07-19 Thread sas

ID: 12266
Updated by: sas
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Session related
Operating System: Linux
PHP Version: 4.0.6
New Comment:

Can you give today's snapshot a try? The mm storage module has been improved 
considerably and should not produce such errors anymore.

http://snaps.php.net/

Please let us know whether it works for you.

Previous Comments:


[2001-07-19 14:50:35] [EMAIL PROTECTED]

In have a bunch of those errors in my logs :

  PHP Fatal error:  Maximum execution time of 30 seconds exceeded in [file] line 335

On line 335 of this file, I just have session_start().

This error happens only from time to time (a dozen times a day, for about 5000 
requests), til today I found  no way to reproduce it.

I'm running php 4.0.6. with "session.save_handler = mm".I'm using libmm1 version 1.1.3
Glibc version is 2.1.3 on a linux 2.2.20pre3 kernel running debian 2.2.







Edit this bug report at http://bugs.php.net/?id=12266&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12266: max execution time reached during session_start with mm session handler

2001-07-19 Thread thomas . morin

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Session related
Bug description:  max execution time reached during session_start with mm session 
handler

In have a bunch of those errors in my logs :

  PHP Fatal error:  Maximum execution time of 30 seconds exceeded in [file]
line 335

On line 335 of this file, I just have session_start().

This error happens only from time to time (a dozen times a day, for about
5000 requests), til today I found  no way to reproduce it.

I'm running php 4.0.6. with "session.save_handler = mm".I'm using libmm1
version 1.1.3
Glibc version is 2.1.3 on a linux 2.2.20pre3 kernel running debian 2.2.


-- 
Edit bug report at: http://bugs.php.net/?id=12266&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Reworking DOMXML

2001-07-19 Thread Joey Smith

OK, for those who actually commented, there seems to be a
consensus. Glad I asked. :)

On Thu, 19 Jul 2001, Colin Viebrock wrote the following to Paul Marquis,...:

> > I prefer style #1 as well -- it preserves backward compatability and
> > is consistent with the libxml2 docs.
> 
> Plus, it is then similar to other PHP functions that use an "object" or
> "handle"
> as the first argument (e.g. mysql_, fopen, fwrite, curl, etc.).
> 
> - Colin
> 


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12265: ImageTTFText says can't open/find font with GD 2.0

2001-07-19 Thread JamesHeinrich

From: [EMAIL PROTECTED]
Operating system: Windows NT 4.0 Workstation (PWS)
PHP version:  4.0.6
PHP Bug Type: GD related
Bug description:  ImageTTFText says can't open/find font with GD 2.0

Using the precompiled php_gd.dll that comes with PHP 4.0.6 (GD v2.0)
ImageTTFText() reports could not open/find font whether the font is
specified as filename, absolute path or URL. I had to downgrade to GD v1.6
(supplied with PHP 4.0.5) and functionality was back to normal.
Just use the sample script at
http://www.php.net/manual/en/function.imagettftext.php (you might want to
update the documentation sample to use ImagePNG rather than ImageGIF, btw).
-- 
Edit bug report at: http://bugs.php.net/?id=12265&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11970 Updated: SEPARATE_ZVAL_TO_MAKE_IS_REF doesn't like 0x0

2001-07-19 Thread zeev

ID: 11970
Updated by: zeev
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Open
Bug Type: Scripting Engine problem
Operating System: SuSE7.0
PHP Version: 4.0.6
New Comment:

The fixes so far were bad;  They were reverted, and this bug is no reopened.

Previous Comments:


[2001-07-19 12:05:04] [EMAIL PROTECTED]

My initial fix was bogus, as I misdiagnosed what was going on.  The current fix is to 
allow returning of plain variables only (i.e., you can return $arr[$key], but you 
can't return @$arr[$key]).  This means that your script will not work (it'll error 
out), but won't crash either...



[2001-07-15 12:48:52] [EMAIL PROTECTED]

Fixed in CVS - thanks for the tiny reproducing script!



[2001-07-09 06:27:49] [EMAIL PROTECTED]

function &erm($key) { 
  return @$arr[$key];
}

$foo = erm('foo');
$bar = erm('bar');

(gdb) run bug3.php
Starting program: /usr/local/bin/php bug3.php

Program received signal SIGSEGV, Segmentation fault.
0x80a29e9 in execute (op_array=0x81d3348) at ./zend_execute.c:1592
1592 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
(gdb) p retval_ptr_ptr
$1 = (zval **) 0x0
(gdb) bt
#0  0x80a29e9 in execute (op_array=0x81d3348) at ./zend_execute.c:1592
#1  0x80a26a8 in execute (op_array=0x81cdf5c) at ./zend_execute.c:1544
#2  0x8097234 in zend_execute_scripts (type=8, file_count=3) at zend.c:752
#3  0x8065b4f in php_execute_script (primary_file=0xb694) at main.c:1206
#4  0x8061173 in main (argc=2, argv=0xb724) at cgi_main.c:718
(gdb) list
1587(opline->op1.op_type != IS_CONST) && 
1588(opline->op1.op_type != IS_TMP_VAR)) {
1589  
1590retval_ptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W);
1591
1592SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
1593
1594(*retval_ptr_ptr)->refcount++;
1595(*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
1596 } else {

notice that the second call [ erm('bar')] actually trigger the segfault.

patch: I dunno, Zeev somebody? :)







Edit this bug report at http://bugs.php.net/?id=11970&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12264: PATH_INFO and PATH_TRANSLATED not being correctly set

2001-07-19 Thread jah

From: [EMAIL PROTECTED]
Operating system: Win2K Server
PHP version:  4.0.6
PHP Bug Type: IIS related
Bug description:  PATH_INFO and PATH_TRANSLATED not being correctly set

Hello,

The scripts that we are running use PATH_INFO to determine where a user is
trying to access, and this became a problem when we switched over from
using Apache to using IIS. Once we made the switch from Apache to IIS we
were getting continual CGI Errors (like virtually every single hit was a
CGI Error) [ and this was not because of permissions ]

As it turns out, the only pages where we would not get a CGI error was the
root page, which had an empty PATH_INFO. Here's an example:

Our root script is /test.php. If I requested /test.php everything would
work fine; However if I requested /test.php/hello/world I
would get a CGI Error (under IIS). Under Apache I would get the proper
results -- it would run /test.php and PATH_INFO would be 
/hello/world.

But anyways - after spending some time poking around the PHP source I found
that PHP was trying to execute the wrong file! In the above example, it was
attempting to run /test.php/hello/world instead of /test.php (SCRIPT_NAME
was being to /test.php). To me it looked like IIS was setting PATH_INFO and
PATH_TRANSLATED differently than PHP was expecting, so I made a change the
the source so that it would modify those two until they were in working
order. I'm not sure if my change is correct - but it did fix the
problem).

(Note: The problem is independent of the actual script - any script where
you put stuff on the URL in this manner will have this problem)

=

What follows now is the output that I had PHP give on what it was trying to
run. The first is the original version that didn't work, followed by the
version with the changes that I made, and the proper results:

In both of the cases, the requested URL was:

http://192.168.1.2/test.php/hello/world


Original (non-working) version
--
PHP Output follows

SG(request_info).path_translated: (null)
PATH_INFO  : /test.php/hello/world
SCRIPT_NAME: /test.php
SG(request_info).request_uri = /test.php/hello/world
php_fopen_primary_script(): filename  =
C:\web\fcsweb\test.php\hello\world
php_fopen_primary_script(): path_info = /test.php/hello/world

=

So you can see that in the original request it is trying to run the wrong
script. With the changes I made, I now get the following:

New (working) version
-
PHP Output follows

SG(request_info).path_translated: C:\web\fcsweb\test.php
PATH_INFO  : /hello/world
SCRIPT_NAME: /test.php
SG(request_info).request_uri = /hello/world
php_fopen_primary_script(): filename  = C:\web\fcsweb\test.php
php_fopen_primary_script(): path_info = /hello/world

=

Some more information on our system:

OS: Win2k Server SP1
Webserver: IIS4
PHP: 4.0.6 CGI mode

And finally, the patch for the changes I made to cgi_main.c are at:

http://div.dyndns.org/jah/php/iis_cgi_path_fix.patch

I've never submitted a patch before, so I don't know if it's done in the
right manner...

Hopefully I've analyzed this whole issue somewhat correctly... :)

Thanks!

-Jah
-- 
Edit bug report at: http://bugs.php.net/?id=12264&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12263: odbc_tables(), odbc_results()

2001-07-19 Thread mklangem

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.0.6
PHP Bug Type: ODBC related
Bug description:  odbc_tables(), odbc_results()

I am trying to get the table names from an Access database using
odbc_tables() and then using odbc_fetch_row() and odbc_result(). I can
print all the results using odbc_result_all() which gives an html table
with all the information (In my test database I get 8 rows). However when I
try to go through the results using fetch_row() and odbc_result() I get
errors.

I've tried going through step by step and weird things are happening. This
works: 

"; 
$i = odbc_fetch_row($array); 
echo $i.""; 
$temp = odbc_result($array, "TABLE_NAME"); 
echo $temp; 
?> 

But this doesn't: 

"; 
$i = odbc_fetch_row($array); 
echo $i.""; 
$temp = odbc_result($array, "TABLE_NAME"); 
echo $temp; 
?> 

It seems like I can only assign or check odbc_fetch_row() and
odbc_results() a total of two times. If I don't check or assing anything, I
can get to the eigth row. If I do check or assign more than 2 twice, I get
a cgi error or it just sits acting like its loading stuff.

With some help, I found out that you can get around the problem by closing
the connection and opening it again. I've also found that something like
$num = count($array) will not work if you've already used you're 2
fetch_row)/results() assigns, but if you close the connection it will work
again.
-- 
Edit bug report at: http://bugs.php.net/?id=12263&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12262: php.exe - Entry Point Not Found

2001-07-19 Thread mclerc

From: [EMAIL PROTECTED]
Operating system: Windows 2000 Server, IIS5.0
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  php.exe - Entry Point Not Found

After installing PHP4.0.6 over the old PHP 4.0.4, I was getting CGI
Incorrect Header errors from my php websites, so I tried to run PHP.EXE
from the command line to see if that would give a specific error and it
pops up an error window stating below:

php.exe - Entry Point Not Found
The procedure entry point php_output_startup could not be located in the
dynamic link library php4ts.dll

php4ts.dll does exist in the same directory as PHP.EXE, and I have copied
it to %systemroot%\system32.

I am running Windows 2000 Server SP2.
-- 
Edit bug report at: http://bugs.php.net/?id=12262&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12261: xml_parser_get_option doesn't get all option that xml_parser_set_option can set

2001-07-19 Thread francisf

From: [EMAIL PROTECTED]
Operating system: linux rh 6.2 2.2.19
PHP version:  4.0.6
PHP Bug Type: *XML functions
Bug description:  xml_parser_get_option doesn't get all option that 
xml_parser_set_option can set

You can do
xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);

but

 xml_parser_get_option($parser,XML_OPTION_SKIP_WHITE);

will give you 
Warning: xml_parser_get_option: unknown option 

SHouldn't we be able to get it if we can set it?


-- 
Edit bug report at: http://bugs.php.net/?id=12261&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Reworking DOMXML

2001-07-19 Thread Colin Viebrock

> I prefer style #1 as well -- it preserves backward compatability and
> is consistent with the libxml2 docs.

Plus, it is then similar to other PHP functions that use an "object" or
"handle"
as the first argument (e.g. mysql_, fopen, fwrite, curl, etc.).

- Colin


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12260: Compile failure --with-oci8 and Oracle 8.0.4

2001-07-19 Thread michael

From: [EMAIL PROTECTED]
Operating system: Solaris 7 and 8
PHP version:  4.0.6
PHP Bug Type: OCI8 related
Bug description:  Compile failure --with-oci8 and Oracle 8.0.4

Compilation failes --with-oci8 and ORACLE_HOME pointing to oracle 8.0.4
installation. A typedef and define for symbol dword is only available in
oratypes.h of newer Oracle versions (checked with 8.0.5, 8.1.5 and 8.1.7)
.

Solution: change dword to sb4 in ext/oci8/oci8.c, that's still matching the
oracle prototype (orl.h of oracle 8.1.7)

sword OCICollAssignElem(OCIEnv *env, OCIError *err, sb4 index, 
CONST dvoid *elem, 
CONST dvoid *elemind, OCIColl *coll);


gcc error:
oci8.c: In function `php_if_ocicollgetelem':
oci8.c:4480: warning: passing arg 7 of `OCIDateToText' from incompatible
pointer type
oci8.c: In function `php_if_ocicollassignelem':
oci8.c:4604: `dword' undeclared (first use in this function)
oci8.c:4604: (Each undeclared identifier is reported only once
oci8.c:4604: for each function it appears in.)
oci8.c:4604: parse error before `)'
oci8.c:4626: parse error before `)'
oci8.c:4657: parse error before `)'

cheers,
Michael
-- 
Edit bug report at: http://bugs.php.net/?id=12260&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12259: segmentation fault apache - pgsql

2001-07-19 Thread r . bhatia

From: [EMAIL PROTECTED]
Operating system: SuSE 7.2
PHP version:  4.0.5
PHP Bug Type: Apache related
Bug description:  segmentation fault apache - pgsql

php compiled with --with-pgsql=/usr (apache version

pgsql (v7.1.1) compiled with
./configure --enable-locale --with-perl
--with-odbcinst=/usr/local/psql/odbc --with-openssl=/usr/ssl
--enable-syslog

sorry but i cannot post a script which causes this error cause it is
encoded and i dont have access to the source. The only thing i can say is
that as far as i know there isn't a pgsql statement in the script. only
mysql.

result:
[Thu Jul 19 18:30:32 2001] [notice] child pid 13013 exit signal
Segmentation fault (11)

backtrace
Program received signal SIGSEGV, Segmentation fault.
0x40158303 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x40158303 in memcpy () from /lib/libc.so.6
#1  0x400303fe in pqPutBytes () from /usr/local/pgsql/lib/libpq.so.2
#2  0x40030639 in pqPutnchar () from /usr/local/pgsql/lib/libpq.so.2
#3  0x4002e4c7 in PQsendQuery () from /usr/local/pgsql/lib/libpq.so.2
#4  0x4002efa4 in PQexec () from /usr/local/pgsql/lib/libpq.so.2
#5  0x806fd33 in _rollback_transactions (rsrc=0x8176770) at pgsql.c:168
#6  0x80ca335 in zend_hash_apply (ht=0x8141b74, apply_func=0x806fd10
<_rollback_transactions>) at zend_hash.c:692
#7  0x806ff08 in php_rshutdown_pgsql (type=1, module_number=5) at
pgsql.c:246
#8  0x80c6eb6 in module_registry_cleanup (module=0x8166a90) at
zend_API.c:785
#9  0x80ca335 in zend_hash_apply (ht=0x813ea40, apply_func=0x80c6e80
) at zend_hash.c:692
#10 0x80cf1c6 in zend_deactivate_modules () at zend.c:522
#11 0x80609fe in php_request_shutdown (dummy=0x0) at main.c:670
#12 0x805d68f in main (argc=4, argv=0xb8cc) at cgi_main.c:763
#13 0x400f9c6f in __libc_start_main () from /lib/libc.so.

-- 
Edit bug report at: http://bugs.php.net/?id=12259&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11970 Updated: SEPARATE_ZVAL_TO_MAKE_IS_REF doesn't like 0x0

2001-07-19 Thread zeev

ID: 11970
Updated by: zeev
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Scripting Engine problem
Operating System: SuSE7.0
PHP Version: 4.0.6
New Comment:

My initial fix was bogus, as I misdiagnosed what was going on.  The current fix is to 
allow returning of plain variables only (i.e., you can return $arr[$key], but you 
can't return @$arr[$key]).  This means that your script will not work (it'll error 
out), but won't crash either...

Previous Comments:


[2001-07-15 12:48:52] [EMAIL PROTECTED]

Fixed in CVS - thanks for the tiny reproducing script!



[2001-07-09 06:27:49] [EMAIL PROTECTED]

function &erm($key) { 
  return @$arr[$key];
}

$foo = erm('foo');
$bar = erm('bar');

(gdb) run bug3.php
Starting program: /usr/local/bin/php bug3.php

Program received signal SIGSEGV, Segmentation fault.
0x80a29e9 in execute (op_array=0x81d3348) at ./zend_execute.c:1592
1592 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
(gdb) p retval_ptr_ptr
$1 = (zval **) 0x0
(gdb) bt
#0  0x80a29e9 in execute (op_array=0x81d3348) at ./zend_execute.c:1592
#1  0x80a26a8 in execute (op_array=0x81cdf5c) at ./zend_execute.c:1544
#2  0x8097234 in zend_execute_scripts (type=8, file_count=3) at zend.c:752
#3  0x8065b4f in php_execute_script (primary_file=0xb694) at main.c:1206
#4  0x8061173 in main (argc=2, argv=0xb724) at cgi_main.c:718
(gdb) list
1587(opline->op1.op_type != IS_CONST) && 
1588(opline->op1.op_type != IS_TMP_VAR)) {
1589  
1590retval_ptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W);
1591
1592SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
1593
1594(*retval_ptr_ptr)->refcount++;
1595(*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
1596 } else {

notice that the second call [ erm('bar')] actually trigger the segfault.

patch: I dunno, Zeev somebody? :)







Edit this bug report at http://bugs.php.net/?id=11970&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] XML and PHP-4.0.6

2001-07-19 Thread sensei

   Hello,
I don't know if I'm in the right place to say what I have to say...

I use php 4.0.6 on a FreeBSD 4.3 system...
I asked the FreeBSD to configure php to compile with xml...
the phpinfo() screen tells '--with-xml=/usr/local',
so it seems to be ok...
But in fact, the compiler doesn't go into the xml directory...
So there's no xml module compiled...
So there's no xml function available...

What should I do ?

-- 
Le Sensei...

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12258: ns-http won't start: Dies in thread-init code

2001-07-19 Thread sybalsky

From: [EMAIL PROTECTED]
Operating system: Solaris 7
PHP version:  4.0.6
PHP Bug Type: iPlanet related
Bug description:  ns-http won't start: Dies in thread-init code

Compiled PHP with

./configure  --with-nsapi=/opt/netscape --without-mysql --enable-libgcc
--with-tsrm-pth

Set up mime.types & obj.conf per the documentation, and added
/usr/local/lib and /opt/ORACLE/... to the start script library path.

Running the start script gets no response, but a core file is created.  GDB
shows the following stack trace:

#0  0xfed39cf0 in __sigprocmask () from /usr/lib/libthread.so.1
(gdb) 
(gdb) where
#0  0xfed39cf0 in __sigprocmask () from /usr/lib/libthread.so.1
#1  0xfed2f324 in _resetsig () from /usr/lib/libthread.so.1
#2  0xfed2ea48 in _sigon () from /usr/lib/libthread.so.1
#3  0xfed3194c in _thrp_kill () from /usr/lib/libthread.so.1
#4  0xfec39470 in abort () from /usr/lib/libc.so.1
#5  0xfe95d3c4 in ts_resource_read (thread_resources=0x0, id=1496176)
at TSRM.c:320
#6  0xfe95d378 in ts_resource_ex (id=0, th_id=0x16c5f0) at TSRM.c:302
#7  0xfe8d47fc in php4_init (pb=0x0, sn=0x0, rq=0x0) at nsapi.c:494
#8  0xff2660b0 in
__0Fafunc_native_pool_wait_workPFP6GpblockP6HSessionP6HRequest_iUiP6GpblockP6HSessionP6HRequest
() from /netscape/bin/https/lib/libns-httpd40.so
#9  0xff2656d0 in
__0FNfunc_exec_strP6KFuncStructP6GpblockP6HSessionP6HRequest ()
   from /netscape/bin/https/lib/libns-httpd40.so
#10 0xff26597c in INTfunc_exec () from
/netscape/bin/https/lib/libns-httpd40.so
#11 0xff263000 in INTconf_run_init_functions ()
   from /netscape/bin/https/lib/libns-httpd40.so
#12 0x2eeb8 in __0FLmagnus_initP6KPRFileDescPCc ()
#13 0x2f5e4 in main ()

It makes no difference whether I use pthreads or pth, nor whether or not I
compile in OCI-8 support -- the same thing happens.
-- 
Edit bug report at: http://bugs.php.net/?id=12258&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12257: list() construct doesn't work as expected.

2001-07-19 Thread daniel_sevcik

From: [EMAIL PROTECTED]
Operating system: W2000, Debian
PHP version:  4.0.6
PHP Bug Type: Scripting Engine problem
Bug description:  list() construct doesn't work as expected.

1, "test"=>2);
list($xx,$yy)=$tmp;
echo("$xx, $yy");
?>

---Output:start---
1,
---Output:end-

Variable $yy is empty (only if key name is not integer).
$tmp=array(0=>1, 1=>2);
In this case - it works...

Danny
-- 
Edit bug report at: http://bugs.php.net/?id=12257&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12256: Error tracking:pass the line number of the function call instead of fun.defin

2001-07-19 Thread sivasubraj

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Error tracking:pass the line number of the function call instead of 
fun.defin

divide_by(4,2) . "\n"; // ok
print $n->divide_by(4,0) . "\n"; // Here's the error
print numberHandler::divide_by(10,5) . "\n";


/*
A "Division by zero on line 13" error will be reported with the line number
from the inner of the class and there's no way of tracking the real
originator of the error.
How to make it possible to track the origin of the error, like in Java ?
Siva


Author: vincent 
Date:   2001-07-19 05:05:49

Ask the PHP boys to make their product give proper line numbers.\ 
 
The same happens when you give an incorrect number of parameters for a
function. The linenumber will indicate the function definition instead of
the line where you do the function call.

*/

?>

-- 
Edit bug report at: http://bugs.php.net/?id=12256&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12255: (In safe mode) The UID check in chdir don't test the good directory

2001-07-19 Thread benoit

From: [EMAIL PROTECTED]
Operating system: Debian GNU/Linux sid
PHP version:  4.0.6
PHP Bug Type: Directory function related
Bug description:  (In safe mode) The UID check in chdir don't test the good directory

In safe mode, when you chdir a specific directory, it does not test the UID
of directory but the UID of the directory below.

Let's say we do a chdir ("/home/benoit");
In safe mode, it will test the UID of /home against the one of the script
so it fails.

If we do a chdir ("/home/benoit/."); , PHP test the UID of /home/benoit/
against the UID of the script and succeed.

But, logically, the two commands should succeed the same way.

I think it's related to the code in "ext/standard/dir.c" around line 286
:
> if (PG(safe_mode) && !php_checkuid((*arg)->value.str.val, NULL,
CHECKUID_ALLOW_ONLY_DIR)) {
and the way php_checkuid handle CHECKUID_ALLOW_ONLY_DIR.


-- 
Edit bug report at: http://bugs.php.net/?id=12255&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12254: PHP/gd compilation problems - gd.c:95: conflicting types for `gdIOCtx'

2001-07-19 Thread alex

From: [EMAIL PROTECTED]
Operating system: Linux 2.2.19
PHP version:  4.0.6
PHP Bug Type: *Compile Issues
Bug description:  PHP/gd compilation problems - gd.c:95: conflicting types for 
`gdIOCtx'

Using gd 1.8.4 , php 4.0.6

./configure --with-mysql --with-fastcgi --with-gd=/usr/local/
--with-jpeg-dir=/usr/lib/ --enable-ftp --enable-trans-sid

Produces error :

gd.c:95: conflicting types for `gdIOCtx'
/usr/local/include/gd_io.h:18: previous declaration of `gdIOCtx'
gd.c: In function `php_if_imagecreatefromgif':
gd.c:1209: `gdImageCreateFromGif' undeclared (first use in this function)
gd.c:1209: (Each undeclared identifier is reported only once
gd.c:1209: for each function it appears in.)
gd.c: In function `php_if_imagegif':
gd.c:1404: `gdImageGif' undeclared (first use in this function)
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.0.6/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.0.6/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.0.6/ext'
make: *** [all-recursive] Error 1

-- 
Edit bug report at: http://bugs.php.net/?id=12254&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12252 Updated: URL rewriter outputs a spurious " /"

2001-07-19 Thread swm

ID: 12252
Updated by: swm
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Session related
Operating System: linux suse 6.4
PHP Version: 4.0.6
New Comment:

Now closed.

Previous Comments:


[2001-07-19 10:37:52] [EMAIL PROTECTED]

I don't think it is. Here is the code:

static inline void handle_form(STD_PARA)
{
if (ctx->tag.len == 4 && strncasecmp(ctx->tag.c, "form", 4) == 0) {
smart_str_appends(&ctx->result, "result, &ctx->q_name);
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
smart_str_appends(&ctx->result, "\" />");
}
}

You'll notice that it is not a  tag we are adding.
Rather, it is 



[2001-07-19 10:34:02] [EMAIL PROTECTED]

actually that _is_ a bug. form is _not_ an empty element.



[2001-07-19 10:08:38] [EMAIL PROTECTED]

This is not a spurious slash. This slash is present to make PHP XHTML 1.0 compliant. 
See more at: http://www.w3.org/TR/xhtml1/

swm



[2001-07-19 09:29:26] [EMAIL PROTECTED]

the rewriter adds a " /" befor the closing bracket in the  rewriting.
fallowing a diff to patch it.
sincerely Daniel S.

*** ext/standard/url_scanner_ex.c   Thu Jun 21 08:29:04 2001
--- ext/standard/url_scanner_ex_modif.c   Thu Jul 19 14:14:34 2001
*** static inline void handle_form(STD_PARA)
*** 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\" />");
}
  }
--- 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\">");
}
  }





Edit this bug report at http://bugs.php.net/?id=12252&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12252 Updated: URL rewriter outputs a spurious " /"

2001-07-19 Thread swm

ID: 12252
Updated by: swm
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: linux suse 6.4
PHP Version: 4.0.6
New Comment:

I don't think it is. Here is the code:

static inline void handle_form(STD_PARA)
{
if (ctx->tag.len == 4 && strncasecmp(ctx->tag.c, "form", 4) == 0) {
smart_str_appends(&ctx->result, "result, &ctx->q_name);
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
smart_str_appends(&ctx->result, "\" />");
}
}

You'll notice that it is not a  tag we are adding.
Rather, it is 

Previous Comments:


[2001-07-19 10:34:02] [EMAIL PROTECTED]

actually that _is_ a bug. form is _not_ an empty element.



[2001-07-19 10:08:38] [EMAIL PROTECTED]

This is not a spurious slash. This slash is present to make PHP XHTML 1.0 compliant. 
See more at: http://www.w3.org/TR/xhtml1/

swm



[2001-07-19 09:29:26] [EMAIL PROTECTED]

the rewriter adds a " /" befor the closing bracket in the  rewriting.
fallowing a diff to patch it.
sincerely Daniel S.

*** ext/standard/url_scanner_ex.c   Thu Jun 21 08:29:04 2001
--- ext/standard/url_scanner_ex_modif.c   Thu Jul 19 14:14:34 2001
*** static inline void handle_form(STD_PARA)
*** 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\" />");
}
  }
--- 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\">");
}
  }





Edit this bug report at http://bugs.php.net/?id=12252&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12252 Updated: URL rewriter outputs a spurious " /"

2001-07-19 Thread cynic

ID: 12252
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Open
Bug Type: Session related
Operating System: linux suse 6.4
PHP Version: 4.0.6
New Comment:

actually that _is_ a bug. form is _not_ an empty element.

Previous Comments:


[2001-07-19 10:08:38] [EMAIL PROTECTED]

This is not a spurious slash. This slash is present to make PHP XHTML 1.0 compliant. 
See more at: http://www.w3.org/TR/xhtml1/

swm



[2001-07-19 09:29:26] [EMAIL PROTECTED]

the rewriter adds a " /" befor the closing bracket in the  rewriting.
fallowing a diff to patch it.
sincerely Daniel S.

*** ext/standard/url_scanner_ex.c   Thu Jun 21 08:29:04 2001
--- ext/standard/url_scanner_ex_modif.c   Thu Jul 19 14:14:34 2001
*** static inline void handle_form(STD_PARA)
*** 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\" />");
}
  }
--- 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\">");
}
  }





Edit this bug report at http://bugs.php.net/?id=12252&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] function similar to get_html_translation_table

2001-07-19 Thread Jack Dempsey

Hi there,

I've recently had a need for a function that can translate html code
such as  and œ, etc...I've found the trick of flipping the
resulting array from get_html_translation_table and using strtr to
translate characters, but I've found nothing to deal with these other
html quantities. I know I could make a big array myself and make my own
function, but it seems to me that something like this would be useful
for others as well. 
Has anything like this been considered? Is it possible to write code for
it and see if others find it useful?
Any help and thoughts are much appreciated.

Jack Dempsey

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Question regarding zend's _efree implementation

2001-07-19 Thread Holger Zimmermann

Hi Zeev,

> 
> Release build assumes no bugs, and thus doesn't try to help you to solve
> bugs, and favours performance.  In release builds, we don't perform slow
> checking of every memory block.  If an invalid block was passed - it'd
> cause a crash (most probably).  In debug builds, which can be slower, we
> favour stronger debugging capabilities to performance, so we do perform
> these checks.
> 
> Zeev
^^
Ok, so I've to consider that in release build each thread trying to _efree()
something must be the same than the thread called _ealloc(), otherwise the
behaviour isn't checked, thus not defined by PHP/Zend but elsewhere.
The remaining issue is, that in debug builds any _efree() related problem
will be undetected if _efree() rejects the call because of the different
thread id's.
-- 
regards
Holger

TMTOWTDI - There's More Than One Way To Do It - Perl motto
--
Holger 'zimpel' Zimmermann 
--
Wendishain
Germany   
--
http://home.t-online.de/home/zimpel/
http://pi3web.sourceforge.net/

mailto:[EMAIL PROTECTED]
--

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12252 Updated: URL rewriter outputs a spurious " /"

2001-07-19 Thread swm

ID: 12252
Updated by: swm
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Session related
Operating System: linux suse 6.4
PHP Version: 4.0.6
New Comment:

This is not a spurious slash. This slash is present to make PHP XHTML 1.0 compliant. 
See more at: http://www.w3.org/TR/xhtml1/

swm

Previous Comments:


[2001-07-19 09:29:26] [EMAIL PROTECTED]

the rewriter adds a " /" befor the closing bracket in the  rewriting.
fallowing a diff to patch it.
sincerely Daniel S.

*** ext/standard/url_scanner_ex.c   Thu Jun 21 08:29:04 2001
--- ext/standard/url_scanner_ex_modif.c   Thu Jul 19 14:14:34 2001
*** static inline void handle_form(STD_PARA)
*** 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\" />");
}
  }
--- 178,182 
smart_str_appends(&ctx->result, "\" value=\"");
smart_str_append(&ctx->result, &ctx->q_value);
!   smart_str_appends(&ctx->result, "\">");
}
  }





Edit this bug report at http://bugs.php.net/?id=12252&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] URL rewriter outputs a spurious " /"

2001-07-19 Thread dans

From: [EMAIL PROTECTED]
Operating system: linux suse 6.4
PHP version:  4.0.6
PHP Bug Type: Session related
Bug description:  URL rewriter outputs a spurious " /"

the rewriter adds a " /" befor the closing bracket in the  rewriting.
following a diff to patch it.
sincerely Daniel S.

*** ext/standard/url_scanner_ex.c   Thu Jun 21 08:29:04 2001
--- ext/standard/url_scanner_ex_modif.c   Thu Jul 19 14:14:34 2001
*** static inline void handle_form(STD_PARA)
*** 178,182 
 smart_str_appends(&ctx->result, "\"value=\"");
 smart_str_append(&ctx->result,&ctx->q_value);
!smart_str_appends(&ctx->result, "\"/>");
   }
}
--- 178,182 
 smart_str_appends(&ctx->result, "\"value=\"");
 smart_str_append(&ctx->result,&ctx->q_value);
!smart_str_appends(&ctx->result,"\">");
   }
}

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] namespace/package feature in PHP 5?

2001-07-19 Thread Zeev Suraski

At 16:28 19/07/2001, Dean Hall wrote:
>Greetings.
>
>First of all, if anyone can direct me to a centralized place that will tell
>me what features the developers are considering for PHP 5, I'd appreciate
>it.

Language-level things like this one are being discussed at 
[EMAIL PROTECTED]  This feature was actually discussed quite a lot in 
that forum in the last few days, and it will be included in PHP 5.0 (not 
with the :: operator though because of the class conflict, but we'll find 
something else :)

Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Reworking DOMXML

2001-07-19 Thread Paul Marquis

I prefer style #1 as well -- it preserves backward compatability and 
is consistent with the libxml2 docs.

On Thursday 19 July 2001 07:44, Gavin Sherry wrote:
> Hi Joey,
>
> Good to see some work going on with DOMXML =).
>
> On Wed, 18 Jul 2001, Joey Smith wrote:
> > I think it is a good idea to keep both the "procedural"
> > and "object oriented" interfaces in the code.
>
> This should be kept, at least up until a new major PHP release
> occurs.
>
> > Style #1:
> > The dom_document object is always the FIRST parameter to
> > the function, if called as a procedure and NOT as a method
> > on a dom_document object.
> >
> > Pro:
> > This seems cleaner, as the user will ALWAYS know where
> > the object belongs.
> >
> > Con:
> > This might confuse the oop users, as the documentation does
> > not currently clearly distinguish the two interfaces.
>
> I am in favour of this style. Two reasons: it is a loose convention
> in development to have the first argument to a function/procedure
> be the object/variable the function/procedure is primarily
> concerned with. The second reason then stems from this: libxml
> always takes the xml doc pointer as the first argument. A
> difference between the two of them is bad form and could lead to
> confusing code.
>
> > Style #2:
> > The dom_document object is always LAST.
> >
> > Pros:
> > Simplest to implement with code as it currently stands.
> > Seems to be the way many other functions have been written.
> >
> > Cons:
> > User will have to remember all arguments of all functions and
> > pass SOMEthing, even if that means passing NULLs or something.
>
> Not necessarily. But in cases when you cannot easily identify which
> argument is which except by position, this will run against the
> conventional interfacing style of PHP.
>
> Gavin

-- 
Paul Marquis
[EMAIL PROTECTED]

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] namespace/package feature in PHP 5?

2001-07-19 Thread Dean Hall

Greetings.

First of all, if anyone can direct me to a centralized place that will tell
me what features the developers are considering for PHP 5, I'd appreciate
it.

Secondly, I'd like to make a request for real namespace support (a la Perl
or even Java) in PHP 5. I think this is one of the most important new
features to add.

PEAR has attempted to overcome the restrictions of a language without
namespaces, and a lot of wonderful code has been written in PEAR; but a lot
of artificial requirements are enforced in the PEAR standards that would not
be necessary with namespace support.

It would be great if you binary extensions and PHP code itself, both, could
declare themselves as part of a particular namespace.

In the tradition of Perl, as PHP often follows, scope-resolution operator
(::) would be great tokens in a namespace. I know this operator is also used
to call class (i.e., static) methods, but the meaning could remain
consistent if a class name is considered a possible final resolution of a
namespace.

In the tradition of Java, multiple scopes could be specified to avoid
namespace collisions. 'net::php::pear' could be a valid namespace,
'net::php::pear::DB' could specify the DB class, and
'net::php::pear::DB::connect' could indicate that the connect class method
should be called. DNS-based namespaces is just an idea; nothing like this
would be enforced, of course, just encouraged to avoid collisions.

With multiple scopes in a namespace, and just a single directory in the
include_path, including files could be greatly simplified. There could be an
INI directive to specify allowable extensions for PHP module files, and the
statement 'use php::pear::DB;' would include the relative path (for example)
"php/pear/DB.phpm". Also 'include' and 'require' could be used for backward
compatibility. Any module that is 'use'd could have an inherent
'include_once' or 'require_once' quality. Including files directly could
also be allowed for backward compatibility.

For a module to declare itself as part of a particular namespace, it could
say: 'namespace php::pear::DB;'. Also, any script could temporarily change
its namespace by the same method.

I admit that I do not help develop any part of the PHP distribution, but I
would be glad to engage anyone in discussion about this feature; and I would
be glad to help with the design of such a feature.

Thanks for your time.
Dean Hall.



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8784 Updated: using Informix with PHP CGI

2001-07-19 Thread verrue . jean-pierre

ID: 8784
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Informix related
Operating System: AIX 4.3.2
PHP Version: 4.0.4
New Comment:

the 'diff -u' output is :
---
--- ifx.ec  Thu Jul 19 10:34:25 2001
+++ ifx.ec.upd  Thu Jul 19 10:34:25 2001
@@ -351,6 +351,8 @@
 STD_PHP_INI_ENTRY_EX("ifx.max_links", "-1", PHP_INI_SYSTEM,
OnUpdateInt, max_links, php_ifx_globals, ifx_globals,
   display_link_numbers)
+STD_PHP_INI_ENTRY("ifx.default_server", NULL, PHP_INI_SYSTEM,
+   OnUpdateString, default_server, php_ifx_globals, ifx_globals)
 STD_PHP_INI_ENTRY("ifx.default_host", NULL, PHP_INI_SYSTEM,
OnUpdateString, default_host, php_ifx_globals, ifx_globals)
 STD_PHP_INI_ENTRY("ifx.default_user", NULL, PHP_INI_SYSTEM,
@@ -517,9 +519,16 @@
 
 char *hashed_details;
 int hashed_details_length;
+
+static char server[40] ;
+
 IFXLS_FETCH();
 PLS_FETCH();
 
+sprintf(server, "INFORMIXSERVER=%s", IFXG(default_server)) ;
+putenv(server);
+   syslog(LOG_DEBUG, "php:%s", server) ;
+
 if (PG(sql_safe_mode)) {
 if (ZEND_NUM_ARGS()>0) {
 php_error(E_NOTICE,



Previous Comments:


[2001-06-14 11:14:43] [EMAIL PROTECTED]

create a patch file with your changes (diff -u  > )  and send 
it to the PHP mailing lists.

mind you will also want to place the patch here in the bug report, and give a good 
reason why, and sample script to reproduce the bug you are fixing.



[2001-01-18 11:02:37] [EMAIL PROTECTED]

It is not possible to use PHP cgi with NETSCAPE E.S. 3.51 and INFORMIX because it is 
imperatively necessary to have INFORMIXSERVER variable in the environment. Alas the 
environment of scripts cgi is very limited. To be able to use INFORMIX nevertheless, I 
supplemented the file php.ini by adding a parameter 'INFORMIX.default_server' then I 
modified the file ifx.ec in order to read this parameter and to place it in the 
environment Before calling upon 'ifx_connect'. Is it possible to register my 
modifiaction in a permanent way in PHP?





Edit this bug report at http://bugs.php.net/?id=8784&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Question regarding zend's _efree implementation

2001-07-19 Thread Zeev Suraski

At 16:22 19/07/2001, Holger Zimmermann wrote:
>Hi,
>
>I don't understand the purpose of the following code in zend_alloc.c:
>
>8< snip
>
>ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
>{
> zend_mem_header *p = (zend_mem_header *) ((char *)ptr - 
> sizeof(zend_mem_header) - PLATFORM_PADDING);
> DECLARE_CACHE_VARS
> ALS_FETCH();
>
>#if defined(ZTS) && ZEND_DEBUG
> if (p->thread_id != tsrm_thread_id()) {
> printf("efree\n");
> tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block 
> allocated at %s:(%d) on thread %x freed at %s:(%d) on thread %x,
>ignoring",
> p->filename, p->lineno, p->thread_id,
> __zend_filename, __zend_lineno, tsrm_thread_id());
> return;
> }
>#endif
>
> >8 snap
>
>I'm a bit confused about the difference between debug and release builds, 
>if the
>thread calling _efree is different from the thread which allocated the 
>resource.
>The real free stuff follows after the above code snippet, thus in debug mode
>nothing is freed but in release builds everything is going its normal way,
>regardless of this thread issue.
>I looked for a  reproducable Win32 crash in php4ts.dll (4.04, 4.05, 4.06) on
>shutdown with Pi3Web server, which appears only in release builds. The reason
>for the differen behaviour is the above code, because in Pi3Web the thread,
>which cleans up a module is not the same as the startup thread.
>Ok, I patched the code a bit and can now reproduce the crash in debug 
>build too.
>So I was finally able to find the reason in the shutdown code of the 
>bcmath module,
>but this is subject of another discussion.
>
>Any ideas regarding the above issue? I would recommend a consitent behaviour
>regardless of the ZEND_DEBUG setting.

Release build assumes no bugs, and thus doesn't try to help you to solve 
bugs, and favours performance.  In release builds, we don't perform slow 
checking of every memory block.  If an invalid block was passed - it'd 
cause a crash (most probably).  In debug builds, which can be slower, we 
favour stronger debugging capabilities to performance, so we do perform 
these checks.

Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Question regarding zend's _efree implementation

2001-07-19 Thread Holger Zimmermann

Hi,

I don't understand the purpose of the following code in zend_alloc.c:

8< snip

ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - 
sizeof(zend_mem_header) - PLATFORM_PADDING);
DECLARE_CACHE_VARS
ALS_FETCH();

#if defined(ZTS) && ZEND_DEBUG
if (p->thread_id != tsrm_thread_id()) {
printf("efree\n");
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) 
on thread %x freed at %s:(%d) on thread %x,
ignoring",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
return;
}
#endif

>8 snap

I'm a bit confused about the difference between debug and release builds, if the
thread calling _efree is different from the thread which allocated the resource.
The real free stuff follows after the above code snippet, thus in debug mode
nothing is freed but in release builds everything is going its normal way,
regardless of this thread issue.
I looked for a  reproducable Win32 crash in php4ts.dll (4.04, 4.05, 4.06) on
shutdown with Pi3Web server, which appears only in release builds. The reason
for the differen behaviour is the above code, because in Pi3Web the thread,
which cleans up a module is not the same as the startup thread.
Ok, I patched the code a bit and can now reproduce the crash in debug build too.
So I was finally able to find the reason in the shutdown code of the bcmath module,
but this is subject of another discussion.

Any ideas regarding the above issue? I would recommend a consitent behaviour
regardless of the ZEND_DEBUG setting.
--
regards
Holger

TMTOWTDI - There's More Than One Way To Do It - Perl motto
--
Holger 'zimpel' Zimmermann 
--
Wendishain
Germany   
--
http://home.t-online.de/home/zimpel/
http://pi3web.sourceforge.net/

mailto:[EMAIL PROTECTED]
--

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #12251: Error with zend_hash.c after writing a file

2001-07-19 Thread Thies C. Arntzen

On Thu, Jul 19, 2001 at 12:46:40PM -, [EMAIL PROTECTED] wrote:
> From: [EMAIL PROTECTED]
> Operating system: 
> PHP version:  4.0CVS-2001-07-19
> PHP Bug Type: Scripting Engine problem
> Bug description:  Error with zend_hash.c after writing a file
> 
> Fatal error: ht=001262d4 is already destroyed in zend_hash.c:852 in Unknown
> on line 0
> 
> Fatal error: ht=00123ebc is already destroyed in zend_hash.c:519 in Unknown
> on line 0
> 
> Fatal error: ht=00123ebc is already destroyed in zend_hash.c:519 in Unknown
> on line 0
> 
> Fatal error: ht=00123ebc is already destroyed in zend_hash.c:519 in Unknown
> on line 0
> 
> This error appears after writing in a TXT file. But I don't think that the
> script I've written can be the source of this bug.
> 
> function finsert($Nom_script,$tableau,$texte,$i){
> 
> static $fp, $k;   
> $tableau[$i] .= $texte."\n"; 
> $fp = @fopen ($Nom_script, "w"); 
> if (!$fp) return FALSE;
> for ($k=0;$k fclose ($fp);
> return TRUE; 
> }

please try to create a self-contained (=complete) short
testcase for this. 

quick question: did you see a "String is not zero-terminated"
message as well, and if yes what exatly did it say?

tc

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_va riable_reference?

2001-07-19 Thread Marc Boeren



> If you want the values to be connected to each other 
> (changing one will change the other), you need to set 
> is_ref to 1.  Otherwise, you don't.  In 
> any case, you must update the refcount.

OK, thanks. I'll update it now, and once I have my machine back in order
again I'll commit it, so dbx will work again.

Cheerio, Marc.

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12251: Error with zend_hash.c after writing a file

2001-07-19 Thread bjorn . dunk

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0CVS-2001-07-19
PHP Bug Type: Scripting Engine problem
Bug description:  Error with zend_hash.c after writing a file

Fatal error: ht=001262d4 is already destroyed in zend_hash.c:852 in Unknown
on line 0

Fatal error: ht=00123ebc is already destroyed in zend_hash.c:519 in Unknown
on line 0

Fatal error: ht=00123ebc is already destroyed in zend_hash.c:519 in Unknown
on line 0

Fatal error: ht=00123ebc is already destroyed in zend_hash.c:519 in Unknown
on line 0

This error appears after writing in a TXT file. But I don't think that the
script I've written can be the source of this bug.

function finsert($Nom_script,$tableau,$texte,$i){

static $fp, $k; 
$tableau[$i] .= $texte."\n"; 
$fp = @fopen ($Nom_script, "w"); 
if (!$fp) return FALSE;
for ($k=0;$khttp://bugs.php.net/?id=12251&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_va riable_reference?

2001-07-19 Thread Zeev Suraski

At 15:36 19/07/2001, Marc Boeren wrote:

> > >(*actual_ptr)->refcount++;
> > >(*actual_ptr)->is_ref =1;
>
> > (a) You only have to set is_ref once.
>
>I only set it once... or is increasing the refcount enough?

No, if you just increase refcount and is_ref is not set, the values will 
not be referenced to each other (i.e., changing one won't change the other).

> > (b) If you don't increase the refcount, the behavior is
> > undefined, and is likely to end up crashing PHP.
> > Not increasing refcount may actually give
> > you the same behavior as setting is_ref to 1, but it would
> > crash, sooner or later.
>
>What I meant was, without setting _either_ refcount or is_ref (so only the
>hash_update call), it still works with no mem loss.

It's not supposed to work, you may be lucky, but chances are it'd crash.

>So, do I need just the refcount++, or the is_ref=1 as well?

If you want the values to be connected to each other (changing one will 
change the other), you need to set is_ref to 1.  Otherwise, you don't.  In 
any case, you must update the refcount.

Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_va riable_reference?

2001-07-19 Thread Marc Boeren


> >(*actual_ptr)->refcount++;
> >(*actual_ptr)->is_ref =1;

> (a) You only have to set is_ref once.

I only set it once... or is increasing the refcount enough?

> (b) If you don't increase the refcount, the behavior is 
> undefined, and is likely to end up crashing PHP.  
> Not increasing refcount may actually give 
> you the same behavior as setting is_ref to 1, but it would 
> crash, sooner or later.

What I meant was, without setting _either_ refcount or is_ref (so only the
hash_update call), it still works with no mem loss.
So, do I need just the refcount++, or the is_ref=1 as well?

Cheerio, Marc.

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_va riable_referen ce?

2001-07-19 Thread Zeev Suraski

At 14:36 19/07/2001, Marc Boeren wrote:


> > When you build the result hash, use the same zval * in both
> > places (don't forget the right refcount), it should work.
>
> >Yes, just use the same zval *, increase refcount accordingly, and set the
> > is_ref bit.  It'd be much faster (and also more correct) than using the
> > assign_to_variable_reference() function...
>
>OK, could you help me out here?
>
>Can I just do this:
>
>zend_hash_index_find((*row_ptr)->value.ht, col_index, (void **)
>&actual_ptr);
>(*actual_ptr)->refcount++;
>(*actual_ptr)->is_ref =1;
>zend_hash_update((*row_ptr)->value.ht, (*columnname_ptr)->value.str.val,
>(*columnname_ptr)->value.str.len + 1, actual_ptr, sizeof(zval *), NULL);
>
>This seems to work. However, I tried it without the refcount and is_ref
>statements, and it still seems to work... (this is in the 4.0.6 version,
>btw)
>There is no memory loss for both versions...

(a) You only have to set is_ref once.
(b) If you don't increase the refcount, the behavior is undefined, and is 
likely to end up crashing PHP.  Not increasing refcount may actually give 
you the same behavior as setting is_ref to 1, but it would crash, sooner or 
later.

Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12250: Segfault when using FreeTDS connect

2001-07-19 Thread dmit

From: [EMAIL PROTECTED]
Operating system: Linux 2.4.5 Slackware 8.0
PHP version:  4.0.6
PHP Bug Type: Any
Bug description:  Segfault when using FreeTDS connect

Linux 2.4.5 Slackware 8.0

FreeTDS 0.52:
./configure --with-tdsver=4.2 --enable-msdblib --enable-dbmfix
--with-gnu-ld --enable-shared --enable-static 

PHP 4.0.6:
./configure --with-sybase=/usr/local/freetds
--with-openssl=/usr/src/openssl-0.9.6b --with-apache=/usr/src/apache_1.3.20
--with-mysql=/usr/local/mysql/ --enable-track-vars

Apache 1.3.20:
./configure --prefix=/usr/local/apache
--activate-module=src/modules/php4/libphp4.a --disable-module=imap

Configures OK, compilation successfull, then

SYBASE=/usr/local/freetds
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
export SYBASE LD_LIBRARY_PATH
/usr/local/apache/bin/apachectl start

Standard PHP functions work, but when trying to connect to MS SQL 6.5
server Apache segfaults:
[notice] child pid 24856 exit signal Segmentation fault (11)


PHP script used:



And exactly the same:



Any solutions?
Tried to compile PHP with ctlib (--with-sybase-ct=/usr/local/freetds) and
after patching some source to remove -lsybtcl -lcs -lcomn -lintl
compilation went successfull, but finally Apache segfaults the same way.

-- 
Edit bug report at: http://bugs.php.net/?id=12250&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12249: Error compiling Apache 1.3.19

2001-07-19 Thread din

From: [EMAIL PROTECTED]
Operating system: AIX 4.3
PHP version:  4.0.4pl1
PHP Bug Type: Apache related
Bug description:  Error compiling Apache 1.3.19

Hi,

I got a error (bottom) when make "make" after "configure" in Apache 1.3.19.
My system was OK, then I needed install mod_ssl and rebuild Apache, now I
need your help!

Thanks
Jose Antonio Rocha

"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 63.1: 1506-277 (S)
Syntax error: possible missing ';' or ','?
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 62.8: 1506-485 (S)
Parameter declaration list is incompatible with declarator for inline.
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 68.9: 1506-276 (S)
Syntax error: possible missing '{'?
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 72.9: 1506-273 (E)
Missing type in declaration of errno.
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 73.9: 1506-273 (E)
Missing type in declaration of local_lval.
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 73.35: 1506-045 (S)
Undeclared identifier end_ptr.
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 73.29: 1506-045 (S)
Undeclared identifier str.
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 73.22: 1506-221 (S)
Initializer must be a valid constant expression.
"/usr/include/dlfcn.h", line 67.9: 1506-236 (W) Macro name RTLD_LAZY has
been redefined.
"/usr/include/dlfcn.h", line 67.9: 1506-358 (I) "RTLD_LAZY" is defined on
line 63 of /usr/install/php-4.0.4pl1/Zend/zend.h.
"/usr/include/dlfcn.h", line 71.9: 1506-236 (W) Macro name RTLD_GLOBAL has
been redefined.
"/usr/include/dlfcn.h", line 71.9: 1506-358 (I) "RTLD_GLOBAL" is defined on
line 67 of /usr/install/php-4.0.4pl1/Zend/zend.h.
"/usr/install/php-4.0.4pl1/Zend/zend_operators.h", line 74.9: 1506-046 (S)
Syntax error.
make: The error code from the last command is 1.


Stop.
make: The error code from the last command is 1.
-- 
Edit bug report at: http://bugs.php.net/?id=12249&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Reworking DOMXML

2001-07-19 Thread Gavin Sherry

Hi Joey,

Good to see some work going on with DOMXML =).

On Wed, 18 Jul 2001, Joey Smith wrote:

> I think it is a good idea to keep both the "procedural"
> and "object oriented" interfaces in the code.

This should be kept, at least up until a new major PHP release occurs.

> Style #1:
> The dom_document object is always the FIRST parameter to
> the function, if called as a procedure and NOT as a method
> on a dom_document object.
> 
> Pro:
> This seems cleaner, as the user will ALWAYS know where
> the object belongs.
> 
> Con:
> This might confuse the oop users, as the documentation does
> not currently clearly distinguish the two interfaces.

I am in favour of this style. Two reasons: it is a loose convention in
development to have the first argument to a function/procedure be the
object/variable the function/procedure is primarily concerned with. The
second reason then stems from this: libxml always takes the xml doc
pointer as the first argument. A difference between the two of them is bad
form and could lead to confusing code.

> Style #2:
> The dom_document object is always LAST.
> 
> Pros:
> Simplest to implement with code as it currently stands.
> Seems to be the way many other functions have been written.
> 
> Cons:
> User will have to remember all arguments of all functions and
> pass SOMEthing, even if that means passing NULLs or something.

Not necessarily. But in cases when you cannot easily identify which
argument is which except by position, this will run against the
conventional interfacing style of PHP.

Gavin


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_va riable_referen ce?

2001-07-19 Thread Marc Boeren



> When you build the result hash, use the same zval * in both 
> places (don't forget the right refcount), it should work.

>Yes, just use the same zval *, increase refcount accordingly, and set the 
> is_ref bit.  It'd be much faster (and also more correct) than using the 
> assign_to_variable_reference() function...

OK, could you help me out here? 

Can I just do this:

zend_hash_index_find((*row_ptr)->value.ht, col_index, (void **)
&actual_ptr);
(*actual_ptr)->refcount++;
(*actual_ptr)->is_ref =1;
zend_hash_update((*row_ptr)->value.ht, (*columnname_ptr)->value.str.val,
(*columnname_ptr)->value.str.len + 1, actual_ptr, sizeof(zval *), NULL);

This seems to work. However, I tried it without the refcount and is_ref
statements, and it still seems to work... (this is in the 4.0.6 version,
btw)
There is no memory loss for both versions...

Cheerio, Marc.

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12248: Page hangs as soon as I have added the _gd extension in php.ini

2001-07-19 Thread ake . lundsten

From: [EMAIL PROTECTED]
Operating system: Win 95
PHP version:  4.0.6
PHP Bug Type: GD related
Bug description:  Page hangs as soon as I have added the _gd extension in php.ini

I have modified the php.ini file to include the php_gd extension.
As soon as I have done that it is not possible to execute pages with php
code on them.
If i kill the hanging php process, add the ';' in php.ini it works again.

I run the precompiled widows php version currently on the web.

I put the php_gd.dll in the windows directory and modified the
extensions_dir=c:\windows

I run Apache 1.3.20



-- 
Edit bug report at: http://bugs.php.net/?id=12248&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12247: ternary ?: loses references

2001-07-19 Thread nick

From: [EMAIL PROTECTED]
Operating system: Solaris
PHP version:  4.0.6
PHP Bug Type: Variables related
Bug description:  ternary ?: loses references

This may be a subtlety of the ?: operator that I failed to spot - then
again it may just be a bug.
Using ?: with references loses the reference, as the example below
illustrates.  In both cases a reference to the second argument to a
function should be returned, the result modified and the original argument
displayed. The expectation being that it has now changed. When the
reference is returned from and if-then-else statement all is fine. When the
reference is, or isn't?, returned from ?: the result is not as expected.

The output from the code is
[1] [xx]
[1] [2]

function &return_ref(&$arg1, &$arg2, $cond)
{
   if ($cond) { return $arg1; } else { return $arg2; }
}

function &return_ref_ternary(&$arg1, &$arg2, $cond)
{
   return ($cond ? $arg1 : $arg2);
}

$arg1 = '1'; $arg2 = '2';
$res =& return_ref($arg1, $arg2, false);
$res = 'xx';
echo "[$arg1] [$arg2]\n";

$arg1 = '1'; $arg2 = '2';
$res =& return_ref_ternary($arg1, $arg2, false);
$res = 'xx';
echo "[$arg1] [$arg2]\n";


-- nick



-- 
Edit bug report at: http://bugs.php.net/?id=12247&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] CVS Account Request

2001-07-19 Thread CVS Account Request

Full name: Marco Cucinato
Email: [EMAIL PROTECTED]
ID:cucinato
Purpose:   I\'m one of the italian translators of phpdoc tree, I\'m maintaining three 
sections and I\'m going to get some more. 
I would update the sections directly without passing through Luca Perigini (Luca 
himself suggested me to ask for the account).

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12245: gettype(true && true) returns "integer"!

2001-07-19 Thread nick

From: [EMAIL PROTECTED]
Operating system: Solaris
PHP version:  4.0.6
PHP Bug Type: Variables related
Bug description:  gettype(true && true) returns "integer"!

The && operator (and ||) returns an integer value even when both arguments
are boolean. Thus the following code:

function is_true($val)
{
   return (is_bool($val) && $val);
}

echo (is_true(true) ? 'T' : 'F'),"\n";
echo (is_true(is_true(true)) ? 'T' : 'F'),"\n";

gives

T
F

-- Nick


-- 
Edit bug report at: http://bugs.php.net/?id=12245&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_va riable_referen ce?

2001-07-19 Thread Zeev Suraski

Yes, just use the same zval *, increase refcount accordingly, and set the 
is_ref bit.  It'd be much faster (and also more correct) than using the 
assign_to_variable_reference() function...

Zeev

At 12:30 19/07/2001, Stanislav Malyshev wrote:
>MB>> I want the fieldname to be a true reference to the value, so
>MB>> if I modify dbx_result->data[0][0] (in a php-script, I mean),
>MB>> and access it through dbx_result->data[0]['fieldname'], I
>MB>> want to get the modified value.
>
>When you build the result hash, use the same zval * in both places (don't
>forget the right refcount), it should work.
>
>--
>Stanislav Malyshev, Zend Products Engineer
>[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115
>
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Zeev Suraski <[EMAIL PROTECTED]>
CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] mail() and windows

2001-07-19 Thread Hartmut Holzgraefe

colin mcdonald wrote:
> I've been reading about (and experiencing) the problems with sending
> mail on windows.


 
> Question:  Are there any plans in the near future to clean/rewrite this
> code?  I keep seeing the comment that "mail() badly needs a rewrite on
> windows".

somehow,
i have plans to rewrite the mail() stuff altogether to have a *working*
SMTP implementation on Windows and the option to use SMTP on UNIX
but i have no spare time right now and still no working windows dev
system
 
> Question(s):  If there are no plans in the near future, how can I help?
>   What needs to be rewritten (besides the obvious handling Bcc header
> and making the header case-insensitive)?  I've been experiencing
> problems when sending attachments that are slightly longer than 2kb.
> What would need to be rewritten to get this working.  Is it a lower
> level than the code in php (ie win sockets)?

the whole php4/win32/sendmail.c file looks like a quick hack or like
someone not really knowing the RFCs did it
but as far as i can tell it uses BSD socket functions like connect(),
send() and receive() only and nothing winsock-specific 



-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_variable_referen ce?

2001-07-19 Thread Stanislav Malyshev

MB>> I want the fieldname to be a true reference to the value, so
MB>> if I modify dbx_result->data[0][0] (in a php-script, I mean),
MB>> and access it through dbx_result->data[0]['fieldname'], I
MB>> want to get the modified value.

When you build the result hash, use the same zval * in both places (don't
forget the right refcount), it should work.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_variable_referen ce?

2001-07-19 Thread Marc Boeren


> It's kind-of odd that you use this function in a module, it's 
> not really an 
> API function that's useful outside the context of the engine. 
>  Are you sure 
> that's the right thing to do in there..?

Well, I'm no expert on the zend engine or anything, but I can 
describe what I try to achieve...

As the return-value of a function I create an object 
containing an array. The array-values are accessible through 
an index and a name, like

dbx_result->data[0][0] 
and
dbx_result->data[0]['fieldname']

I want the fieldname to be a true reference to the value, so 
if I modify dbx_result->data[0][0] (in a php-script, I mean), 
and access it through dbx_result->data[0]['fieldname'], I 
want to get the modified value.
For this, the zend_assign_to_variable_reference works fine. 

If you know another function that gives me the same 
functionality, I'd be happy too :-)

Cheerio, Marc.

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Zend engine: unresolved external _zend_assign_to_variable_referen ce?

2001-07-19 Thread Zeev Suraski

It's kind-of odd that you use this function in a module, it's not really an 
API function that's useful outside the context of the engine.  Are you sure 
that's the right thing to do in there..?

Zeev


At 11:58 19/07/2001, Marc Boeren wrote:

>Hi,
>
>If I build the dbx module I get the following error:
>
>dbx.obj : error LNK2001: unresolved external symbol
>_zend_assign_to_variable_reference
>..\..\Release_TS/php_dbx.dll : fatal error LNK1120: 1 unresolved externals
>
>This is with a clean checkout of php4, zend and tsrm on a windows box.
>I noticed that the zend_assign_to_variable_reference implementation has
>changed between the 4.0.6 and the current cvs.
>
>4.0.6 zend_execute.h:
>
>static inline void zend_assign_to_variable_reference(znode *result, zval
>**variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC) {
>...
>}
>
>4.0.7-dev cvs  zend_execute.h:
>
>void zend_assign_to_variable_reference(znode *result, zval
>**variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
>(implemented in zend_execute.c)
>
>If I change the new code to
>
>ZEND_API void zend_assign_to_variable_reference(znode *result, zval
>**variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
>
>everything builds correctly, again.
>I'm not sure if this has any side-effect, so if someone could look it over
>and commit this patch (or something similar), I'd be happy.
>
>Cheerio, Marc.
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Zeev Suraski <[EMAIL PROTECTED]>
CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] ZEND_DEBUG issue (more)

2001-07-19 Thread Marc Boeren


Hi,

I forgot to mention that I run WinNT4sp6...

Cheerio, Marc.

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Zend engine: unresolved external _zend_assign_to_variable_reference?

2001-07-19 Thread Marc Boeren


Hi,

If I build the dbx module I get the following error:

dbx.obj : error LNK2001: unresolved external symbol
_zend_assign_to_variable_reference
..\..\Release_TS/php_dbx.dll : fatal error LNK1120: 1 unresolved externals

This is with a clean checkout of php4, zend and tsrm on a windows box.
I noticed that the zend_assign_to_variable_reference implementation has
changed between the 4.0.6 and the current cvs. 

4.0.6 zend_execute.h:

static inline void zend_assign_to_variable_reference(znode *result, zval
**variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC) {
...
}

4.0.7-dev cvs  zend_execute.h:

void zend_assign_to_variable_reference(znode *result, zval
**variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
(implemented in zend_execute.c)

If I change the new code to 

ZEND_API void zend_assign_to_variable_reference(znode *result, zval
**variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);

everything builds correctly, again.
I'm not sure if this has any side-effect, so if someone could look it over
and commit this patch (or something similar), I'd be happy.

Cheerio, Marc.

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Help wanted: Operator -> and a class in a PHP extension

2001-07-19 Thread David Eriksson

Quoting David Eriksson <[EMAIL PROTECTED]>:

> First, look att this piece of pure PHP code:
> 
> 
> 
>  
> class S
> {
> var $a;
> var $x;
> }
> 
> $s1 = new S();
> $s1->a = 42;
> 
> $s2 = new S();
> 
> $s2->a = 4711;
> $s2->x = $s1;
> 
> echo $s1->a."\n";
> 
> $s3 = $s2->x;
> echo $s3->a."\n";
> 
> echo $s2->x->a."\n";
> 
> ?>
> 
> 
> 
> All three of the "echo" lines above will output the value 42.
> 
> Now consider the same code, but S is class in a PHP extension that has
> implemented the handle_property_get function to retrieve properties.
> 
> This time, the last echo line will get the value of $s1->a and not
> $s2->a.
> 
> handle_property_get is only called on the $s1 instance and not on the
> $s2
> instance of the object.
> 
> I will write a PHP extension that just shows this "feature".

Now that I have written the special extension to test this, I am beginning to
suspekt an error in the way I treat the zend_property_reference parameter passed
to the handlers that get/set properties.

Would someone who be able to explain this structure to me? Maybe Zeev? :-)

I'll read the source meanwhile... :-)

Regards,

-\- David Eriksson -/-

"An expert in a particular computer language is really an expert
in the work-arounds necessary to use this language to perform
useful work." - Richard B. Johnson

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] ZEND_DEBUG issue

2001-07-19 Thread Marc Boeren


Hi, 

I noticed something really odd with a fresh cvs checkout of php4, zend en
tsrm: if I compile the Release_TS php4ts project and the Release_TS mssql
module, I get the following error when I try to run php:

mssql: Unable to initialize module
Module compiled with debug=0, thread-safety=1 module API=20001222
PHP compiled with debug=1, thread-safety=1 module API=20001222
These options need to match

I _did_ compile the php4ts in Release_TS, (and ZEND_DEBUG _is_ set to 0), so
how come it says PHP is compiled with debug=1???
I looked at the code that generates this message, and it just inserts
ZEND_DEBUG on that spot, and ZEND_DEBUG is set to 0 in the project. 
Does anyone else have this, or is my machine broken somehow?

Cheerio, Marc.

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] $argv and $argc registration

2001-07-19 Thread Zeev Suraski

ini_set() cannot be used to handle register_globals or register_argc_argv, 
because by the time this function gets called - it's already 'too late' for 
doing these tasks.  You have to use a method of setting these directives 
before the script even begins to execute, via php.ini, httpd.conf or .htaccess.

Zeev

At 10:49 19/07/2001, J. Jones wrote:
>I am not subscribed to this list, so please CC: or reply directly to me.
>Thanks!
>
>I may be doing something wrong.. I'm not real sure.  Neither $argc or $argv
>seem to be registered with the cgi version of php 4.0.6 and up.
>
>The test script:
>ini_set ('register_globals', 1);
>ini_set ('register_argc_argv', 1);
>var_dump ($argc);
>var_dump ($argv);
>?>
>
>exits with the following:
>
>Warning: Undefined variable:  argc in ./foo.php on line 5
>NULL
>
>Warning: Undefined variable:  argv in ./foo.php on line 6
>NULL
>
>regardless of any command line options passed to it.
>
>Older scripts that work fine with php 4.0.5 fail with 4.0.6, with identical
>build options and php.ini settings.  The above script also behaves as expected
>on php 4.0.5.
>
>Any ideas? Am I missing something? Does this work for other people?
>
>--
>Jeremy
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Zeev Suraski <[EMAIL PROTECTED]>
CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12244 Updated: Short form of if-clause

2001-07-19 Thread cynic

ID: 12244
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: RedHat Linux 7.0
PHP Version: 4.0.6
New Comment:

please read the trinary op. man page carefully. you obvously misunderstood its purpose.

Previous Comments:


[2001-07-19 04:12:58] [EMAIL PROTECTED]

Hi there,

not a bug, but a suggestion:

if ($foo==4) $foo=3;

in short form:

$foo==4 ? $foo=3 : 1;

it would be nice if that where possible:

$foo==4 ? $foo=3; (without else string)

i didnt know where to post else. please cc to me cauze i'm not on the list.






Edit this bug report at http://bugs.php.net/?id=12244&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12244: Short form of if-clause

2001-07-19 Thread soenke

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 7.0
PHP version:  4.0.6
PHP Bug Type: Scripting Engine problem
Bug description:  Short form of if-clause

Hi there,

not a bug, but a suggestion:

if ($foo==4) $foo=3;

in short form:

$foo==4 ? $foo=3 : 1;

it would be nice if that where possible:

$foo==4 ? $foo=3; (without else string)

i didnt know where to post else. please cc to me cauze i'm not on the
list.

-- 
Edit bug report at: http://bugs.php.net/?id=12244&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #12223: ldap rebind procedure implementation

2001-07-19 Thread Enrik Berkhan

On Wed, Jul 18, 2001 at 02:41:56AM -0700, Ron Chmara wrote:
> [EMAIL PROTECTED] wrote:
> > A ldap rebind procedure for automatical referral chase is
> > not provided in php4. The solution of #9704 doesn't work
> > "ldap result". This is an inherent problem with synchronous
> > ldap calls.

> a) post the patch to thE PHP-DEV list.
> b) apply for a CVS account to /ext/ldap
> c) also create a patch for the documentation...  referral

Thanks for your hints.

You can download a) from
http://sites.inka.de/~W1022/software/php/ldap_rebind.patch

and c) from
http://sites.inka.de/~W1022/software/php/ldap_rebind_doc.patch

Please have someone a look at the code and especially check my usage
of the Zend API as this is my first php extension.

I have to apologize for the documentation because it is very preliminary,
no code example and even not checked if the xml is correct due to the lack
of time (exams ...). Still I think it's better than nothing.

Of course any suggestions are welcome.

Enrik

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] $argv and $argc registration

2001-07-19 Thread J. Jones

I am not subscribed to this list, so please CC: or reply directly to me.
Thanks!

I may be doing something wrong.. I'm not real sure.  Neither $argc or $argv
seem to be registered with the cgi version of php 4.0.6 and up.

The test script:


exits with the following:

Warning: Undefined variable:  argc in ./foo.php on line 5
NULL

Warning: Undefined variable:  argv in ./foo.php on line 6
NULL

regardless of any command line options passed to it.

Older scripts that work fine with php 4.0.5 fail with 4.0.6, with identical
build options and php.ini settings.  The above script also behaves as expected
on php 4.0.5.

Any ideas? Am I missing something? Does this work for other people?

--
Jeremy


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]