Re: [PHP-DEV] Question for Zeev, Zak or Georg - mysql_query andpossible integer overflow?

2003-03-26 Thread Matt Flaherty
Thanks guys for your feedback. With regard to PEAR, I've had to patch
PEAR::DB::mysql to solve another problem I've had with the
prepared_queries field growing steadily. I'm sure this is also a problem
with the either DB subclasses. I'll post my patch to pear-dev as I don't
have a CVS account yet.

-Matt



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



[PHP-DEV] Question for Zeev, Zak or Georg - mysql_query and possible integeroverflow?

2003-03-25 Thread Matt Flaherty
Hi,

I have a question for the authors of the mysql extension. I'm sure you
gentlemen are very busy, but I'd appreciate your insight if you can
spare a moment. I'm developing a stand-alone php application running in
an infinite loop from the command line interface. A mysql database is
polled continually for new rows to deal with. The same query is executed
several times in one second. I've noticed that whether or not a query
resource is freed the next query identifier returned from mysql_query()
is ++ the last one. I'm sure this is by design and governed by the mysql
driver. Naturally I'm concerned about integer overflow when the the
application has been running uninterrupted for a very long time. I don't
think I can wait around while a test script runs to see what happens
after 4,294,967,295 is exceeded though! Can anyone tell me with
certainty or hazard a guess what might happen here? I thank you very
much for your time.

Matt

ps - I'm doing this through PEAR::DB::mysql
-- 
Matt Flaherty [EMAIL PROTECTED]
Boltblue International Ltd.


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



Re: [PHP-DEV] Question for Zeev, Zak or Georg - mysql_query andpossible integer overflow?

2003-03-25 Thread Wez Furlong
Hi Matt,

Yes, there is a risk of overflow.
From my understanding, the id is signed, so you will hit overflow at 2G
rather than 4G resources.
This applies to any/all PHP/ZE resources.

I'm not sure what happens when it overflows; it seems like the query
would fail.

You could design your application so that it re-runs itself when the
query fails (pcntl_exec(), or one of the other execution functions).

--Wez.

On Tue, 25 Mar 2003, Matt Flaherty wrote:

 Hi,

 I have a question for the authors of the mysql extension. I'm sure you
 gentlemen are very busy, but I'd appreciate your insight if you can
 spare a moment. I'm developing a stand-alone php application running in
 an infinite loop from the command line interface. A mysql database is
 polled continually for new rows to deal with. The same query is executed
 several times in one second. I've noticed that whether or not a query
 resource is freed the next query identifier returned from mysql_query()
 is ++ the last one. I'm sure this is by design and governed by the mysql
 driver. Naturally I'm concerned about integer overflow when the the
 application has been running uninterrupted for a very long time. I don't
 think I can wait around while a test script runs to see what happens
 after 4,294,967,295 is exceeded though! Can anyone tell me with
 certainty or hazard a guess what might happen here? I thank you very
 much for your time.

 Matt

 ps - I'm doing this through PEAR::DB::mysql
 --
 Matt Flaherty [EMAIL PROTECTED]
 Boltblue International Ltd.


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




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



Re: [PHP-DEV] Question for Zeev, Zak or Georg - mysql_query andpossible integer overflow?

2003-03-25 Thread Matt Flaherty
Thanks Wez,

If all that happens is the query will fail, I can live with that. It's a
simple SELECT query called over and over again. If the integer wraps
around negative, I'm guessing that would probably have undesirable
effects. If not, then I can let it run forever. What I don't want is
something like a segfault. I'm considering making the application
restart itself periodically to clear out the cobwebs.

-Matt

On Tue, 2003-03-25 at 14:12, Wez Furlong wrote:
 Hi Matt,
 
 Yes, there is a risk of overflow.
 From my understanding, the id is signed, so you will hit overflow at 2G
 rather than 4G resources.
 This applies to any/all PHP/ZE resources.
 
 I'm not sure what happens when it overflows; it seems like the query
 would fail.
 
 You could design your application so that it re-runs itself when the
 query fails (pcntl_exec(), or one of the other execution functions).
 
 --Wez.
 


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



Re: [PHP-DEV] Question for Zeev, Zak or Georg - mysql_query and possible integer overflow?

2003-03-25 Thread Zak Greant
On Tue, Mar 25, 2003 at 01:50:17PM +, Matt Flaherty wrote:
 Hi,
 
 I have a question for the authors of the mysql extension. I'm sure you
 gentlemen are very busy, but I'd appreciate your insight if you can
 spare a moment. I'm developing a stand-alone php application running in
 an infinite loop from the command line interface. A mysql database is
 polled continually for new rows to deal with. The same query is executed
 several times in one second. I've noticed that whether or not a query
 resource is freed the next query identifier returned from mysql_query()
 is ++ the last one. I'm sure this is by design and governed by the mysql
 driver. Naturally I'm concerned about integer overflow when the the
 application has been running uninterrupted for a very long time. I don't
 think I can wait around while a test script runs to see what happens
 after 4,294,967,295 is exceeded though! Can anyone tell me with
 certainty or hazard a guess what might happen here? I thank you very
 much for your time.

  The query that generates an auto_increment value larger than the largest
  value allowed for the column will fail with error 1062 (Duplicate
  entry 'xxx' for key 1)

 Matt
 
 ps - I'm doing this through PEAR::DB::mysql

  I am not exactly sure how PEAR::DB will propagate this error through
  its error handling interface.

  An easy way to test this is to create a temporary table that has a
  TINYINT as its auto_incrementing primary key, fill the table up and
  then watch to see what breaks.
  
  Cheers!
  --zak

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



[PHP-DEV] Is this a bug?

2003-03-25 Thread Tony Bibbs
Are there instances you all can think of where doing a header('location: 
$url'); causes a loss of all session data?  I have a case I can reproduce 
consistently where doing a header() refresh or echoing out an HTML page 
with a meta refresh both cause resulting page to lose session.  My hunch 
is that I may not be accounting for some ingrained PHP handling and that 
this isn't a bug but I can't be sure.  

If required, I can submit the offending code but I'll hold off in case 
there is an obvious answer.

-- 
Tony Bibbs  I guess you have to remember that those who don't
[EMAIL PROTECTED]  hunt or fish often see those of us who do as  
harmlessly strange and sort of amusing. When you  
think about it, that might be a fair assessment. 
--Unknown



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



Re: [PHP-DEV] Is this a bug?

2003-03-25 Thread Chris Shiflett
--- Tony Bibbs [EMAIL PROTECTED] wrote:
 Are there instances you all can think of where doing a header('location: 
 $url'); causes a loss of all session data?

This is most likely not a bug. You can (hopefully) find more people to help
with this type of question on [EMAIL PROTECTED]

Good luck.

Chris

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



Re: [PHP-DEV] Question for Zeev, Zak or Georg - mysql_query and possible integer overflow?

2003-03-25 Thread Zeev Suraski
I believe he meant the query id's that the engine uses, and not the auto 
increment id's.  Wez's response was accurate, we'll overflow at some 
point.  This is basically because PHP was designed with short requests in 
mind.  We could probably fix it relatively easily for ZE2.

Zeev

At 13:15 25/03/2003, Zak Greant wrote:
On Tue, Mar 25, 2003 at 01:50:17PM +, Matt Flaherty wrote:
 Hi,

 I have a question for the authors of the mysql extension. I'm sure you
 gentlemen are very busy, but I'd appreciate your insight if you can
 spare a moment. I'm developing a stand-alone php application running in
 an infinite loop from the command line interface. A mysql database is
 polled continually for new rows to deal with. The same query is executed
 several times in one second. I've noticed that whether or not a query
 resource is freed the next query identifier returned from mysql_query()
 is ++ the last one. I'm sure this is by design and governed by the mysql
 driver. Naturally I'm concerned about integer overflow when the the
 application has been running uninterrupted for a very long time. I don't
 think I can wait around while a test script runs to see what happens
 after 4,294,967,295 is exceeded though! Can anyone tell me with
 certainty or hazard a guess what might happen here? I thank you very
 much for your time.
  The query that generates an auto_increment value larger than the largest
  value allowed for the column will fail with error 1062 (Duplicate
  entry 'xxx' for key 1)
 Matt

 ps - I'm doing this through PEAR::DB::mysql
  I am not exactly sure how PEAR::DB will propagate this error through
  its error handling interface.
  An easy way to test this is to create a temporary table that has a
  TINYINT as its auto_incrementing primary key, fill the table up and
  then watch to see what breaks.
  Cheers!
  --zak
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


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


Re: [PHP-DEV] Question for Zeev, Zak or Georg - mysql_query and possible integer overflow?

2003-03-25 Thread Zak Greant
D'oh - read too little, too fast. :)

On Tue, Mar 25, 2003 at 05:55:42PM -0800, Zeev Suraski wrote:
 I believe he meant the query id's that the engine uses, and not the auto 
 increment id's.  Wez's response was accurate, we'll overflow at some 
 point.  This is basically because PHP was designed with short requests in 
 mind.  We could probably fix it relatively easily for ZE2.

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



[PHP-DEV] locale bug from php4.3.0

2003-03-24 Thread Giuseppe Tanzilli - CSF
Hi,
just porting big 4.2.3 application to 4.3.2rc,
I see something changed from 4.3.0 about locale settings.
Before 4.3.0 locale was used to print out numbers in string format
and to read numbers from string formats.
I mean php uses the decimal delimiter definied in the locale settings.
From 4.3.0 on, php uses the decimal delimiter from locale only to 
output numbers to strings,
not when read numbers from strings.

Why ?

Every other language works the old pre 4.3.0 way.

This way every serious application needs alot of work to run on php 
=4.3.0

Please explain why this change was made.

I saw in setlocale source  in ext/standard/strings.c,
if ((lc.decimal_point)[0] != '.') {
   /* set locale back to C */
   setlocale(LC_NUMERIC, C);
   }
this sets  LC_NUMERIC to C in every case
I'm in Italy and here we use comma as decimal delimiter.

bye
Giuseppe


--
---
Giuseppe Tanzilli		[EMAIL PROTECTED]
CSF Sistemi srl			phone ++39 0775 7771
Via del Ciavattino 
Anagni FR
Italy



smime.p7s
Description: S/MIME Cryptographic Signature


[PHP-DEV] PHP 4 Bug Summary Report

2003-03-22 Thread php-dev
 PHP 4 Bug Database summary - http://bugs.php.net

 Num Status Summary (904 total including feature requests)
===[*Configuration Issues]
20490 Analyzed   enable versioning not supported on OSX
21195 Verified   Configure warnings/errors
21973 Open   'configure' script can't find libpng.(a|so), openldap, libjava...
22189 Open   Configuration file is not loaded, though PHP reports it is
===[*Database Functions]==
20946 Suspended  php_ingres.dll missing in the php 4 zip!!!
===[*Directory/Filesystem functions]
21532 Feedback   incorrect warning
===[*General Issues]==
20195 Open   make install doesnt set permissions
20775 Open   Silent install (/s) does not work
===[*Network Functions]===
15639 Suspended  detecting end of UDP packets
===[Apache related]===
15529 Open   ap_cleanup_for_exec not used when creating
20190 Critical   Random mem corruption: zend_get_executed_filename() mismatch
21756 Open   Accessing $_SERVER['PATH_INFO '] causes intermittent segfault in 
Apache
22755 Feedback   PHP Source partially displayed
22780 Assigned   DSO load warnings + crash behaviour
===[Apache2 related]==
17414 Open   Segfaults on restart
19618 Suspended  Cannot load libphp4.so - Win32 error 5
21074 Open   PHP doesn't work with 401 (Auth) ErrorDocument and Apache2
21283 Open   Apache2  PHP4.3 leak memory when respond to requests
21855 Open   Likely threading issue: Crash when using Apache 2.0 (worker model)
22072 Verified   connection_status() always returning 0
22273 Open   Cannot load libphp4.so into server: Unresolved external
22394 Feedback   No libphp4.so module for Apache 2.0.43
22497 Openphp writes on wrong position in file after new lines
22603 Feedback   Can't set content-length
22758 Open   performance problem with apache2 handler
22784 Feedback   Memory forbiden writes
22805 Assigned   Long input fields get truncated when posted (to about 1kb)
22811 Feedback   Apache2 start failure
22815 Open   Apache doesn't start
===[Arrays related]===
22463 Verified   array_reduce segmentation fault
===[CGI related]==
20896 Verified   php -w hangs indefinitely at 100% CPU
22127 Open   bogus http response when force-cgi-redirect safety mechanism triggered
22233 Assigned   mod_gzip_on yes makes force-cgi-redirect disabled and incorrect 
PHP_SELF
22270 Assigned   cgi binary parses itself when called directly
22291 Assigned   iisfunc extension crashes on shutdown
22440 Open   Bug with cookie in CGI not in ISAPI
22789 Feedback   echo/print/flush doesn't work while socket open
22796 Open   Error messages go to stdout; lost with -r option
22798 Feedback   The specified CGI application misbehaved by not returning a complete 
set of HTT
===[Class/Object related]=
15675 Suspended  get_class() returns only lower chars
17637 Analyzed   constructors in classes (Back to PHP3)
20676 Verified   Reinitialization of a reference
22004 Open   Overload extension and _call() breaks classes.
===[COM related]==
15771 Suspended  cannot pass value to image field by ado
16375 Suspended  Feature: Support for VARIANT multi dimensional arrays
===[Compile Failure]==
18640 Open   Compilation with Oracle fails...
22197 Assigned   inline functions cannot use static identifier
22574 Feedback   unsatisfied symbols freeaddrinfo and getaddrinfo
22821 Feedback   [php] make install breaks with core dump
===[Compile Warning]==
22823 Open   Two warnings during make
===[cURL related]=
20263 Open   feof doesn't work with --with-curlwrappers
22213 Open   Apache mod_ssl + PHP + cURL SSL segfault
===[Date/time related]
13142 Verified   strtotime() returns -1 for M d H:i:s Y format
18101 Assigned   strtotime() can't handle certain timestamp format
18289 Suspended  strftime totally buggy!!
18670 Assigned   strtotime() bug
20382 Verified   strtotime (Monday, $date) can produce incorrect output
21984 Verified   in 4.3.0 strtotime says next monday is Feb 10th 2003, thats wrong 
(4.2.3 works)
22135 Open   PHP confused by America/Los Angeles timezone
22453 Open   Incorrect display of date when locale set to Greek
22814 Assigned   strtotime error

Re: [PHP-DEV] [PATCH] OCI8 link failure (Tru64/AIX) (#22324)

2003-03-22 Thread Jani Taskinen

Attached is patch for ext/oci8/config.m4, please try it out.

--Jani


On Tue, 11 Mar 2003, Michael Mauch wrote:

Jani Taskinen [EMAIL PROTECTED] wrote:
 
I still don't think we should be linking with libocijdbc8 in any case.
Can you ask some Oracle support why their libs differ with same version 
but in different OSes??

I can try to do so [1], although I don't see what that will buy us.

From Oracle9i Administrator's Reference
http://download-east.oracle.com/docs/html/A97297_01/ch4_comp.htm#i26133,
chapter 4, Using Oracle Precompilers and the Oracle Call Interface:

| Custom Make Files
| 
| Oracle Corporation recommends that you use the provided demo_product.mk
| make files to create user programs as described in the specific product
| sections of this chapter.
| [...]
| If you choose to use a make utility such as nmake or GNU make, be aware
| of how macro and suffix processing differs from the make utility
| provided with the platform. Oracle make files are tested and are
| supported with the make utility for your platform.

The demo_product.mk is in reality called demo_rdbms.mk - and of course
it's virtually undocumented.

| Oracle library names and the contents of Oracle libraries are subject to
| change between releases. Always use the demo_product.mk make file that
| ships with the current release as a guide to determine the required
| libraries.

Then they go on to explain their symfind utility, which is a shell
script around find, grep and nm - with platform-specific output [2].

| Correcting Undefined Symbols (Solaris Only)
|
| Oracle provides the symfind utility to assist you in locating a library
| or object file where a symbol is defined. When linking a program,
| undefined symbols are a common error that produce an error message
| similar to the following:
 
IMHO this is totally unacceptable. If they can't provide a well-defined
set of interface libraries, they should at least offer some kind of
oci-config or a few text files with -lsomelib -lanotherlib lines.

But no matter how hard we wish they had some such thing, they don't have
it at the moment - and even if they would suddenly start to clean up
that whole mess, it would probably take a long time until their patches
would be installed everywhere.

I still think that the best solution would be to check if linking with
-lcntsh alone is enough to get OCILobIsTemporary, and if not, check if
it works with -locijdbc8.

Regards...
   Michael

[1]: My question in the Oracle Technology Network forum has not been
answered for two weeks now, ditto in comp.databases.oracle.misc.

[2]: Symfind (or nm) finds the OCILobIsTemporary definition (T) not only
in libocijdbc8.so, but also in libclntsh.so and a few other libs:

OCILobIsTemporary|  | U | 0008
^^^ ./lib/libsql8.a
OCILobIsTemporary| 0004396969863776 | T | 0008
^^^ ./lib/libnjni8.so
OCILobIsTemporary| 5408 | T | 0008
^^^ ./lib/libclient8.a
OCILobIsTemporary| 5408 | T | 0008
OCILobIsTemporary|  | U | 0008
^^^ ./lib/libclntst8.a
OCILobIsTemporary| 0004396969227952 | T | 0008
^^^ ./lib/libocijdbc8.so
OCILobIsTemporary| 0004396962545744 | T | 0008
^^^ ./lib/libocijdbc8_g.so
OCILobIsTemporary|  | U | 0008
^^^ ./lib/libsqlplus.a
OCILobIsTemporary|  | U | 0008
^^^ ./lib/libordim8.a
OCILobIsTemporary| 0004396966909952 | T | 0008
^^^ ./lib/libclntsh.so

This is on the Compaq/HP test drive with Tru64 5.1 and Oracle 8.1.7.



-- 
- For Sale! -
Index: config.m4
===
RCS file: /repository/php4/ext/oci8/config.m4,v
retrieving revision 1.37.2.3
diff -u -r1.37.2.3 config.m4
--- config.m4   25 Feb 2003 04:37:08 -  1.37.2.3
+++ config.m4   23 Mar 2003 01:17:41 -
@@ -88,14 +88,7 @@
 
 8.1)
   PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
-
-dnl This breaks build on some systems (AIX at least).
-dnl   if test -f $OCI8_DIR/lib/libocijdbc8.so ; then
-dnl PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD)
-dnl   fi
-
   PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
-  AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
   AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ])
 
   dnl 
@@ -106,14 +99,7 @@
 
 9.0)
   PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
-
-dnl This breaks build on some systems (AIX at least)
-dnl if test -f $OCI8_DIR/lib/libocijdbc8.so 

[PHP-DEV] segfault with ze2/php5-cvs

2003-03-21 Thread Sterling Hughes
?php
class sheep {
var $name;
}

$start = new sheep;
$start-name = Dolly;
$new = $start-__clone();
$new-name = Molly;
var_dump($start);
?

BOOM!

-Sterling
-- 
Good judgement comes from experience, and experience comes from 
bad judgement. 
- Fred Brooks


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



Re: [PHP-DEV] segfault with ze2/php5-cvs

2003-03-21 Thread Joey Smith
Very nice.

What about:

?php
class person {
var $name;
}

$start = new person;
$start-name = 'Eve';
$new = $start-__clone();
?

Does it come back with 'Call to a member function on a non-object'?


On Fri, Mar 21, 2003 at 02:47:06PM -0500, Sterling Hughes wrote:
 ?php
 class sheep {
 var $name;
 }
 
 $start = new sheep;
 $start-name = Dolly;
 $new = $start-__clone();
 $new-name = Molly;
 var_dump($start);
 ?
 
 BOOM!
 
 -Sterling
 -- 
 Good judgement comes from experience, and experience comes from 
 bad judgement. 
 - Fred Brooks
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP-DEV] segfault with ze2/php5-cvs

2003-03-21 Thread Sterling Hughes
On Fri, 2003-03-21 at 15:12, Joey Smith wrote:
 Very nice.
 
 What about:
 
 ?php
   class person {
   var $name;
   }
 
   $start = new person;
   $start-name = 'Eve';
   $new = $start-__clone();
 ?
 
 Does it come back with 'Call to a member function on a non-object'?
 
 

I get a segfault with that as well, same error. execute_data is
corrupted.

-Sterling

 On Fri, Mar 21, 2003 at 02:47:06PM -0500, Sterling Hughes wrote:
  ?php
  class sheep {
  var $name;
  }
  
  $start = new sheep;
  $start-name = Dolly;
  $new = $start-__clone();
  $new-name = Molly;
  var_dump($start);
  ?
  
  BOOM!
  
  -Sterling
  -- 
  Good judgement comes from experience, and experience comes from 
  bad judgement. 
  - Fred Brooks
  
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
-- 
The three most dangerous things in the world are a programmer  
 with a soldering iron, a hardware type with a program patch and  
 a user with an idea. 
- Unknown


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



[PHP-DEV] ze2 segfault #2

2003-03-21 Thread Sterling Hughes
When running the following example through pres2 (apache 1.3.27), I get
a segfault..  Sample pres2 file.

slide
titleInterfaces Suck/title
blurbThey really do/blurb
example filename=interface2.php result=1 /
/slide

interface2.php::

?php
interface ISerializable {
function sleep();
function wakeup();
};

class Person implements ISerializable {
public $name;

function sleep() {
file_set_contents(serialized,
serialize($this-name)
);
}

function wakeup() {
$this-name = unserialize(
file_get_contents(serialized)
);
}
}

$p = new Person;
if ($p instanceof ISerializable) {
$p-wakeup();
}
echo Previous Spy: {$p-name}\n;
$superspies = array('James Bond',
'Sterling Hughes',
'Austin Powers');
$p-name = $superspies[array_rand($superspies)];
echo New Spy: {$p-name}\n;

if ($p instanceof ISerializable) {
$p-sleep();
}
?

-- 
Nothing is particularly hard if you divide it into small jobs. 
- Henry Ford


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



Re: [PHP-DEV] ze2 segfault #2

2003-03-21 Thread Sterling Hughes
Nevermind, I found the bug, and I have a fix that I'm testing right now.

-Sterling

On Fri, 2003-03-21 at 16:53, Sterling Hughes wrote:
 When running the following example through pres2 (apache 1.3.27), I get
 a segfault..  Sample pres2 file.
 
 slide
 titleInterfaces Suck/title
 blurbThey really do/blurb
 example filename=interface2.php result=1 /
 /slide
 
 interface2.php::
 
 ?php
 interface ISerializable {
 function sleep();
 function wakeup();
 };
 
 class Person implements ISerializable {
 public $name;
 
 function sleep() {
 file_set_contents(serialized,
 serialize($this-name)
 );
 }
 
 function wakeup() {
 $this-name = unserialize(
 file_get_contents(serialized)
 );
 }
 }
 
 $p = new Person;
 if ($p instanceof ISerializable) {
 $p-wakeup();
 }
 echo Previous Spy: {$p-name}\n;
 $superspies = array('James Bond',
 'Sterling Hughes',
 'Austin Powers');
 $p-name = $superspies[array_rand($superspies)];
 echo New Spy: {$p-name}\n;
 
 if ($p instanceof ISerializable) {
 $p-sleep();
 }
 ?
 
 -- 
 Nothing is particularly hard if you divide it into small jobs. 
 - Henry Ford
-- 
Programming today is a race between software engineers stirring to  
 build bigger and better idiot-proof programs, and the universe trying  
 to produce bigger and better idiots. So far, the universe is winning. 
- Unknown


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



Re: [PHP-DEV] Language Auto Detection / www.php.net

2003-03-19 Thread Stig S. Bakken
On Wed, 2003-03-12 at 11:31, James Cox wrote:
 Gabor Hojtsy [EMAIL PROTECTED] wrote:
 
   is there any chance that we can revert this annoying feature?
   The translated documentation is always behind and partly lacks
   important information from the english version. I want to read
   the documentation in english (and I am not the only one). This
   is only possible if I change the url after all searches to /en/
   The site should at least be so intelligent to search in the 
   /en/ part of the manual if I search from an /en/ page.
  
  This is fixed now, and works again the way it was before the
  weekend (if you explicitly specify a language with being on a
  manual page in a language, or using the search page with a language
  parameter, that language is carried on).
  
  We do have language specification abilities in URL shortcuts, which
  is the short term solution, while I (or someone else) add the
  language cookie support. See http://php.net/urlhowto
 
 I remember adding a cookie before for something trivial (user-configurable
 css) and jimw pointing out that it tends to do silly things with caching...
 (ie, renders it useless)

There's always Vary: Cookie, though I think the world is still lagging
in implementing it. :-(

A good way to fix the caching problem for language detection is to use
non-caching headers on pages such as /manual/ and redirect to the
language-specific page.

 - Stig


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



[PHP-DEV] Re: cvs: php4 /ext/tokenizer tokenizer.c

2003-03-19 Thread Jani Taskinen

It really doesn't matter anyhow, the HEAD of php4 only works
with ZE2 anyway.

--Jani


On Wed, 19 Mar 2003, Greg Beaver wrote:

Hi,

shouldn't the first REGISTER_LONG_CONSTANT(T_DOC_COMMENT, etc. etc.) 
be within the #ifdef ZEND_ENGINE2 at the end of the list of 
registration, or enclosed within an #ifdef?

Greg

Jani Taskinen wrote:
 sniper   Wed Mar 19 18:10:27 2003 EDT
 
   Modified files:  
 /php4/ext/tokenizer  tokenizer.c 
   Log:
   And this too..
   
 Index: php4/ext/tokenizer/tokenizer.c
 diff -u php4/ext/tokenizer/tokenizer.c:1.16 php4/ext/tokenizer/tokenizer.c:1.17
 --- php4/ext/tokenizer/tokenizer.c:1.16  Wed Mar 19 18:08:58 2003
 +++ php4/ext/tokenizer/tokenizer.c   Wed Mar 19 18:10:27 2003
 @@ -259,6 +259,7 @@
  REGISTER_LONG_CONSTANT(T_LINE, T_LINE, CONST_CS | CONST_PERSISTENT);
  REGISTER_LONG_CONSTANT(T_FILE, T_FILE, CONST_CS | CONST_PERSISTENT);
  REGISTER_LONG_CONSTANT(T_COMMENT, T_COMMENT, CONST_CS | CONST_PERSISTENT);
 +REGISTER_LONG_CONSTANT(T_DOC_COMMENT, T_DOC_COMMENT, CONST_CS | 
 CONST_PERSISTENT);
  REGISTER_LONG_CONSTANT(T_OPEN_TAG, T_OPEN_TAG, CONST_CS | CONST_PERSISTENT);
  REGISTER_LONG_CONSTANT(T_OPEN_TAG_WITH_ECHO, T_OPEN_TAG_WITH_ECHO, CONST_CS 
 | CONST_PERSISTENT);
  REGISTER_LONG_CONSTANT(T_CLOSE_TAG, T_CLOSE_TAG, CONST_CS | 
 CONST_PERSISTENT);
 @@ -481,6 +482,7 @@
  case T_CURLY_OPEN: return T_CURLY_OPEN;
  case T_PAAMAYIM_NEKUDOTAYIM: return T_DOUBLE_COLON;
  #ifdef ZEND_ENGINE_2
 +case T_DOC_COMMENT: return T_DOC_COMMENT;
  case T_ABSTRACT: return T_ABSTRACT;
  case T_CATCH: return T_CATCH;
  case T_FINAL: return T_FINAL;
 
 



-- 
- For Sale! -



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



Re: [PHP-DEV] Pb : access control

2003-03-18 Thread Fabrice Le Coz
here a code to test private variables
?php
// test private variables
class foo {
private $name = foo;

function __construct() {
$this-name = foo2;
}
}

class baz extends foo {
function show() {
echo  name : $this-name \n;
}
}

$test = new baz();
$test-show();
echo   name : $test-name \n;
?

this code expose the variable foo2 in the baz object (method show) which
normally can't be visible (private variable of the parent class), and expose
the variable in the main context.
Normally a fatal error must be generated when accessing private variables in
the main context (echo   name : $test-name \n;) and in the inheritance
context ($test-show();)

Hope that will help debug PHP5

Fabrice Le Coz
[EMAIL PROTECTED]



- Original Message -
From: Andi Gutmans [EMAIL PROTECTED]
To: Fabrice Le Coz [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 9:00 PM
Subject: Re: [PHP-DEV] Pb : access control


 Can you cut down the script to like 10 lines and say what your result is
 and what you'd expect?

 At 05:37 PM 3/17/2003 +0100, Fabrice Le Coz wrote:
 Hi,
 
 I'm playing with PHP5 and have some trouble wtith access control, here's
the
 code I run with last php5 from snaps.php.net under windows XP :
 
 ?php
 class pere {
  private   $var3;
  public$var1;
  protected $var2;
 
  function __construct() {
  $this-var1 = public;
  $this-var2 = protected;
  $this-var3 = private;
  }
 
  function show() {
  echo pere::show() \n;
  echo var1 : $this-var1\n;
  echo var2 : $this-var2\n;
  echo var3 : $this-var3\n;
  echo \n;
  }
 }
 
 class fils extends pere {
  protected $var = fils;
  private   $var4 = test;
 
  function __construct() {
  parent::__construct();
  }
 
  function show_fils() {
  echo fils::show() \n;
  echo var1 : $this-var1\n;
  echo var2 : $this-var2\n;
  echo var3 : $this-var3\n;
  echo var  : $this-var\n;
  echo \n;
  }
 }
 
 function show_var($obj) {
  $obj_vars = get_object_vars($obj);
  foreach ($obj_vars as $name = $value) {
  if($name != ) echo $name : $value\n;
  }
  echo \n;
 }
 
 $test1 = new pere();
 $test1-show();
 echo Affichage des variables visibles de test1 :\n;
 show_var($test1);
 
 $test2 = new fils();
 $test2-show_fils();
 echo Affichage des variables visibles de test2 :\n;
 show_var($test2);
 $test2-show();
 echo var3 : .$test2-var3.\n;
 echo var4 : .$test2-var4.\n;
 ?
 
 and I've the following result :
 
 pere::show()
 var1 : public
 var2 : protected
 var3 : private
 
 Affichage des variables visibles de test1 :
 var1 : public
 
 fils::show()
 var1 : public
 var2 : protected
 var3 : private
 var  : fils
 
 Affichage des variables visibles de test2 :
 var1 : public
 var2 :
 var3 : private
 
 pere::show()
 var1 : public
 var2 : protected
 var3 : private
 
 var3 : private
 
 Fatal error: Cannot access private property fils::$var4 in
 D:\www\test\heritier.php on line 59
 
 Normally in the instance of fils object ($test2), I mustn't see
 $this-var3 which is private variable of the parent. if I comment the
line
 'echo var3 : $this-var3\n;' in the show_fils method, $test2-var3 is
 empty but do not generate an error !
 The show_var($test2) function expose a var2 variable which normally must
 send an Fatal error.
 
  Fabrice Le Coz
  [EMAIL PROTECTED]
 




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



[PHP-DEV] add SMTP authentication to php.mail() function

2003-03-18 Thread John M. Calvert
Hello, I'm interested to add SMTP authentication to the php.mail() function.
Is this something that the PHP dev community would endorse? I'm told that as
a newbie contributor I wouldn't have direct access to the CVS, that I'd have
to post my diffs to this list or get an existing developer to sponsor my
changes. I already did the digging around and know what needs to happen: a
small number of lines of code in /win32/sendmail.c SendText() to add the
necessary SMTP AUTH commands. Maybe this has come up before and been
rejected. Let me know. I did a search in the list archives but didn't turn
anything up.

Here is some background:

I'm developing a website that will be hosted on a linux box (LAMP), however
my work machine is MS Windows 2000. The website includes a submission page
which e-mails some HTTP form posted data back to me. For simplicity I'm
simply using the php.mail() function. However, when I'm developing on
Windows 2000, if I want to test the mail submission, I don't have an SMTP
relay running locally and my ISP requires authentication for outgoing SMTP.
So for now the php.mail() fails and I fake it until the php pages are
uploaded to the server. I know I could switch to another means of sending
mail (PHP class for SMTP, etc) but I thought it would be cool to hack PHP to
add this minor feature. I would plan to add two new php.ini settings
SMTP_usr and SMTP_pwd.

Looking forward to your comments.

John M. Calvert, M.Sc., MCSD

1310521 Ontario Inc.
49 Belmont Ave.
Ottawa ON K1S 0V2
(613) 730-9851
http://members.rogers.com/john-m-calvert/

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



[PHP-DEV] __call for the namespaces

2003-03-17 Thread Brad LaFountain
This idea spawned from playing with ext/rpc and the ability to declare
class types on the fly

Since zend_namespaces is really _zend_class_entry I think it would
be cool to implement __call at the namespace level.

namespace java {
 function __call($classname) {
   // this will be called every time a new java::$classname() is called
   // and $classname isn't defined
   eval(
class $classname {
}
   );
   // and it can return the new class
   return new $classname();
 }
}

This doesn't seem like it would be too hard to implement and it will allow me
to do stuff like...

?
 $j = new java::java.util.Stack();
 // $j could be of ns java:util and class Stack
 $s = new soap::myObject(http://server/some.wsdl;);
 // $s could be the namespace defined in the wsdl and of class myObject
?

ps:
?
namespace test {
class test1 {
function doSomething() {
eval(
class test2 { }
);
}
}
}

$test1 = new test::test1();
$test1-doSomething();
?
results in...
bFatal error/b:  Internal Zend error - Missing class information for  in
b
c:\php\php5\Release_TSDbg\name.php(7) : eval()'d code/b on line b2/bbr
/


 - Brad



__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



[PHP-DEV] curl multi

2003-03-17 Thread Wico de Leeuw
Hiya,

If someone has some spare time could he look at curl_multi_info_read() i'd 
like to use (test) the curl_multi functions, but without the 
curl_multi_info_read it isn't really usefull (and when i look at the source 
i thing it's almost finished)

P.S. when i test them i'll report back to you guys when i find things

Greetz and tnx in advance

Wico 

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


[PHP-DEV] Re: [PHP-CVS] curl multi

2003-03-17 Thread Sterling Hughes
On Mon, 2003-03-17 at 10:29, Wico de Leeuw wrote:
 sorry for writing to the wrong list should have been phpdev offcourse
 At 16:28 17-3-03 +0100, Wico de Leeuw wrote:
 Hiya,
 
 If someone has some spare time could he look at curl_multi_info_read() i'd 
 like to use (test) the curl_multi functions, but without the 
 curl_multi_info_read it isn't really usefull (and when i look at the 
 source i thing it's almost finished)
 
 P.S. when i test them i'll report back to you guys when i find things
 
 Greetz and tnx in advance
 

It is still very useful, what would give you the idea it isn't?

-Sterling


 Wico
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
People can have the Model T in any colour -- so long as it's black. 
- Henry Ford


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



[PHP-DEV] Pb : access control

2003-03-17 Thread Fabrice Le Coz
Hi,

I'm playing with PHP5 and have some trouble wtith access control, here's the
code I run with last php5 from snaps.php.net under windows XP :

?php
class pere {
private   $var3;
public$var1;
protected $var2;

function __construct() {
$this-var1 = public;
$this-var2 = protected;
$this-var3 = private;
}

function show() {
echo pere::show() \n;
echo var1 : $this-var1\n;
echo var2 : $this-var2\n;
echo var3 : $this-var3\n;
echo \n;
}
}

class fils extends pere {
protected $var = fils;
private   $var4 = test;

function __construct() {
parent::__construct();
}

function show_fils() {
echo fils::show() \n;
echo var1 : $this-var1\n;
echo var2 : $this-var2\n;
echo var3 : $this-var3\n;
echo var  : $this-var\n;
echo \n;
}
}

function show_var($obj) {
$obj_vars = get_object_vars($obj);
foreach ($obj_vars as $name = $value) {
if($name != ) echo $name : $value\n;
}
echo \n;
}

$test1 = new pere();
$test1-show();
echo Affichage des variables visibles de test1 :\n;
show_var($test1);

$test2 = new fils();
$test2-show_fils();
echo Affichage des variables visibles de test2 :\n;
show_var($test2);
$test2-show();
echo var3 : .$test2-var3.\n;
echo var4 : .$test2-var4.\n;
?

and I've the following result :

pere::show()
var1 : public
var2 : protected
var3 : private

Affichage des variables visibles de test1 :
var1 : public

fils::show()
var1 : public
var2 : protected
var3 : private
var  : fils

Affichage des variables visibles de test2 :
var1 : public
var2 :
var3 : private

pere::show()
var1 : public
var2 : protected
var3 : private

var3 : private

Fatal error: Cannot access private property fils::$var4 in
D:\www\test\heritier.php on line 59

Normally in the instance of fils object ($test2), I mustn't see
$this-var3 which is private variable of the parent. if I comment the line
'echo var3 : $this-var3\n;' in the show_fils method, $test2-var3 is
empty but do not generate an error !
The show_var($test2) function expose a var2 variable which normally must
send an Fatal error.

Fabrice Le Coz
[EMAIL PROTECTED]



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



[PHP-DEV] Re: [PHP-CVS] curl multi

2003-03-17 Thread Wico de Leeuw
At 11:15 17-3-03 -0500, Sterling Hughes wrote:
On Mon, 2003-03-17 at 10:29, Wico de Leeuw wrote:
 sorry for writing to the wrong list should have been phpdev offcourse
 At 16:28 17-3-03 +0100, Wico de Leeuw wrote:
 Hiya,
 
 If someone has some spare time could he look at curl_multi_info_read() 
i'd
 like to use (test) the curl_multi functions, but without the
 curl_multi_info_read it isn't really usefull (and when i look at the
 source i thing it's almost finished)
 
 P.S. when i test them i'll report back to you guys when i find things
 
 Greetz and tnx in advance
 

It is still very useful, what would give you the idea it isn't?

-Sterling
Hiya

I want to use  to get some webpages parallel, and start processing a page 
when the it has arrived. (while the other ones are still loading)
At the moment i can't find which page is ready and which one not. Even when 
you use a different writer function for each page, because you can't see if 
the page is complete yet. With curl_multi_info you're supposed to get such 
info.

Ok i agree it's nog complete useless, you can still get many urls at the 
same time but you have to wait until there all loaded.

Gr,

Wico

P.S. sorry for the bad english :)


 Wico
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
--
People can have the Model T in any colour -- so long as it's black.
- Henry Ford


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


Re: [PHP-DEV] Pb : access control

2003-03-17 Thread Andi Gutmans
Can you cut down the script to like 10 lines and say what your result is 
and what you'd expect?

At 05:37 PM 3/17/2003 +0100, Fabrice Le Coz wrote:
Hi,

I'm playing with PHP5 and have some trouble wtith access control, here's the
code I run with last php5 from snaps.php.net under windows XP :
?php
class pere {
private   $var3;
public$var1;
protected $var2;
function __construct() {
$this-var1 = public;
$this-var2 = protected;
$this-var3 = private;
}
function show() {
echo pere::show() \n;
echo var1 : $this-var1\n;
echo var2 : $this-var2\n;
echo var3 : $this-var3\n;
echo \n;
}
}
class fils extends pere {
protected $var = fils;
private   $var4 = test;
function __construct() {
parent::__construct();
}
function show_fils() {
echo fils::show() \n;
echo var1 : $this-var1\n;
echo var2 : $this-var2\n;
echo var3 : $this-var3\n;
echo var  : $this-var\n;
echo \n;
}
}
function show_var($obj) {
$obj_vars = get_object_vars($obj);
foreach ($obj_vars as $name = $value) {
if($name != ) echo $name : $value\n;
}
echo \n;
}
$test1 = new pere();
$test1-show();
echo Affichage des variables visibles de test1 :\n;
show_var($test1);
$test2 = new fils();
$test2-show_fils();
echo Affichage des variables visibles de test2 :\n;
show_var($test2);
$test2-show();
echo var3 : .$test2-var3.\n;
echo var4 : .$test2-var4.\n;
?
and I've the following result :

pere::show()
var1 : public
var2 : protected
var3 : private
Affichage des variables visibles de test1 :
var1 : public
fils::show()
var1 : public
var2 : protected
var3 : private
var  : fils
Affichage des variables visibles de test2 :
var1 : public
var2 :
var3 : private
pere::show()
var1 : public
var2 : protected
var3 : private
var3 : private

Fatal error: Cannot access private property fils::$var4 in
D:\www\test\heritier.php on line 59
Normally in the instance of fils object ($test2), I mustn't see
$this-var3 which is private variable of the parent. if I comment the line
'echo var3 : $this-var3\n;' in the show_fils method, $test2-var3 is
empty but do not generate an error !
The show_var($test2) function expose a var2 variable which normally must
send an Fatal error.
Fabrice Le Coz
[EMAIL PROTECTED]


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


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


Re: [PHP-DEV] 4.3.2RC1: patch to compile with libgd 2

2003-03-17 Thread Jani Taskinen

Please try the latest STABLE cvs snapshot
from http://snaps.php.net as this seems to be fixed
already.

--Jani


On Sat, 15 Mar 2003, Roberto Biancardi wrote:

--- ext/gd/gdttf.c.orig Sat Mar 15 22:38:28 2003
+++ ext/gd/gdttf.c  Sat Mar 15 22:42:42 2003
@@ -744,9 +744,13 @@
if (tweencolorkey.pixel  0) {
x3 = x2 + col;
if (x3 = im-sx || x3  0) continue;
+#if HAVE_LIBGD20
if (im-trueColor) {
pixel = im-tpixels[y3][x3];
} else {
+#else
+   {
+#endif
 #if HAVE_LIBGD13
pixel = im-pixels[y3][x3];
 #else



-- 
- For Sale! -


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



Re: [PHP-DEV] 4.3.2RC1: patch to compile with libgd 2

2003-03-17 Thread Roberto Biancardi
nope. Was introduced by this late fix: 
http://cvs.php.net/diff.php/php4/ext/gd/gdttf.c?login=2r1=1.17r2=1.18ty=h
and merged into 4.3.2RC1.

Jani Taskinen wrote:

   Please try the latest STABLE cvs snapshot
   from http://snaps.php.net as this seems to be fixed
   already.
--
--  Roberto Biancardi  -- 
--



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


[PHP-DEV] Apache2 as service, php4.3.1 and Interbase 6.0

2003-03-16 Thread Dr. I. Schueler
Hi!
I am trying to setup Apache2, php4.3.1 and Interbase 6.0 to work together on a Windows 
2000 Professional system. When I use Apache2 as a console application, everything 
seems to work ok, but when I use it as a service it does not see the the Interbase 
database anymore (php errror - Warning: ibase_connect(): unavailable database in ...)
I do not understand why the script works with Apache2 as console and do not work with 
Apache2 as service.
Could someone help me? Tx!

[PHP-DEV] RPC Extension

2003-03-16 Thread Brad LaFountain
I was just playing with the RPC extension.

Don't you think that the rpc layer should pass along TSRMLS_CC to
all of the callbacks?

rpc_call(rpc_string, void *, zval *, int, zval *** TSRMLS_CC);

- Brad

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



Re: [PHP-DEV] RPC Extension

2003-03-16 Thread Brad LaFountain
Other issues:
1) Passing This to callbacks
Also I think we should pass getThis() to the handlers too
rpc_call(zval *this, rpc_string, void *, zval *, int, zval *** TSRMLS_DC);

2) Return object types
I see that the rpc layer is actually trying to register a new zend class
for every new Com(someclass); and someclass will actually be a class... now
how does that work for return values. 
$j = new Java(java.util.Vector); // now $j will be of type 'Vector'
$j-add(string);
$e = $j-elements(); 
/*
 now this returns type 'Enumeration' but since it wasn't called new Java()
*/
how do you register 'Enumeration' so it will be created like Vector was.

A similar thing is exceptions.. Do we want to auto register exceptions..
you could so something like this

try {
 $j = new Java(java.util.Stack);
 $j-pop();
} catch(java:util:EmptyStackException $e) {
 $e-printStackTrace();
}

3) Namespaces
RPC should probally auto-register the class with a namespace too. 
rpc_name(rpc_string hash, rpc_string *name, rpc_string *ns, void *data, int
type);

so in the case of java.util.Vector we could register Vector in the java:util
namespace.

4) Segfault
RPC was segfaulting in rpc_objects_new()

I changed this part...
zend_ts_hash_init(intern-function_table, 0, NULL, NULL, TRUE);
/*  intern-function_table.reader = 0;
intern-function_table.mx_reader = tsrm_mutex_alloc();
intern-function_table.mx_writer = tsrm_mutex_alloc();*/
5) Possible Feature
From what i understand too you can do stuff like this...

$c1 = new com('test');
$c2 = new test();

$j1 = new java('java.util.Stack');
$j2 = new java:util:Stack();

Right (if we implemented the namespace thing)?

now what i find interesting if we can come up with a way to get rid of the
inital
$j1 = new java('java.util.Stack');
and skip right to doing this
$j2 = new java:util:Stack();

I don't know if thats possible.. maybe with some of the autoload() ideas, or
even better having the rpc layer set a namespace that it 'listens to' and every
time a new (defined ns)::Class() is called then it would call the extensions
ctor and try to register the class

ex..
$j = new com:some_com_class(); // where the com extension registerd for the com
ns
or
$j = new php_java:java:utils::Vector(); // and the java ext registered php_java

well anyways it would be pretty cool.

.
.
.

If you couldn't tell im trying to convert ext/java to ext/rpc/java. I got the
functions down, im still learning what ext/rpc is actually doing. But i'll
really need the zend *this; to go forward just from the way the old ext/java
works.

 - Brad

--- Brad LaFountain [EMAIL PROTECTED] wrote:
 I was just playing with the RPC extension.
 
 Don't you think that the rpc layer should pass along TSRMLS_CC to
 all of the callbacks?
 
 rpc_call(rpc_string, void *, zval *, int, zval *** TSRMLS_CC);
 
 - Brad
 
 __
 Do you Yahoo!?
 Yahoo! Web Hosting - establish your business online
 http://webhosting.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-15 Thread Wez Furlong

On Sat, 15 Mar 2003, James Devenish wrote:
 Regardless of what you personally understand (and what I personally
 understand), my point would be that the problems are simply unfixed
 by *anyone*.

This is the first time that anyone has brought this issue to my
attention.

 Index: main/streams.c
 ===
 RCS file: /repository/php4/main/Attic/streams.c,v
 retrieving revision 1.125.2.37
 diff -u -u -r1.125.2.37 streams.c
 --- main/streams.c6 Mar 2003 20:58:19 -   1.125.2.37
 +++ main/streams.c8 Mar 2003 10:48:16 -
 @@ -1532,7 +1532,7 @@
   }
   if (ret) {
   fflush(data-file);
 - *ret = (void*)fd;
 + *(int*)ret = fd;
   }
   return SUCCESS;
   default:

 What have I done? Well, someone's taking fd (declared as an 'int', which
 ...

There is no need for a patronizing tone here; I can read C code.

I will commit this fix shortly.  Are there any other places in the
streams code that are similarly affected?

--Wez.

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



RE: [PHP-DEV] Possible problem in the parser

2003-03-15 Thread Marcus Börger
At 13:01 14.03.2003, Ford, Mike   [LSS] wrote:
 Just to make this completely clear, in left-associative PHP
 
 b = a==1? 4:a==2? 5:6;
 
 is equivalent to
 
 b = (a==1? 4:a==2)? 5:6;


 NO it is not equal. Either '==' has higher precedence OR '?:' has.
 See one of my previous mails where i showed where the error is.
Yes, it is -- believe me, I've researched this extensively.  It is NOT 
about precedence, but associativity.  If you want me to be totally 
completist about this:

Starting from:

   b = a==1? 4:a==2? 5:6;

precedence rules make this equivalent to:

   b = (a==1)? 4:(a==2)? 5:6;

but this is still ambiguous -- which ?: phrase do you evaluate 
first?  Associativity provides the answer: in PHP, where ?: is left 
associative (i.e. the left most ?: is evaluated first), the result is 
equivalent to:

   b = ((a==1)? 4:(a==2))? 5:6;

On the other hand, in c, where ?: is right associative, the equivalent is:

   b = (a==1)? 4:((a==2)? 5:6);

which, apart from the additional (unnecessary) parentheses around the == 
comparisons, is exactly what I said before.

QED


Ok Mike, i did not took left association into accound becuase it is stupid.
Since the whole thing is messy at the moment and there is no reason to
keep BC for messy things which shouldn't be done anyway i suppose we
make ir right associative.
Andi?

marcus

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


Re: [PHP-DEV] 64bit PHP on solaris

2003-03-15 Thread David Hill
 Even so, I don't know what would be hard for anyone to understand about
 my patches (and no-one has asked me in the past). If you think there
 simply too many of them, most of them are probably whitespace
 disagreements between what you committed and what the PHP style appears
 to be. The basis of all my streams patches is like this (from the old
 streams.c):

James - speaking for myself - I had no problems with your patch, size,
whitespace or otherwise.

As I mentioned before, I like to understand that which I commit before I do
so. Sometimes seeming illogical code can be correct, and so I try to
understand what is proposed - and sometimes I even learn something new :-)
In the case shown below, I had a hard time tracing the call stack back by
code inspection 'cause I did not understand the mechanisms involved (I do
love these indirect methods of calling things, they make debuging so fun :-)
Now that I understand the semi-tortuous means to arrive at the line in
question, I wholeheartedly endore the following change. All 28 calls that
arrive at this line do indeed pass an int - and that was the real reason I
was holding off - I wanted to check that was the case.

Wez, as streams is your baby - can you commit this ? (How is that for
coordination :-)
Jani, as 4.3.2 is your baby - will you approve it ?

Dave


 Index: main/streams.c
 ===
 RCS file: /repository/php4/main/Attic/streams.c,v
 retrieving revision 1.125.2.37
 diff -u -u -r1.125.2.37 streams.c
 --- main/streams.c 6 Mar 2003 20:58:19 - 1.125.2.37
 +++ main/streams.c 8 Mar 2003 10:48:16 -
 @@ -1532,7 +1532,7 @@
   }
   if (ret) {
   fflush(data-file);
 - *ret = (void*)fd;
 + *(int*)ret = fd;
   }
   return SUCCESS;
   default:

 What have I done? Well, someone's taking fd (declared as an 'int', which
 may be 32 bits on some systems), casting it a void* (a 64-bit value on
 some systems) and then stuffing that into storage space which, although
 it might not be obvious, happens to be only 32 bits wide. My patch takes
 fd (the 'int') and stuffs it into 'int' storage. Now that's not to say
 that the destination IS actually an 'int' but merely that I am keeping
 the int at its original width rather than casting it up. It's not a
 'perfect solution', but it's not a 'perfect problem', either.





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



[PHP-DEV] PHP 4 Bug Summary Report

2003-03-15 Thread php-dev
 PHP 4 Bug Database summary - http://bugs.php.net

 Num Status Summary (1030 total including feature requests)
===[*Configuration Issues]
19282 Wont fix   Place php4ts.dll into \sapi
20490 Analyzed   enable versioning not supported on OSX
20689 Wont fix   php_admin_value disable_functions not working as it should
21195 Verified   Configure warnings/errors
21216 Wont fix   phpize passes --no-verify to ltconfig without specifying host
21973 Open   'configure' script can't find libpng.(a|so), openldap, libjava...
22001 Wont fix   /php.ini is read instead of configured /usr/local/etc/php.ini !!!
22189 Open   Configuration file is not loaded, though PHP reports it is
===[*Database Functions]==
20946 Suspended  php_ingres.dll missing in the php 4 zip!!!
===[*Directory/Filesystem functions]
21310 Assigned   no such file (paths)
21532 Assigned   incorrect warning
===[*General Issues]==
20195 Open   make install doesnt set permissions
20775 Open   Silent install (/s) does not work
21254 Wont fix   Suggestion for the site
22047 Wont fix   PHP pollutes the namespace w/ (what looks like) its grammar tokens
22666 Feedback   POST only passing a limited number of form variables
===[*Languages/Translation]===
11975 Wont fix   mix of hebrew  english
13014 Wont fix   hebrevc ()
===[*Network Functions]===
15639 Suspended  detecting end of UDP packets
===[*Programming Data Structures]=
21062 Wont fix   Recursive calls may SEGV
===[Apache related]===
15529 Open   ap_cleanup_for_exec not used when creating
17837 Wont fix   PHP 'handles' permission problems rather than letting Apache do it
19113 Open   HTTP status 200 returned on HTTP CONNECT when mod_proxy not in use
20190 Critical   Random mem corruption: zend_get_executed_filename() mismatch
20665 Wont fix   Memory leaks on SIGHUP
21756 Open   Accessing $_SERVER['PATH_INFO '] causes intermittent segfault in 
Apache
22699 Open   URL's like http://subdomain.site.com/script.php/test/this won't work
===[Apache2 related]==
17414 Open   Segfaults on restart
18957 Wont fixmultiple definitions
19618 Suspended  Cannot load libphp4.so - Win32 error 5
19787 Wont fix   Can not load module
21074 Open   PHP doesn't work with 401 (Auth) ErrorDocument and Apache2
21283 Open   Apache2  PHP4.3 leak memory when respond to requests
21855 Open   Likely threading issue: Crash when using Apache 2.0 (worker model)
22072 Verified   connection_status() always returning 0
22273 Open   Cannot load libphp4.so into server: Unresolved external
22394 Feedback   No libphp4.so module for Apache 2.0.43
22497 Openphp writes on wrong position in file after new lines
22603 Feedback   Can't set content-length
22672 Assigned   User not logged under Apache2
===[Arrays related]===
18829 Wont fix   array_pop, array_shift, array_push... functions very slow with large 
arrays
20251 Wont fix   Can't assign values to array in loop.
22463 Verified   array_reduce segmentation fault
===[CCVS related]=
10447 Wont fix   ccvs_*() functions segfault when given invalid session ID
===[CGI related]==
20896 Verified   php -w hangs indefinitely at 100% CPU
22127 Open   bogus http response when force-cgi-redirect safety mechanism triggered
22233 Assigned   mod_gzip_on yes makes force-cgi-redirect disabled and incorrect 
PHP_SELF
22270 Assigned   cgi binary parses itself when called directly
22291 Assigned   iisfunc extension crashes on shutdown
22440 Open   Bug with cookie in CGI not in ISAPI
===[Class/Object related]=
15675 Suspended  get_class() returns only lower chars
17637 Analyzed   constructors in classes (Back to PHP3)
20676 Verified   Reinitialization of a reference
22004 Open   Overload extension and _call() breaks classes.
22361 Wont fix   Endless loop causes windows to reboot
===[COM related]==
15771 Suspended  cannot pass value to image field by ado
16375 Suspended  Feature: Support for VARIANT multi dimensional arrays
===[Compile Failure]==
17820 Wont fix   php.ini-dist not copied
18358 Wont fix   Recode doesn't compile with apache2
18640 Open   Compilation with Oracle fails...
20444 Wont fix   Various compile warnings and one error.
20768 Wont fix  

Re: [PHP-DEV] 64bit PHP on solaris

2003-03-15 Thread Chris Field
For my own education, is there a reason they were passed as void* to
begin with? 

On Fri, 2003-03-14 at 23:43, James Devenish wrote: 
 In message [EMAIL PROTECTED]
 on Fri, Mar 14, 2003 at 05:22:11PM +, Wez Furlong wrote:
  Please coordinate with me on streams issues; if some 64bit oses
  declare descriptors as longs rather than ints, then we could have a
  bigger job on our hands (similar to the mess with socket types under
  win32).
 
 Regardless of any potential disasters with _php_stream_cast, there are
 at least a few unsubtle storage-type conflicts. In my case, fds are
 stored as ints but PHP casts them to pointers.
 
 In message [EMAIL PROTECTED]
 on Fri, Mar 14, 2003 at 11:00:50AM -0500, David Hill wrote:
  Sorry but I don't commit what I don't understand, and the three streams
  files needed some more understanding on my part. In those areas the php5
  head differs quite a bit from the 4_3 stream.
 
 Regardless of what you personally understand (and what I personally
 understand), my point would be that the problems are simply unfixed
 by *anyone*.
 
 Even so, I don't know what would be hard for anyone to understand about
 my patches (and no-one has asked me in the past). If you think there
 simply too many of them, most of them are probably whitespace
 disagreements between what you committed and what the PHP style appears
 to be. The basis of all my streams patches is like this (from the old
 streams.c):
 
 Index: main/streams.c
 ===
 RCS file: /repository/php4/main/Attic/streams.c,v
 retrieving revision 1.125.2.37
 diff -u -u -r1.125.2.37 streams.c
 -- main/streams.c 6 Mar 2003 20:58:19 -   1.125.2.37
 +++ main/streams.c8 Mar 2003 10:48:16 -
 @@ -1532,7 +1532,7 @@
   }
   if (ret) {
   fflush(data-file);
 - *ret = (void*)fd;
 + *(int*)ret = fd;
   }
   return SUCCESS;
   default:
 
 What have I done? Well, someone's taking fd (declared as an 'int', which
 may be 32 bits on some systems), casting it a void* (a 64-bit value on
 some systems) and then stuffing that into storage space which, although
 it might not be obvious, happens to be only 32 bits wide. My patch takes
 fd (the 'int') and stuffs it into 'int' storage. Now that's not to say
 that the destination IS actually an 'int' but merely that I am keeping
 the int at its original width rather than casting it up. It's not a
 'perfect solution', but it's not a 'perfect problem', either.


-- 

Chris Field [EMAIL PROTECTED]

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



[PHP-DEV] php-4.3.2RC1 interbase/firebird config.m4 problem

2003-03-15 Thread Daniela Mariaschi
Let's spend few words about Firebird first.
Firebird it's a fork of Interbase 6.0 source code, and its development is
managed by a team of independent developers, not from Borland itself.
Only Interbase 6.0  has been  released as open source code 
instead Firebird is an open source project .
you can find more at  http://firebird.sourceforge.net.
Right now both Interbase and Firebird have same API calls
and php interbase module it's working for Firebird too.
(May be in the future they will have different development .)

Now, the problem with php-4.3.2RC1 (and current CVS too)
tested on  Debian Woody and RH7.3  with Firebird instead of Interbase

=
./configure --with-interbase=/usr

configure:37403: checking for InterBase support
configure:37461: checking for isc_detach_database in -lgds
configure:37480: gcc -o conftest -g -O2
-L/usr/lib -lgds
conftest.c -lgds  -lresolv -lm -ldl -lnsl  15
/usr/lib/libgds.so: undefined reference to `crypt'
collect2: ld returned 1 exit status
configure: failed program was:
#line 37469 configure
#include confdefs.h
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply.  */
char isc_detach_database();

int main() {
isc_detach_database()
; return 0; }
=

with Firebird we need libcrypt while testing for libgds .
but as Jani noticed ... can we be 100% sure libcrypt  is always available?
...mmmhhh
I saw  test for libgds was added in response of  bug #21977 and
for Interbase users this is ok but Firebird  users can't correctly compile
php .
any suggestion is really appreciated  

Daniela


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



[PHP-DEV] 4.3.2RC1: patch to compile with libgd 2

2003-03-15 Thread Roberto Biancardi
--- ext/gd/gdttf.c.orig Sat Mar 15 22:38:28 2003
+++ ext/gd/gdttf.c  Sat Mar 15 22:42:42 2003
@@ -744,9 +744,13 @@
   if (tweencolorkey.pixel  0) {
   x3 = x2 + col;
   if (x3 = im-sx || x3  0) continue;
+#if HAVE_LIBGD20
   if (im-trueColor) {
   pixel = im-tpixels[y3][x3];
   } else {
+#else
+   {
+#endif
#if HAVE_LIBGD13
   pixel = im-pixels[y3][x3];
#else
--
--  Roberto Biancardi  --  
--



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


RE: [PHP-DEV] Possible problem in the parser

2003-03-14 Thread Ford, Mike [LSS]
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 13 March 2003 19:33
 To: Ford, Mike [LSS]
 Cc: 'Andrey Hristov'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DEV] Possible problem in the parser
 
 
 At 14:58 13.03.2003, Ford, Mike   [LSS] wrote:
 
 Just to make this completely clear, in left-associative PHP
 
 b = a==1? 4:a==2? 5:6;
 
 is equivalent to
 
 b = (a==1? 4:a==2)? 5:6;
 
 
 NO it is not equal. Either '==' has higher precedence OR '?:' has.
 See one of my previous mails where i showed where the error is.

Yes, it is -- believe me, I've researched this extensively.  It is NOT about 
precedence, but associativity.  If you want me to be totally completist about this:

Starting from:

   b = a==1? 4:a==2? 5:6;

precedence rules make this equivalent to:

   b = (a==1)? 4:(a==2)? 5:6;

but this is still ambiguous -- which ?: phrase do you evaluate first?  Associativity 
provides the answer: in PHP, where ?: is left associative (i.e. the left most ?: is 
evaluated first), the result is equivalent to:

   b = ((a==1)? 4:(a==2))? 5:6;

On the other hand, in c, where ?: is right associative, the equivalent is:

   b = (a==1)? 4:((a==2)? 5:6);

which, apart from the additional (unnecessary) parentheses around the == comparisons, 
is exactly what I said before.

QED

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP-DEV] Possible problem in the parser

2003-03-14 Thread Andi Gutmans
You are right that it doesn't behave the same as C. However, personally 
although it might have been better for it to work like C I don't think it's 
a good idea to change it now. First of all it would break backwards 
compatibility in a way which would be hard for people to find where the bug 
is and how to fix it. Secondly, not meaning to insult anyone here, but I 
think people who write such code without using parentheses should improve 
their coding style :)

Andi

At 12:01 PM 3/14/2003 +, Ford, Mike   [LSS] wrote:
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 13 March 2003 19:33
 To: Ford, Mike [LSS]
 Cc: 'Andrey Hristov'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DEV] Possible problem in the parser


 At 14:58 13.03.2003, Ford, Mike   [LSS] wrote:

 Just to make this completely clear, in left-associative PHP
 
 b = a==1? 4:a==2? 5:6;
 
 is equivalent to
 
 b = (a==1? 4:a==2)? 5:6;


 NO it is not equal. Either '==' has higher precedence OR '?:' has.
 See one of my previous mails where i showed where the error is.
Yes, it is -- believe me, I've researched this extensively.  It is NOT 
about precedence, but associativity.  If you want me to be totally 
completist about this:

Starting from:

   b = a==1? 4:a==2? 5:6;

precedence rules make this equivalent to:

   b = (a==1)? 4:(a==2)? 5:6;

but this is still ambiguous -- which ?: phrase do you evaluate 
first?  Associativity provides the answer: in PHP, where ?: is left 
associative (i.e. the left most ?: is evaluated first), the result is 
equivalent to:

   b = ((a==1)? 4:(a==2))? 5:6;

On the other hand, in c, where ?: is right associative, the equivalent is:

   b = (a==1)? 4:((a==2)? 5:6);

which, apart from the additional (unnecessary) parentheses around the == 
comparisons, is exactly what I said before.

QED

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


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


RE: [PHP-DEV] Possible problem in the parser

2003-03-14 Thread Jani Taskinen
On Fri, 14 Mar 2003, Andi Gutmans wrote:

You are right that it doesn't behave the same as C. However, personally 
although it might have been better for it to work like C I don't think it's 
a good idea to change it now. First of all it would break backwards 
compatibility in a way which would be hard for people to find where the bug 
is and how to fix it. Secondly, not meaning to insult anyone here, but I 
think people who write such code without using parentheses should improve 
their coding style :)

Amen. :)

--Jani


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



RE: [PHP-DEV] Possible problem in the parser

2003-03-14 Thread Ford, Mike [LSS]
 -Original Message-
 From: Andi Gutmans [mailto:[EMAIL PROTECTED]
 Sent: 14 March 2003 14:50
 
 You are right that it doesn't behave the same as C. However, 
 personally 
 although it might have been better for it to work like C I 
 don't think it's 
 a good idea to change it now. First of all it would break backwards 
 compatibility in a way which would be hard for people to find 
 where the bug 
 is and how to fix it. Secondly, not meaning to insult anyone 
 here, but I 
 think people who write such code without using parentheses 
 should improve 
 their coding style :)

Oh, I totally agree.  My original response was to a query as to whether the
PHP behaviour was a bug -- so I simply pointed out (in some detail!) that,
although different from c, it *did* conform to the precedence and
associativity documented in the PHP manual.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-14 Thread David Hill
 CRIPES, people! I posted patches in November 2002 (admittedly, it was a
 large patch and probably no one got to check it all out). Then, I
 reposted them (and sent then directly to you, Dave!) a few days ago.

And I got all but the three files merged that are probably causing his
problem too - sigh-

Sorry but I don't commit what I don't understand, and the three streams
files needed some more understanding on my part. In those areas the php5
head differs quite a bit from the 4_3 stream.

And on top of that I got diverted by a bug in the session stuff too.

Well as I always say in my volunteer posts - if you don't like the job I am
doing - cut my pay, if you like what I am doing you can double it - either
way the result is the same :-)

I will try to get the file descriptors stuff in by early next week.

Dave


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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-14 Thread Wez Furlong
Please coordinate with me on streams issues; if some 64bit oses declare
descriptors as longs rather than ints, then we could have a bigger job
on our hands (similar to the mess with socket types under win32).

--Wez.

On Fri, 14 Mar 2003, David Hill wrote:

  CRIPES, people! I posted patches in November 2002 (admittedly, it was a
  large patch and probably no one got to check it all out). Then, I
  reposted them (and sent then directly to you, Dave!) a few days ago.

 And I got all but the three files merged that are probably causing his
 problem too - sigh-

 Sorry but I don't commit what I don't understand, and the three streams
 files needed some more understanding on my part. In those areas the php5
 head differs quite a bit from the 4_3 stream.

 And on top of that I got diverted by a bug in the session stuff too.

 Well as I always say in my volunteer posts - if you don't like the job I am
 doing - cut my pay, if you like what I am doing you can double it - either
 way the result is the same :-)

 I will try to get the file descriptors stuff in by early next week.

 Dave




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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-14 Thread David Hill

 CRIPES, people! I posted patches in November 2002 (admittedly, it was a
 large patch and probably no one got to check it all out). Then, I
 reposted them (and sent then directly to you, Dave!) a few days ago.

And I got all but the three files merged that are probably causing his
problem too - sigh-

Sorry but I don't commit what I don't understand, and the three streams
files needed some more understanding on my part. In those areas the php5
head differs quite a bit from the 4_3 stream.

And on top of that I got diverted by a bug in the session stuff too.

Well as I always say in my volunteer posts - if you don't like the job I am
doing - cut my pay, if you like what I am doing you can double it - either
way the result is the same :-)

I will try to get the file descriptors stuff in by early next week.

Dave


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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-14 Thread David Hill



 Please coordinate with me on streams issues; if some 64bit oses declare
 descriptors as longs rather than ints, then we could have a bigger job
 on our hands (similar to the mess with socket types under win32).

Tru64  HP-UX (and I would guess Solaris and the rest) - the descriptor is
an int, which is part of the problem because the streams code in 4.3 casts
it wrong.

James sent me a patch that included a cast fix, but I have yet to submit it
(or try too) because I got caught up in trying to follow the code and then
got diverted. I will endevor to finish my look at the patch  and see if Jani
will let me commit it.

Dave


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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-14 Thread Wez Furlong

On Fri, 14 Mar 2003, David Hill wrote:
  Please coordinate with me on streams issues; if some 64bit oses declare
  descriptors as longs rather than ints, then we could have a bigger job
  on our hands (similar to the mess with socket types under win32).

 Tru64  HP-UX (and I would guess Solaris and the rest) - the descriptor is
 an int, which is part of the problem because the streams code in 4.3 casts
 it wrong.

 James sent me a patch that included a cast fix, but I have yet to submit it
 (or try too) because I got caught up in trying to follow the code and then
 got diverted. I will endevor to finish my look at the patch  and see if Jani
 will let me commit it.

Which part of please coordinate with me on streams issues didn't you
get? ;-)

If there are long vs int issues in streams, please let me know where
they are and I will fix it.

Thanks :)

--Wez.

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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-14 Thread David Hill

 Which part of please coordinate with me on streams issues didn't you
 get? ;-)

 If there are long vs int issues in streams, please let me know where
 they are and I will fix it.

 Thanks :)

Forgive me if I am a bit dense tonight :-) My 15 yr old son is having a lan
party in the basement with about 9 friends and I am tech support and the
wine I am drinking to help things is not helping matters :-) Oh to be young
again LOL.

I will send you the proposed diffs when I get a moment to prepare them and
let you submit them as you probably are a better sanity check.

Dave


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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-14 Thread James Devenish
In message [EMAIL PROTECTED]
on Fri, Mar 14, 2003 at 05:22:11PM +, Wez Furlong wrote:
 Please coordinate with me on streams issues; if some 64bit oses
 declare descriptors as longs rather than ints, then we could have a
 bigger job on our hands (similar to the mess with socket types under
 win32).

Regardless of any potential disasters with _php_stream_cast, there are
at least a few unsubtle storage-type conflicts. In my case, fds are
stored as ints but PHP casts them to pointers.

In message [EMAIL PROTECTED]
on Fri, Mar 14, 2003 at 11:00:50AM -0500, David Hill wrote:
 Sorry but I don't commit what I don't understand, and the three streams
 files needed some more understanding on my part. In those areas the php5
 head differs quite a bit from the 4_3 stream.

Regardless of what you personally understand (and what I personally
understand), my point would be that the problems are simply unfixed
by *anyone*.

Even so, I don't know what would be hard for anyone to understand about
my patches (and no-one has asked me in the past). If you think there
simply too many of them, most of them are probably whitespace
disagreements between what you committed and what the PHP style appears
to be. The basis of all my streams patches is like this (from the old
streams.c):

Index: main/streams.c
===
RCS file: /repository/php4/main/Attic/streams.c,v
retrieving revision 1.125.2.37
diff -u -u -r1.125.2.37 streams.c
--- main/streams.c  6 Mar 2003 20:58:19 -   1.125.2.37
+++ main/streams.c  8 Mar 2003 10:48:16 -
@@ -1532,7 +1532,7 @@
}
if (ret) {
fflush(data-file);
-   *ret = (void*)fd;
+   *(int*)ret = fd;
}
return SUCCESS;
default:

What have I done? Well, someone's taking fd (declared as an 'int', which
may be 32 bits on some systems), casting it a void* (a 64-bit value on
some systems) and then stuffing that into storage space which, although
it might not be obvious, happens to be only 32 bits wide. My patch takes
fd (the 'int') and stuffs it into 'int' storage. Now that's not to say
that the destination IS actually an 'int' but merely that I am keeping
the int at its original width rather than casting it up. It's not a
'perfect solution', but it's not a 'perfect problem', either.



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



Re: [PHP-DEV] compiling PHP_4_3

2003-03-13 Thread Corne' Cornelius
 Nevermind, stupid me made stupid mistake

Rasmus Lerdorf wrote:

Did you actually check out version 4.3?

 cvs co -r PHP_4_3 php4

Check your CVS/Entries file.  You should see the branch name after each
file.
-Rasmus

On Thu, 13 Mar 2003, Corne' Cornelius wrote:

 

Hi,

I compiled CLI version of PHP_4_3 this morning and it gave the following:

php4/main/main.c:225: undefined reference to `zend_disable_class'
php4/main/main.c:239: undefined reference to `zend_disable_class'
Is this right ? won't PHP_4_3 compile with Zend version 1 anymore ?

Corne'
!Exclude Disclaimer!
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php
   

 



=Disclaimer and Confidentiality===
This message contains information intended for the perusal, and/or use (if so stated), 
by the stated addressee(s) only. The information is confidential and privileged. If 
you are not an intended recipient, do not peruse, use, disseminate, distribute, copy 
or in any manner rely upon  he information contained in this message (directly or 
indirectly). The sender and/or the entity represented by the sender shall not be held 
accountable in the event that this prohibition is disregarded. If you receive this 
message in error, notify the sender immediately by e-mail, fax or telephone 
representations contained in this message, whether express or implied, are those of 
the sender only, unless that sender expressly states them to be the views or 
representations of an entity or person, who shall be named by the sender and who the 
sender shall state to represent. No liability shall otherwise attach to any other 
entity or person. ==


Re: [PHP-DEV] Moderate PHP-DEV

2003-03-13 Thread Hartmut Holzgraefe
Sterling Hughes wrote:
In what country can you walk onto the floor of the congress
(parliament) without sponsorship? 
OTOH in which country do you *trust* your parliament?

--
Six Offene Systeme GmbH http://www.six.de/
i.A. Hartmut Holzgraefe Email: [EMAIL PROTECTED]   Tel.: +49-711-99091-77
Sie finden uns auf der CeBIT in Halle 6/H44   http://www.six.de/cebit2003/

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


Re: [PHP-DEV] Scope and namespace

2003-03-13 Thread Zeev Suraski
At 23:48 12/03/2003, Andrei Zmievski wrote:
Seeing as how we now have only one-level deep namespaces and classes
(which is another topic), does it make sense to have both 'scope' and
'ns' fields in zend_op_array structure? I would think they can be merged
into one.
Not really, we can't.  You can have functions inside a namespace, that 
don't have a class entry attached to them.
I guess we could create some hybrid of the namespace and ce, but it would 
end up being ugly, with many more extra checks.

Zeev

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


RE: [PHP-DEV] Possible problem in the parser

2003-03-13 Thread Ford, Mike [LSS]
 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]
 Sent: 12 March 2003 17:26
 
  On Wed, 12 Mar 2003, Andrey Hristov wrote:
 
Few minutes ago I found the following behaviour somehow 
 wierd for me :
 
  Known bug, the associativity of the ternary operator has been
  broken since ages in the engine.  It's on the won't be
  fixed sheet, because of BC concerns.

That's a bit hard -- it's different from c, certainly (left associative
instead of right), but that's a valid choice (even if it was originally
accidental!) and calling it broken is a bit harsh.

 
 Is it documented somewhere?

Yes -- at
http://www.php.net/manual/en/language.operators.php#language.operators.prece
dence).

Just to make this completely clear, in left-associative PHP

   b = a==1? 4:a==2? 5:6;

is equivalent to

   b = (a==1? 4:a==2)? 5:6;

yielding 5 if a==1 or a==2, else 6.

But in right-associative c, it's equivalent to:

   b = a==1? 4:(a==2? 5:6);

yielding 4 if a==1, 5 if a==2, else 6.

Since this *is* documented behaviour, I don't see how it can be called
particularly unexpected.  (Weird, maybe, if you're used to the c
behaviour, but not unexpected!)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP-DEV] Scope and namespace

2003-03-13 Thread Zeev Suraski
At 15:54 13/03/2003, Andrei Zmievski wrote:
On Thu, 13 Mar 2003, Zeev Suraski wrote:
 Not really, we can't.  You can have functions inside a namespace, that
 don't have a class entry attached to them.
 I guess we could create some hybrid of the namespace and ce, but it would
 end up being ugly, with many more extra checks.
Suppose we left only one field, scope. For those functions not attached
to a class, we'd have scope-type = ZEND_NAMESPACE, and for methods we'd
have scope-type = ZEND_USER_CLASS or something. Unless, you mean that
you want to keep track of both theh namespace and the class for methods.
Yes, you need both.  The namespace effects which methods you call, the 
scope affects your access level (and sometimes also which methods you call)...

Zeev

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


[PHP-DEV] CVS Account Request: jorton

2003-03-13 Thread Joe Orton
Commit of autoconf code cleanups to php4 (4_3 branch) needed for systems which have 
system libraries in /usr/lib64 rather than /usr/lib.

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



Re: [PHP-DEV] CVS Account Request: jorton

2003-03-13 Thread Sascha Schumann
On Thu, 13 Mar 2003, Joe Orton wrote:

 Commit of autoconf code cleanups to php4 (4_3 branch) needed
 for systems which have system libraries in /usr/lib64 rather
 than /usr/lib.

Please post patches.

- Sascha

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



Re: [PHP-DEV] CVS Account Request: jorton

2003-03-13 Thread Joe Orton
On Thu, Mar 13, 2003 at 04:18:51PM +0100, Sascha Schumann wrote:
 On Thu, 13 Mar 2003, Joe Orton wrote:
 
  Commit of autoconf code cleanups to php4 (4_3 branch) needed
  for systems which have system libraries in /usr/lib64 rather
  than /usr/lib.
 
 Please post patches.

I have done, Sascha :) It was suggested privately that I apply direct.

msgid [EMAIL PROTECTED]

joe

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



[PHP-DEV] 64bit PHP on solaris

2003-03-13 Thread Chris Field
We have been attempting to run php on a brand new sun v880, and have had
a number of problems.  

first file_get_contents  readfile both core dump with bus errors b/c
the file descriptors are typed as int's when they should be longs
(steams.c lines 1020/1156)

second, and far stranger is when you open a file with the mode 'a' it
opens it the does a seek using SEEK_CUR which leaves the file pointer at
the beginning of the file, shouldn't that bee a SEEK_END?  Altering that
results in expected functionality, will it break anything else?

third, and even stranger, is in php_spn_common_handler it calls:
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|ll, s11, 
len1, s22, len2, start, len)

the va_list has the correct values for the length of the two strings
passed in, however the lengths are never assigned into len1 and len2, as
it seems they should be.  Any ideas about why this is, I am kind of at a
loss, in the mean time I simply set the lengths of the two strings in
php_spn_common_handler after the parse_parameters function returns which
fixes it.


-- 
Chris Field
[EMAIL PROTECTED]
Affinity Solutions Inc.
386 Park Avenue South
Suite 1209
New York, NY 10016
(212) 685-8748 ext. 32


signature.asc
Description: This is a digitally signed message part


Re: [PHP-DEV] 64bit PHP on solaris

2003-03-13 Thread Wez Furlong
Make sure that you are using the latest stable snapshot from
http://snaps.php.net; a number of 64bit issues have already been addressed.

--Wez.

On Thu, 13 Mar 2003, Chris Field wrote:

 We have been attempting to run php on a brand new sun v880, and have had
 a number of problems.

 first file_get_contents  readfile both core dump with bus errors b/c
 the file descriptors are typed as int's when they should be longs
 (steams.c lines 1020/1156)

 second, and far stranger is when you open a file with the mode 'a' it
 opens it the does a seek using SEEK_CUR which leaves the file pointer at
 the beginning of the file, shouldn't that bee a SEEK_END?  Altering that
 results in expected functionality, will it break anything else?

 third, and even stranger, is in php_spn_common_handler it calls:
 zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|ll, s11,
   len1, s22, len2, start, len)

 the va_list has the correct values for the length of the two strings
 passed in, however the lengths are never assigned into len1 and len2, as
 it seems they should be.  Any ideas about why this is, I am kind of at a
 loss, in the mean time I simply set the lengths of the two strings in
 php_spn_common_handler after the parse_parameters function returns which
 fixes it.


 --
 Chris Field
 [EMAIL PROTECTED]
 Affinity Solutions Inc.
 386 Park Avenue South
 Suite 1209
 New York, NY 10016
 (212) 685-8748 ext. 32


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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-13 Thread Chris Field
I am working off a checkout from about three days ago...



On Thu, 2003-03-13 at 11:21, Wez Furlong wrote:
 Make sure that you are using the latest stable snapshot from
 http://snaps.php.net; a number of 64bit issues have already been addressed.
 
 --Wez.
 
 On Thu, 13 Mar 2003, Chris Field wrote:
 
  We have been attempting to run php on a brand new sun v880, and have had
  a number of problems.
 
  first file_get_contents  readfile both core dump with bus errors b/c
  the file descriptors are typed as int's when they should be longs
  (steams.c lines 1020/1156)
 
  second, and far stranger is when you open a file with the mode 'a' it
  opens it the does a seek using SEEK_CUR which leaves the file pointer at
  the beginning of the file, shouldn't that bee a SEEK_END?  Altering that
  results in expected functionality, will it break anything else?
 
  third, and even stranger, is in php_spn_common_handler it calls:
  zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|ll, s11,
  len1, s22, len2, start, len)
 
  the va_list has the correct values for the length of the two strings
  passed in, however the lengths are never assigned into len1 and len2, as
  it seems they should be.  Any ideas about why this is, I am kind of at a
  loss, in the mean time I simply set the lengths of the two strings in
  php_spn_common_handler after the parse_parameters function returns which
  fixes it.
 
 
  --
  Chris Field
  [EMAIL PROTECTED]
  Affinity Solutions Inc.
  386 Park Avenue South
  Suite 1209
  New York, NY 10016
  (212) 685-8748 ext. 32
 
-- 
Chris Field
[EMAIL PROTECTED]
Affinity Solutions Inc.
386 Park Avenue South
Suite 1209
New York, NY 10016
(212) 685-8748 ext. 32


signature.asc
Description: This is a digitally signed message part


Re: [PHP-DEV] 64bit PHP on solaris

2003-03-13 Thread Wez Furlong
Of the PHP_4_3 branch?

Could you open a bug report for each of these three issues at
bugs.php.net?

--Wez.

On Thu, 13 Mar 2003, Chris Field wrote:

 I am working off a checkout from about three days ago...

 On Thu, 2003-03-13 at 11:21, Wez Furlong wrote:
  Make sure that you are using the latest stable snapshot from
  http://snaps.php.net; a number of 64bit issues have already been addressed.
 
  --Wez.
 
  On Thu, 13 Mar 2003, Chris Field wrote:
 
   We have been attempting to run php on a brand new sun v880, and have had
   a number of problems.
  
   first file_get_contents  readfile both core dump with bus errors b/c
   the file descriptors are typed as int's when they should be longs
   (steams.c lines 1020/1156)
  
   second, and far stranger is when you open a file with the mode 'a' it
   opens it the does a seek using SEEK_CUR which leaves the file pointer at
   the beginning of the file, shouldn't that bee a SEEK_END?  Altering that
   results in expected functionality, will it break anything else?
  
   third, and even stranger, is in php_spn_common_handler it calls:
   zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|ll, s11,
 len1, s22, len2, start, len)
  
   the va_list has the correct values for the length of the two strings
   passed in, however the lengths are never assigned into len1 and len2, as
   it seems they should be.  Any ideas about why this is, I am kind of at a
   loss, in the mean time I simply set the lengths of the two strings in
   php_spn_common_handler after the parse_parameters function returns which
   fixes it.

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



Re: [PHP-DEV] 64bit PHP on solaris

2003-03-13 Thread David Hill

Chris,
some of these changes went in a few days ago, so you want to:
cvs co -r PHP_4_3 php4
or grab the release candidate.

  first file_get_contents  readfile both core dump with bus errors
b/c
  the file descriptors are typed as int's when they should be longs
  (steams.c lines 1020/1156)

The lines don't match up to the current code... if you could tell me
based on the current lines or give me a code snippet

  third, and even stranger, is in php_spn_common_handler it calls:
  zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|ll, s11,
  len1, s22, len2, start, len)

Until a few days ago - there was an int/long issue with many calls to
zend_parse_parameter. s need an int, l needs a long. I *think* all of
these are fixed correctly.

Dave


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



RE: [PHP-DEV] Possible problem in the parser

2003-03-13 Thread Marcus Börger
At 14:58 13.03.2003, Ford, Mike   [LSS] wrote:

Just to make this completely clear, in left-associative PHP

   b = a==1? 4:a==2? 5:6;

is equivalent to

   b = (a==1? 4:a==2)? 5:6;


NO it is not equal. Either '==' has higher precedence OR '?:' has.
See one of my previous mails where i showed where the error is.
marcus

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


Re: [PHP-DEV] 64bit PHP on solaris

2003-03-13 Thread James Devenish
In message [EMAIL PROTECTED]
on Thu, Mar 13, 2003 at 02:05:45PM -0500, David Hill wrote:
   first file_get_contents  readfile both core dump with bus errors
 b/c
   the file descriptors are typed as int's when they should be longs
   (steams.c lines 1020/1156)
 
 The lines don't match up to the current code... if you could tell me
 based on the current lines or give me a code snippet

CRIPES, people! I posted patches in November 2002 (admittedly, it was a
large patch and probably no one got to check it all out). Then, I
reposted them (and sent then directly to you, Dave!) a few days ago.




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



RE: [PHP-DEV] Re: Segmentation violation

2003-03-13 Thread NAIK,ROSHAN (HP-Cupertino,ex1)
what is your platform ?


 -Original Message-
 From: Matt [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 6:03 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DEV] Re: Segmentation violation
 
 
 J, I will post an issue, but as far as I can tell the error is very 
 intermittent. I don't have a consistent action that I do each 
 time to cause 
 the error. It is just randomly (as far as I can tell) throughout the 
 application.
 
 But If you like I'll send some through
 
 J Smith wrote:
 
  
  How about providing a short example script that reproduces 
 the segfault?
  Posting a backtrace is all well and good, but it's not very 
 useful if
  nobody can see what initiated it.
  
  J
  
  
  Matt wrote:
  
  Hi, i've never posted to this newsgroup b4 so pls don't 
 shoot me down if
  this is not protocol. But I've been trying to debug a seg 
 fault trying
  varying options from various postings with little success. After
  generating a stacktrace I'm not sure really what to do 
 next to find the
  problem. If anyone can help me, given the trace below that'd be
  fantastic.
  
  thanks,
  
  Matt - [EMAIL PROTECTED]
  
  
  snipped backtrace
 
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



Re: [PHP-DEV] iterating objects with interfaces

2003-03-12 Thread Zeev Suraski
At 02:48 12/03/2003, Stephen Thorne wrote:
How soon till
('pre'.($_GET['textArea']-strip_tags()).'/pre')-print(); ?
Considering $_GET is an array of strings, infinity :)

Zeev

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


Re: [PHP-DEV] iterating objects with interfaces

2003-03-12 Thread Derick Rethans
On Wed, 12 Mar 2003, Zeev Suraski wrote:

 At 02:48 12/03/2003, Stephen Thorne wrote:
 How soon till
 ('pre'.($_GET['textArea']-strip_tags()).'/pre')-print(); ?
 
 Considering $_GET is an array of strings, infinity :)

Is that before or after hell freezes? :)

Derick

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] Re: php4 /ext/fam fam.c /ext/fbsql php_fbsql.c /ext/hwapi hwapi.cpp /ext/hyperwave hw.c /ext/informix ifx.ec /ext/ingres_ii ii.c /ext/interbase interbase.c /ext/ircg ircg.c /ext/ldap

2003-03-12 Thread moshe doron



Jani Taskinen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 
 Your cvs checkout is broken:
 
   # cvs -d :pserver:[EMAIL PROTECTED]:/repository co php5

while php5 and php4 PHP_4_3 works fine *php4* is broken.
may i missing somthing but why not do the default php4 branch PHP_4_3?

--
moshe

Re: [PHP-DEV] Re: php4 /ext/fam fam.c /ext/fbsql php_fbsql.c /ext/hwapi hwapi.cpp /ext/hyperwave hw.c /ext/informix ifx.ec /ext/ingres_iiii.c /ext/interbase interbase.c /ext/ircg ircg.c /ext/

2003-03-12 Thread Derick Rethans
On Wed, 12 Mar 2003, moshe doron wrote:

 
 
 
 Jani Taskinen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
  
  Your cvs checkout is broken:
  
# cvs -d :pserver:[EMAIL PROTECTED]:/repository co php5
 
 while php5 and php4 PHP_4_3 works fine *php4* is broken.

It's supposed to be broken.

 may i missing somthing but why not do the default php4 branch PHP_4_3?

That's techincally not possible.

Derick

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] Language Auto Detection / www.php.net

2003-03-12 Thread Gabor Hojtsy
 is there any chance that we can revert this annoying feature?
 The translated documentation is always behind and partly lacks
 important information from the english version. I want to read
 the documentation in english (and I am not the only one). This
 is only possible if I change the url after all searches to /en/
 The site should at least be so intelligent to search in the 
 /en/ part of the manual if I search from an /en/ page.

This is fixed now, and works again the way it was before the
weekend (if you explicitly specify a language with being on a
manual page in a language, or using the search page with a language
parameter, that language is carried on).

We do have language specification abilities in URL shortcuts, which
is the short term solution, while I (or someone else) add the
language cookie support. See http://php.net/urlhowto

Goba


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



Re: [PHP-DEV] Language Auto Detection / www.php.net

2003-03-12 Thread James Cox
Gabor Hojtsy [EMAIL PROTECTED] wrote:

  is there any chance that we can revert this annoying feature?
  The translated documentation is always behind and partly lacks
  important information from the english version. I want to read
  the documentation in english (and I am not the only one). This
  is only possible if I change the url after all searches to /en/
  The site should at least be so intelligent to search in the 
  /en/ part of the manual if I search from an /en/ page.
 
 This is fixed now, and works again the way it was before the
 weekend (if you explicitly specify a language with being on a
 manual page in a language, or using the search page with a language
 parameter, that language is carried on).
 
 We do have language specification abilities in URL shortcuts, which
 is the short term solution, while I (or someone else) add the
 language cookie support. See http://php.net/urlhowto

I remember adding a cookie before for something trivial (user-configurable
css) and jimw pointing out that it tends to do silly things with caching...
(ie, renders it useless)

 James

___
This mail sent using V-webmail - http://www.v-webmail.co.uk


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



Re: [PHP-DEV] Language Auto Detection / www.php.net

2003-03-12 Thread Gabor Hojtsy
   is there any chance that we can revert this annoying feature?
   The translated documentation is always behind and partly lacks
   important information from the english version. I want to read
   the documentation in english (and I am not the only one). This
   is only possible if I change the url after all searches to /en/
   The site should at least be so intelligent to search in the
   /en/ part of the manual if I search from an /en/ page.
 
  This is fixed now, and works again the way it was before the
  weekend (if you explicitly specify a language with being on a
  manual page in a language, or using the search page with a language
  parameter, that language is carried on).
 
  We do have language specification abilities in URL shortcuts, which
  is the short term solution, while I (or someone else) add the
  language cookie support. See http://php.net/urlhowto

 I remember adding a cookie before for something trivial (user-configurable
 css) and jimw pointing out that it tends to do silly things with
caching...
 (ie, renders it useless)

Adding a cookie for langauge preference is the same as using the
user's accept-language header from the technology and
caching perspective.

I have thought out the whole caching problem, and written down in
my my.php.net proposal. You can find it in the archives
(news.php.net). Basically if the setting does not modify the pages
HTML code, there is no problem with it. This is the case with a
language setting cookie, and the accept-language.

If we would like to provide CSS selection, the way to go is to have
a link rel=stylesheet href=/style.php / at the top, and print
out stylesheets without caching (or cookie dependant caching) from
that page. This would make pages have the same HTML code, but with
different user based CSS files.

Anyway, we do not have any CSS preference plans, do we?

Goba


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



Re: [PHP-DEV] How to Connect remote DB server?

2003-03-12 Thread Derick Rethans
Hello,

please forward user questions to the [EMAIL PROTECTED]
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.

Derick


On Wed, 12 Mar 2003, Patrick LOK wrote:

 It is possible to connect a remote db server using x_connect? 
 e.g. a PostgreSQL in server PSQLDB, ip=192.168.0.100  and a MSSQL server MSSQLDB, 
 ip=192.168.0.110
 
 I tried pgsql_connect(psqldb,administrator,)  
 pgsql_connect(192.168.0.100,administrator,) but failed!
 
 Error is Unable to connect to server: psqldb in psqltest.php on line 2  Unable 
 to connect to server: 192.168.0.100 in psqltest.php on line 2
 
 Can anyone help?
 
 regards
 ./pl
 

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] Segfault with latest CVS

2003-03-12 Thread Sebastian Bergmann
Derick Rethans wrote:
 uhm, this will be fixed ... some time :)

  Zeev fixed it.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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



Re: [PHP-DEV] Is PHP designed (have the capability) to access remote DB?

2003-03-12 Thread Patrick LOK
DON'T YOU THINK IT IS ABOUT THE DEVELOPMENT OF PHP ITSELF?



Derick Rethans [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Stop posting user questions to the php-dev and php5-dev list, as I
 explained before.

 Derick

 On Wed, 12 Mar 2003, Patrick LOK wrote:

  Is PHP designed (have the capability) to access remote DB?
 
  Is there any PHP developer willing to answer the question?
 
  ./pl
 

 --
 my other box is your windows PC
 -
  Derick Rethans http://derickrethans.nl/
  PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
 -



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



Re: [PHP-DEV] Is PHP designed (have the capability) to access remoteDB?

2003-03-12 Thread Derick Rethans
On Wed, 12 Mar 2003, Patrick LOK wrote:

 DON'T YOU THINK IT IS ABOUT THE DEVELOPMENT OF PHP ITSELF?

NO (and stop shouting, we're not in a market here)

Derick

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



[PHP-DEV] Re: [PHP-CVS] cvs: php4 /tests/classes interface_class.phpt interface_doubled.phpt interface_implemented.phpt interface_instantiate.phpt interface_member.phpt interface_method.phpt interface_method_final.phpt interface_method_private.phpt interface_must_be_implemented.phpt

2003-03-12 Thread Andrei Zmievski
On Wed, 12 Mar 2003, Marcus Boerger wrote:
 helly Tue Mar 11 19:10:00 2003 EDT
 
   Added files: 
 /php4/tests/classes   interface_class.phpt interface_doubled.phpt 
   interface_implemented.phpt 
   interface_instantiate.phpt 
   interface_member.phpt interface_method.phpt 
   interface_method_final.phpt 
   interface_method_private.phpt 
   interface_must_be_implemented.phpt 
   Log:
   Added some interface tests

I have 2 questions:

1. Do the interface functions have to be explicitly specified as
abstract?

   interface Foo {
function bar();
   }

Because this runs fine for me with no errors.

1. What is the difference between the following:

   interface Foo {
   }
 
   class Boo extends Foo {
   }

and

   class Zoo implements Foo {
   }

-Andrei   http://www.gravitonic.com/

In this age, which believes that there is a short cut to everything,
 the greatest lesson to be learned is that the most difficult way is, in
 the long run, the easiest.
-Henry Miller, The Books in My Life

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



[PHP-DEV] PHP - PDF on the fly

2003-03-12 Thread Bev
Hi,

BACKGROUND


I am looking to create a series of Certificates and Brouchures etc and then
using the products Print/Acrobat Distiller option save the documents as
PDF(with some pre-built in Name1, address1, address2 variables
that can be automatically resolved

on-the fly using a PHP script using a PDF_REPACE(see below code) option or
something similar. This then allows me to Create Nice looking
Brouchures/Certificates etc with variable abc markers before
converting to PDF so my online user can have personalised stationary
without the need for them to EDIT any of the documents.

My attempts using PHP - PDF on the fly
===

I am looking for guidance on whats the best method and am I on the right
track without using the long winded PDFLIB functions..

I wonder if you could help(I'm going round in circles!), I a looking to use
PHP - PDF, probably with PDF templates instead of actual PDFLIB coding
techniques.

I have tried to create a simply script(before I move on)which will process a
PDF pre-written template and resolve variables on the fly(without using
any PDFLIB functions etc). I created a simple script to do this using
Microsoft RTF but obviously this would only work on PC's where users have
WORD etc...(I assume)

I have tried myself but keep getting the error msg The file is damaged and
could not be repaired when it trys to load the amended  PDF file(see the
sample script below).

By the way, the script works fine if I comment out the PDF_REPLACE option. I
assume these are causing some type of error?? I tried updating the Acrobat
prefences/options to not load in a Browser but that just downloaded to my PC
and the same error message appeared after I double clicked on it...

The PDF template small script is attached as an example.

Rgds

Bev

?php

set_time_limit( 180 ); // this script can be very slow

//create short variable names

$name = $HTTP_POST_VARS['name'];

$score = $HTTP_POST_VARS['score'];

function pdf_replace( $pattern, $replacement, $string )

{

$len = strlen( $pattern );

$regexp = '';

for ( $i = 0; $i$len; $i++ )

{

$regexp .= $pattern[$i];

if ($i$len-1)

$regexp .= (\)\-{0,1}[0-9]*\(){0,1};

}

return ereg_replace ( $regexp, $replacement, $string );

}

if(!$name||!$score)

{

echo 'h1Error:/h1This page was called incorrectly';

}

else

{

//generate the headers to help a browser choose the correct application

$date = date( 'F d, Y' );

// open our template file

$filename = 'PHPCertification.pdf';

$fp = fopen ( $filename, 'r' );

//read our template into a variable

$output = fread( $fp, filesize( $filename ) );

header( 'Content-type: application/pdf' );

header( 'Content-Disposition: filename=cert.pdf');

fclose ( $fp );

// replace the place holders in the template with our data

$output = pdf_replace( 'NAME', strtoupper( $name ), $output );

$output = pdf_replace( 'Name', $name, $output );

$output = pdf_replace( 'score', $score, $output );

$output = pdf_replace( 'mm/dd/', $date, $output );

// send the generated document to the browser

echo $output;

}

?




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



Re: [PHP-DEV] PHP - PDF on the fly

2003-03-12 Thread Derick Rethans
Hello,

please forward user questions to the [EMAIL PROTECTED]
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.

Derick


On Wed, 12 Mar 2003, Bev wrote:

 Hi,
 
 BACKGROUND
 
 
 I am looking to create a series of Certificates and Brouchures etc and then
 using the products Print/Acrobat Distiller option save the documents as
 PDF(with some pre-built in Name1, address1, address2 variables
 that can be automatically resolved
 
 on-the fly using a PHP script using a PDF_REPACE(see below code) option or
 something similar. This then allows me to Create Nice looking
 Brouchures/Certificates etc with variable abc markers before
 converting to PDF so my online user can have personalised stationary
 without the need for them to EDIT any of the documents.
 
 My attempts using PHP - PDF on the fly
 ===
 
 I am looking for guidance on whats the best method and am I on the right
 track without using the long winded PDFLIB functions..
 
 I wonder if you could help(I'm going round in circles!), I a looking to use
 PHP - PDF, probably with PDF templates instead of actual PDFLIB coding
 techniques.
 
 I have tried to create a simply script(before I move on)which will process a
 PDF pre-written template and resolve variables on the fly(without using
 any PDFLIB functions etc). I created a simple script to do this using
 Microsoft RTF but obviously this would only work on PC's where users have
 WORD etc...(I assume)
 
 I have tried myself but keep getting the error msg The file is damaged and
 could not be repaired when it trys to load the amended  PDF file(see the
 sample script below).
 
 By the way, the script works fine if I comment out the PDF_REPLACE option. I
 assume these are causing some type of error?? I tried updating the Acrobat
 prefences/options to not load in a Browser but that just downloaded to my PC
 and the same error message appeared after I double clicked on it...
 
 The PDF template small script is attached as an example.
 
 Rgds
 
 Bev
 
 ?php
 
 set_time_limit( 180 ); // this script can be very slow
 
 //create short variable names
 
 $name = $HTTP_POST_VARS['name'];
 
 $score = $HTTP_POST_VARS['score'];
 
 function pdf_replace( $pattern, $replacement, $string )
 
 {
 
 $len = strlen( $pattern );
 
 $regexp = '';
 
 for ( $i = 0; $i$len; $i++ )
 
 {
 
 $regexp .= $pattern[$i];
 
 if ($i$len-1)
 
 $regexp .= (\)\-{0,1}[0-9]*\(){0,1};
 
 }
 
 return ereg_replace ( $regexp, $replacement, $string );
 
 }
 
 if(!$name||!$score)
 
 {
 
 echo 'h1Error:/h1This page was called incorrectly';
 
 }
 
 else
 
 {
 
 //generate the headers to help a browser choose the correct application
 
 $date = date( 'F d, Y' );
 
 // open our template file
 
 $filename = 'PHPCertification.pdf';
 
 $fp = fopen ( $filename, 'r' );
 
 //read our template into a variable
 
 $output = fread( $fp, filesize( $filename ) );
 
 header( 'Content-type: application/pdf' );
 
 header( 'Content-Disposition: filename=cert.pdf');
 
 fclose ( $fp );
 
 // replace the place holders in the template with our data
 
 $output = pdf_replace( 'NAME', strtoupper( $name ), $output );
 
 $output = pdf_replace( 'Name', $name, $output );
 
 $output = pdf_replace( 'score', $score, $output );
 
 $output = pdf_replace( 'mm/dd/', $date, $output );
 
 // send the generated document to the browser
 
 echo $output;
 
 }
 
 ?
 
 
 
 
 

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



[PHP-DEV] PHP - PDF ...hmm is this the correct way??

2003-03-12 Thread Bev
Hi,


BACKGROUND


I am looking to create a series of Certificates and Brouchures etc and then
using the products Print/Acrobat Distiller option save the documents as
PDF(with some pre-built in Name1, address1, address2 variables
that can be automatically resolved

on-the fly using a PHP script using a PDF_REPACE(see below code) option or
something similar. This then allows me to Create Nice looking
Brouchures/Certificates etc with variable abc markers before
converting to PDF so my online user can have personalised stationary
without the need for them to EDIT any of the documents.

My attempts using PHP - PDF on the fly
===

I am looking for guidance on whats the best method and am I on the right
track without using the long winded PDFLIB functions..

I wonder if you could help(I'm going round in circles!), I a looking to use
PHP - PDF, probably with PDF templates instead of actual PDFLIB coding
techniques.


I have tried to create a simply script(before I move on)which will process a
PDF pre-written template and resolve variables on the fly(without using
any PDFLIB functions etc). I created a simple script to do this using
Microsoft RTF but obviously this would only work on PC's where users have
WORD etc...(I assume)

I have tried myself but keep getting the error msg The file is damaged and
could not be repaired when it trys to load the amended  PDF file(see the
sample script below).


By the way, the script works fine if I comment out the PDF_REPLACE option. I
assume these are causing some type of error?? I tried updating the Acrobat
prefences/options to not load in a Browser but that just downloaded to my PC
and the same error message appeared after I double clicked on it...


The PDF template small script is attached as an example.

Rgds

Bev

?php


set_time_limit( 180 ); // this script can be very slow

//create short variable names

$name = $HTTP_POST_VARS['name'];

$score = $HTTP_POST_VARS['score'];

function pdf_replace( $pattern, $replacement, $string )

{

$len = strlen( $pattern );

$regexp = '';

for ( $i = 0; $i$len; $i++ )

{

$regexp .= $pattern[$i];

if ($i$len-1)

$regexp .= (\)\-{0,1}[0-9]*\(){0,1};

}

return ereg_replace ( $regexp, $replacement, $string );

}


if(!$name||!$score)

{

echo 'h1Error:/h1This page was called incorrectly';

}

else

{

//generate the headers to help a browser choose the correct application

$date = date( 'F d, Y' );


// open our template file

$filename = 'PHPCertification.pdf';

$fp = fopen ( $filename, 'r' );

//read our template into a variable

$output = fread( $fp, filesize( $filename ) );

header( 'Content-type: application/pdf' );

header( 'Content-Disposition: filename=cert.pdf');

fclose ( $fp );

// replace the place holders in the template with our data

$output = pdf_replace( 'NAME', strtoupper( $name ), $output );

$output = pdf_replace( 'Name', $name, $output );

$output = pdf_replace( 'score', $score, $output );

$output = pdf_replace( 'mm/dd/', $date, $output );



// send the generated document to the browser

echo $output;

}

?




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



Re: [PHP-DEV] PHP - PDF ...hmm is this the correct way??

2003-03-12 Thread Derick Rethans
Hello,

please forward user questions to the [EMAIL PROTECTED]
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.

Derick


On Wed, 12 Mar 2003, Bev wrote:

 Hi,
 
 
 BACKGROUND
 
 
 I am looking to create a series of Certificates and Brouchures etc and then
 using the products Print/Acrobat Distiller option save the documents as
 PDF(with some pre-built in Name1, address1, address2 variables
 that can be automatically resolved
 
 on-the fly using a PHP script using a PDF_REPACE(see below code) option or
 something similar. This then allows me to Create Nice looking
 Brouchures/Certificates etc with variable abc markers before
 converting to PDF so my online user can have personalised stationary
 without the need for them to EDIT any of the documents.
 
 My attempts using PHP - PDF on the fly
 ===
 
 I am looking for guidance on whats the best method and am I on the right
 track without using the long winded PDFLIB functions..
 
 I wonder if you could help(I'm going round in circles!), I a looking to use
 PHP - PDF, probably with PDF templates instead of actual PDFLIB coding
 techniques.
 
 
 I have tried to create a simply script(before I move on)which will process a
 PDF pre-written template and resolve variables on the fly(without using
 any PDFLIB functions etc). I created a simple script to do this using
 Microsoft RTF but obviously this would only work on PC's where users have
 WORD etc...(I assume)
 
 I have tried myself but keep getting the error msg The file is damaged and
 could not be repaired when it trys to load the amended  PDF file(see the
 sample script below).
 
 
 By the way, the script works fine if I comment out the PDF_REPLACE option. I
 assume these are causing some type of error?? I tried updating the Acrobat
 prefences/options to not load in a Browser but that just downloaded to my PC
 and the same error message appeared after I double clicked on it...
 
 
 The PDF template small script is attached as an example.
 
 Rgds
 
 Bev
 
 ?php
 
 
 set_time_limit( 180 ); // this script can be very slow
 
 //create short variable names
 
 $name = $HTTP_POST_VARS['name'];
 
 $score = $HTTP_POST_VARS['score'];
 
 function pdf_replace( $pattern, $replacement, $string )
 
 {
 
 $len = strlen( $pattern );
 
 $regexp = '';
 
 for ( $i = 0; $i$len; $i++ )
 
 {
 
 $regexp .= $pattern[$i];
 
 if ($i$len-1)
 
 $regexp .= (\)\-{0,1}[0-9]*\(){0,1};
 
 }
 
 return ereg_replace ( $regexp, $replacement, $string );
 
 }
 
 
 if(!$name||!$score)
 
 {
 
 echo 'h1Error:/h1This page was called incorrectly';
 
 }
 
 else
 
 {
 
 //generate the headers to help a browser choose the correct application
 
 $date = date( 'F d, Y' );
 
 
 // open our template file
 
 $filename = 'PHPCertification.pdf';
 
 $fp = fopen ( $filename, 'r' );
 
 //read our template into a variable
 
 $output = fread( $fp, filesize( $filename ) );
 
 header( 'Content-type: application/pdf' );
 
 header( 'Content-Disposition: filename=cert.pdf');
 
 fclose ( $fp );
 
 // replace the place holders in the template with our data
 
 $output = pdf_replace( 'NAME', strtoupper( $name ), $output );
 
 $output = pdf_replace( 'Name', $name, $output );
 
 $output = pdf_replace( 'score', $score, $output );
 
 $output = pdf_replace( 'mm/dd/', $date, $output );
 
 
 
 // send the generated document to the browser
 
 echo $output;
 
 }
 
 ?
 
 
 
 
 

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



[PHP-DEV] Need some ZE2 functions exported.

2003-03-12 Thread l0t3k
im trying to do some namespace related experimentation but im getting the
following link errors :
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_init_namespace
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_initialize_class_data
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_do_inheritance
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_register_functions

any chance of exporting the offenders here ?  here's precisely the code im
using (modified from marcus):

/* {{{ register_interface */
/* You will have to alloc the pce before the call and namespace_entry must
be valid */
zend_class_entry* register_class(zend_namespace *namespace_entry,
zend_class_entry *parent_ce,
char *class_name,
zend_function_entry *functions
TSRMLS_DC)
{
 int name_length = strlen(class_name);
 char *lowercase_name = zend_strndup(class_name, name_length);

 zend_class_entry *pce = emalloc(sizeof(zend_class_entry));

 pce-type = ZEND_INTERNAL_CLASS;
 pce-name_length = name_length;
 pce-name = class_name;

 pce-parent = NULL;
 pce-num_interfaces = 0;

 zend_initialize_class_data(pce, 1 TSRMLS_CC);
 pce-ns = namespace_entry;

 if (functions) {
  zend_register_functions(pce, functions, pce-function_table,
MODULE_PERSISTENT TSRMLS_CC);
 }

 if (parent_ce) {
  zend_do_inheritance(pce, parent_ce);
 }

 zend_str_tolower(lowercase_name, name_length);
 zend_hash_add(namespace_entry-class_table, lowercase_name,
name_length+1, pce, sizeof(zend_class_entry *), NULL);
 free(lowercase_name);

 return pce;
}
/* }}} */

l0t3k





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



[PHP-DEV] Re: Segmentation violation

2003-03-12 Thread J Smith

How about providing a short example script that reproduces the segfault?
Posting a backtrace is all well and good, but it's not very useful if
nobody can see what initiated it.

J


Matt wrote:

 Hi, i've never posted to this newsgroup b4 so pls don't shoot me down if
 this is not protocol. But I've been trying to debug a seg fault trying
 varying options from various postings with little success. After
 generating a stacktrace I'm not sure really what to do next to find the
 problem. If anyone can help me, given the trace below that'd be fantastic.
 
 thanks,
 
 Matt - [EMAIL PROTECTED]
 

snipped backtrace

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



[PHP-DEV] Re: PHP Startup Error In Apache

2003-03-12 Thread J Smith

Looks like a problem with your php.ini file. There should be some lines in
there that read something like

extension=xslt.so
extension=xmlrpc.so
extension=xml.so

There should also be a line that reads

extension_dir=/some/path

Make sure the path in extension_dir actually leads to the extension library
files. If it doesn't, change it. If those files don't exist, remove their
extension= entries.

This sort of question belongs in php.general, not php.dev. 

J


Ray Hunter wrote:

 
 Has anyone seen these startup errors before?
 
 These are from my apache error_log file when i start up apache:
 
 PHP Warning:  Unknown(): Unable to load dynamic library

'/usr/local/php-4.3.0/lib/php/extensions/no-debug-non-zts-20020429/xslt.so'
 -
 /usr/local/php-4.3.0/lib/php/extensions/no-debug-non-zts-20020429/xslt.so:
 cannot open shared object file: No such file or directory in Unknown on
 line 0
 
 PHP Warning:  Unknown(): Unable to load dynamic library

'/usr/local/php-4.3.0/lib/php/extensions/no-debug-non-zts-20020429/xmlrpc.so'
 -

/usr/local/php-4.3.0/lib/php/extensions/no-debug-non-zts-20020429/xmlrpc.so:
 cannot open shared object file: No such file or directory in Unknown on
 line 0
 
 PHP Warning:  Unknown(): Unable to load dynamic library
 '/usr/local/php-4.3.0/lib/php/extensions/no-debug-non-zts-20020429/xml.so'
 -
 /usr/local/php-4.3.0/lib/php/extensions/no-debug-non-zts-20020429/xml.so:
 cannot open shared object file: No such file or directory in Unknown on
 line 0
 
 PHP:4.3.0 - 4.3.1
 Apache: 1.3.27
 Mandrake:   9.0
 
 
 How can i fix these warnings?
 
 
 Thanks,
 
 Ray


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



[PHP-DEV] function to read fixed length text

2003-03-12 Thread Frederic . Hahn
Hi Devs,

as this is the first time I post to this list, I hope I do the right thing.
I programmed a nice little function, that is not very nitty but might 
be useful for other users as well.

See the script below.

Cheers!
-- 
{Bis bald
Frederic;}


?
// function to read a 'fixed lenght' text file in an array  
// delivers an array containg the values
//
// $string  = string to read
// $lengths = array containing the lenghts of the input fields  
// $number  = number of fields/columns
//
// Usage read_fl(string string, array lengths, int number)

function read_fl ($string, $lengths, $number)
{
// tests
if (!is_array($lengths)) $err = $lengths is not an array;
$lang = count($lengths);
if ($lang != $number) $err =number of fields/columns and number of
length statements does not match;

if (!$err) {
$start = 0;
$i = 0;
foreach ($eingabelänge as $wert) 
{
$i++;
$tmp[] = substr($zeile, $start,
$wert);
$start = $start + $wert;
}
foreach ($tmp as $zahl) echo $zahl.br;
}
if ($err) return $err;
else return $tmp;
}

?

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



Re: [PHP-DEV] function to read fixed length text

2003-03-12 Thread didou
Hi,

You should post this to [EMAIL PROTECTED], this one is for development OF PHP.

Cheers,



 Hi Devs,
 
 as this is the first time I post to this list, I hope I do the right thing.
 I programmed a nice little function, that is not very nitty but might 
 be useful for other users as well.
 
 See the script below.
 
 Cheers!
 -- 
 {Bis bald
 Frederic;}
 
 
 ?
 // function to read a 'fixed lenght' text file in an array  
 // delivers an array containg the values
 //
 // $string= string to read
 // $lengths   = array containing the lenghts of the input fields  
 // $number= number of fields/columns
 //
 // Usage read_fl(string string, array lengths, int number)
 
 function read_fl ($string, $lengths, $number)
   {
   // tests
   if (!is_array($lengths)) $err = $lengths is not an array;
   $lang = count($lengths);
   if ($lang != $number) $err =number of fields/columns and number of
 length statements does not match;
   
   if (!$err) {
   $start = 0;
   $i = 0;
   foreach ($eingabelänge as $wert) 
   {
   $i++;
   $tmp[] = substr($zeile, $start,
 $wert);
   $start = $start + $wert;
   }
   foreach ($tmp as $zahl) echo $zahl.br;
   }
   if ($err) return $err;
   else return $tmp;
   }
   
 ?
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



Re: [PHP-DEV] function to read fixed length text

2003-03-12 Thread Derick Rethans
On Wed, 12 Mar 2003 [EMAIL PROTECTED] wrote:

 as this is the first time I post to this list, I hope I do the right thing.

It's the wrong list, user questions/additions/usefullness should go to 
[EMAIL PROTECTED], only if you are developing the PHP language 
or have bugs you can post here.

Derick

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



[PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Jani Taskinen

Of about 20 emails today, 6 were posted to wrong mailing
list. And one of those generated a 5 email thread about not
posting to wrong mailing list. (counting this one :)

So I suggest we finally make this list MODERATED.

--Jani



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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Derick Rethans
On Wed, 12 Mar 2003, Jani Taskinen wrote:

 
 Of about 20 emails today, 6 were posted to wrong mailing
 list. And one of those generated a 5 email thread about not
 posting to wrong mailing list. (counting this one :)
 
 So I suggest we finally make this list MODERATED.

+1

Derick

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Andrey Hristov
 I think this is just a bad day :)

Andrey

- Original Message - 
From: Jani Taskinen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 6:59 PM
Subject: [PHP-DEV] Moderate PHP-DEV


 
 Of about 20 emails today, 6 were posted to wrong mailing
 list. And one of those generated a 5 email thread about not
 posting to wrong mailing list. (counting this one :)
 
 So I suggest we finally make this list MODERATED.
 
 --Jani
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Sascha Schumann
On Wed, 12 Mar 2003, Jani Taskinen wrote:


 Of about 20 emails today, 6 were posted to wrong mailing
 list. And one of those generated a 5 email thread about not
 posting to wrong mailing list. (counting this one :)

 So I suggest we finally make this list MODERATED.

-1.

The list could be renamed so that it is less confusing for
newbie PHP developers.

- Sascha

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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Sterling Hughes
On Wed, 2003-03-12 at 12:01, Derick Rethans wrote:
 On Wed, 12 Mar 2003, Jani Taskinen wrote:
 
  
  Of about 20 emails today, 6 were posted to wrong mailing
  list. And one of those generated a 5 email thread about not
  posting to wrong mailing list. (counting this one :)
  
  So I suggest we finally make this list MODERATED.
 
 +1

+1.  

People who say that important messages will get lost: they already do. 
Many people can't hear over the din.  I'm more worried about the 25% of
developer mail that gets lost than the 1% of useful user mail that might
get lost.

-Sterling

 
 Derick
 
 -- 
 my other box is your windows PC
 -
  Derick Rethans http://derickrethans.nl/
  PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
 -
-- 
Science is like sex: sometimes something useful comes out, 
but that is not the reason we are doing it. 
- Richard Feynman


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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Jani Taskinen

It was a 7 hour period. And not only today,
this happens daily. (maybe not in this scale)
For me, even 1 OT email is too much. 

(But it's propably just me, who is stupid enough to read 
EVERY email coming here.)

--Jani


On Wed, 12 Mar 2003, Andrey Hristov wrote:

 I think this is just a bad day :)

Andrey

- Original Message - 
From: Jani Taskinen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 6:59 PM
Subject: [PHP-DEV] Moderate PHP-DEV


 
 Of about 20 emails today, 6 were posted to wrong mailing
 list. And one of those generated a 5 email thread about not
 posting to wrong mailing list. (counting this one :)
 
 So I suggest we finally make this list MODERATED.
 
 --Jani
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
- For Sale! -


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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Brian Moon
| -1.
| 
| The list could be renamed so that it is less confusing for
| newbie PHP developers.
| 
| - Sascha

I agree.

Brian.
dealnews.com


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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Andrey Hristov
 Okay Jani,
I also read every mail here but a non-related to this mail is easily
recognizable in 2-3 secs.
Most time loses Derick who answers (thanks).

May be the change of the list name is good idea.

Andrey

- Original Message -
From: Jani Taskinen [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 7:07 PM
Subject: Re: [PHP-DEV] Moderate PHP-DEV



 It was a 7 hour period. And not only today,
 this happens daily. (maybe not in this scale)
 For me, even 1 OT email is too much.

 (But it's propably just me, who is stupid enough to read
 EVERY email coming here.)

 --Jani


 On Wed, 12 Mar 2003, Andrey Hristov wrote:

  I think this is just a bad day :)
 
 Andrey
 
 - Original Message -
 From: Jani Taskinen [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 6:59 PM
 Subject: [PHP-DEV] Moderate PHP-DEV
 
 
 
  Of about 20 emails today, 6 were posted to wrong mailing
  list. And one of those generated a 5 email thread about not
  posting to wrong mailing list. (counting this one :)
 
  So I suggest we finally make this list MODERATED.
 
  --Jani
 
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

 --
 - For Sale! -


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



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



Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Jani Taskinen
On Wed, 12 Mar 2003, Andrey Hristov wrote:

 Okay Jani,
I also read every mail here but a non-related to this mail is easily
recognizable in 2-3 secs.
  
Whatever. It's still noise.

Most time loses Derick who answers (thanks).

Yeah, as I don't bother replying to those. :)

May be the change of the list name is good idea.

For a day or two? :)

--Jani


Andrey

- Original Message -
From: Jani Taskinen [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 7:07 PM
Subject: Re: [PHP-DEV] Moderate PHP-DEV



 It was a 7 hour period. And not only today,
 this happens daily. (maybe not in this scale)
 For me, even 1 OT email is too much.

 (But it's propably just me, who is stupid enough to read
 EVERY email coming here.)

 --Jani


 On Wed, 12 Mar 2003, Andrey Hristov wrote:

  I think this is just a bad day :)
 
 Andrey
 
 - Original Message -
 From: Jani Taskinen [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 6:59 PM
 Subject: [PHP-DEV] Moderate PHP-DEV
 
 
 
  Of about 20 emails today, 6 were posted to wrong mailing
  list. And one of those generated a 5 email thread about not
  posting to wrong mailing list. (counting this one :)
 
  So I suggest we finally make this list MODERATED.
 
  --Jani
 
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

 --
 - For Sale! -


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





-- 
- For Sale! -


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



[PHP-DEV] Possible problem in the parser

2003-03-12 Thread Andrey Hristov
 Few minutes ago I found the following behaviour somehow wierd for me :
?php
$a = 1;
$b = $a==1? 4:$a==2? 5:6;
printf(a[%d]b[%d]\n, $a, $b);
?
Prints : 
a[1]b[5]

Similar C program :
main()
{
int a,b;
a = 1;
b = a==1? 4:a==2? 5:6;
printf(a[%d]b[%d]\n, a, b);
}
Prints : 
a[1]b[4]

-=-=-=-=-=-
I think that the behavior of the C program is the right

Andrey





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



Re: [PHP-DEV] Possible problem in the parser

2003-03-12 Thread Sascha Schumann
On Wed, 12 Mar 2003, Andrey Hristov wrote:

  Few minutes ago I found the following behaviour somehow wierd for me :

Known bug, the associativity of the ternary operator has been
broken since ages in the engine.  It's on the won't be
fixed sheet, because of BC concerns.

- Sascha

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



Re: [PHP-DEV] Possible problem in the parser

2003-03-12 Thread Andrey Hristov
- Original Message - 
From: Sascha Schumann [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 7:21 PM
Subject: Re: [PHP-DEV] Possible problem in the parser


 On Wed, 12 Mar 2003, Andrey Hristov wrote:
 
   Few minutes ago I found the following behaviour somehow wierd for me :
 
 Known bug, the associativity of the ternary operator has been
 broken since ages in the engine.  It's on the won't be
 fixed sheet, because of BC concerns.
 

h


Andrey


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



  1   2   3   4   5   6   7   8   9   10   >