[PHP-DEV] widestring variable possible in php?

2002-06-26 Thread Derek Aschenbrenner

I am trying to assign a widestring to a variable in php?  Is it possible
to create a widestring variable?


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




[PHP-DEV] Feature request: anonymous usage of returned values

2002-04-19 Thread Derek Moore

I've been playin' around with Horde and IMP lately...  And I've done a lot of 
PHP and Perl work in the past...  One of the things I really like about PHP is 
how it has most of the really cool features of Perl that I enjoy, but lacks 
some of the things that annoy me about Perl.

I was making some modifications to IMP's configurations when I tried to use a 
feature of Perl that I thought for sure would have been carried over to PHP.

I'm not sure the exact vernacular to describe this feature, but Perl allows 
you to anonymously use whatever was returned by a function--e.g., $year = 
(localtime($time))[5], so $year takes only the year value of the data returned 
by localtime() instead of the entire array.

In IMP I was trying to do:

$conf['spam']['email'] = 'postmaster@' . (posix_uname())['nodename'];

But instead I have to do:

$uname = posix_uname();
$conf['spam']['email'] = 'postmaster@' . $uname['nodename'];


I realize this is nitpicking a little bit, but being able to handle returned 
values in such a manner is quite, quite useful.  Or does PHP provide this 
functionality through some other syntax?

Anyways, I just thought I'd say somethin' about it.  Btw, please reply-to-all, 
as I'm not subscribed to this list.

Okay, I'm done now,

Derek

[ derek p. moore ]---[ http://hackunix.org/~derekm/pubkey.asc ]
[ [EMAIL PROTECTED] ][ bfd2 fad6 1014 80c9 aaa8 ]
[ http://hackunix.org/~derekm/ ]---[ a4a0 f449 3461 a443 51b9 ]

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




[PHP-DEV] Bug #15186: define/mysql_connect problem

2002-01-23 Thread derek

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.1.1
PHP Bug Type: MySQL related
Bug description:  define/mysql_connect problem

Previous to version 4.1.1, using define() to define a handle to a MySQL
connection worked fine:

define(DB, mysql_connect(host,user,pass));

In PHP 4.1.1, if the above is done, then the script will hang for a long
time (for a minute or so) if other mysql connections are attempted to be
made.

i.e.:

function hang_mysql()
{
  define(DB1, mysql_connect(host,user,pass));
  define(DB2, mysql_connect(host,user,pass));
}

function doesnt_hang()
{
  $db1 = mysql_connect(host,user,pass);
  $db2 = mysql_connect(host,user,pass);
}

This wasn't a problem in PHP 4.0.6 and older versions.

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


-- 
PHP Development Mailing List http://www.php.net/
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 #13208 Updated: problems using old .php3 extension - general protection faults

2001-10-20 Thread Derek Meek

Server Side Included

Bug Database wrote:

ID: 13208
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Apache related
Operating System: Windows 2000 Professional, updat
PHP Version: 4.0.6
New Comment:

Please explain what you mean by SSI'ed ?


Previous Comments:


[2001-09-07 19:47:39] [EMAIL PROTECTED]

on apache 1.3.20
PHP 4.0.6

Windows 32 bit (Windows 2000, Service Packs 1  2)

having php handle both .php3

AddType application/x-httpd-php .php .php3

causes a GPF when the script is SSI'ed





ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=13208edit=2



-- 
Derek Kazan Meek

God is dead. - Nietzsche

---
Staff Programmer for FreeSpace 2: The Babylon Project
http://freespace.volitionwatch.com/babylon/
---
Founder Alliance Productions
Programmer: AP FreeSpace 2 Kit, AP Red Faction Kit
http://alliance.sourceforge.net
---
UT: ZEB Clan Web Coordinator




-- 
PHP Development Mailing List http://www.php.net/
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 #12518 Updated: ocifreestatment doesn't free the Oracle cursor and so you run out of cursors

2001-08-06 Thread derek

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

I have a long-running PHP script that eventually comes up with: 

Failed execution, error: ORA-00604: error occurred at recursive SQL level 2 ORA-01000: 
maximum open cursors exceeded.

I don't explicitly use any cursors in this script btw. In addition I found (via a web 
search) that someone else has been experiencing the same thing.

However, in response to your request I've been trying to build a test script to leak 
cursors and reproduce the problem, unfortunately, thus far, even deliberately leaking 
cursors is not producing it. :(


Previous Comments:


[2001-08-01 16:18:03] [EMAIL PROTECTED]

what makes you belive it doesn't work?

please send me a short testcase that shows leakage of 
resources.






[2001-08-01 13:20:01] [EMAIL PROTECTED]

the ocifreestatment function doesn't actually free the Oracle cursor, these are only 
freed when the script exits.

While this isn't a problem when using PHP as a web page it is a problem if you have a 
command line script that has to perform thousands (or tens of thousands) of queries 
eventually the open_cursors limit is exceeded and all further queries fail.

The same appears to be true with connections.





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


-- 
PHP Development Mailing List http://www.php.net/
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 #12518 Updated: ocifreestatment doesn't free the Oracle cursor and so you run out of cursors

2001-08-06 Thread derek

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

With the help of v$open_cursor I've tracked down the problem and it was a case of user 
error, my apologies for having taken up your time.


Previous Comments:


[2001-08-06 12:59:04] [EMAIL PROTECTED]

I have a long-running PHP script that eventually comes up with: 

Failed execution, error: ORA-00604: error occurred at recursive SQL level 2 ORA-01000: 
maximum open cursors exceeded.

I don't explicitly use any cursors in this script btw. In addition I found (via a web 
search) that someone else has been experiencing the same thing.

However, in response to your request I've been trying to build a test script to leak 
cursors and reproduce the problem, unfortunately, thus far, even deliberately leaking 
cursors is not producing it. :(




[2001-08-01 16:18:03] [EMAIL PROTECTED]

what makes you belive it doesn't work?

please send me a short testcase that shows leakage of 
resources.






[2001-08-01 13:20:01] [EMAIL PROTECTED]

the ocifreestatment function doesn't actually free the Oracle cursor, these are only 
freed when the script exits.

While this isn't a problem when using PHP as a web page it is a problem if you have a 
command line script that has to perform thousands (or tens of thousands) of queries 
eventually the open_cursors limit is exceeded and all further queries fail.

The same appears to be true with connections.





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


-- 
PHP Development Mailing List http://www.php.net/
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 #12518: ocifreestatment doesn't free the Oracle cursor and so you run out of cursors

2001-08-01 Thread derek

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: OCI8 related
Bug description:  ocifreestatment doesn't free the Oracle cursor and so you run out of 
cursors

the ocifreestatment function doesn't actually free the Oracle cursor, these
are only freed when the script exits.

While this isn't a problem when using PHP as a web page it is a problem if
you have a command line script that has to perform thousands (or tens of
thousands) of queries eventually the open_cursors limit is exceeded and all
further queries fail.

The same appears to be true with connections.
-- 
Edit bug report at: http://bugs.php.net/?id=12518edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8686: Starting a session corrupts reading of external files.

2001-01-12 Thread derek

From: [EMAIL PROTECTED]
Operating system: Linux AES.MandrakeSoft.com 2.2.17-21mdk
PHP version:  4.0.3pl1
PHP Bug Type: *Session related
Bug description:  Starting a session corrupts reading of external files.

When I begin a session, using "session_start()" and then read in a file using file(), 
readfile(), or require(), the contents of the file get corrupted with double quote 
characters.

Here's a sample file to read in (name it "test_file.txt"):
a.b=[]

Here's a PHP webpage that displays corrupted output:
?php

session_start();
readfile( 'test_file.txt' );

?

The corrupted output is:
a.b="[]"

If the call to session_start() is removed from the above script, the output matches 
the sample file contents.

Also if any of the characters are removed from the sample file, the readfile() works 
fine, so there's something specific to the text in the sample file that disagrees with 
session_start().

FYI, the sample file is small section of javascript in an HTML file I am using.  I 
pared down the javascript/HTML to this small section that was getting corrupted.  I'm 
trying to echo different HTML files depending on session variables I set. 


-- 
Edit Bug report at: http://bugs.php.net/?id=8686edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]