[PHP] Remove duplicates, as long as you have it.

2001-04-22 Thread Richard

Greetings.

I have this link file which has been active for quite a while, but the
problem is that when I used a "admin" program to manage the links
(admin.php) it kinda wrote the file multiple times, which means that it has
sorted the file and added multiple instances of the lines.

How I managed to create it? Well, by using the free linkadd/linkmanager
PHP script. Anyhow, what I need is how can I remove duplicates that are
sorted in arrays? Or does anyone of you has such a script or C++ program, so
you could sort the file for me or something?

Thanks
- Richard



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




Re: [PHP] pumping database dump in mysql

2001-04-22 Thread Christian Reiniger

On Saturday 21 April 2001 15:39, Peter Van Dijck wrote:
> Hi,
> I want to write a script that takes a mysql dump file and pumps it into
> the database.

What about simply using phpMyAdmin?

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

"Software is like sex: the best is for free" -- Linus Torvalds

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




RE: [PHP] passing variables

2001-04-22 Thread PHPBeginner.com

using POST, Cookies or sessions.

session is the most appropriate way to do that.

php.net/sessions


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Adam [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 8:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] passing variables


how could i pass a variable between pages without them seeing the variable
stated in the URL?



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



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




[PHP] what's wrong with this?

2001-04-22 Thread McShen

this is something related to my last post.

$start is passed by the url. like http://mydomain.com/links.ph?start=0;
$end =$start+15;

$query = "SELECT * FROM refer ORDER BY hits desc LIMIT $start,$end";

it didn't work. Please help.



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




RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com

You can (mySQL, right?) do the following:

UPDATE table SET date=(date+INTERVAL 10 DAYS);

so if date there was 04-28, it will be added 10 more days and so will become
05-08

Use SQL for this things, it treats dates as 'dates' while PHP treats them as
integers and strings.




Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 7:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Incrementing dates


How do I increment dates past the turn of the month (or year)?
Say I've got a booking of equipment A for the 28 April to 5 May and want to
add each instance to a calendar (mysql table).
Can I increment the variable (format 2001-04-28) holding the date
($txtDate++) somehow so that it doesn't add the 31, 32 and 33 of April?

Martin S.

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



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




[PHP] File Download With A Twist....

2001-04-22 Thread Donovan J. Edye

G'Day,

I would like to do the following when a user clicks on a link to this PHP
script. The script would be located on www.myserver.com but the page with
the link would be on a mirror say in Australia (www.someserver.com.au):

- Log info about the user download request to a text file
- Display a page ("Thankyou for downloading . If you download does not
start automatically. etc.)
- Start a download of a file from a remote server based on the parameters to
the script

Eg:  Suppose that the page on www.someserver.com.au contained the following
link http://www.myserver.com/dnld.php?loc=au&file=somefile.zip

- Log info about the user download request to a text file

Write this info into a text file on www.myserver.com

- Display a page ("Thankyou for downloading . If you download does not
start automatically. etc.)

Display the page in the user's browser

- Start a download of a file from a remote server based on the parameters to
the script

Essentially initiate http://www.someserver.com.au/somefile.zip

TIA

-- Donovan


E-Mail: [EMAIL PROTECTED]  Web: www.edye.wattle.id.au
"If I throw a stick will you go away?"
"Very funny Scotty. Now beam down my pants!"
GXExplorer - Freeware Delphi Windows Explorer Replacement
and Delphi Components www.gxexplorer.org





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




RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com

I am not sure on how your possibilities are,
but doing this in PHP means literally "adding useless lines and loops"

If possible, do it with SQL queries. Read the documentations on date
datatypes, this is so much easier... almost magic.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 4:15 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Incrementing dates


James, Yz wrote:

>If anyone has any comments on this, I'd like to
> hear
> them (there's probably a simpler way around what I have done).  Here's the
> URL:
>
> http://www.yorkshire-zone.co.uk/date_increment.php
>
> And here's the code that powers it:
>
> 
> 
>
> 
> $date = date("2001-04-28");
> list($year, $month, $day) = explode("-", $date);
>
> $actual_date = mktime(0,0,0,$month,$day,$year);
>
> $days_to_add = 7;
>
> $x = 1;
>
> while($x <= $days_to_add) {
>
>  $make_date = getdate($actual_date);
>
>  echo "Day $x: $make_date[mday] $make_date[month],
> $make_date[year]";
>
>  $actual_date = $actual_date + (3600 * 24);
>
>  $x++;
>
> }
>
> ?>
>
> 
> 

Thanks James!

You started me off in the right direction. And ... with a few beers less in
the brain (and a look at php.net and PHP Developers Cookbook) I finally
found that mktime actually increments dates correctly.
So, given that $month, $day and $year are valid and that we want to add 10
days to the output we can do:

echo date ("Y-m-d", mktime (0,0,0,$month, $day, $year)) . "";
for($i=1; $i<=9; $i++) {
  $day++;
  echo date ("Y-m-d", mktime (0,0,0,$month, $day, $year)) .
"";
}

Cheers,

Martin S.

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



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




Re: [PHP] Recursive Childs

2001-04-22 Thread mukul

Hi,

thanks for that, could you just explain how it should start, should i just call the 
function, how does the level get determined ???

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




RE: [PHP] what's wrong with this?

2001-04-22 Thread PHPBeginner.com

$end should be 15.

ie:
LIMIT 50, 10

will display 10 rows starting from 51.

so, it will show rows 51-60 (included)


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: McShen [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 3:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] what's wrong with this?


this is something related to my last post.

$start is passed by the url. like http://mydomain.com/links.ph?start=0;
$end =$start+15;

$query = "SELECT * FROM refer ORDER BY hits desc LIMIT $start,$end";

it didn't work. Please help.



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



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




Re: [PHP] help!! newbie

2001-04-22 Thread McShen

then, should i do this?
---
$query = "SELECT * FROM refer ORDER BY hits desc LIMIT $i,$end";
$result = mysql_db_query ("celebzone", $query);

$num = mysql_num_rows($result);
echo $num;

 for ($i; $i < $end; $i++)
   {
$r = mysql_fetch_array($result,$i);

  $id = $r[id];
  $title = $r[title];

  // $id = mysql_result($result, $i, "id"); // check this later
  // $title = mysql_result($result, $i, "title"); // check this later
  echo "http://www.celebritieszones.com/jump.php?id=$id\">$title\n";

 }
--

it didn't work. it says "Warning: Supplied argument is not a valid MySQL
result resource in /home/sites/site3/web/links/index.php on line 15"

why?

""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9bte0p$53d$[EMAIL PROTECTED]">news:9bte0p$53d$[EMAIL PROTECTED]...
> You'll want to use the LIMIT option in SQL. So on the end of your query
add:
>
> "LIMIT 0,10" to get the first ten results.
>
> The first number is the "offset", and the last is the max amount to
> retrieve. To get links 20 through 40 you'd use:
>
> "LIMIT 19, 39"
>
> The offset is refering to an array, so offset 0 is actually the first
link.
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""McShen"" <[EMAIL PROTECTED]> wrote in message
> 9btbqt$t79$[EMAIL PROTECTED]">news:9btbqt$t79$[EMAIL PROTECTED]...
> > hi
> >
> > I have 30 links stored in a table(mysql) now. I wanna show them
accorging
> to
> > the traffic they send. But i don't want to list all of them in just 1
page
> > because i will be adding 300 links soon. (I don't want my visitors to
wait
> 3
> > minutes to load the links)How should i do it? I wanna do it like this
> > http://mydomain.com/links?list=0
> > shows only links from 0-15
> > and
> > http://mydomain.com/links?list=15
> > shows links from 15-30
> > etc.
> >
> > here is my code.
> > --
> >  >
> > $connection = mysql_connect("localhost","","");
> > if ($connection==false)
> > {
> > echo mysql_errno().":".mysql_error()."";
> > exit;
> > }
> > $query = "SELECT * FROM refer ORDER BY hits desc ";
> > $result = mysql_db_query ("celebzone", $query);
> >
> > $rows = mysql_num_rows($result);
> > $num_of_page = floor($rows/15)+1;
> >
> > $i=$list;
> >
> > for ($i = $list; $i < $list+15; $i++)
> > {
> >
> > if ($i <= $rows)
> > {
> > @$id = mysql_result($result, $i, "id"); // check this later
> > @$title = mysql_result($result, $i, "title"); // check this later
> > echo "
href=\"http://www.celebritieszones.com/jump.php?id=$id\">$title\n";
> >
> > }
> > else
> > {
> > echo "";
> > $i = 288; // this forces it to quit the loop
> >
> > }
> > }
> > echo "";
> >
> > $check = floor($rows/$num_of_page); // this finds how many pages it
should
> generate
> > if ( $check>0 )
> > {
> >
> > if (($i-1)==288)
> > {
> > echo "";
> > }
> > else
> > {
> > $num_of_page = $i;
> > echo "
href=\"http://www.celebritieszones.com/links/index.php?list=$num_of_page\">N
> ext Link Page";
> > }
> >
> > }
> > ?>
> > ---
> > It's not good though and it's kinda stupid. :( When it loads the last
page
> of my links, it will show this
> > "Warning: Unable to jump to row 48 on MySQL result index 2 in
> /home/sites/site3/web/links/index.php on line 22
> >
> > Warning: Unable to jump to row 48 on MySQL result index 2 in
> /home/sites/site3/web/links/index.php on line 23"
> >
> > You see the @? I am using it to supress the error messasges cuz i don't
> know how to fix this error. Please help. :)
> > Thank You.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Connecting to a MS Access database

2001-04-22 Thread John Lim

Your question is a bit too short to be answered. Explain why and we will try
to explain how. The other poster is wrong however, u can use ADO and use the
Jet OLEDB provider to connect to Microsoft Access.

Søren Soltveit <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How can I connect to a Microsoft Access database, whitout using ODBC??
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




RE: [PHP] Incrementing dates

2001-04-22 Thread Martin Skjöldebrand

PHPBeginner.com wrote:

> 
> INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE
> bla=bla;
> 
> it is just a way to do it. you will definitely have to play with it.
> 
> However you can easily make two queries to read the previous date
> combining it with INTERVAL and then do an insert.

I've looked at INTERVAL but it seems it only deals with one specific date 
at a time?

date=10 : SELECT date+INTERVAL 10 
would then mean date=20

Or have I got everything wrong?

What I looking at
from the value of date=10 ADD other dates for X days on, like this
(in a table, each record (row) has more data than the one given)
date=2001-04-10
date=2001-04-11
date=2001-04-12

This, if I'm mistaken can't be done with interval, at least not without 
looping in PHP? And using two queries would not perhaps save as much code 
as the way I solved it? Could be mistaken of course.

Martin S.

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




[PHP-CVS] cvs: php4 /sapi/thttpd thttpd_patch

2001-04-22 Thread Sascha Schumann

sas Sun Apr 22 07:00:54 2001 EDT

  Modified files:  
/php4/sapi/thttpd   thttpd_patch 
  Log:
  Update patch to thttpd-2.21
  
  
Index: php4/sapi/thttpd/thttpd_patch
diff -u php4/sapi/thttpd/thttpd_patch:1.7 php4/sapi/thttpd/thttpd_patch:1.8
--- php4/sapi/thttpd/thttpd_patch:1.7   Wed Nov 15 15:37:50 2000
+++ php4/sapi/thttpd/thttpd_patch   Sun Apr 22 07:00:53 2001
@@ -1,6 +1,6 @@
-diff -Nur thttpd-2.20b/Makefile.in thttpd-2.20b-php/Makefile.in
 thttpd-2.20b/Makefile.in   Tue Jul  4 18:21:32 2000
-+++ thttpd-2.20b-php/Makefile.in   Mon Nov 13 14:25:48 2000
+diff -ur thttpd-2.21/Makefile.in thttpd-2.21-p/Makefile.in
+--- thttpd-2.21/Makefile.inThu Mar 29 20:36:21 2001
 thttpd-2.21-p/Makefile.in  Sun Apr 22 15:59:42 2001
 @@ -46,13 +46,15 @@
  
  # You shouldn't need to edit anything below here.
@@ -38,10 +38,10 @@
  
  tar:
@name=`sed -n -e '/SERVER_SOFTWARE/!d' -e 's,.*thttpd/,thttpd-,' -e 's, .*,,p' 
version.h` ; \
-diff -Nur thttpd-2.20b/libhttpd.c thttpd-2.20b-php/libhttpd.c
 thttpd-2.20b/libhttpd.cWed Sep 27 20:13:24 2000
-+++ thttpd-2.20b-php/libhttpd.cMon Nov 13 14:25:57 2000
-@@ -75,6 +75,8 @@
+diff -ur thttpd-2.21/libhttpd.c thttpd-2.21-p/libhttpd.c
+--- thttpd-2.21/libhttpd.c Sat Apr 21 02:11:32 2001
 thttpd-2.21-p/libhttpd.c   Sun Apr 22 16:01:41 2001
+@@ -85,6 +85,8 @@
  #include "match.h"
  #include "tdate_parse.h"
  
@@ -50,7 +50,7 @@
  #ifndef STDIN_FILENO
  #define STDIN_FILENO 0
  #endif
-@@ -225,6 +227,8 @@
+@@ -243,6 +245,8 @@
free( (void*) hs->cwd );
  if ( hs->cgi_pattern != (char*) 0 )
free( (void*) hs->cgi_pattern );
@@ -59,7 +59,7 @@
  if ( hs->charset != (char*) 0 )
free( (void*) hs->charset );
  if ( hs->url_pattern != (char*) 0 )
-@@ -232,6 +236,7 @@
+@@ -250,6 +254,7 @@
  if ( hs->local_pattern != (char*) 0 )
free( (void*) hs->local_pattern );
  free( (void*) hs );
@@ -67,7 +67,7 @@
  }
  
  
-@@ -292,6 +297,7 @@
+@@ -313,6 +318,7 @@
}
  
  hs->port = port;
@@ -75,7 +75,7 @@
  if ( cgi_pattern == (char*) 0 )
hs->cgi_pattern = (char*) 0;
  else
-@@ -363,6 +369,8 @@
+@@ -386,6 +392,8 @@
return (httpd_server*) 0;
}
  
@@ -83,19 +83,20 @@
 +
  /* Done initializing. */
  if ( hs->binding_hostname == (char*) 0 )
-   syslog( LOG_INFO, "%s starting on port %d", SERVER_SOFTWARE, hs->port );
-@@ -2167,7 +2175,9 @@
- void
- httpd_close_conn( httpd_conn* hc, struct timeval* nowP )
+   syslog( LOG_INFO, "%.80s starting on port %d", SERVER_SOFTWARE, hs->port );
+@@ -2336,7 +2344,10 @@
  {
+ make_log_entry( hc, nowP );
+ 
 -if ( hc->file_address != (char*) 0 )
-+  if (hc->file_address == (char *) 1) {
-+  thttpd_closed_conn(hc->conn_fd);
-+  } else if ( hc->file_address != (char*) 0 )
++if ( hc->file_address == (char*) 1 )
++{
++  thttpd_closed_conn(hc->conn_fd);
++} else if ( hc->file_address != (char*) 0 )
{
-   mmc_unmap( hc->file_address, nowP, &(hc->sb) );
+   mmc_unmap( hc->file_address, &(hc->sb), nowP );
hc->file_address = (char*) 0;
-@@ -3336,6 +3346,11 @@
+@@ -3543,6 +3554,11 @@
 ( hc->sb.st_mode & S_IXOTH ) &&
 match( hc->hs->cgi_pattern, hc->expnfilename ) )
return cgi( hc );
@@ -107,9 +108,11 @@
  
  /* It's not CGI.  If it's executable or there's pathinfo, someone's
  ** trying to either serve or run a non-CGI file as CGI.   Either case
-diff -Nur thttpd-2.20b/libhttpd.h thttpd-2.20b-php/libhttpd.h
 thttpd-2.20b/libhttpd.hTue Jun 13 20:48:56 2000
-+++ thttpd-2.20b-php/libhttpd.hMon Nov 13 14:25:48 2000
+Only in thttpd-2.21-p: libhttpd.c.rej
+Only in thttpd-2.21-p: libhttpd.c~
+diff -ur thttpd-2.21/libhttpd.h thttpd-2.21-p/libhttpd.h
+--- thttpd-2.21/libhttpd.h Fri Apr 13 07:37:17 2001
 thttpd-2.21-p/libhttpd.h   Sun Apr 22 15:59:42 2001
 @@ -69,6 +69,7 @@
  char* server_hostname;
  int port;
@@ -118,19 +121,20 @@
  char* charset;
  char* cwd;
  int listen4_fd, listen6_fd;
-diff -Nur thttpd-2.20b/thttpd.c thttpd-2.20b-php/thttpd.c
 thttpd-2.20b/thttpd.c  Wed Sep 27 21:31:48 2000
-+++ thttpd-2.20b-php/thttpd.c  Mon Nov 13 14:25:57 2000
-@@ -1332,6 +1333,12 @@
-   c->bytes_sent = hc->bytes;
+diff -ur thttpd-2.21/thttpd.c thttpd-2.21-p/thttpd.c
+--- thttpd-2.21/thttpd.c   Sun Apr 15 18:09:20 2001
 thttpd-2.21-p/thttpd.c Sun Apr 22 15:59:42 2001
+@@ -1392,6 +1392,12 @@
clear_connection( c, tvP );
return;
-+  }
+   }
 +  if (hc->file_address == (char *) 1) {
 +  tmr_cancel( c->idle_read_timer );
 +  c->idle_read_timer = (Timer*) 0;
 +  c->wouldblock_delay = 0;
 +  return;
-   }
++  }
  if ( c->bytes_sent >= c->bytes_to_send )
{
+   /* There's nothing to send. */
+Only in thttpd-2.21-p: thttpd.c~



-- 
PHP CVS Mailing List (

Re: [PHP] Buttons and such...

2001-04-22 Thread Geir Eivind Mork

On Saturday 21 April 2001 20:15, Jason Caldwell wrote:
>  I know this is off-topic -- please forgive me.  But I figure someone here
>  would know.
>  I'm looking for some really nice *professional* looking (submit, logon,
> buy, help, etc) buttons for my website... I've done all kinds of

try do it with css:
.button {
  font-size: 10px;
  font-family: Verdana, Arial, Helvetica, Sans-serif;
  color: #ff;
  font-weight: bold;
  background-color: #77;
  border-color: #99;
}

and just 

and the world is for your feets :)

> searches on MSN and Yahoo -- found a ton of sites that offer all kinds of
> .gifs and .jpegs -- but I must say 99% of them are garbage.

or hire somebody :)

-- 
 php developer / CoreTrek AS| I think I'll KILL myself by leaping out 
 Sandnes / Rogaland / Norway| of this 14th STORY WINDOW while reading 
 web: http://www.moijk.net/ | ERICA JONG'S poetry!! 

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




php-general Digest 22 Apr 2001 09:39:44 -0000 Issue 642

2001-04-22 Thread php-general-digest-help


php-general Digest 22 Apr 2001 09:39:44 - Issue 642

Topics (messages 49704 through 49733):

Redirection II
49704 by: Wade
49706 by: Wade

Re: [Apache] Win32 Virtual Host - Sub Domain
49705 by: Andrew Braund

Re: Buggy Java GUI? (just a tad OT)
49707 by: Seung-woo Nam
49710 by: Plutarck

Incrementing dates
49708 by: Martin Skjöldebrand
49712 by: James, Yz
49724 by: Martin Skjöldebrand
49728 by: PHPBeginner.com
49730 by: PHPBeginner.com
49732 by: Martin Skjöldebrand

Re: Cool
49709 by: Pank Floyd

Connecting to a MS Access database
49711 by: Søren Soltveit
49714 by: Andrew Hill

help!! newbie
49713 by: McShen
49715 by: Plutarck
49717 by: McShen
49722 by: Chris Adams

UUdecode
49716 by: Paul A. Owen

what's wrong with this?
49718 by: McShen
49723 by: CC Zona
49729 by: PHPBeginner.com

File Download With A Twist
49719 by: Donovan J. Edye

Re: I don't get it ... suddenly my script doesn't work ...
49720 by: Tim Thorburn

Re: Recursive Childs
49721 by: Joe Conway
49733 by: mukul.wwli.com

Re: pumping database dump in mysql
49725 by: Christian Reiniger

[php] what creates an Transport endpoint is not connected
49726 by: ruud habets
49727 by: Brian Clark
49731 by: ruud habets

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



I am submitting a form to a PHP page. I would like to check the form
variables before I load the page, and redirect them to another page if they
variables are incorrect -- so they can fix them.

Any ideas how I do this?
My idea was to start out the PHP with an if statement, and redirect in the
case something was wrong. But I'm really having a hard time finding a way to
do this.

Thank you!
Wade






I got it! :-)

""Wade"" <[EMAIL PROTECTED]> wrote in message
9bsudp$g23$[EMAIL PROTECTED]">news:9bsudp$g23$[EMAIL PROTECTED]...
> I am submitting a form to a PHP page. I would like to check the form
> variables before I load the page, and redirect them to another page if
they
> variables are incorrect -- so they can fix them.
>
> Any ideas how I do this?
> My idea was to start out the PHP with an if statement, and redirect in the
> case something was wrong. But I'm really having a hard time finding a way
to
> do this.
>
> Thank you!
> Wade
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





> -Original Message-
> From: Jon Shoberg [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, 22 April 2001 00:39
> To: phpgeneral
> Subject: [PHP] [Apache] Win32 Virtual Host - Sub Domain
>
>
> Sorry for the OT post but this has me stumped and Google is
> not giving me
> any good leads.

A good lead is the Apache manual on virtual hosting;
http://httpd.apache.org/docs/vhosts/index.html
in particular;
http://httpd.apache.org/docs/vhosts/name-based.html
in the examples shown there you will notice the virtualHost line is;

ie it uses an IP address, your config uses a host name;
> 
so on startup Apache will try to resolve test.localhost to an IP
address.
It fails so ignores the virtual host entry.
You could probably fix it by adding an entry to you hosts file like
127.0.0.1 test.localhost
but I think this would only be good for requests coming from a browser
on the server machine.
For simple installations I think you will find an entry like;

will work well (it also allows you to use dynamic DNS without changing
your config file).
The example in the documentation also does not use a trailing slash in
the document root. I don't know if this is important but with some
config directives it is so I generally follow the documentation
*exactly*.

So the complete virtual host entry would be;

ServerAdmin webmaster@localhost
DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/test"
ServerName test.localhost
ErrorLog logs/test.localhost-error_log
CustomLog logs/test.localhost-access_log common


HTH

Andrew Braund

>
> I am trying to setup Apache with PHP on Win32 (don't ask
> why).  Anyhow, PHP
> is working great but virtual hosting is not going so well.
> When the browser
> brings up http://localhost/ it reads from [Apache
> Root]/apache/htdocs as
> defined by:
>
> #*** Good Virtual **
>
> 
> ServerAdmin webmaster@localhost
> DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/"
> ServerName localhost
> ErrorLog logs/error_log
> CustomLog logs/access_log common
> 
>
> #*

Re: [PHP] Recursive Childs

2001-04-22 Thread Joe Conway

>Subject: [PHP] Recursive Childs



> like hotscripts.com too, so i thought if someone could tell me how to use
get all the children :
>
> ID | NAME | PARENT
> 1X  0
> 2Y  1
> 3Z  2
> 4A  2
> 5F  1
> 6G  5
> if i want to get all children of 1, i want to get 2, 3, 4, 5, 6!
>
> how do i get this, thanks!
>

Hi Natasha,

As your subject implies, the way to do this is with a recursive function
call. Assuming your data is in a PostgreSQL database table, you could use
something like the following (*untested* -- modify as required if you are
using MySQL or something else)

Hope this helps!

Joe

*

";
 }

 $levelpad = $levelpad . "";
 If (! empty($parent))
 { 
  $sql = "select id, name, parent from mytable where parent =$parent order by id";
  $rs = pg_exec($conn,$sql);
  
  for ($row = 0; $row <= pg_numrows($rs) - 1; $row++)
  {
   $currentrecord += 1;
   if ($rowclr == "#d7d7d7")
   {
$rowclr = "#ff";
   }
   else
   {
$rowclr = "#d7d7d7";
   }
   for ($field = 0; $field <= pg_numfields($rs) - 1; $field++)
   {
$rsf[pg_fieldname($rs,$field)] = pg_result($rs,$row,$field);
   }
   print("\n");
   print("" . $levelpad . $rsf["id"] . " \n");
   print("" . $rsf["name"] . " \n");
   print("" . $level . " \n");
   print("\n");
   
   $newparent = $rsf["parent"];
   getChildren($conn,$newparent,$level,$currentrecord,$rowclr);
  };
  pg_freeresult($rs);
 }
 else
 {
  print("No information found.\n");
 }
}

  $conn = pg_connect("dbname=mydb user=postgres");
  $parent = 0;
  $level = 0;
  $currentrecord = 0;

  $rowclr = "#e7e7e7";

  print("\n");

  print("\n");
  print("\n");
  print("ID\n");
  print("Name\n");
  print("Level\n");
  print("\n");

  getChildren($conn,$parent,$level,$currentrecord,$rowclr);

  print("\n");
  if ($currentrecord == 0)
  {
   print("No matches found.\n");
  }
  print("\n");

?>


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




RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com

you can then do this:

INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE
bla=bla;

it is just a way to do it. you will definitely have to play with it.

However you can easily make two queries to read the previous date combining
it with INTERVAL and then do an insert.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Incrementing dates


PHPBeginner.com wrote:

> I am not sure on how your possibilities are,
> but doing this in PHP means literally "adding useless lines and loops"
>
> If possible, do it with SQL queries. Read the documentations on date
> datatypes, this is so much easier... almost magic.
>

AND

> You can (mySQL, right?) do the following:

>UPDATE table SET date=(date+INTERVAL 10 DAYS);

>so if date there was 04-28, it will be added 10 more days and so will
>become
>05-08

>Use SQL for this things, it treats dates as 'dates' while PHP treats them
>as
>integers and strings.

Sounds even easier. But what if I'm not doing an UPDATE but an INSERT? Can
it read the previous date? I am inserting a batch of bookings at one time.

Martin S.

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



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




RE: [PHP] Incrementing dates

2001-04-22 Thread Martin Skjöldebrand

PHPBeginner.com wrote:

> I am not sure on how your possibilities are,
> but doing this in PHP means literally "adding useless lines and loops"
> 
> If possible, do it with SQL queries. Read the documentations on date
> datatypes, this is so much easier... almost magic.
> 

AND 

> You can (mySQL, right?) do the following:

>UPDATE table SET date=(date+INTERVAL 10 DAYS);

>so if date there was 04-28, it will be added 10 more days and so will 
>become
>05-08

>Use SQL for this things, it treats dates as 'dates' while PHP treats them 
>as
>integers and strings.

Sounds even easier. But what if I'm not doing an UPDATE but an INSERT? Can 
it read the previous date? I am inserting a batch of bookings at one time.

Martin S.

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




RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com

well, then you have to do it with PHP, as I said - if possible, then mySQL
does it better.

Try converting each date into UNIX timestamp adding to it 60*60*24*10 . It
will create you a set of dates incremented by 10 days.


What I previously meant was :

say you design a poll, you have a table called logs.
you want to see if the specific user have already voted within the last 10
days.

SELECT date FROM logs WHERE user='$user' AND date>=(NOW() - INTERVAL 10
DAY));

this will return you at least one row (hopefully one only) if there's such a
user voted less then 10 days ago, and will return you an empty set if
there's none.

Many use PHP to do that kind of checks while mySQL has it built in.

Since I am not sure I understood your situation right, I think you should
consider some mySQL (or any other DB) date functions. They often save you a
lot of code. Otherwise try to do it with PHP as you have already resolved
it.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 8:13 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Incrementing dates


PHPBeginner.com wrote:

>
> INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE
> bla=bla;
>
> it is just a way to do it. you will definitely have to play with it.
>
> However you can easily make two queries to read the previous date
> combining it with INTERVAL and then do an insert.

I've looked at INTERVAL but it seems it only deals with one specific date
at a time?

date=10 : SELECT date+INTERVAL 10
would then mean date=20

Or have I got everything wrong?

What I looking at
from the value of date=10 ADD other dates for X days on, like this
(in a table, each record (row) has more data than the one given)
date=2001-04-10
date=2001-04-11
date=2001-04-12

This, if I'm mistaken can't be done with interval, at least not without
looping in PHP? And using two queries would not perhaps save as much code
as the way I solved it? Could be mistaken of course.

Martin S.

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



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




Re: [PHP] Incrementing dates

2001-04-22 Thread Martin Skjöldebrand

James, Yz wrote:

>If anyone has any comments on this, I'd like to
> hear
> them (there's probably a simpler way around what I have done).  Here's the
> URL:
> 
> http://www.yorkshire-zone.co.uk/date_increment.php
> 
> And here's the code that powers it:
> 
> 
> 
> 
>  
> $date = date("2001-04-28");
> list($year, $month, $day) = explode("-", $date);
> 
> $actual_date = mktime(0,0,0,$month,$day,$year);
> 
> $days_to_add = 7;
> 
> $x = 1;
> 
> while($x <= $days_to_add) {
> 
>  $make_date = getdate($actual_date);
> 
>  echo "Day $x: $make_date[mday] $make_date[month],
> $make_date[year]";
> 
>  $actual_date = $actual_date + (3600 * 24);
> 
>  $x++;
> 
> }
> 
> ?>
> 
> 
> 

Thanks James!

You started me off in the right direction. And ... with a few beers less in 
the brain (and a look at php.net and PHP Developers Cookbook) I finally 
found that mktime actually increments dates correctly.
So, given that $month, $day and $year are valid and that we want to add 10 
days to the output we can do:

echo date ("Y-m-d", mktime (0,0,0,$month, $day, $year)) . "";
for($i=1; $i<=9; $i++) {
  $day++;
  echo date ("Y-m-d", mktime (0,0,0,$month, $day, $year)) . "";
}

Cheers,

Martin S.

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




Re: [PHP] Buttons and such...

2001-04-22 Thread Plutarck

Another way of getting buttons without actually "hiring" someone is to kind
of trade them work. Works especially well with people you already know, or
people your friends know.

You'll do a little website programming for them (like a custom form-to-email
or user login system) and they'll make some graphics for you.

Also check out a program called IconToy, which rips out graphics from
windows programs.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Geir Eivind Mork" <[EMAIL PROTECTED]> wrote in message
01042216125503.05150@maria">news:01042216125503.05150@maria...
> On Saturday 21 April 2001 20:15, Jason Caldwell wrote:
> >  I know this is off-topic -- please forgive me.  But I figure someone
here
> >  would know.
> >  I'm looking for some really nice *professional* looking (submit, logon,
> > buy, help, etc) buttons for my website... I've done all kinds of
>
> try do it with css:
> .button {
>   font-size: 10px;
>   font-family: Verdana, Arial, Helvetica, Sans-serif;
>   color: #ff;
>   font-weight: bold;
>   background-color: #77;
>   border-color: #99;
> }
>
> and just 
>
> and the world is for your feets :)
>
> > searches on MSN and Yahoo -- found a ton of sites that offer all kinds
of
> > .gifs and .jpegs -- but I must say 99% of them are garbage.
>
> or hire somebody :)
>
> --
>  php developer / CoreTrek AS| I think I'll KILL myself by leaping
out
>  Sandnes / Rogaland / Norway| of this 14th STORY WINDOW while
reading
>  web: http://www.moijk.net/ | ERICA JONG'S poetry!!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




RE: [PHP] Incrementing dates

2001-04-22 Thread Warren Vail

If you are looking for a PHP only solution you might try hand calculating
the amount of time you want to adjust in seconds (i.e. 60 seconds x 60
minutes x 24 hours x 10 days = 864000)

$newdatetime = (strtotime($otherdatetime) + 864000;
I often use something similar to adjust for timezone differences.

There are lots of other datetime functions in the manual ;)

Warren Vail

-Original Message-
From: PHPBeginner.com [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 3:09 AM
To: Martin Skjoldebrand; [EMAIL PROTECTED]
Subject: RE: [PHP] Incrementing dates


you can then do this:

INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE
bla=bla;

it is just a way to do it. you will definitely have to play with it.

However you can easily make two queries to read the previous date combining
it with INTERVAL and then do an insert.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Incrementing dates


PHPBeginner.com wrote:

> I am not sure on how your possibilities are,
> but doing this in PHP means literally "adding useless lines and loops"
>
> If possible, do it with SQL queries. Read the documentations on date
> datatypes, this is so much easier... almost magic.
>

AND

> You can (mySQL, right?) do the following:

>UPDATE table SET date=(date+INTERVAL 10 DAYS);

>so if date there was 04-28, it will be added 10 more days and so will
>become
>05-08

>Use SQL for this things, it treats dates as 'dates' while PHP treats them
>as
>integers and strings.

Sounds even easier. But what if I'm not doing an UPDATE but an INSERT? Can
it read the previous date? I am inserting a batch of bookings at one time.

Martin S.

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



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



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




[PHP] passing variables

2001-04-22 Thread Adam

how could i pass a variable between pages without them seeing the variable
stated in the URL?



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




Re: [PHP] writing to file on server

2001-04-22 Thread Plutarck

When you are using that on your site, what basically happens is that you are
trying to open an FTP session with yourself. Not too efficient.

So just kill off the url and use the path to your file.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Joeri Vankelst"" <[EMAIL PROTECTED]> wrote in message
9bujcv$gtm$[EMAIL PROTECTED]">news:9bujcv$gtm$[EMAIL PROTECTED]...
> Hi,
>
> I've just started working with PHP. I've made a guest book using PHP
> (nothing spectacular) that worked just fine when I tested it op my pc, but
> when I uploaded it, it stopped working.
> My specific problem is that I cannot write to a file that already exists
and
> contains data. When I try to I get these warnings:
>
> Warning: File already exists
> Warning: fopen("ftp:[EMAIL PROTECTED]/guestbook.txt","a") - File
> exists
>
> Is this problem related to the FTP fopen? And is there a way to correct
this
> problem?
>
> Tnx!
> Joeri Vankelst
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] UUdecode

2001-04-22 Thread Henrik Hansen

"Paul A. Owen" <[EMAIL PROTECTED]> wrote:

 > Is there an UUdecode function in PHP? If not then how would I implement
 > this under NT?

a base64 decode?

http://dk.php.net/manual/function.base64-decode.php

else look here, there are some more:

http://dk.php.net/manual-lookup.php?lang=en&function=uudecode

-- 
Henrik Hansen


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




Re: [PHP] I don't get it ... suddenly my script doesn't work ...

2001-04-22 Thread Tim Thorburn

Hi all,

Just to let you know, I found out my problem with my PHP script ... I had 
installed the self installer version of PHP on my system this time around, 
rather than installing the full version - now the script works great.

Thanks again

-Tim 


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




Re: [PHP] help!! newbie

2001-04-22 Thread Chris Adams

On 21 Apr 2001 19:26:03 -0700, McShen <[EMAIL PROTECTED]> wrote:
>then, should i do this?
>---
>$query = "SELECT * FROM refer ORDER BY hits desc LIMIT $i,$end";

Is $end set at this point? Also, if you always want to display 15 records, this
could just be LIMIT $i, 15.


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




[PHP-CVS] cvs: php4(PHP_4_0_5) /win32 php4dllts.dsp

2001-04-22 Thread Harald Radi

phanto  Sun Apr 22 05:14:44 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/win32 php4dllts.dsp 
  Log:
  added ext/com/com.h to PHP_4_0_5 branch
  
Index: php4/win32/php4dllts.dsp
diff -u php4/win32/php4dllts.dsp:1.32 php4/win32/php4dllts.dsp:1.32.2.1
--- php4/win32/php4dllts.dsp:1.32   Fri Feb 23 14:55:28 2001
+++ php4/win32/php4dllts.dspSun Apr 22 05:14:44 2001
@@ -1899,6 +1899,10 @@
 # PROP Default_Filter ""
 # Begin Source File
 
+SOURCE=..\ext\com\com.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\ext\com\conversion.h
 # End Source File
 # Begin Source File



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




Re: [PHP] what's wrong with this?

2001-04-22 Thread CC Zona

In article <9btgks$fc6$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("McShen") wrote:

> $start is passed by the url. like http://mydomain.com/links.ph?start=0;
> $end =$start+15;
> 
> $query = "SELECT * FROM refer ORDER BY hits desc LIMIT $start,$end";
> 
> it didn't work. Please help.

Perhaps if you were more specific about what you were expecting to happen 
and what *actually happened when "it didn't work"...?  Meantime note that 
the 2nd parameter to LIMIT is not an end point but a count of total rows to 
be shown.  So "limit 0,15" translates to "show the first 15 rows" while 
"limit 15,15" and "limit 30,15" would be the correct way to get the next 
two groups of 15 rows each.

-- 
CC

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




[PHP-CVS] cvs: php4 /sapi/thttpd thttpd.c

2001-04-22 Thread Sascha Schumann

sas Sun Apr 22 07:22:40 2001 EDT

  Modified files:  
/php4/sapi/thttpd   thttpd.c 
  Log:
  bytes in the conn structure was renamed to bytes_sent.
  
  
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.39 php4/sapi/thttpd/thttpd.c:1.40
--- php4/sapi/thttpd/thttpd.c:1.39  Tue Mar 13 09:14:47 2001
+++ php4/sapi/thttpd/thttpd.c   Sun Apr 22 07:22:40 2001
@@ -59,7 +59,7 @@
if (n <= 0) 
return n;
 
-   TG(hc)->bytes += n;
+   TG(hc)->bytes_sent += n;
str += n;
sent += n;
str_length -= n;
@@ -86,7 +86,7 @@
vec[n].iov_base = buf;
vec[n++].iov_len = len;
TG(hc)->status = SG(sapi_headers).http_response_code;
-   TG(hc)->bytes += len;
+   TG(hc)->bytes_sent += len;
}
 
h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
@@ -309,7 +309,7 @@
TLS_FETCH();
 
TG(hc) = hc;
-   hc->bytes = 0;
+   hc->bytes_sent = 0;

thttpd_request_ctor(TLS_C SLS_CC);
 



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




[PHP] [php] what creates an Transport endpoint is not connected

2001-04-22 Thread ruud habets

a perfectly working website suddenly went dead yesterday
the resulting error is: Transport endpoint is not connected
i have no idea what can be the cause of that.

the error can be viewed at www.kgv.nl (just wait 30 seconds)

any ideas?

thanks
ruud habets



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




Re: [PHP] [php] what creates an Transport endpoint is not connected

2001-04-22 Thread Brian Clark

Hi ruud,

@ 4:05:08 AM on 4/22/2001, ruud habets wrote:

> a perfectly working website suddenly went dead yesterday
> the resulting error is: Transport endpoint is not connected
> i have no idea what can be the cause of that.

http://www.google.com/search?q="Transport+endpoint+is+not+connected"

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please, DO NOT carbon copy me on list replies.



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




[PHP] help!! newbie

2001-04-22 Thread McShen

hi

I have 30 links stored in a table(mysql) now. I wanna show them accorging to
the traffic they send. But i don't want to list all of them in just 1 page
because i will be adding 300 links soon. (I don't want my visitors to wait 3
minutes to load the links)How should i do it? I wanna do it like this
http://mydomain.com/links?list=0
shows only links from 0-15
and
http://mydomain.com/links?list=15
shows links from 15-30
etc.

here is my code.
--
http://www.celebritieszones.com/jump.php?id=$id\">$title\n"; 

} 
else 
{ 
echo ""; 
$i = 288; // this forces it to quit the loop 

} 
} 
echo ""; 

$check = floor($rows/$num_of_page); // this finds how many pages it should generate 
if ( $check>0 ) 
{ 

if (($i-1)==288) 
{ 
echo ""; 
} 
else 
{ 
$num_of_page = $i; 
echo "http://www.celebritieszones.com/links/index.php?list=$num_of_page\">Next Link 
Page"; 
} 

} 
?> 
--- 
It's not good though and it's kinda stupid. :( When it loads the last page of my 
links, it will show this 
"Warning: Unable to jump to row 48 on MySQL result index 2 in 
/home/sites/site3/web/links/index.php on line 22 

Warning: Unable to jump to row 48 on MySQL result index 2 in 
/home/sites/site3/web/links/index.php on line 23" 

You see the @? I am using it to supress the error messasges cuz i don't know how to 
fix this error. Please help. :) 
Thank You. 









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




Re: [PHP] Buggy Java GUI? (just a tad OT)

2001-04-22 Thread Plutarck

Hm, that would probably explain it.

I assumed it wasn't it because the programs are so comparitively
small...then again, it's not the size that counts blah blah...

Since it loads so much up at one time rather than a little bit at a time, it
probably eats a huge amount of ram. Forte probably loads the majority of the
JDK, the virtual machine, all it's neccessary system files and the majority
of it's class files, plus any files the user opens/builds.

I suppose Java's lack of programmer defined memory management is probably
the cause, since in other languages the programmer explicitly says what to
load and what to unload.

Ah well, I suppose that's the price of simplicity.


Thanks for your answer. I feel better about Java now...but now I have issues
about the size of my RAM. ;)


--
Plutarck
Should be working on something...
...but forgot what it was.


"Seung-woo Nam" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi:
> If you don't have plenty of ram on your machine, forget about running
> Forte. Java applications that use swing look nice but they use a lot of
> systems resources. It's not a bug, per se, but whenever your systems
> runs out of physical memory and start writing stuff on the virtual
> memory, that's what you get. I have 224MB on my machine and Forte is
> still slow.
>
> Seung-woo Nam
>
> Plutarck wrote:
> >
> > I've been toying around with Java to possibly interface with PHP, but I
have
> > a question about it.
> >
> > Is it just me, or is the GUI in most standalone java applications
remarkably
> > (and annoyingly) buggy?
> >
> > I downloaded Forte for Java by Sun, and after the 45 second loading time
I
> > noticed that if you click around the menus or move your cursor too fast,
a
> > menu will become temporarily "burned" into the frame of the page. Same
if
> > you hover on one button till a message comes up, then switch over to
another
> > button, a portion of the original message will still be shown.
> >
> > Same goes for Limewire and other 100% java apps I've tried.
> >
> > I was just wondering if it's just my machine, or because I use the
windows98
> > VM, or if everyone experiences the same thing.
> >
> > I'm guessing the horrendous starting load time is native to java, but at
> > least it runs ok once you get the thing to start.
> >
> > --
> > Plutarck
> > Should be working on something...
> > ...but forgot what it was.
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP-CVS] cvs: php4(PHP_4_0_5) /sapi/thttpd thttpd.c thttpd_patch

2001-04-22 Thread Sascha Schumann

sas Sun Apr 22 07:33:09 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/sapi/thttpd   thttpd.c thttpd_patch 
  Log:
  Merge thttpd-2.21-related changes into 4.0.5 branch
  
  
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.38 php4/sapi/thttpd/thttpd.c:1.38.2.1
--- php4/sapi/thttpd/thttpd.c:1.38  Fri Mar  2 09:01:52 2001
+++ php4/sapi/thttpd/thttpd.c   Sun Apr 22 07:33:09 2001
@@ -24,6 +24,8 @@
 #include "php_variables.h"
 #include "version.h"
 
+#include "ext/standard/php_smart_str.h"
+
 #include 
 
 typedef struct {
@@ -57,7 +59,7 @@
if (n <= 0) 
return n;
 
-   TG(hc)->bytes += n;
+   TG(hc)->bytes_sent += n;
str += n;
sent += n;
str_length -= n;
@@ -84,7 +86,7 @@
vec[n].iov_base = buf;
vec[n++].iov_len = len;
TG(hc)->status = SG(sapi_headers).http_response_code;
-   TG(hc)->bytes += len;
+   TG(hc)->bytes_sent += len;
}
 
h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
@@ -257,30 +259,24 @@
 
 static void thttpd_request_ctor(TLS_D SLS_DC)
 {
-   char *cp;
-   size_t cp_len;
char buf[1024];
int offset;
size_t filename_len;
size_t cwd_len;
-
+   smart_str s = {0};
 
SG(request_info).query_string = TG(hc)->query?strdup(TG(hc)->query):NULL;
-
-   filename_len = strlen(TG(hc)->expnfilename);
-   cwd_len = strlen(TG(hc)->hs->cwd);
 
-   cp_len = cwd_len + filename_len;
-   cp = (char *) malloc(cp_len + 1);
-   /* cwd always ends in "/", so this is safe */
-   memcpy(cp, TG(hc)->hs->cwd, cwd_len);
-   memcpy(cp + cwd_len, TG(hc)->expnfilename, filename_len);
-   cp[cp_len] = '\0';
-   
-   SG(request_info).path_translated = cp;
-   
-   snprintf(buf, 1023, "/%s", TG(hc)->origfilename);
-   SG(request_info).request_uri = strdup(buf);
+   smart_str_appends_ex(&s, TG(hc)->hs->cwd, 1);
+   smart_str_appends_ex(&s, TG(hc)->expnfilename, 1);
+   smart_str_0(&s);
+   SG(request_info).path_translated = s.c;
+   
+   s.c = NULL;
+   smart_str_appendc_ex(&s, '/', 1);
+   smart_str_appends_ex(&s, TG(hc)->origfilename, 1);
+   smart_str_0(&s);
+   SG(request_info).request_uri = s.c;
SG(request_info).request_method = httpd_method_str(TG(hc)->method);
SG(sapi_headers).http_response_code = 200;
SG(request_info).content_type = TG(hc)->contenttype;
@@ -313,7 +309,7 @@
TLS_FETCH();
 
TG(hc) = hc;
-   hc->bytes = 0;
+   hc->bytes_sent = 0;

thttpd_request_ctor(TLS_C SLS_CC);
 
Index: php4/sapi/thttpd/thttpd_patch
diff -u php4/sapi/thttpd/thttpd_patch:1.7 php4/sapi/thttpd/thttpd_patch:1.7.4.1
--- php4/sapi/thttpd/thttpd_patch:1.7   Wed Nov 15 15:37:50 2000
+++ php4/sapi/thttpd/thttpd_patch   Sun Apr 22 07:33:09 2001
@@ -1,6 +1,6 @@
-diff -Nur thttpd-2.20b/Makefile.in thttpd-2.20b-php/Makefile.in
 thttpd-2.20b/Makefile.in   Tue Jul  4 18:21:32 2000
-+++ thttpd-2.20b-php/Makefile.in   Mon Nov 13 14:25:48 2000
+diff -ur thttpd-2.21/Makefile.in thttpd-2.21-p/Makefile.in
+--- thttpd-2.21/Makefile.inThu Mar 29 20:36:21 2001
 thttpd-2.21-p/Makefile.in  Sun Apr 22 15:59:42 2001
 @@ -46,13 +46,15 @@
  
  # You shouldn't need to edit anything below here.
@@ -38,10 +38,10 @@
  
  tar:
@name=`sed -n -e '/SERVER_SOFTWARE/!d' -e 's,.*thttpd/,thttpd-,' -e 's, .*,,p' 
version.h` ; \
-diff -Nur thttpd-2.20b/libhttpd.c thttpd-2.20b-php/libhttpd.c
 thttpd-2.20b/libhttpd.cWed Sep 27 20:13:24 2000
-+++ thttpd-2.20b-php/libhttpd.cMon Nov 13 14:25:57 2000
-@@ -75,6 +75,8 @@
+diff -ur thttpd-2.21/libhttpd.c thttpd-2.21-p/libhttpd.c
+--- thttpd-2.21/libhttpd.c Sat Apr 21 02:11:32 2001
 thttpd-2.21-p/libhttpd.c   Sun Apr 22 16:01:41 2001
+@@ -85,6 +85,8 @@
  #include "match.h"
  #include "tdate_parse.h"
  
@@ -50,7 +50,7 @@
  #ifndef STDIN_FILENO
  #define STDIN_FILENO 0
  #endif
-@@ -225,6 +227,8 @@
+@@ -243,6 +245,8 @@
free( (void*) hs->cwd );
  if ( hs->cgi_pattern != (char*) 0 )
free( (void*) hs->cgi_pattern );
@@ -59,7 +59,7 @@
  if ( hs->charset != (char*) 0 )
free( (void*) hs->charset );
  if ( hs->url_pattern != (char*) 0 )
-@@ -232,6 +236,7 @@
+@@ -250,6 +254,7 @@
  if ( hs->local_pattern != (char*) 0 )
free( (void*) hs->local_pattern );
  free( (void*) hs );
@@ -67,7 +67,7 @@
  }
  
  
-@@ -292,6 +297,7 @@
+@@ -313,6 +318,7 @@
}
  
  hs->port = port;
@@ -75,7 +75,7 @@
  if ( cgi_pattern == (char*) 0 )
hs->cgi_pattern = (char*) 0;
  else
-@@ -363,6 +369,8 @@
+@@ -386,6 +392,8 @@
return (httpd_server*) 0;
}
  
@@ -83,19 +83,20 @@
 +
  /* Done initializing. */
  if ( hs->binding_hostname == (char*) 0 )
-   syslog( L

Re: [PHP] help!! newbie

2001-04-22 Thread Plutarck

You'll want to use the LIMIT option in SQL. So on the end of your query add:

"LIMIT 0,10" to get the first ten results.

The first number is the "offset", and the last is the max amount to
retrieve. To get links 20 through 40 you'd use:

"LIMIT 19, 39"

The offset is refering to an array, so offset 0 is actually the first link.


--
Plutarck
Should be working on something...
...but forgot what it was.


""McShen"" <[EMAIL PROTECTED]> wrote in message
9btbqt$t79$[EMAIL PROTECTED]">news:9btbqt$t79$[EMAIL PROTECTED]...
> hi
>
> I have 30 links stored in a table(mysql) now. I wanna show them accorging
to
> the traffic they send. But i don't want to list all of them in just 1 page
> because i will be adding 300 links soon. (I don't want my visitors to wait
3
> minutes to load the links)How should i do it? I wanna do it like this
> http://mydomain.com/links?list=0
> shows only links from 0-15
> and
> http://mydomain.com/links?list=15
> shows links from 15-30
> etc.
>
> here is my code.
> --
> 
> $connection = mysql_connect("localhost","","");
> if ($connection==false)
> {
> echo mysql_errno().":".mysql_error()."";
> exit;
> }
> $query = "SELECT * FROM refer ORDER BY hits desc ";
> $result = mysql_db_query ("celebzone", $query);
>
> $rows = mysql_num_rows($result);
> $num_of_page = floor($rows/15)+1;
>
> $i=$list;
>
> for ($i = $list; $i < $list+15; $i++)
> {
>
> if ($i <= $rows)
> {
> @$id = mysql_result($result, $i, "id"); // check this later
> @$title = mysql_result($result, $i, "title"); // check this later
> echo "http://www.celebritieszones.com/jump.php?id=$id\">$title\n";
>
> }
> else
> {
> echo "";
> $i = 288; // this forces it to quit the loop
>
> }
> }
> echo "";
>
> $check = floor($rows/$num_of_page); // this finds how many pages it should
generate
> if ( $check>0 )
> {
>
> if (($i-1)==288)
> {
> echo "";
> }
> else
> {
> $num_of_page = $i;
> echo "http://www.celebritieszones.com/links/index.php?list=$num_of_page\">N
ext Link Page";
> }
>
> }
> ?>
> ---
> It's not good though and it's kinda stupid. :( When it loads the last page
of my links, it will show this
> "Warning: Unable to jump to row 48 on MySQL result index 2 in
/home/sites/site3/web/links/index.php on line 22
>
> Warning: Unable to jump to row 48 on MySQL result index 2 in
/home/sites/site3/web/links/index.php on line 23"
>
> You see the @? I am using it to supress the error messasges cuz i don't
know how to fix this error. Please help. :)
> Thank You.
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP-CVS] cvs: php4 /sapi/thttpd thttpd_patch

2001-04-22 Thread Sascha Schumann

sas Sun Apr 22 07:33:58 2001 EDT

  Modified files:  
/php4/sapi/thttpd   thttpd_patch 
  Log:
  remove Only.* lines from patch
  
  
Index: php4/sapi/thttpd/thttpd_patch
diff -u php4/sapi/thttpd/thttpd_patch:1.8 php4/sapi/thttpd/thttpd_patch:1.9
--- php4/sapi/thttpd/thttpd_patch:1.8   Sun Apr 22 07:00:53 2001
+++ php4/sapi/thttpd/thttpd_patch   Sun Apr 22 07:33:57 2001
@@ -108,8 +108,6 @@
  
  /* It's not CGI.  If it's executable or there's pathinfo, someone's
  ** trying to either serve or run a non-CGI file as CGI.   Either case
-Only in thttpd-2.21-p: libhttpd.c.rej
-Only in thttpd-2.21-p: libhttpd.c~
 diff -ur thttpd-2.21/libhttpd.h thttpd-2.21-p/libhttpd.h
 --- thttpd-2.21/libhttpd.h Fri Apr 13 07:37:17 2001
 +++ thttpd-2.21-p/libhttpd.h   Sun Apr 22 15:59:42 2001
@@ -137,4 +135,3 @@
  if ( c->bytes_sent >= c->bytes_to_send )
{
/* There's nothing to send. */
-Only in thttpd-2.21-p: thttpd.c~



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




[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/com COM.c com.h php_COM.h typedef_VARIANT.c

2001-04-22 Thread Harald Radi

phanto  Sun Apr 22 04:57:18 2001 EDT

  Added files: (Branch: PHP_4_0_5)
/php4/ext/com   com.h 

  Modified files:  
/php4/ext/com   COM.c php_COM.h typedef_VARIANT.c 
  Log:
  merging changes from main branch to fix a memory leak
  #sorry for being late, but i was on holiday
  

Index: php4/ext/com/COM.c
diff -u php4/ext/com/COM.c:1.6 php4/ext/com/COM.c:1.6.2.1
--- php4/ext/com/COM.c:1.6  Sun Feb 25 22:06:49 2001
+++ php4/ext/com/COM.c  Sun Apr 22 04:57:18 2001
@@ -50,27 +50,17 @@
 
 #define _WIN32_DCOM
 
-#ifdef CP_THREAD_ACP
-#define PHP_COM_CODEPAGE CP_THREAD_ACP
-#else
-#define PHP_COM_CODEPAGE CP_ACP
-#endif
-
 #include 
 #include 
 
 #include "php.h"
 #include "php_ini.h"
+#include "com.h"
 
 #include "conversion.h"
-#include "unknwn.h"
-
-BEGIN_EXTERN_C()
 
 zend_class_entry com_class_entry;
 
-END_EXTERN_C()
-
 PHP_FUNCTION(COM_load);
 PHP_FUNCTION(COM_invoke);
 PHP_FUNCTION(com_propget);
@@ -101,27 +91,94 @@
 
 static int php_COM_load_typelib(char *typelib_name, int mode);
 
+PHPAPI HRESULT php_COM_invoke(i_dispatch *obj, DISPID dispIdMember, WORD wFlags, 
+DISPPARAMS FAR*  pDispParams, VARIANT FAR*  pVarResult)
+{
+   if(obj->typelib) {
+   return obj->i.dispatch->lpVtbl->Invoke(obj->i.dispatch, dispIdMember, 
+&IID_NULL, LOCALE_SYSTEM_DEFAULT,
+  
+wFlags, pDispParams, pVarResult, NULL, NULL);
+   } else {
+   return obj->i.typeinfo->lpVtbl->Invoke(obj->i.typeinfo, 
+obj->i.dispatch, dispIdMember,
+  
+wFlags, pDispParams, pVarResult, NULL, NULL);
+   }
+}
+
+PHPAPI HRESULT php_COM_get_ids_of_names(i_dispatch *obj, OLECHAR FAR* FAR* rgszNames, 
+DISPID FAR* rgDispId)
+{
+   if(obj->typelib) {
+   return obj->i.dispatch->lpVtbl->GetIDsOfNames(obj->i.dispatch, 
+&IID_NULL, rgszNames, 1, LOCALE_SYSTEM_DEFAULT, rgDispId);
+   } else {
+   return obj->i.typeinfo->lpVtbl->GetIDsOfNames(obj->i.typeinfo, 
+rgszNames, 1, rgDispId);
+   }
+}
+
+PHPAPI HRESULT php_COM_release(i_dispatch *obj)
+{
+   HRESULT hr;
+   
+   hr = obj->i.dispatch->lpVtbl->Release(obj->i.dispatch);
+   obj->i.dispatch = NULL;
+   obj->i.typeinfo = NULL;
+   obj->typelib = FALSE;
+
+   return hr;
+}
+
+PHPAPI HRESULT php_COM_set(i_dispatch *obj, IDispatch FAR* pDisp, int cleanup)
+{
+   HRESULT hr;
+
+   obj->i.dispatch = pDisp;
+   obj->typelib = !FAILED(obj->i.dispatch->lpVtbl->GetTypeInfo(obj->i.dispatch, 
+0, LANG_NEUTRAL, &obj->i.typeinfo));
+
+   if(cleanup) {
+   pDisp = NULL;
+   } else {
+   hr = obj->i.dispatch->lpVtbl->AddRef(obj->i.dispatch);
+   }
+
+   return hr;
+}
+
+PHPAPI HRESULT php_COM_clone(i_dispatch *obj, i_dispatch *clone, int cleanup)
+{
+   HRESULT hr;
+
+   obj->typelib = clone->typelib;
+   obj->i.dispatch = clone->i.dispatch;
+   obj->i.typeinfo = clone->i.typeinfo;
+
+   if(cleanup) {
+   obj->i.dispatch = NULL;
+   obj->i.typeinfo = NULL;
+   obj->typelib = FALSE;
+   } else {
+   hr = obj->i.dispatch->lpVtbl->AddRef(obj->i.dispatch);
+   }
+
+   return hr;
+}
+
 PHPAPI char *php_COM_error_message(HRESULT hr)
 {
-   char *pMsgBuf;
+   void *pMsgBuf;
 
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | 
FORMAT_MESSAGE_FROM_SYSTEM, NULL,
hr, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pMsgBuf, 0, 
NULL)) {
char error_string[] = "No description available";

-   pMsgBuf = (char *) LocalAlloc(LMEM_FIXED, sizeof(error_string));
+   pMsgBuf = LocalAlloc(LMEM_FIXED, sizeof(error_string));
memcpy(pMsgBuf, error_string, sizeof(error_string));
}
 
return pMsgBuf;
 }
 
-static char *php_string_from_clsid(const CLSID clsid)
+static char *php_string_from_clsid(const CLSID *clsid)
 {
LPOLESTR ole_clsid;
char *clsid_str;
 
-   StringFromCLSID(&clsid, &ole_clsid);
+   StringFromCLSID(clsid, &ole_clsid);
clsid_str = php_OLECHAR_to_char(ole_clsid, NULL, 0, codepage);
LocalFree(ole_clsid);
 
@@ -130,9 +187,9 @@
 
 static void php_idispatch_destructor(zend_rsrc_list_entry *rsrc)
 {
-   IDispatch *i_dispatch = (IDispatch *)rsrc->ptr;
-
-   i_dispatch->lpVtbl->Release(i_dispatch);
+   i_dispatch *obj = (i_dispatch *)rsrc->ptr;
+   php_COM_release(obj);
+   efree(obj);
 }
 
 static PHP_INI_MH(OnTypelibFileChange)
@@ -199,12 +256,12 @@
 
 
 PHP_INI_BEGIN()
-   PHP_INI_ENTRY1_EX("allow_dcom", "0",PHP_INI_SYSTEM,
 NULL,   NULL,   php_ini_boolean_displayer_cb)
-   PHP_INI_ENTRY1("typelib_file",  NULL, 

[PHP-CVS] cvs: php4(PHP_4_0_5) / php.ini-dist php.ini-optimized

2001-04-22 Thread Harald Radi

phanto  Sun Apr 22 04:58:49 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4   php.ini-dist php.ini-optimized 
  Log:
  merged [com] section from main branch
  
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.73.2.1 php4/php.ini-dist:1.73.2.2
--- php4/php.ini-dist:1.73.2.1  Thu Apr  5 19:09:43 2001
+++ php4/php.ini-dist   Sun Apr 22 04:58:49 2001
@@ -1,5 +1,5 @@
 [PHP]
-; $Id: php.ini-dist,v 1.73.2.1 2001/04/06 02:09:43 sniper Exp $
+; $Id: php.ini-dist,v 1.73.2.2 2001/04/22 11:58:49 phanto Exp $
 
 ;;;
 ; About this file ;
@@ -766,3 +766,10 @@
 [Sockets]
 ; Use the system read() function instead of the php_read() wrapper.
 sockets.use_system_read = On
+
+[com]
+; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
+;com.typelib_file = 
+
+; allow Distributed-COM calls
+;com.allow_dcom = true
Index: php4/php.ini-optimized
diff -u php4/php.ini-optimized:1.33.2.1 php4/php.ini-optimized:1.33.2.2
--- php4/php.ini-optimized:1.33.2.1 Thu Apr  5 19:09:43 2001
+++ php4/php.ini-optimized  Sun Apr 22 04:58:49 2001
@@ -500,6 +500,10 @@
 [Sockets]
 sockets.use_system_read=   Off ; Use the system read() 
function instead of
; the php_read() wrapper.
+[com]
+;com.typelib_file =; path to a file containing GUIDs, 
+IIDs or filenames of files with TypeLibs
+;com.allow_dcom=   true; allow Distributed-COM calls
+
 ; Local Variables:
 ; tab-width: 4
 ; End:



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




Re: [PHP] Remove duplicates, as long as you have it.

2001-04-22 Thread Richard

That removes instances in an array, I am talking about a file. Each line
contains non-duplicate words, but the lines are mixed and duplicated,
perhaps trippled.

- Richard

""Taylor, Stewart"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Have you tried the array_unique function
> http://www.php.net/manual/en/function.array-unique.php
>
>
> -Stewart
>
> -Original Message-
> From: Richard [mailto:[EMAIL PROTECTED]]
> Sent: 22 April 2001 12:36
> To: [EMAIL PROTECTED]
> Subject: [PHP] Remove duplicates, as long as you have it.
>
>
> Greetings.
>
> I have this link file which has been active for quite a while, but the
> problem is that when I used a "admin" program to manage the links
> (admin.php) it kinda wrote the file multiple times, which means that it
has
> sorted the file and added multiple instances of the lines.
>
> How I managed to create it? Well, by using the free
linkadd/linkmanager
> PHP script. Anyhow, what I need is how can I remove duplicates that are
> sorted in arrays? Or does anyone of you has such a script or C++ program,
so
> you could sort the file for me or something?
>
> Thanks
> - Richard
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP-CVS] cvs: php4(PHP_4_0_5) /sapi/thttpd thttpd.c thttpd_patch

2001-04-22 Thread derick

On Sun, 22 Apr 2001, Sascha Schumann wrote:

> sas   Sun Apr 22 07:33:09 2001 EDT
>
>   Modified files:  (Branch: PHP_4_0_5)
> /php4/sapi/thttpd thttpd.c thttpd_patch
>   Log:
>   Merge thttpd-2.21-related changes into 4.0.5 branch

Nice, when will RC8 be out?

Derick Rethans
PHP QA

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


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




RE: [PHP] Remove duplicates, as long as you have it.

2001-04-22 Thread Jack Dempsey

if the lines are exact duplicates, then you could open the file with PHP or
Perl, then scan through it, line by line, each time throwing the line in the
next cell of an arraythen you should be able to sort by the values in
those cells, and after you have that, deleting duplicates would be
simple.

-Original Message-
From: Richard [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 12:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Remove duplicates, as long as you have it.


That removes instances in an array, I am talking about a file. Each line
contains non-duplicate words, but the lines are mixed and duplicated,
perhaps trippled.

- Richard

""Taylor, Stewart"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Have you tried the array_unique function
> http://www.php.net/manual/en/function.array-unique.php
>
>
> -Stewart
>
> -Original Message-
> From: Richard [mailto:[EMAIL PROTECTED]]
> Sent: 22 April 2001 12:36
> To: [EMAIL PROTECTED]
> Subject: [PHP] Remove duplicates, as long as you have it.
>
>
> Greetings.
>
> I have this link file which has been active for quite a while, but the
> problem is that when I used a "admin" program to manage the links
> (admin.php) it kinda wrote the file multiple times, which means that it
has
> sorted the file and added multiple instances of the lines.
>
> How I managed to create it? Well, by using the free
linkadd/linkmanager
> PHP script. Anyhow, what I need is how can I remove duplicates that are
> sorted in arrays? Or does anyone of you has such a script or C++ program,
so
> you could sort the file for me or something?
>
> Thanks
> - Richard
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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



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




[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Sascha Schumann

sas Sun Apr 22 08:17:57 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/ircg  config.m4 ircg.c php_ircg.h 
  Log:
  MFH allocation-related and thttpd-independence changes 
  
  
Index: php4/ext/ircg/config.m4
diff -u php4/ext/ircg/config.m4:1.5 php4/ext/ircg/config.m4:1.5.2.1
--- php4/ext/ircg/config.m4:1.5 Thu Mar  8 15:13:34 2001
+++ php4/ext/ircg/config.m4 Sun Apr 22 08:17:57 2001
@@ -16,6 +16,9 @@
   PHP_EVAL_INCLINE(`$IRCG_CONFIG --cppflags`)
   AC_ADD_LIBRARY_WITH_PATH(ircg, $PHP_IRCG/lib)
   AC_ADD_INCLUDE($PHP_IRCG/include)
+  if test "$PHP_SAPI" = "thttpd"; then
+AC_DEFINE(IRCG_WITH_THTTPD, 1, [Whether thttpd is available])
+  fi
   AC_DEFINE(HAVE_IRCG, 1, [Whether you want IRCG support])
   PHP_EXTENSION(ircg, $ext_shared)
 fi
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.53 php4/ext/ircg/ircg.c:1.53.2.1
--- php4/ext/ircg/ircg.c:1.53   Sat Mar 10 15:51:56 2001
+++ php4/ext/ircg/ircg.cSun Apr 22 08:17:57 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.53 2001/03/10 23:51:56 sas Exp $ */
+/* $Id: ircg.c,v 1.53.2.1 2001/04/22 15:17:57 sas Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -62,6 +62,8 @@
FMT_MSG_WHOIS_END,
FMT_MSG_MODE_VOICE,
FMT_MSG_MODE_OP,
+   FMT_MSG_BANLIST,
+   FMT_MSG_BANLIST_END,
NO_FMTS
 };
 
@@ -73,11 +75,15 @@
PHP_FE(ircg_join, NULL)
PHP_FE(ircg_part, NULL)
PHP_FE(ircg_msg, NULL)
+   PHP_FE(ircg_notice, NULL)
PHP_FE(ircg_nick, NULL)
PHP_FE(ircg_topic, NULL)
PHP_FE(ircg_channel_mode, NULL) 
+   PHP_FE(ircg_html_encode, NULL)
PHP_FE(ircg_whois, NULL)
PHP_FE(ircg_kick, NULL)
+   PHP_FE(ircg_ignore_add, NULL)
+   PHP_FE(ircg_ignore_del, NULL)
PHP_FE(ircg_disconnect, NULL)
PHP_FE(ircg_is_conn_alive, NULL)
PHP_FE(ircg_lookup_format_messages, NULL)
@@ -132,7 +138,9 @@
"%f is on channel %c",
"End of whois for %f",
"%f sets voice flag of %t to %m on %c",
-   "%f sets channel operator flag of %t to %m on %c"
+   "%f sets channel operator flag of %t to %m on %c",
+   "banned from %c: %m",
+   "end of ban list for %c"
 };
 
 #define MSG(conn, type) \
@@ -202,10 +210,10 @@
case '"':
case '\\':
case '\'':
-   smart_str_appendc(output, '\\');
+   smart_str_appendc_ex(output, '\\', 1);
/* fall-through */
default:
-   smart_str_appendc(output, *p);
+   smart_str_appendc_ex(output, *p, 1);
}
}
 }
@@ -243,7 +251,7 @@
smart_str tmp = {0}; \
ircg_js_escape(what, &tmp); \
smart_str_append_ex(result, &tmp, 1); \
-   smart_str_free(&tmp); \
+   smart_str_free_ex(&tmp, 1); \
} else { \
smart_str_append_ex(result, what, 1); \
}
@@ -308,7 +316,7 @@
if (encoded)
smart_str_free(&encoded_msg);
if (js_encoded)
-   smart_str_free(&js_encoded_msg);
+   smart_str_free_ex(&js_encoded_msg, 1);
 
smart_str_0(result);
 }
@@ -505,6 +513,24 @@
msg_send(conn, &m);
 }
 
+static void banlist_handler(irconn_t *ircc, smart_str *channel, smart_str *mask, void 
+*conn_data)
+{
+   php_irconn_t *conn = conn_data;
+   smart_str m = {0};
+
+   format_msg(MSG(conn, FMT_MSG_BANLIST), channel, NULL, NULL, mask, &m);
+   msg_send(conn, &m);
+}
+
+static void end_of_banlist_handler(irconn_t *ircc, smart_str *channel, void 
+*conn_data)
+{
+   php_irconn_t *conn = conn_data;
+   smart_str m = {0};
+
+   format_msg(MSG(conn, FMT_MSG_BANLIST_END), channel, NULL, NULL, NULL, &m);
+   msg_send(conn, &m);
+}
+
 static void user_add(irconn_t *ircc, smart_str *channel, smart_str *users,
int nr, void *dummy)
 {
@@ -630,6 +656,7 @@
 
 PHP_FUNCTION(ircg_set_current)
 {
+#ifdef IRCG_WITH_THTTPD
zval **p1;
php_irconn_t *conn;
 
@@ -653,6 +680,7 @@
msg_empty_buffer(conn);
 
RETURN_TRUE;
+#endif
 }
 
 PHP_FUNCTION(ircg_new_window)
@@ -707,6 +735,50 @@
 #endif
 }
 
+PHP_FUNCTION(ircg_ignore_add)
+{
+#if defined(IRCG_API_VERSION) && IRCG_API_VERSION >= 20010402
+   zval **args[2];
+   php_irconn_t *conn;
+   smart_str s;
+
+   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) == FAILURE)
+   WRONG_PARAM_COUNT;
+
+   convert_to_long_ex(args[0]);
+   convert_to_string_ex(args[1]);
+
+   conn = lookup_irconn(Z_LVAL_PP(args[0]));
+   if (!conn) RETURN_FALSE;
+
+   smart_str_setl(&s, Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
+   irc_ignore_add(

[PHP] Getting a binary file from URL

2001-04-22 Thread Jaime Torres

Hi, I'm trying to get a binary file from an URL and then save it to a local
disk.

I'm trying this:

$fd = fopen ($filename, "rb");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);

$fp = fopen ($tempfile, "wb");
fwrite ($fp,$contents);
fclose ($fp);

If I use $filename="local_file" the script works great, but if I use
$filename="http://myserver.com/remote_file" the resultant local file is
empty.

How can I do this?

Thanks in advance,
Jaime


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




RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread James Moore

>
> sas   Sun Apr 22 08:17:57 2001 EDT
>
>   Modified files:  (Branch: PHP_4_0_5)
> /php4/ext/ircgconfig.m4 ircg.c php_ircg.h
>   Log:
>   MFH allocation-related and thttpd-independence changes

Sascha can you please STOP MFH'ding your changes will have to wait for 4.0.6
now as we are trying to get this out the door then someone comes along and
merges a few more changes, to what is a fairly trivial extension albeit. Now
we either need to revert these patches as 4.0.5 was going to be released
tomorrow or some people need to voulenteer to test RC8.  Sascha I hope you
do and post your results to PHP-QA@ otherwise please revert these patches
and leave it until 4.0.6.

- James


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




RE: [PHP] Getting a binary file from URL

2001-04-22 Thread Jaime Torres

Well, it use to happen...

[from function.filesize.html]
int filesize (string filename)
This function will not work on remote files; the file to be examined must be
accessible via the server's filesystem.

Ok, I screwed up. But now that I know what went wrong, how can I override
this? The docs said: "Fread() reads up to length bytes from the file pointer
referenced by fp. Reading stops when length bytes have been read or EOF is
reached, whichever comes first."

How do I use fread to read until EOF? Note: I don't know the file size, it
could be from 1 byte to xxx Mb.

Thanks,
Jaime

-Mensaje original-
De: Jaime Torres [mailto:[EMAIL PROTECTED]]
Enviado el: domingo 22 de abril de 2001 12:07
Para: [EMAIL PROTECTED]
Asunto: [PHP] Getting a binary file from URL


Hi, I'm trying to get a binary file from an URL and then save it to a local
disk.

I'm trying this:

$fd = fopen ($filename, "rb");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);

$fp = fopen ($tempfile, "wb");
fwrite ($fp,$contents);
fclose ($fp);

If I use $filename="local_file" the script works great, but if I use
$filename="http://myserver.com/remote_file" the resultant local file is
empty.

How can I do this?

Thanks in advance,
Jaime


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



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




RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.cphp_ircg.h

2001-04-22 Thread Sascha Schumann

On Sun, 22 Apr 2001, James Moore wrote:

> >
> > sas Sun Apr 22 08:17:57 2001 EDT
> >
> >   Modified files:  (Branch: PHP_4_0_5)
> > /php4/ext/ircg  config.m4 ircg.c php_ircg.h
> >   Log:
> >   MFH allocation-related and thttpd-independence changes
>
> Sascha can you please STOP MFH'ding

Well, that really surprises me.  I commit minimal changes
while other people commit _huge_ patches to the release
branch and noone complains about that.

Regardless, the changes I just committed are _all_
self-contained.  They cannot affect anything else (beside the
single config.m4 change which has been merged from the head
branch).  And hence, they are in good tradition with what has
happened up to now to the 4.0.5 branch.

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


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




[PHP-CVS] Re: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4ircg.c php_ircg.h

2001-04-22 Thread derick

On Sun, 22 Apr 2001, Sascha Schumann wrote:

> On Sun, 22 Apr 2001, James Moore wrote:
>
> > Sascha can you please STOP MFH'ding
>
> Well, that really surprises me.  I commit minimal changes
> while other people commit _huge_ patches to the release
> branch and noone complains about that.

True, but there was an RC after it. RC7 was supposed ti be the last one.
But now there is need for a RC8, no matter what change you did. It should
be covered by an RC I think.

Derick Rethans
PHP-QA

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


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




[PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread James Moore

> On Sun, 22 Apr 2001, James Moore wrote:
>
> > >
> > > sas   Sun Apr 22 08:17:57 2001 EDT
> > >
> > >   Modified files:  (Branch: PHP_4_0_5)
> > > /php4/ext/ircgconfig.m4 ircg.c php_ircg.h
> > >   Log:
> > >   MFH allocation-related and thttpd-independence changes
> >
> > Sascha can you please STOP MFH'ding
>
> Well, that really surprises me.  I commit minimal changes
> while other people commit _huge_ patches to the release
> branch and noone complains about that.
>
> Regardless, the changes I just committed are _all_
> self-contained.  They cannot affect anything else (beside the
> single config.m4 change which has been merged from the head
> branch).  And hence, they are in good tradition with what has
> happened up to now to the 4.0.5 branch.

Sorry Sascha,
I missed the com changes too, I just saw the thttpd and ircg changes..

Herald I trust you will be helping to test RC8 too please dont MFH this late
in the process and before you do so send a mail to PHP-DEV and PHP-QA
justifying your changes and why they are so urgent that they require the
delay of the release of PHP 4.0.5 is it really that necessary to fix the mem
leak??

TO both of you we have just tested RC7 please be realistic and if you
changes REALLY need to be in 4.0.5 then thats OK and we will test again but
if they are not critical then please revert the patches  you are delaying
the release of 4.0.5 further by forcing another RC cycle.

Sascha looking at your patch:

+PHP_FUNCTION(ircg_ignore_add)
+{+#if defined(IRCG_API_VERSION) && IRCG_API_VERSION >= 20010402
+   zval **args[2];
+   php_irconn_t *conn;
+   smart_str s;
+
+   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) ==
FAILURE)
+   WRONG_PARAM_COUNT;
+
+   convert_to_long_ex(args[0]);
+   convert_to_string_ex(args[1]);
+
+   conn = lookup_irconn(Z_LVAL_PP(args[0]));
+   if (!conn) RETURN_FALSE;
+
+   smart_str_setl(&s, Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
+   irc_ignore_add(&conn->conn, &s, 1);
+#endif
+}

Would it not be better to have an else here the outputs a warning rather
than having the possibility of

PHP_FUNCTION(ircg_ignore_add)
{
}

The same is true of:
ircg_ignore_del

and seemingly a lot of the IRCG functions..

- James


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




[PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Liz

Depending on the changes whether they are more enhancements or showing
stopping bug fixes, could they not be withdrawn and put in as first changes
for 4.0.6?

> -Original Message-
> From: James Moore [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, April 22, 2001 5:01 PM
> To: Sascha Schumann
> Cc: [EMAIL PROTECTED]; PHP Quality Assurance Team Mailing List;
> [EMAIL PROTECTED]
> Subject: RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg
> config.m4 ircg.c php_ircg.h
>
>
> > On Sun, 22 Apr 2001, James Moore wrote:
> >
> > > >
> > > > sas Sun Apr 22 08:17:57 2001 EDT
> > > >
> > > >   Modified files:  (Branch: PHP_4_0_5)
> > > > /php4/ext/ircg  config.m4 ircg.c php_ircg.h
> > > >   Log:
> > > >   MFH allocation-related and thttpd-independence changes
> > >
> > > Sascha can you please STOP MFH'ding
> >
> > Well, that really surprises me.  I commit minimal changes
> > while other people commit _huge_ patches to the release
> > branch and noone complains about that.
> >
> > Regardless, the changes I just committed are _all_
> > self-contained.  They cannot affect anything else (beside the
> > single config.m4 change which has been merged from the head
> > branch).  And hence, they are in good tradition with what has
> > happened up to now to the 4.0.5 branch.
>
> Sorry Sascha,
> I missed the com changes too, I just saw the thttpd and ircg changes..
>
> Herald I trust you will be helping to test RC8 too please dont MFH this late
> in the process and before you do so send a mail to PHP-DEV and PHP-QA
> justifying your changes and why they are so urgent that they require the
> delay of the release of PHP 4.0.5 is it really that necessary to fix the mem
> leak??
>
> TO both of you we have just tested RC7 please be realistic and if you
> changes REALLY need to be in 4.0.5 then thats OK and we will test again but
> if they are not critical then please revert the patches  you are delaying
> the release of 4.0.5 further by forcing another RC cycle.
>
> Sascha looking at your patch:
>
> +PHP_FUNCTION(ircg_ignore_add)
> +{+#if defined(IRCG_API_VERSION) && IRCG_API_VERSION >= 20010402
> + zval **args[2];
> + php_irconn_t *conn;
> + smart_str s;
> +
> + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) ==
> FAILURE)
> + WRONG_PARAM_COUNT;
> +
> + convert_to_long_ex(args[0]);
> + convert_to_string_ex(args[1]);
> +
> + conn = lookup_irconn(Z_LVAL_PP(args[0]));
> + if (!conn) RETURN_FALSE;
> +
> + smart_str_setl(&s, Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
> + irc_ignore_add(&conn->conn, &s, 1);
> +#endif
> +}
>
> Would it not be better to have an else here the outputs a warning rather
> than having the possibility of
>
> PHP_FUNCTION(ircg_ignore_add)
> {
> }
>
> The same is true of:
> ircg_ignore_del
>
> and seemingly a lot of the IRCG functions..
>
> - James
>
>
> --
> PHP Quality Assurance Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread James Moore

Liz there are lots of changes for 4.0.6 already we branch CVS when we start
the release cycle. Its just a question of if these changes need to be in the
branch, on the IRCG front I can see no real problem as long as Sascha is
willing to test and post results (although I also feel that they should wait
until 4.0.6 but Ill trust Sascha judgement on this one and if we only have
these changes then there is probably no need for RC8 as long as people can
build latest CVS branch) on the COM front I am unsure of if a mem leak fix
really needs to delay the release this large patch will require more testing
on Win32 before we release.

- James


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




[PHP] weird mail() behaviour

2001-04-22 Thread Christian Dechery

I have a formmail script that works both under Win32 as in Linux.

It has a function email() that calls either mail() if in Win32 or 
sendmail() if in Linux... in Linux this sendmail() function works exactly 
as mail() but calling a popen() to sendmail... and it works fine..
but sometimes in Win mail() simply terminates the script and the email 
isn't sent.

It's weird, it's like mail() had some internall error and had to quit the 
entire script execution, cuz nothing after the mail() funcion is called 
happens, and it does not give me any error message either...

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




Re: [PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5)/ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Sascha Schumann

Well, as I said before, this commits are harmless with regard
to the rest of the system.  Additionally, builds with thttpd
and IRCG have been completed successfully.  A test run
producing 2GB of output from IRCG with thttpd-2.21 and 4.0.5
seems to show a memory leak which I'm currently trying to
locate.

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


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




Re: [PHP] Getting a binary file from URL

2001-04-22 Thread Sigitas Paulavicius

Solution #1

$contents = fread ($pointer, 1);



Solution #2

$contents="";
while ($partial = fread ($pointer, 8192)) {
$contents.=$partial;
};



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




[PHP-CVS] Re: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircgconfig.m4ircg.c php_ircg.h

2001-04-22 Thread Sebastian Bergmann

[EMAIL PROTECTED] wrote:
> be covered by an RC I think.

  If an RC8 is finished, I'll test it on Win32 with Apache as CGI, and
on Linux 2.4.3 with thttpd and ircg.

-- 
 sebastian bergmann[EMAIL PROTECTED]
   http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de

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




Re: [PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5)/ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Cameron

well, im not about to test ircg but im going to do the rounds with testing
thttpd yet again. would be nice to have some form of limiting in thttpd like
the apache  stuff how you can set prepends and execuction
limits etc. but i think thats a bit much to get added at this time

Cameron

Sascha Schumann wrote:

> Well, as I said before, this commits are harmless with regard
> to the rest of the system.  Additionally, builds with thttpd
> and IRCG have been completed successfully.  A test run
> producing 2GB of output from IRCG with thttpd-2.21 and 4.0.5
> seems to show a memory leak which I'm currently trying to
> locate.
>
> - Sascha Experience IRCG
>   http://schumann.cx/http://schumann.cx/ircg
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5)/ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Sascha Schumann

On Mon, 23 Apr 2001, Cameron wrote:

> well, im not about to test ircg but im going to do the rounds with testing
> thttpd yet again. would be nice to have some form of limiting in thttpd like
> the apache  stuff how you can set prepends and execuction
> limits etc. but i think thats a bit much to get added at this time

Yes, enabling thttpd to set PHP configuration directives
through its config file would be a great addition.
Unfortunately, the format of thttpd's source code does not
really encourage third party modifications and that is the
main reason such a change has not been implemented so far.

Of course, you can set thttpd-specific configs by building
PHP with --with-config-file-path=/dedicated/directory where
the directory contains the php.ini for thttpd.

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


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




[PHP] strtok not working...

2001-04-22 Thread Christian Dechery

I have a chunk of text like this:

$string="bla bla bla (12837) ble blo bli sjhs9 39udjkd";

I only want "bla bla bla" out of it...

what is wrong with:
$newString = strtok ($string,"(128");

altough this seems to work:
$newStrArray = explode("(128",$string);

so $newStrArray[0] would have exactly what I want... why doesn't strtok() 
works here?

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




Re: [PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5)/ext/ircgconfig.m4 ircg.c php_ircg.h

2001-04-22 Thread Cameron

yes but thats thttpd wide, not per host or per directory

i have been sitting and thinking about it since i sent that message and i could
imagine it being not TOO hard to create that in a xml file with all the hosts
listed and their restrictions but that would still be a lot of coding for the
guru's like you sascha . . .

oh well, perhaps 4.1 wishlist?

Cameron

Sascha Schumann wrote:

> On Mon, 23 Apr 2001, Cameron wrote:
>
> > well, im not about to test ircg but im going to do the rounds with testing
> > thttpd yet again. would be nice to have some form of limiting in thttpd like
> > the apache  stuff how you can set prepends and execuction
> > limits etc. but i think thats a bit much to get added at this time
>
> Yes, enabling thttpd to set PHP configuration directives
> through its config file would be a great addition.
> Unfortunately, the format of thttpd's source code does not
> really encourage third party modifications and that is the
> main reason such a change has not been implemented so far.
>
> Of course, you can set thttpd-specific configs by building
> PHP with --with-config-file-path=/dedicated/directory where
> the directory contains the php.ini for thttpd.
>
> - Sascha Experience IRCG
>   http://schumann.cx/http://schumann.cx/ircg


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




Re: [PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5)/ext/ircgconfig.m4ircg.c php_ircg.h

2001-04-22 Thread Sascha Schumann

On Mon, 23 Apr 2001, Cameron wrote:

> yes but thats thttpd wide, not per host or per directory

That is why it said "thttpd-specific configs".

> i have been sitting and thinking about it since i sent that message and i could
> imagine it being not TOO hard to create that in a xml file with all the hosts
> listed and their restrictions but that would still be a lot of coding for the
> guru's like you sascha . . .
>
> oh well, perhaps 4.1 wishlist?

We would need to think about whether this should be in the
form of an add-on patch.  I would be in favor of commencing a
dialogue with the thttpd community to add hooks to thttpd
instead, to decrease the burden of maintaining various
patches across several projects which interoperate with
thttpd.

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


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




[PHP-CVS] cvs: php4 /ext/pcre php_pcre.c

2001-04-22 Thread Sascha Schumann

sas Sun Apr 22 10:20:03 2001 EDT

  Modified files:  
/php4/ext/pcre  php_pcre.c 
  Log:
  Fix freeing of a NULL pointer
  
  
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.91 php4/ext/pcre/php_pcre.c:1.92
--- php4/ext/pcre/php_pcre.c:1.91   Sun Apr 15 21:56:31 2001
+++ php4/ext/pcre/php_pcre.cSun Apr 22 10:20:03 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.91 2001/04/16 04:56:31 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.92 2001/04/22 17:20:03 sas Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -60,7 +60,7 @@
pcre_cache_entry *pce = (pcre_cache_entry *) data;
pefree(pce->re, 1);
 #if HAVE_SETLOCALE
-   pefree((void*)pce->tables, 1);
+   if ((void*)pce->tables) pefree((void*)pce->tables, 1);
 #endif
 }
 



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




RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Zeev Suraski

I'm going to base 4.0.5 on the RC7 tag, so this won't make it in anyway.

Zeev

At 18:35 22/4/2001, James Moore wrote:
> >
> > sas   Sun Apr 22 08:17:57 2001 EDT
> >
> >   Modified files:  (Branch: PHP_4_0_5)
> > /php4/ext/ircgconfig.m4 ircg.c php_ircg.h
> >   Log:
> >   MFH allocation-related and thttpd-independence changes
>
>Sascha can you please STOP MFH'ding your changes will have to wait for 4.0.6
>now as we are trying to get this out the door then someone comes along and
>merges a few more changes, to what is a fairly trivial extension albeit. Now
>we either need to revert these patches as 4.0.5 was going to be released
>tomorrow or some people need to voulenteer to test RC8.  Sascha I hope you
>do and post your results to PHP-QA@ otherwise please revert these patches
>and leave it until 4.0.6.
>
>- James
>
>
>--
>PHP CVS Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

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


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




[PHP] Link Color Questions

2001-04-22 Thread Mark Lo

Hi,

 I would like to know how to make different link in different color on
one page.

etc.  www.domain1.com in blue color
   www.domain2.com in red color
   www.domain3.com in orange color

Thank you for your help

Mark


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




[PHP] Apache, PHP, Windows XP, MSIE 6, Cheese, and Cookies.

2001-04-22 Thread Padraic Tynan

Hey, I'm new to the list, and this issue may have already been addressed...

It seems that with Apache and PHP (running in Windows XP Beta 2, which identifies to 
Apache as an NT system) as the server and being accessed by MSIE 6.0b or MSIE 5.5 that 
cheese doesn't taste right.
No, wait, that's not the issue. The issue is that unless the page is what the browser 
opens with (ex: desktop shortcut, address bar request, being set as the browser's 
"home" -- anything where no page, not even the "Action cancelled." page, is opened) 
the cookies I setcookie() are saved as session cookies (yo know, not saved in a file), 
whereas if it's the first page the browser opens, they're saved in the Cookies folder 
where they're supposed to go, as a bona fide file.

Is there a solution to this issue yet? Has anyone else noticed it? :)



Re: [PHP] I'm a moron. So?

2001-04-22 Thread Geir Eivind Mork

On Saturday 21 April 2001 04:42, [EMAIL PROTECTED] wrote:
>  Alrighty.  I'm baack!  Anyways, I seem to be having stupid little
>  problems, al of which are driving me insane.  I'll feel really
>  stupid when you tell me the problem.  A friend told me something about
>  "seeding" for random() but I didn't find anything on that.

try this and learn from it :)




Horse Race v.1


Welcome to horse racing v.1.  This is a simple PHP game where you can
train, race and win money for your animals.  Eventually I'll make it a
whole barn with feeding and horses, and costs, age, breeding.  So on.
But for now, this is just a simple game.

Enter six names of horses.

\n";
?>


Good luck!




-- 
 php developer / CoreTrek AS| Remembering is for those who have
 Sandnes / Rogaland / Norway| forgotten.   -- Chinese proverb 
 web: http://www.moijk.net/ | 

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




[PHP] imap ssl on port 993

2001-04-22 Thread Drew Adams

Can anyone tell me the correct syntax for connecting to an imap server using
imap_open and an ssl connection.

normally >   $link = imap_open ("{mail.whatever.com:143}",
"username", "password");

Is this the correct way to do it for ssl?  ... because it is not working for
me.

ssl > $link = imap_open ("{mail.whatever.com:993}", "username",
"password");

 Drew



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




Re: [PHP] writing to file on server

2001-04-22 Thread Joeri Vankelst

But when I try using the path to the file I get denied permission ...
How can I use my password then? Or can I bypass that in some way?

""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9bupqt$b8s$[EMAIL PROTECTED]">news:9bupqt$b8s$[EMAIL PROTECTED]...
> When you are using that on your site, what basically happens is that you
are
> trying to open an FTP session with yourself. Not too efficient.
>
> So just kill off the url and use the path to your file.
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""Joeri Vankelst"" <[EMAIL PROTECTED]> wrote in message
> 9bujcv$gtm$[EMAIL PROTECTED]">news:9bujcv$gtm$[EMAIL PROTECTED]...
> > Hi,
> >
> > I've just started working with PHP. I've made a guest book using PHP
> > (nothing spectacular) that worked just fine when I tested it op my pc,
but
> > when I uploaded it, it stopped working.
> > My specific problem is that I cannot write to a file that already exists
> and
> > contains data. When I try to I get these warnings:
> >
> > Warning: File already exists
> > Warning: fopen("ftp:[EMAIL PROTECTED]/guestbook.txt","a") - File
> > exists
> >
> > Is this problem related to the FTP fopen? And is there a way to correct
> this
> > problem?
> >
> > Tnx!
> > Joeri Vankelst
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] CGI x DSO: Output Buffering

2001-04-22 Thread Christian Dechery

As I've seen and tested, Apache running in Win2k won't do output buffering 
running PHP as CGI.

But will perfectly running PHP as DSO.

Any explanations?

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




RE: [PHP] Link Color Questions

2001-04-22 Thread Jeff Oien

You need to use style sheets:
http://www.awlonline.com/cseng/titles/0-201-41998-X/liebos/
http://www.builder.com/Authoring/CSS/?tag=st.bl.7258.dir1.bl_CSS
http://www.wdvl.com/Authoring/Style/Sheets/
Jeff Oien

> Hi,
>
>  I would like to know how to make different link in different color on
> one page.
>
> etc.  www.domain1.com in blue color
>www.domain2.com in red color
>www.domain3.com in orange color
>
> Thank you for your help
>
> Mark


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




Re: [PHP] Apache, PHP, Windows XP, MSIE 6, Cheese, and Cookies.

2001-04-22 Thread Steve Lawson

Yea, I got a solution.

Choose a flavor of linux, format your HD, install, and run the that server
like it was meant to run.

Apache is not even 100% on NT much less the XP beta, it's like your running
a beta on a beta...That's why it's not working.

Here is a good quote from apache.org:  "Please note that at this time,
Windows support is entirely experimental, and is recommended only for
experienced users."

:)

I'm not trying to be a linux zealot, but you will encounter more strange
problems like this on windows...

SL.

- Original Message -
From: "Padraic Tynan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 22, 2001 1:28 PM
Subject: [PHP] Apache, PHP, Windows XP, MSIE 6, Cheese, and Cookies.


Hey, I'm new to the list, and this issue may have already been addressed...

It seems that with Apache and PHP (running in Windows XP Beta 2, which
identifies to Apache as an NT system) as the server and being accessed by
MSIE 6.0b or MSIE 5.5 that cheese doesn't taste right.
No, wait, that's not the issue. The issue is that unless the page is what
the browser opens with (ex: desktop shortcut, address bar request, being set
as the browser's "home" -- anything where no page, not even the "Action
cancelled." page, is opened) the cookies I setcookie() are saved as session
cookies (yo know, not saved in a file), whereas if it's the first page the
browser opens, they're saved in the Cookies folder where they're supposed to
go, as a bona fide file.

Is there a solution to this issue yet? Has anyone else noticed it? :)



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




Re: [PHP] problem with storing & displaying image in db

2001-04-22 Thread Steve Lawson

Why not just store the filename?

SL.

- Original Message -
From: "Keyur Kalaria" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Saturday, April 21, 2001 9:52 AM
Subject: [PHP] problem with storing & displaying image in db


> Hello everybody,
>
> I am facing a strange problem while uploading and displaying images in a
> database table.
>
> I have taken blob field to store the images.
>
> Images which are less then around 100kb are stored & displayed properly
but
> images which are greater than 100kb are giving problems while displaying
> although no errors were generated while inserting them in database.
>
> what could be the problem ? is it due to the blob type ?
>
> i am using the following statements to insert the file to database.
>
> insert.php
> ***
> $imgsize=GetImageSize($photofile);
> $photo=addslashes(fread(fopen($photofile, "r"), filesize($photofile)));
> $query="insert into photo(photoformat,photo,photowidth,photoheight) values
> ('$photoformat','$photo',$imgsize[0],$imgsize[1])";
>
> $photoformat, $photofile are the input fields of the form which is
> submitted.
>
> ***
>
> in my html pages i use the following  :
>
> 
>
> and my display.php is as follows:
>
> display.php
> ***
> $query="select * from photo where id='$id'";
> $result=mysql_query($query);
> $photo_rec=mysql_fetch_array($result);
> Header( "Content-type: image/$photo_rec[photoformat]; name=".microtime());
> echo $photo_rec["photo"];
>
> ***
>
>
> Thanks in advance
>
> Keyur
> $$$
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] Re: Linux Suggestion

2001-04-22 Thread Padraic Tynan

You know, that's a tad rude, just suggestion an OS switch like that. :þ
I mean, my http server isn't the only thing I run -- this is my personal use
computer. Windows XP Beta contains the sum total of what Windows has been up
to now, so I don't think the OS has very much to do with it.

I just wanted to know of this was an actual documented problem and if there
was a fix for it, or if I was the first person to experience it.

Not to mention, even though Apache.org says that Windows support is entirely
experimental and recommended only for experienced users, Linux itself (every
flavor) is still experimental, and you have to know beyond a shadow of a
doubt what you're doing to use it. Not to mention, every time I've tried to
set it up (RH6, Mandrake 7.1), nearly immediately following the
installation, it's messed up, without my editing any part of it.


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




php-general Digest 22 Apr 2001 21:49:08 -0000 Issue 643

2001-04-22 Thread php-general-digest-help


php-general Digest 22 Apr 2001 21:49:08 - Issue 643

Topics (messages 49734 through 49765):

Re: Incrementing dates
49734 by: PHPBeginner.com
49738 by: Martin Skjöldebrand
49742 by: PHPBeginner.com
49747 by: Warren Vail

Re: UUdecode
49735 by: Henrik Hansen

passing variables
49736 by: Adam
49737 by: PHPBeginner.com

Remove duplicates, as long as you have it.
49739 by: Richard
49740 by: Taylor, Stewart
49749 by: Richard
49750 by: Jack Dempsey

writing to file on server
49741 by: Joeri Vankelst
49743 by: chris herring
49748 by: Plutarck
49760 by: Joeri Vankelst

Re: Connecting to a MS Access database
49744 by: John Lim

Re: Buttons and such...
49745 by: Geir Eivind Mork
49746 by: Plutarck

Getting a binary file from URL
49751 by: Jaime Torres
49752 by: Jaime Torres
49754 by: Sigitas Paulavicius

weird mail() behaviour
49753 by: Christian Dechery

strtok not working...
49755 by: Christian Dechery

Apache, PHP, Windows XP, MSIE 6, Cheese, and Cookies.
49756 by: Padraic Tynan
49763 by: Steve Lawson

Link Color Questions
49757 by: Mark Lo
49762 by: Jeff Oien

Re: I'm a moron. So?
49758 by: Geir Eivind Mork

imap ssl on port 993
49759 by: Drew Adams

CGI x DSO: Output Buffering
49761 by: Christian Dechery

Re: problem with storing & displaying image in db
49764 by: Steve Lawson

Re: Linux Suggestion
49765 by: Padraic Tynan

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



you can then do this:

INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE
bla=bla;

it is just a way to do it. you will definitely have to play with it.

However you can easily make two queries to read the previous date combining
it with INTERVAL and then do an insert.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Incrementing dates


PHPBeginner.com wrote:

> I am not sure on how your possibilities are,
> but doing this in PHP means literally "adding useless lines and loops"
>
> If possible, do it with SQL queries. Read the documentations on date
> datatypes, this is so much easier... almost magic.
>

AND

> You can (mySQL, right?) do the following:

>UPDATE table SET date=(date+INTERVAL 10 DAYS);

>so if date there was 04-28, it will be added 10 more days and so will
>become
>05-08

>Use SQL for this things, it treats dates as 'dates' while PHP treats them
>as
>integers and strings.

Sounds even easier. But what if I'm not doing an UPDATE but an INSERT? Can
it read the previous date? I am inserting a batch of bookings at one time.

Martin S.

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






PHPBeginner.com wrote:

> 
> INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE
> bla=bla;
> 
> it is just a way to do it. you will definitely have to play with it.
> 
> However you can easily make two queries to read the previous date
> combining it with INTERVAL and then do an insert.

I've looked at INTERVAL but it seems it only deals with one specific date 
at a time?

date=10 : SELECT date+INTERVAL 10 
would then mean date=20

Or have I got everything wrong?

What I looking at
from the value of date=10 ADD other dates for X days on, like this
(in a table, each record (row) has more data than the one given)
date=2001-04-10
date=2001-04-11
date=2001-04-12

This, if I'm mistaken can't be done with interval, at least not without 
looping in PHP? And using two queries would not perhaps save as much code 
as the way I solved it? Could be mistaken of course.

Martin S.




well, then you have to do it with PHP, as I said - if possible, then mySQL
does it better.

Try converting each date into UNIX timestamp adding to it 60*60*24*10 . It
will create you a set of dates incremented by 10 days.


What I previously meant was :

say you design a poll, you have a table called logs.
you want to see if the specific user have already voted within the last 10
days.

SELECT date FROM logs WHERE user='$user' AND date>=(NOW() - INTERVAL 10
DAY));

this will return you at least one row (hopefully one only) if there's such a
user voted less then 10 days ago, and will return you an empty set if
there's none.

Many use PHP to do that kind of checks wh

RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Sascha Schumann

On Sun, 22 Apr 2001, Zeev Suraski wrote:

> I'm going to base 4.0.5 on the RC7 tag, so this won't make it in anyway.

It would be really inconvenient for users of PHP, if PHP
4.0.5 would not be compatible with existing web-servers.
Would you mind explaining how you came to the conclusion that
PHP 4.0.5 needs to be based on the RC7 tag?

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


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




Re: [PHP] writing to file on server

2001-04-22 Thread Adam

chmod the file to 777, this will allow anyone write permission to the file
and thus you will be able to append to the file



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




[PHP-CVS] RE: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Liz

> It would be really inconvenient for users of PHP, if PHP
> 4.0.5 would not be compatible with existing web-servers.
> Would you mind explaining how you came to the conclusion that
> PHP 4.0.5 needs to be based on the RC7 tag?

Without leaping into a battle that isnt mine.. (so please, dont flame me for
it) perhaps because the intention to release tomorrow is keen, and RC7 is
tested? and there are no major problems?? If there are major problems what are
they? and how long would they take to bring it in so that it is compatible
with all currently supported web servers and tested?

(ducking coz Im sure to have annoyed someone)

Liz


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




RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Zeev Suraski

At 22:47 22/4/2001, Sascha Schumann wrote:
>On Sun, 22 Apr 2001, Zeev Suraski wrote:
>
> > I'm going to base 4.0.5 on the RC7 tag, so this won't make it in anyway.
>
> It would be really inconvenient for users of PHP, if PHP
> 4.0.5 would not be compatible with existing web-servers.
> Would you mind explaining how you came to the conclusion that
> PHP 4.0.5 needs to be based on the RC7 tag?

As I said last week, RC7 was to be the last RC, after which 4.0.5 would be 
released in the beginning of the following week (i.e. tomorrow), barring 
major unexpected bugs (the thttpd changes don't fall in that category).
If you feel confident enough with your patches, move the RC7 tag for the 
thttpd.c file (generally a bad thing to do, unless you're pretty certain 
nobody tested it anyway).  There's not going to be another RC.

Zeev


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




Re: [PHP] writing to file on server

2001-04-22 Thread Felix Kronlage

On Sun, Apr 22, 2001 at 03:06:04PM -0700, Adam wrote:

> chmod the file to 777, this will allow anyone write permission to the file
> and thus you will be able to append to the file

file-mode 777 is ugo=rwx. You want 'chmod 666', which is ugo=rw.

read is 4
write is 2
execute is 1

If you want rw on the file, it's 6 not 7.

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 


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




Re: [PHP] Link Color Questions

2001-04-22 Thread Adam

#
yes, make a style sheet called "domain.css" and
put in this text:
#

a.domain1:link {  color: #FF; }
a.domain2:link {  color: #FF; }
a.domain3:link {  color: #FF8000; }

#
in the head tag, be sure to add the style's location:
#





#
then inset your html on teh page as follows:
#


www.domain1.com
www.domain2.com
www.domain3.com



hope this helps some :)

-Adam





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




RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Andi Gutmans

I don't want to get into it but you had a big problem with config.m4 
changes during RC's when I added the fastcgi support.
Anyway no need to make a big deal about it but you almost killed me back 
then as config.m4 could potentially create problems for the whole release.

Andi

At 09:47 PM 4/22/2001 +0200, Sascha Schumann wrote:
>On Sun, 22 Apr 2001, Zeev Suraski wrote:
>
> > I'm going to base 4.0.5 on the RC7 tag, so this won't make it in anyway.
>
> It would be really inconvenient for users of PHP, if PHP
> 4.0.5 would not be compatible with existing web-servers.
> Would you mind explaining how you came to the conclusion that
> PHP 4.0.5 needs to be based on the RC7 tag?
>
> - Sascha Experience IRCG
>   http://schumann.cx/http://schumann.cx/ircg
>
>
>--
>PHP CVS Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP-CVS] Re: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4ircg.c php_ircg.h

2001-04-22 Thread derick

On Sun, 22 Apr 2001, Zeev Suraski wrote:

> At 22:47 22/4/2001, Sascha Schumann wrote:
> >On Sun, 22 Apr 2001, Zeev Suraski wrote:
> >
> > > I'm going to base 4.0.5 on the RC7 tag, so this won't make it in anyway.
> >
> > It would be really inconvenient for users of PHP, if PHP
> > 4.0.5 would not be compatible with existing web-servers.
> > Would you mind explaining how you came to the conclusion that
> > PHP 4.0.5 needs to be based on the RC7 tag?
>
> As I said last week, RC7 was to be the last RC, after which 4.0.5 would be
> released in the beginning of the following week (i.e. tomorrow), barring
> major unexpected bugs (the thttpd changes don't fall in that category).

I don't think this is wise to do. Harald put in some fixes for COM support
(a lot even) and Sascha's patch will fix bugs in thttpd support. I don't
think it's a prob to delay the Release another week, as it's been a very
long time since php4.0.4pl1 anyway. Releases with less bugs (through the
patches from Harald and Sascha) are prefered over a fast release. You
can see what happens if a product is release to fast if you look at the
Win* OSses.

regards,

Derick Rethans
PHP-QA

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


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




[PHP] What's wrong with this code?

2001-04-22 Thread Tyler Longren

$file = fopen("includes/about.inc", "r");
$data = fread($file, 2400);
$stripped = stripslashes($data);
$formatted_data = nl2br($stripped);
echo "$formatted_data";

Any ideas why that doesn't work on one server but it will work on another
server?  The server it works on is Win2k, IIS5, php4.0.4pl1.  The server it
doesn't work on is Linux, Apache, php4.0.4pl1.  Any ideas why this won't
work?  Just to be sure, I did a chmod 777 about.inc, so file permissions
isn't it.

Thanks everyone,
Tyler Longren


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




[PHP-CVS] Re: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Zeev Suraski

I disagree.  Bug fixes are endless (this is not just a figure of speech), 
and if we schedule another RC every time someone fixes a bug, we'll never 
release.  None of the bugs fixed since RC7 are showstoppers, so the show 
goes on...

Zeev

At 23:56 22/4/2001, [EMAIL PROTECTED] wrote:
>On Sun, 22 Apr 2001, Zeev Suraski wrote:
>
> > At 22:47 22/4/2001, Sascha Schumann wrote:
> > >On Sun, 22 Apr 2001, Zeev Suraski wrote:
> > >
> > > > I'm going to base 4.0.5 on the RC7 tag, so this won't make it in 
> anyway.
> > >
> > > It would be really inconvenient for users of PHP, if PHP
> > > 4.0.5 would not be compatible with existing web-servers.
> > > Would you mind explaining how you came to the conclusion that
> > > PHP 4.0.5 needs to be based on the RC7 tag?
> >
> > As I said last week, RC7 was to be the last RC, after which 4.0.5 would be
> > released in the beginning of the following week (i.e. tomorrow), barring
> > major unexpected bugs (the thttpd changes don't fall in that category).
>
>I don't think this is wise to do. Harald put in some fixes for COM support
>(a lot even) and Sascha's patch will fix bugs in thttpd support. I don't
>think it's a prob to delay the Release another week, as it's been a very
>long time since php4.0.4pl1 anyway. Releases with less bugs (through the
>patches from Harald and Sascha) are prefered over a fast release. You
>can see what happens if a product is release to fast if you look at the
>Win* OSses.
>
>regards,
>
>Derick Rethans
>PHP-QA
>
>-
> PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
>  SRM: Site Resource Manager - www.vl-srm.net
>-

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


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




[PHP-CVS] cvs: php4 /ext/ccvs ccvs.c

2001-04-22 Thread Sterling Hughes

sterlingSun Apr 22 16:40:34 2001 EDT

  Modified files:  
/php4/ext/ccvs  ccvs.c 
  Log:
  Fix bug #10447.
  
  
  
  
Index: php4/ext/ccvs/ccvs.c
diff -u php4/ext/ccvs/ccvs.c:1.13 php4/ext/ccvs/ccvs.c:1.14
--- php4/ext/ccvs/ccvs.c:1.13   Sun Feb 25 22:06:48 2001
+++ php4/ext/ccvs/ccvs.cSun Apr 22 16:40:34 2001
@@ -17,7 +17,7 @@
+--+
  */
 /*
-*  cvvs.c $Revision: 1.13 $ - PHP4 Interface to the RedHat CCVS API
+*  cvvs.c $Revision: 1.14 $ - PHP4 Interface to the RedHat CCVS API
 *   ---
 *   Interfaces RedHat's CCVS [Credit Card Verification System] 

 *   This code is ported from an original php3 interface written by RedHat's Doug 
DeJulio <[EMAIL PROTECTED]>
@@ -27,10 +27,10 @@
 
 /*
 *  Code started on [EMAIL PROTECTED] by Brendan W. McAdams <[EMAIL PROTECTED]>
-*  $Revision: 1.13 $
+*  $Revision: 1.14 $
 */
 
-static char const cvsid[] = "$Id: ccvs.c,v 1.13 2001/02/26 06:06:48 andi Exp $";
+static char const cvsid[] = "$Id: ccvs.c,v 1.14 2001/04/22 23:40:34 sterling Exp $";
 
 #include 
 #include 
@@ -193,6 +193,11 @@
   }
 
   convert_to_string_ex(psess);
+  if (!Z_STRVAL_PP(psess)) {
+php_error(E_WARNING, "Invalid session to ccvs_new()");
+RETURN_FALSE;
+  }
+
   sess = hks_ptr_stringtoptr((*psess)->value.str.val);
 
   convert_to_string_ex(pinvoice);



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




Re: [PHP] Recursive Childs

2001-04-22 Thread Joe Conway

>Subject: Re: [PHP] Recursive Childs
> thanks for that, could you just explain how it should start, should i just
call the function, how does the level get determined ???

After the function ends, starting at
*
  $conn = pg_connect("dbname=mydb user=postgres");

*
is an example of how to call the function. Level starts out as level 0. Each
time the function is called, it increments the value of level that was
passed to it -- therefore a child of parent = 0 is at level 1, and a child
of parent 1 is at level 2, etc. The part that initializes everything is:

*
  $conn = pg_connect("dbname=mydb user=postgres");
  $parent = 0;
  $level = 0;
  $currentrecord = 0;
  $rowclr = "#e7e7e7";
*

Change $parent to something else to start at a different point in your tree.
$level can start with whatever value you want. The next part starts an HTML
document and the table, then calls the recursive function, getChildren.
getChildren calls itself recursively to build the table. When the function
emerges again at the top level, the table and html document are ended.
*
  print("\n");

  print("\n");
  print("\n");
  print("ID\n");
  print("Name\n");
  print("Level\n");
  print("\n");

  getChildren($conn,$parent,$level,$currentrecord,$rowclr);

  print("\n");
  if ($currentrecord == 0)
  {
   print("No matches found.\n");
  }
  print("\n");
 *

That's it -- it's actually pretty simple.

- Joe


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




[PHP] is there something like get_time_limit() ?

2001-04-22 Thread almir

is it possible to get time limit of script on server ?

almir



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




[PHP] PHP4 for Apache httpd-2_0_16

2001-04-22 Thread The Doctor

Does anyone know how to build a static module for Apache
httpd-2_0_16?

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




[PHP] Reference to arrays

2001-04-22 Thread Wayne Parrott

Hi,
I'm trying to make a reference to an array but it doesn't seem to work,
is this supported? am i doing it wrong?
Here is the code...

$this->level[$this->breaklevel][column] = $col;
$this->level[$this->breaklevel][level] =
$this->breaklevel;
$this->level[$this->breaklevel][breaktype] =
'break';
$this->column[$col] =
&$level[$this->breaklevel];

Thanks
 Wayne


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




Re: [PHP] is there something like get_time_limit() ?

2001-04-22 Thread CC Zona

In article <9bvs8e$g9p$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("almir") wrote:

> is it possible to get time limit of script on server ?

Since the "max_execution_time" can be set in php.ini, the current value 
should be displayable with a call to phpinfo().  I expect you can also 
check that value with get_cfg_var().  And of course you can also change the 
setting in a script simply by using set_time_limit().  Cheers!

-- 
CC

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




[PHP] Incrementing a String Name

2001-04-22 Thread Chris Aitken

Hi

Just a quick puzzle I cant seem to get around at the moment...

Im trying to create a loop that increments the string name by a digit. For 
example, if I had the following 4 strings submitted to a script.

$name1
$name2
$name3
$name4

What I want to do is create a while loop that will print out the above 4 
strings, incrementing the number part of string automatically.

while($count<4) {
 $count=$count+1;
 echo"$increased_string_name\n";
}

But I just cant seem to work out how to increment the string name to 
display it.

Any assistance on this would be great. I have a feeling that there is a 
better method of attacking this but im only new to PHP and dont know it yet.



Thanks


Chris


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




Re: [PHP] Incrementing a String Name

2001-04-22 Thread Andreas Landmark

On Mon, Apr 23, 2001 at 10:58:20AM +1000, Chris Aitken produced this golden nugget:
> Hi
> 
> Just a quick puzzle I cant seem to get around at the moment...
> 
> Im trying to create a loop that increments the string name by a digit. For 
> example, if I had the following 4 strings submitted to a script.
> 
> $name1
> $name2
> $name3
> $name4
> 
> What I want to do is create a while loop that will print out the above 4 
> strings, incrementing the number part of string automatically.
> 
> while($count<4) {
>  $count=$count+1;
>  echo"$increased_string_name\n";
> }
> 
> But I just cant seem to work out how to increment the string name to 
> display it.
> 
> Any assistance on this would be great. I have a feeling that there is a 
> better method of attacking this but im only new to PHP and dont know it yet.
> 
There is a better way...

Use an array:

$name[0]  //your $name1
$name[1] // your $name2
etc.

and then do

while($count<4)
{
$count=$count+1;
echo $name[$count];
}

and there you go...
that should work just like your code would've in theory...

-- 
andreas landmark / noXtension


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




Re: [PHP] Connecting to a MS Access database

2001-04-22 Thread Steve Maroney


This brings up a question that I always wondered.

Does Access have server functionality? Where do you configure these
settings ?


Thanks,
Steve


On Sat, 21 Apr 2001, Andrew Hill wrote:

> The Access native driver IS an ODBC driver.
> That is, I believe, your only option.
>
> Best regards,
> Andrew
> 
> Andrew Hill - OpenLink Software
> Directory of Technology Evangelism
> Internet Data Integration Technology
> http://www.openlinksw.com
>
> On Saturday, April 21, 2001, at 07:00 PM, Søren Soltveit wrote:
>
> > How can I connect to a Microsoft Access database, whitout using ODBC??
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] redirection to another page function

2001-04-22 Thread Carlos Fernando Scheidecker Antunes

Hello all!

Is there any PHP native function to redirect to another page or URL?

I would like that once the user clicks on home.php4 and a few verifications are done, 
he/she would be redirected to home.html.

Thanks,

C.F.



RE: [PHP] redirection to another page function

2001-04-22 Thread Tyler Longren

header ("Location: http://www.location.com/home.html");

> -Original Message-
> From: Carlos Fernando Scheidecker Antunes [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, April 22, 2001 8:19 PM
> To: PHP-GENERAL
> Subject: [PHP] redirection to another page function
> Importance: High
> 
> 
> Hello all!
> 
> Is there any PHP native function to redirect to another page or URL?
> 
> I would like that once the user clicks on home.php4 and a few 
> verifications are done, he/she would be redirected to home.html.
> 
> Thanks,
> 
> C.F.
> 

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




RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray

> Is there any PHP native function to redirect to another page or URL?

No, because you can only redirect a browser to another page using the 
appropriate HTTP command (it is a header) or JavaScript.

> I would like that once the user clicks on home.php4 and a few 
> verifications are done, he/she would be redirected to home.html.

You can issue a HTTP redirection command to the web browser by using 
PHP's Header() function. You'll want to use this kind of code:

http://this.is.the.destination.com/directory/file.php");
?>

Jason

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




[PHP-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4

2001-04-22 Thread Andrei Zmievski

andrei  Sun Apr 22 17:24:06 2001 EDT

  Modified files:  
/CVSROOTavail cvsusers gen_acl_file.m4 
  Log:
  Access to PHP-GTK docs for Markus.
  
  

Index: CVSROOT/avail
diff -u CVSROOT/avail:1.150 CVSROOT/avail:1.151
--- CVSROOT/avail:1.150 Thu Apr 19 20:34:10 2001
+++ CVSROOT/avail   Sun Apr 22 17:24:05 2001
@@ -2,14 +2,14 @@
 unavail
 avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane|CVSROOT
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,sniper,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams|phpweb
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin,joey,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,mboeren,fireclaw,jmcastagnetto,kaltoft,jccann|php4/pear,pearweb,pear
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin,joey|php4,php3,php31,phpfi
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin,joey,hholzgra|functable
+avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,mboeren,fireclaw,jmcastagnetto,kaltoft,jccann|php4/pear,pearweb,pear
+avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey|php4,php3,php31,phpfi
+avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,hholzgra|functable
 avail|rasmus,sterling,jimw,ssb|pres
 
avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin,joey,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jb

Re: [PHP] Incrementing a String Name

2001-04-22 Thread Tom Rogers

Hi
Here is another way
$x = 1;
while($x < 5):
 $index = "name".$x;
 $name = $$index;
 echo $name."";
endwhile;
had troubles with echo and $$variable, thats why the extra stephabit
Tom



At 10:58 AM 23/04/01 +1000, Chris Aitken wrote:
>Hi
>
>Just a quick puzzle I cant seem to get around at the moment...
>
>Im trying to create a loop that increments the string name by a digit. For 
>example, if I had the following 4 strings submitted to a script.
>
>$name1
>$name2
>$name3
>$name4
>
>What I want to do is create a while loop that will print out the above 4 
>strings, incrementing the number part of string automatically.
>
>while($count<4) {
> $count=$count+1;
> echo"$increased_string_name\n";
>}
>
>But I just cant seem to work out how to increment the string name to 
>display it.
>
>Any assistance on this would be great. I have a feeling that there is a 
>better method of attacking this but im only new to PHP and dont know it yet.
>
>
>
>Thanks
>
>
>Chris
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Incrementing a String Name

2001-04-22 Thread Meir kriheli

On Monday 23 April 2001 03:58, Chris Aitken wrote:
> Hi
>
> Just a quick puzzle I cant seem to get around at the moment...
>
> Im trying to create a loop that increments the string name by a digit. For
> example, if I had the following 4 strings submitted to a script.
>
> $name1
> $name2
> $name3
> $name4
>
> What I want to do is create a while loop that will print out the above 4
> strings, incrementing the number part of string automatically.
>
> while($count<4) {
>  $count=$count+1;
>  echo"$increased_string_name\n";
> }
>
> But I just cant seem to work out how to increment the string name to
> display it.
>
> Any assistance on this would be great. I have a feeling that there is a
> better method of attacking this but im only new to PHP and dont know it
> yet.
>
>
>
> Thanks
>
>
> Chris

while($count<4) {
  $count++;
  $strname="name$count";
  echo $$strname;
 }
-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

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




RE: [PHP] redirection to another page function

2001-04-22 Thread Christian Dechery

At 11:22 23/4/2001 +1000, Jason Murray wrote:
> > Is there any PHP native function to redirect to another page or URL?
>
>No, because you can only redirect a browser to another page using the
>appropriate HTTP command (it is a header) or JavaScript.
>
> > I would like that once the user clicks on home.php4 and a few
> > verifications are done, he/she would be redirected to home.html.
>
>You can issue a HTTP redirection command to the web browser by using
>PHP's Header() function. You'll want to use this kind of code:
>
>Header("Location:
>http://this.is.the.destination.com/directory/file.php");
>?>

I never had any trouble using header() to redirect, but wouldn't something 
like this work even better (without worring about previous outputs)??

function redirect($dest)
{
 ?>
 
 parent.location.href='';
 
 http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray

> I never had any trouble using header() to redirect, but 
> wouldn't something like this work even better (without 
> worring about previous outputs)??
> 
> function redirect($dest)
> {
>  ?>
>  
>  parent.location.href='';
>  
>   }
> 
> it would work wouldn't it?

In Netscape:

 Menu >> Edit >> Preferences >> Advanced >>
   [ ] Enable Javascript
^
Not ticked

Oops. I just broke that redirection. :)

Jason

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




  1   2   >