Re: [PHP-DEV] No file uploaded...

2002-07-18 Thread derick

Hello,

this is fixed already, so just wait for a new release.

Derick

On Wed, 17 Jul 2002, Lance Lovette wrote:

 I have a question related to bug #17530. The message Notice: No file
 uploaded in Unknown on line 0 is driving me crazy. I see it every time I
 submit a bug report in Mantis or execute a query in phpMyAdmin. They only
 way I've found to get it to stop is to disable E_NOTICE in php.ini. I don't
 like having to turn off all E_NOTICE messages just to silence this
 individual notice because most of the others are very useful. Is there any
 way to prevent this notice from being output?
 
 Lance
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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


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




[PHP-DEV] Module startup/shutdown in PHP extensions

2002-07-18 Thread Pete Dishman

Hi,

I've just started creating my own PHP extension and am having some trouble
understanding the ZEND_MODULE_STARTUP and ZEND_MODULE_SHUTDOWN functions.

my zend_module_entry is as follows:

zend_module_entry tpphp_module_entry = {
 STANDARD_MODULE_HEADER,
 tpphp,
 tpphp_functions,
 ZEND_MODULE_STARTUP_N(tpphp),
 ZEND_MODULE_SHUTDOWN_N(tpphp),
 ZEND_MODULE_ACTIVATE_N(tpphp),
 ZEND_MODULE_DEACTIVATE_N(tpphp),
 ZEND_MODULE_INFO_N(tpphp),
 NO_VERSION_YET,
 STANDARD_MODULE_PROPERTIES
};

and then I have the two module functions defined as:

ZEND_MODULE_STARTUP_D(tpphp)
{
 FILE *fp;

 fp =fopen(d:/moduleinit.txt, w+);
 if (fp)
  fclose(fp);

 return SUCCESS;
}

ZEND_MODULE_SHUTDOWN_D(tpphp)
{
 FILE *fp;

 fp =fopen(d:/moduleshutdown.txt, w+);
 if (fp)
  fclose(fp);

 return SUCCESS;
}

the file functions are just so I can see when they're being called and are
only temporary.

I'm running php 4.1.1 as an apache module (1.3.20) (on NT4 workstation) and
am loading the extension via the php.ini file.

Now the problem is when I start apache (net start apache) php seems to call
the module startup function and then it calls the module shutdown function
immediately afterwards.  The request startup and shutdown functions seem to
work as expected, i.e. they get called when I make a request to apache.

If I then stop apache (net stop apache) the module shutdown function gets
called as expected.  It's just when starting that the problem occurs.  Is
this the expected behaviour and if so is there anyway of telling in the
module shutdown function if the module really is shutting down or have I
done something completely wrong?

TIA

Pete




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




[PHP-DEV] CVS Account Request: shadow

2002-07-18 Thread Ozan Ademi

I Like to learn PHP

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




[PHP-DEV] Error in zend2_example.phps

2002-07-18 Thread Sander Steffann

I think zend2_example.phps has a little error in example 6:

The display function is defined as:
function display()
{
print $this-name;
print \n;
}

But then it is called with:
print $person-getName()-display();

Either the function should use return, or the call shouldn't use print...




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




[PHP-DEV] How can I search in the dev list?

2002-07-18 Thread Braulio José Solano Rojas

Hi!

Is there an interface to search through the dev list?

I'm looking on how to use PHP functions into C code inside an extension.  I
know that this question has been answered before and I would like to search
and read previous postings.

Thanks!

Regards,

Braulio Solano



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




Re: [PHP-DEV] How can I search in the dev list?

2002-07-18 Thread Martin Jansen

On Thu Jul 18, 2002 at 11:1525AM -0600, Braulio José Solano Rojas wrote:
 Is there an interface to search through the dev list?

http://marc.theaimsgroup.com/?l=php-dev

- Martin
-- 
Martin Jansen  -  [EMAIL PROTECTED]
  http://martinjansen.com/

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




Re: [PHP-DEV] How can I search in the dev list?

2002-07-18 Thread derick

Hi,

http://marc.theaimsgroup.com/?l=php-devr=1w=2

or

http://news.php.net


Derick

On Thu, 18 Jul 2002, Braulio José Solano Rojas wrote:

 Hi!
 
 Is there an interface to search through the dev list?
 
 I'm looking on how to use PHP functions into C code inside an extension.  I
 know that this question has been answered before and I would like to search
 and read previous postings.
 
 Thanks!
 
 Regards,
 
 Braulio Solano
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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


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




Re: [PHP-DEV] How can I search in the dev list?

2002-07-18 Thread Rick Widmer

At 11:15 AM 7/18/02 -0600, Braulio José Solano Rojas wrote:
Hi!

Is there an interface to search through the dev list?

Try:

http://marc.theaimsgroup.com/?l=php-devr=1w=2


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




[PHP-DEV] Re: How can I search in the dev list?

2002-07-18 Thread Braulio José Solano Rojas

Hi!

Thank Martin, Rick and Derick very much.

Best regards,

Braulio Solano



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




RE: [PHP-DEV] CVS Account Request: pgc

2002-07-18 Thread Lukas Smith

As the package maintainer I can only say that I would welcome this :-)
So give the man some pear karma :-)

Best regards,
Lukas

 -Original Message-
 From: Paul Gregory Cooper [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 17, 2002 1:00 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DEV] CVS Account Request: pgc
 
 To develop and maintain the MDB postgres driver, and MDB in general
 (/pear/MDB/)
 
 --
 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




[PHP-DEV] ldap controls

2002-07-18 Thread Matthew Gray

A while back there was some talk about adding ldap_search_ext() and 
ldap_create_*_control()-style functions to PHP to allow server(and maybe 
client someday?) controls to be sent along with a request.  Is anybody 
working on or still thinking about doing this?  

Thanks
Matt


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




[PHP-DEV] information request

2002-07-18 Thread M Bruggeman

Hello,

I have been using php for some time now and am interrested in exploring 
how php handles strings. There are some things about the way php does 
things I find ugly but I would like to know more before I go making 
proposals.

I have read the docs and searched the php-dev list but have not found the 
kind of in depth discussion on the internals and strings that I am 
looking for.

Specifically I am interrested in variable interpolation and all the side 
effects of double quotes (I consider addslashes/stripslashes to be a 
kind of side effect as they are only necessary because of the magic 
of double quotes - as I understand it now. But then that is why I am 
asking for more information. There could be more to it.)

Thankyou for your time and attention.
Martin


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




Re: [PHP-DEV] information request

2002-07-18 Thread Rasmus Lerdorf

   Specifically I am interrested in variable interpolation and all the side
 effects of double quotes (I consider addslashes/stripslashes to be a
 kind of side effect as they are only necessary because of the magic
 of double quotes - as I understand it now. But then that is why I am
 asking for more information. There could be more to it.)

No, addslashes/stripslases has to do with databases that want quotes
escaped.  They have nothing to do with PHP's internal string handling.

-Rasmus


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




[PHP-DEV] ldap_start_tls() suggestion

2002-07-18 Thread Matt Wirges

The documentation for ldap_start_tls does not mention that you MUST be using LDAP 
protcol version 3.  I spent a day looking through google and source
trying to figure out why this was happening.  I finally just changed ext/ldap/ldap.c 
to force LDAP protocol version 3.  
After happening across bug #13278 I realized that I could have just used 
ldap_set_option (I neglected to take notice of this function 
probably just because I was burnt out from trying to solve this problem.)

Could ldap_start_tls be changed to force protocol version 3 (since it is required) or 
could the ldap_start_tls function page be updated
to alert people that this must be done?

The changes I made to get this to work, though sort of a waste of time now that I know 
of ldap_set_option are below.

-matt

--- ext/ldap/ldap.c-distThu Jul 18 15:35:00 2002
+++ ext/ldap/ldap.c Thu Jul 18 15:49:52 2002
 -1997,15 +1997,22 
Start TLS */
 PHP_FUNCTION(ldap_start_tls)
 {
+   int version = LDAP_VERSION3;
pval **link;
ldap_linkdata *ld;
-
+
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, link) == FAILURE) {
WRONG_PARAM_COUNT;
}

ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, link, -1, ldap link, le_link);

+   //try to set LDAP version to LDAP_VERSION3
+   if (ldap_set_option(ld-link, LDAP_OPT_PROTOCOL_VERSION, version) != 
+LDAP_SUCCESS) {
+   php_error(E_WARNING, LDAP: TLS:  Unable to start TLS: %s,
+   ldap_err2string(_get_lderrno(ld-link)));
+   RETURN_FALSE;
+   }
if (ldap_start_tls_s(ld-link, NULL, NULL) != LDAP_SUCCESS) {
php_error(E_WARNING,LDAP:  Unable to start TLS: %s,
  ldap_err2string(_get_lderrno(ld-link)));

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




[PHP-DEV] PHP -f or -q?

2002-07-18 Thread Lance Lovette

I am executing PHP CGI scripts from the command line. I usually run scripts
using the -f switch. However I recently started passing arguments to the
scripts and notice that if the first argument after the name of the script
is a hyphenated argument it will not be passed to the script. For example,
this works:

% php -f script.php a --b

[argv] = Array
(
 [0] = script.php
 [1] = a
 [2] = --b
)

However, this does not:

% php -f script.php --a --b

[argv] = Array
(
 [0] = script.php
 [1] = --b
)

Using the -q switch instead of -f works:

% php -q script.php --a --b

[argv] = Array
(
 [0] = script.php
 [1] = --a
 [2] = --b
)

Is this a bug? When should one use the -f switch versus the -q switch? BTW,
I'm running Red Hat 7.2 with the latest version of PHP.

Thanks!
Lance


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




[PHP-DEV] IMAP quota functionality

2002-07-18 Thread Dan Kalowsky

Hey there php-dev readers,

Attached is a patch (based off of 4.2.1 release) for the IMAP system that
needs testing.  It's been brought to my attention that the quota support
is sort of... well, not standards compliant.  So I tried to fix that.

In the process I've also hopefully added in imap_get_quotaroot()
capabilities as well.

This patch NEEDS through testing, but would be nice to see in 4.3.
Unfortunately I have no access to an IMAP server with quota capabilities
turned on, so I can't really test.

imap_get_quota() should work the same, only now you will be returned the
name value as well, or whatever that is in quota name field (i.e. a
message).  The qlist array now looks like:

[qlist] = [name]
= [usage]
= [limit]

imap_get_quotaroot() should not require the user to be run as a mail-admin
user, making this eventually much more useful.  Here is an example using
it:

?php

$mbx = imap_open( /* blah blah blah */);
$qroot = imap_get_quotaroot($mbx, INBOX);
// this should retrieve the quota for the logged in users INBOX
if (!$qroot) {
  print We have nothing!;
} else {
  foreach ($qroot as $name = $value)
print $name and $value\n;
}

?

As usual please test and send any comments back to me.

---
Dan KalowskyA little less conversation,
http://www.deadmime.org/~danka little more action.
[EMAIL PROTECTED] - A Little Less Conversation,
[EMAIL PROTECTED] Elvis Presley


Only in imap: .deps
Only in imap: libs.mk
diff -u imap-orig/php_imap.c imap/php_imap.c
--- imap-orig/php_imap.cWed Apr 24 11:30:16 2002
+++ imap/php_imap.c Thu Jul 18 18:04:21 2002
@@ -22,6 +22,7 @@
|  Andrew Skalski  [EMAIL PROTECTED]  |
|  Hartmut Holzgraefe  [EMAIL PROTECTED]|
|  Jani Taskinen   [EMAIL PROTECTED] |
+   |  Daniel R. Kalowsky  [EMAIL PROTECTED]  |
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
@@ -132,6 +133,7 @@
 
 #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
PHP_FE(imap_get_quota,  NULL)
+   PHP_FE(imap_get_quotaroot,  NULL)
PHP_FE(imap_set_quota,  NULL)
PHP_FE(imap_setacl,
 NULL)
 #endif
@@ -371,12 +373,22 @@
 {
TSRMLS_FETCH();
 
-   /* this should only be run through once */
-   for (; qlist; qlist = qlist-next)
-   {
-   IMAPG(quota_usage) = qlist-usage;
-   IMAPG(quota_limit) = qlist-limit;
-   }
+   IMAPG(quota_return) = qlist;
+
+}
+/* }}} */
+
+/* {{{ mail_getquotaroot
+ *
+ * Mail GET_QUOTAROOT callback
+ * Called via the mail_parameter function in c-client:src/c-client/mail.c
+ * Author DRK
+ */
+void mail_getquotaroot(MAILSTREAM *stream, char *mbx, STRINGLIST *qroot)
+{
+   TSRMLS_FETCH();
+
+   IMAPG(quotaroot_return) = qroot;
 }
 /* }}} */
 #endif
@@ -396,6 +408,10 @@
imap_globals-imap_folder_objects = NIL;
imap_globals-imap_sfolder_objects = NIL;
imap_globals-folderlist_style = FLIST_ARRAY;
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+   imap_globals-quota_return = NIL;
+   imap_globals-quotaroot_return = NIL;
+#endif
 }
 /* }}} */
 
@@ -1017,6 +1033,7 @@
 {
zval **streamind, **qroot;
pils *imap_le_struct;
+   QUOTALIST *qlist;
 
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, streamind, qroot) == 
FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -1037,9 +1054,54 @@
php_error(E_WARNING, Unable to allocate array memory);
RETURN_FALSE;
}
-   
-   add_assoc_long(return_value, usage, IMAPG(quota_usage));
-   add_assoc_long(return_value, limit, IMAPG(quota_limit));
+
+   qlist = IMAPG(quota_return);
+
+   for (; qlist; qlist = qlist-next) {
+   add_assoc_long(return_value, usage, qlist-usage);
+   add_assoc_long(return_value, limit, qlist-limit);
+   add_assoc_string(return_value, name, qlist-name, 
+strlen(qlist-name));
+   }
+
+   IMAPG(quota_return) = NIL;
+}
+/* }}} */
+
+/* {{{ proto array imap_get_quotaroot(int stream_id, string mbox)
+Returns the quota set to the mailbox account mbox */
+PHP_FUNCTION(imap_get_quotaroot)
+{
+zval **streamind, **mbox;
+pils *imap_le_struct;
+STRINGLIST *qlist;
+
+if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, streamind, mbox) == 
+FAILURE) {
+ZEND_WRONG_PARAM_COUNT();
+}
+

[PHP-DEV] autoconf-2.5x users: HEADS UP

2002-07-18 Thread Sascha Schumann

If you want to use autoconf-2.5x with PHP, make sure that you
run a ./cvsclean after cvs update.  Autoconf-2.5x will not
correctly rebuild configure/php_config.h in many cases.

This happens under the following circumstances:

- configure.in, acinclude.m4 did not change
- any config.m4 was updated

Due to its architectural slowness, autoconf-2.5x includes a
cache which fails to properly detect or check dependencies.

It is becoming more and more apparent that there is a need
for forking autoconf-2.13 and merging positive changes from
2.5x.

Try it out yourself:

$ echo echo hi  ext/ircg/config.m4
$ ./buildconf
$ grep echo hi configure|wc -l
0

$ ./cvsclean
$ ./buildconf
$ grep echo hi configure|wc -l
1

- Sascha


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




Re: [PHP-DEV] Module startup/shutdown in PHP extensions

2002-07-18 Thread David Eriksson

On Thu, 18 Jul 2002, Pete Dishman wrote:

[snip]

 Now the problem is when I start apache (net start apache) php seems to call
 the module startup function and then it calls the module shutdown function
 immediately afterwards.  The request startup and shutdown functions seem to
 work as expected, i.e. they get called when I make a request to apache.
 
 If I then stop apache (net stop apache) the module shutdown function gets
 called as expected.  It's just when starting that the problem occurs.  Is
 this the expected behaviour and if so is there anyway of telling in the
 module shutdown function if the module really is shutting down or have I
 done something completely wrong?

I have seen this behaviour too, I guess PHP just works this way, it calls
the module startup and shutdown function pair once on initilization.

I have never bothered to figure out why :-)

-\- David Eriksson -/-

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


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