[PHP] Netscape 4.77 and PHP

2001-04-14 Thread Jason Caldwell

I've created a test.php file that dynamically loads HTML.. works totally
fine in IE 5, but when I test it with Netscape 4.77 -- nothing comes up...
just a totally blank page.

Anyone know why this might be happening?

Thanks.
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]




Re: [PHP] next release?

2001-04-14 Thread Plutarck

Nope, it 4.0.5 hasn' been released yet.

However at one point I believe there was a 4.0.6dev source code on CVS,
before the Midgaard extension required another round of release candidates.
So I think that's where the mentions came from.

And I'm sure some people are planning their features to be in 4.0.6. Then
again, there are probably people who claim their features will be in PHP5 ;)



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


"Michael Kimsal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm seeing references to functions that 'are' in 4.0.6, but I wasn't
> even
> aware that 4.0.5 was released yet.  I've seen references to RCs for
> 4.0.5,
> but nothing's on the php.net page.  Did I miss something?
>
>
>
>
> --
> 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 Digest 15 Apr 2001 05:42:17 -0000 Issue 628

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


php-general Digest 15 Apr 2001 05:42:17 - Issue 628

Topics (messages 48556 through 48618):

Re: W2K Install Problem
48556 by: Long Lam

Javascript in a header
48557 by: Dan Harrington

strange error
48558 by: n e t b r a i n
48560 by: Phil Driscoll

Re: PHP & MySQL Search Results
48559 by: Jason Caldwell

Re: Do any of you provide hosting?
48561 by: Manuel Lemos

Using gnupg with php - errors
48562 by: sohara.sohara.com

Re: PHP without a webserver
48563 by: Brian Clark
48566 by: Jeroen Wesbeek
48568 by: Les Neste
48570 by: Plutarck
48573 by: Brian Clark
48575 by: Plutarck
48584 by: Brian Clark
48591 by: Plutarck
48616 by: Markus Fischer

Supplied argument is not a valid MS SQL-Link resource
48564 by: davek
48571 by: Plutarck
48572 by: Brian Clark

Re: HTML and PHP?
48565 by: Brian Clark
48567 by: Les Neste
48579 by: Brian Clark
48592 by: Jason Caldwell

Red Hat 7.0
48569 by: Mauricio Junqueira

Re: user info?
48574 by: Brian Clark

Re: Any one have PHP voteBOOTH source code...?!?
48576 by: Brian Clark

Re: Forcing Case
48577 by: Brian Clark

Re: antifraud logic for voting poll, banner clicks
48578 by: Brian Clark

A tricky problem
48580 by: David Tandberg-Johansen
48585 by: Brian Clark

R: [PHP] CLASSES AND OBJECTS..
48581 by: alberto

What's XML's Purpose??
48582 by: Chris Anderson
48586 by: Brian Clark
48588 by: Chris Anderson
48589 by: Brian Clark
48590 by: Plutarck
48593 by: phpman
48594 by: Jason Caldwell
48600 by: Michael Kimsal
48618 by: Plutarck

Re: Selected Radio Buttons
48583 by: Jordan Elver

setuid
48587 by: Ulysses Almeida

Re: Extract from string
48595 by: Steve Edberg

Secure Sockets
48596 by: phpman

2 Different Mysql Server Connection Problem
48597 by: Mesut TUNGA
48605 by: Brian Clark

Sorry :(
48598 by: Chris Anderson
48599 by: Richard
48603 by: Brian Clark
48604 by: Chris Anderson

Re: Extract from string, version 2.0
48601 by: Steve Edberg

next release?
48602 by: Michael Kimsal

Re: session
48606 by: Yasuo Ohgaki

converting DATETIME to a readable date.
48607 by: DRN
48608 by: Brian Clark
48611 by: Chris Adams
48612 by: DRN

Display Formatted Query Results
48609 by: Jeff Holzfaster
48610 by: Brian Clark
48614 by: Jeff Holzfaster
48615 by: Jeff Holzfaster

Re: Extract from string, version 3.0
48613 by: Steve Edberg

limiting page for printing
48617 by: Fabian Fabela

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]


--



Win2k's command prompt is located under the start 
button/programs/accessories/command prompt.


At 09:53 AM 4/14/2001 -0500, Jeff Oien wrote:
>I got it to work. I would still like to know how to open a command
>window in W2K though.
>
>I had a reference to d:/php4/ instead of d:/php/ which is where I
>have it.
>Jeff Oien
>
> > When I try to run a PHP script through a Web browser it just
> > displays the code. I did a clean install of W2K and installed
> > Apache. I copied the php.ini to the WINNT and system folders.
> > Not sure where to go from here.
> >
> > BTW how do you open a command window in W2K? Thanks.
> > Jeff Oien
> >
> > --
> > 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]





Hello,
Am I brain damaged or will something like this work?

header("Location:javascript:window.open('http://login.php?arg1&arg2','','windowname')");

I want to popup a login script in a sub-browser window, and then pass
the results back to the main window.  Someone told me that the javascript
in the header would work but so far it won't.

However, that javascript typed into the browser "location" field
does work as  I want it to.

ideas?
Thanks
Dan






Hi all,
I don't know why this (quick & dirty) small function:

function esiste_url($file){
@$fp=fopen($file,"r");
if(!$fp){return false;}else{return true;}
@fclose($fp);
}
//it checks if a url submit via form client exist

in two different pages:

a.php3 ---> works fine
b.php3 ---> produce an Internal Error Ser

Re: [PHP] What's XML's Purpose??

2001-04-14 Thread Plutarck

I agree with most of your points actually. That's why I said I thought the
love would "fade off a bit".

For some things I agree that XML really is quite excellant.

But what I meant about people not being good with "new" on Java and XML, is
that when people (including myself) get a new toy they try and do everything
with it. People get a VCR, and now they want it to program itself and set
it's own clock. Thus came for horrible implementation of "VCR+".

Java was originally made to work in little widgets like blenders and
microwaves. Then it made sense to work on computers too...it's still a very
good idea. But then people instantly tried to do everything with it, and
complained loudly when they couldn't. So Sun bowed to their wishes and
started forcing Java to do things it wasn't yet ready to do.

And now Java applets are quite secure for the user, but the ease with which
they can be decompiled is gastly.

And with XML it's the same way, for now. They want it to do _everything_.
Now when you mix XML with a little javascript and a server-side language
like PHP or *cough* ASP (or any of the others), it really is a pretty nifty
widget.


But here is my problem. For instance with Java, people tend to get really
excited about doing something that they could of done with C/C++. But in
reality, it's a feature only a mother (or programmer, as the case may be),
could love.

So my whole POV is when you want to open a can, use a can opener. So please
put the VCR back under the TV.


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

"Michael Kimsal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Plutarck wrote:
>
> > I use to be really enthusiastically pro-XML just as I was getting into
PHP,
> > but now I've basically taken a "XML shmexXML" approach. I get the
initial
> > attraction, but I would think the love would fade off a bit.
> >
> > The key that so many people seem to forget is the best way to do HTML is
> > with, *gasp*, HTML!
> >
> > If you just want a webpage, XML is using a canon to kill a fly. It's
like
> > creating classes and objects in PHP for sending text emails.
> >
>
> Agreed, but if you have a set of data that you'd like to be able to
> "fairly easily" convert into multiple presentation systems (HTML, PDF
> and WAP spring to mind), then taking a more structured data and
> abstraction approach can pay off quite handsomely on larger projects.
>
>
> >
> > Sure you can do it...but why?
> >
>
> Because what you need to do might change some in the future.  Yes,
> use mail() all you want, but when you start needing to send attachments,
> already you need a class of some sort.   - Aha - I see you qualified and
said
> 'text' attachments.  OK...
>
>
> >
> > XML is new. Common society doesn't do well with new. They always manage
to
> > screw it up somehow.
> >
>
> Depends on what you mean by 'screw it up'.  The notion of a commercial
> internet, to me, seems to have been adopted QUITE quickly - even my
> parents have coped quite well with this 'new' stuff, and they STILL
> can't set their VCR clocks.
>
> >
> > XML started as an extensible markup language...that's it. That's all it
was
> > supposed to do! Now people are using it to query databases, and concoct
> > entire search engines, and they are trying to use it to control access
to
> > restricted data, etc etc.
> >
>
> I don't know what you're talking about here.  I've not heard of anyone
using
> XML to 'control access' to 'restricted data'.  The XML itself IS the data.
>
>
> >
> > It's the same thing that happened with Java. People just aren't good
with
> > "new".
> >
>
> Don't lump Java in with other 'new' technology wholesale.  Sun has made,
> imo, a HUGE number of mistakes pushing Java out, so the
> less-than-stellar adoption of Java has as much or more to do with Sun
themselves
>
> rather than people's ability to adopt to 'new' things.  Again, imo.
>
>
> >
> > XML is nice, and for some things it's even great. But it's not the death
of
> > plain old HTML, just like ISDN didn't kill POTS (remember when ISDN was
"the
> > future of telecom"?).
> >
> > I fear that there are too many cooks in the kitchen on XML, all with a
> > seasoning all their own that they are dead set on adding to the broth.
> >
> > But for me, I say let people play with their Java and XML and new
fangled
> > widgets. I'll take my PHP and plain-old HTML, and I'll create twice as
much
> > material with just as high a quality, and I won't need to spend an extra
> > minute learning a bleeding-edge technology.
> >
>
> Twice as much material?  Is there a contest going on?  Some of us are
trying
> to use PHP to create advanced applications where we exchange data with
> disparate parties.  Having a common standard by which we can exchange
> data is a necessity - XML can be that commonality in many cases.
>
> Keep making your HTML webpages - no one is trying to convert you.  Realize
> 2 things:
>
> 1.  The impact and use of 'in

[PHP] limiting page for printing

2001-04-14 Thread Fabian Fabela

Hello,

I have a page with a lot of data, all of this data is formated in that page to be 
printed, in a table with 500 px width, but how can I messure the length of the page 
with my results, for example a query can give me exactly the height of the page, but 
other queries can give me more of the height of the page and the results are cutted at 
the end when I send the page to the printer.

How can I solve this problem?

Thank you in advance for your help.


Fabian Fabela
[EMAIL PROTECTED]
www.vacagorda.com





Re: [PHP] PHP without a webserver

2001-04-14 Thread Markus Fischer

On Sat, Apr 14, 2001 at 03:34:32PM -0500, Plutarck wrote : 
> The final layer is the scripting engine. In the script if a move_elevator()
[...]
> This would allow the vast majority of the real "content" of a game or
> application to be written in a scripting language, much like web apps are
> now. The script would run just as well on Linux as it would on windows.
[...]

This is not only true since now or since quake but also sicne the
early days of Sierra On-Line games / Lucasmfilm Games. All their
games were built on a particular Scripting Engine. For Lucasfilm,
this was SCUMM[tm] and for Sierra it was SCI (Sierra Creative
Interpreter).

This is why those games also run nowadays on Linux (see
http://freesci.linuxgames.com/ ).
Ok now this is hell Offtopic ;-)


But, yes, gtk+ rocks.

And, for me, I removed perl and also use now PHP as my day to day
scripting language. Its behaviour of hashes is much more
intuitive for me than perl's way (every used nested hashes ?
you're getting crazy doing so :). But, after all maybe i'm just
too dump for perl then. But hey its ok :) I've much joy and fun
working with PHP :-)


cheers,

Markus

-- 
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] Display Formatted Query Results

2001-04-14 Thread Jeff Holzfaster

Teemu, thanks for the input.  I tried this with somewhat modified code
(added all the fields) and perhaps you saw what I did on my last post to the
list.  I have actually been able to get the same results as this.  I'm a
little confused about how to get the info in the 'for' section to format to
look the way I need it and to 'wrap' with only two sets of results to a row.
Using the way you show has the disadvantage of leaving blank rows if data is
not available for that row plus, I don't see how to rearrange the results to
look right.  I mean, how do you put city, state, zip on the same line or how
do you get "$city Round Table Discussion" in there?  Are

Thanks!!

Here is yours after I made my attempt:

while( $row = mysql_fetch_array( $result )){
 $data[] = array(
 location   => $row[1],
 address=> $row[2],
 address2   => $row[3],
 city   => $row[4],
 state=> $row[5],
 zip  => $row[6],
 day  => $row[7],
 date => $row[8],
 time => $row[9],
 phone=> $row[10]

 );
}

for ( $i = 0; $i < count( $data ); $i++ ){

 print("Set $i:");
 print( $data[$i][location]."");
 print( $data[$i][address]."");
 print( $data[$i][address2]."");
   print( $data[$i][city]." "."Round Table Discussion"."");
 print( $data[$i][city]."");
   print( $data[$i][state]."");
   print( $data[$i][zip]."");
   print( $data[$i][day]."");
   print( $data[$i][date]."");
   print( $data[$i][time]."");
   print( $data[$i][phone]."");

}





try something like this...

$db = "database_name";
$q = "select * from md_tbl";
$rs = mysql_query( $db, $q );
while( $row = mysql_fetch_array( $rs )){
 $data[] = array(
 LOCATION=> $row[1],
 ADDR=> $row[2],
 ADDR2   => $row[3]
 );
}

for ( $i = 0; $i < count( $data ); $i++ ){
 print("Set $i:");
 print( $data[$i][LOCATION]."");
 print( $data[$i][ADDR]."");
 print( $data[$i][ADDR2]."");
}

sorry 'bout typos , it's getting late here ;-)
Hope this helps.

cheers

Teemu Pentinsaari

At 19:52 14.4.2001 -0500, you wrote:
>Hi All,
>
>My apologies if this is too wordy.
>
>This is driving me nuts.  I have very little experience or knowledge of PHP
>and MySQL but have been put in a position that requires me to build several
>applications that require me to figure them out.  I am making progress,
>though.  Here is my first delimit:
>
>I have a form page that looks like this:
>http://www.webtinker.com/fran_info.htm This form has several things going
>on.  1st, the first pull down list needs to reflect the same info as the
two
>location descriptions.  2nd, the two locations "Round Table Discussion"
will
>grow to an unknown number of entries over time so the two may become 6 or 8
>or...  My first big (for me) hurdle is to figure out how to get these to
>show up at the top of this form in order of the date with the closest one
>first.  They need to be in the same format as they appear but with
>additional rows showing as more entries are made.  The ones showing can't
be
>past due, or, don't show past dates.
>
>What I have figured out so far is how to populate the pull down, how to
make
>the admin form to fill in the needed info into the MySQL table and I have
>had limited success in displaying the meeting info at the top of the form.
>I just can't figure out how to make them wrap into groups of info, say with
>5 entries of different meetings.  Do I need a separate query for each row
of
>info using the limit statement in the query or is there a way to do this
>using  arrays?  I have just about every book available and just can't
>find a good example of this type of formatted query results.  How do I
>approach this?
>
>Here is the table I am using:
>
>CREATE TABLE rnd_tbl (
>id tinyint(10) DEFAULT '0' NOT NULL auto_increment,
>location varchar(100) NOT NULL,
>address varchar(45) NOT NULL,
>address2 varchar(45) NOT NULL,
>city varchar(50) NOT NULL,
>state char(2) NOT NULL,
>zip varchar(14) NOT NULL,
>day char(3) NOT NULL,
>date varchar(25) NOT NULL,
>time varchar(25) NOT NULL,
>phone varchar(15) NOT NULL,
>PRIMARY KEY (id)
>);
>
>Many Thanks!!
>Short Circuit
>
>
>--
>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: [EMA

RE: [PHP] Display Formatted Query Results

2001-04-14 Thread Jeff Holzfaster

Thanks for the help, Brian.  That'll give me something to go on.  I
definitely will need some assistance with this array stuff.  I was actually
able to do this (below) which got everything to a page - unformatted in any
way - but when I tried moving it around (the arrays??) such as $my_row .=
"$row[state]"; to something like $my_row .=
"$row[city][state][zip]"; it obviously failed.  Is there something I
need to do with the output of the while statement beyond what I have done or
is there a simple way to get that info formatted to look like the current
page?

Thanks









\n";
$my_row .= "Round Table Discussion";
$my_row .= "$row[day]";
$my_row .= "$row[address] [address2]";
$my_row .= "$row[address2]";
$my_row .= "$row[location]";
$my_row .= "$row[city]";
$my_row .= "$row[state]";
$my_row .= "$row[city]";
$my_row .= "$row[zip]";
$my_row .= "$row[date]";
$my_row .= "$row[time]";
$my_row .= "$row[phone]";
$my_row .= "";
echo "$my_row\n";
}
?>









Hi Jeff,

@ 8:52:10 PM on 4/14/2001, Jeff Holzfaster wrote:


> My apologies if this is too wordy.

A little confusing, but here we go. If this makes no sense what so
ever, maybe someone else can provide a better way of doing what you're
describing here.


> I have a form page that looks like this:
> http://www.webtinker.com/fran_info.htm This form has several things
> going on. 1st, the first pull down list needs to reflect the same
> info as the two location descriptions.

That's easy. If you're getting the two locations' data from a mysql
table, just reuse the same information for the pull down.

Is 'location' in your table the 'label' for that meeting? Ie., is
'location' in your SQL below going to be something like "Chicogo Round
Table Discussion"?

If not, add another column for that label and use that for the
listings above the form, and use that again for the select.

> 2nd, the two locations "Round Table Discussion" will grow to an
> unknown number of entries over time so the two may become 6 or 8
> or... My first big (for me) hurdle is to figure out how to get these
> to show up at the top of this form in order of the date with the
> closest one first. They need to be in the same format as they appear
> but with additional rows showing as more entries are made. The ones
> showing can't be past due, or, don't show past dates.

For the date column in your SQL below, use either the value of time()
from PHP, or use one of the built in mysql date functions like
DATETIME.

Then you'll just need to compare the current date to the ones listed
in the table and only show the meetings dated for the current day or
greater. If the expired meetings won't change, you could leave them in
the table and only modify the date down the road. If they're a one
time thing, you can drop the expired listings as you're doing your
date check for the current/future meetings to extract from the table.

Since you're reusing the 'location,' your drop down matching the top
listings should already be taken care of.

> What I have figured out so far is how to populate the pull down, how
> to make the admin form to fill in the needed info into the MySQL
> table and I have had limited success in displaying the meeting info
> at the top of the form.

You'll just need to read the data using mysql_fetch_array() or
mysql_fetch_object(). There are examples of those in the manual at
http://www.php.net. (enough to do what you're wanting to do.)

As you read the data, you can print rows with two cells. If you have 5
meeting entries, you'll end up with a 2 x 3 table with the 2nd cell in
the last row being empty.

Since you'll be reusing the 'location label' from the rows' printing,
your select should be populated with the same information.

> I just can't figure out how to make them wrap into groups of info

No idea what you mean by 'groups of info' unless you mean rows from
the table.

> , say with 5 entries of different meetings. Do I need a separate
> query for each row of info using the limit statement in the query or
> is there a way to do this using  arrays?

Grabbing the data into an array is going to be a lot quicker than
making several separate queries, probably. If you're having trouble
with arrays, there are lots of folks here willing to help to clarify
them when you get into trouble.


> Here is the table I am using:

> CREATE TABLE rnd_tbl (
>id tinyint(10) DEFAULT '0' NOT NULL auto_increment,
>location varchar(100) NOT NULL,
>address varchar(45) NOT NULL,
>address2 varchar(45) NOT NULL,
>city varchar(50) NOT NULL,
>state char(2) NOT NULL,
>zip varchar(14) NOT NULL,
>day char(3) NOT NULL,
>date varchar(25) NOT NULL,
>time varchar(25) NOT NULL,

time and date could be combined. You can u

Re: [PHP] Extract from string, version 3.0

2001-04-14 Thread Steve Edberg

Sheesh! No one should let me reply to email without sufficient 
caffiene! Now, I actually just read and grokked your question...

I haven't tested this. And, I included a line that removes 
apostrophes (eg; "steve's" becomes "steve"). You can comment that 
line out if this doesn't suit your needs. The function returns an 
array of all words that meet or exceed your threshold count, sorted 
by decreasing frequency (you can remove the sort section too, if you 
don't need it).

Sorry about the previous two messages...


function your_dream_function($phrase, $threshold) {
$phrase = strtolower(trim($phrase));
$WordList = $Temp = array();

$Bits = split('[[:space:]]+', $phrase);

for ($i=0; $i= $threshold) { $WordList[] = $Temp[$i]; }
}

return ($WordList);
}

Some notes:

(1) I can't recall if PHP3's arsort() would treat the array value as 
a string or as a numeric. I think it would always treat the value as 
a string (meaning that '2' would come before '12' in an descending 
sort), so in that case you would have to modify the function above in 
one place (only if you wanted the sort):

Replace

   $Temp[$Bits[$i]]++;

in the first for loop with

   $x = $Temp[$Bits[$i]]++;
   $Temp[$Bits[$i]] = substr(1+$x, 1);

This should left-pad the number with zeros (for up to  
occurrences found), so that the ASCII sort sequence is in numeric 
order. Using PHP4's arsort($Temp, SORT_NUMERIC) would be much handier!

(2) Iff (if and ONLY if) you are using the sort, you could get a 
slight speed improvement by modifying the second for loop as follows; 
replace

   if ($Temp[$i] >= $threshold) { $WordList[] = $Temp[$i]; }

with

   if ($Temp[$i] >= $threshold) {
  $WordList[] = $Temp[$i];
   } else {
  break; # all subsequent words will be below the threshold
   }



Again, this is all untested code.

-steve



At 3:43 PM -0700 4/14/01, Steve Edberg wrote:
>OK, this is less elegant (to me, anyway), and probably a bit slower, but:
>
>function word_occurrence($word,$phrase) {
>$word = strtolower($word); # this way,
>$phrase = strtolower($phrase); # case is irrelevant
>
>$Bits = split('[^[:alnum:]]+', $phrase);
>$count = 0;
>for ($i=0; $i   if ($Bits[$i] == $word) { $count++; }
>}
>
>return ($count);
>}
>
>It should also handle hyphenated & apostrophied (is that a word?) 
>words correctly, such as
>
>   coffe's a drag
>or
>   coffe-heads are strange
>
>If you want to count words that INCLUDE dashes or apostrophes, you'd 
>have to use "[^[:alnum:]'-]+" in the split() function. Or, just 
>break the string up by whitespace, and use '[[:space:]]+'.
>
>   -steve
>
>
>
>---Original Message ---
>At 11:07 PM +0200 4/14/01, n e t b r a i n wrote:
>>Hi all,
>>anyone have or know where I can find a small function in order to extract
>>from a string the most relevant words in it?
>>
>>something like this:
>>
>>$var="I love coffe ... Coffe is from Brazil and coffe with milk ..";
>>$occurence=2;
>>//$occurence means word that are repeat 2 or more times
>>my_dream_funct($var,$occurence);
>>//the funct now return the word _ coffe _
>>
>>many thanks in advance
>>max
>>
>>ps.plz note: I need that it works on php3
>>
>
>
>Well, just offthetopofmyhead:
>
>function word_occurrence($word,$phrase) {
>$word = strtolower($word); # this way,
>$phrase = strtolower($phrase); # case is irrelevant
>
>$Bits = split($word.'[^[:alnum:]]*', $phrase);
>
>return (count($Bits)-1);
>}
>
>I tested this, and it works fine (php 3.0.12) EXCEPT it counts 
>'coffecoffe' as TWO words, not zero. If that's the behavior you 
>want, then it's fine. Now I'm intrigued...I want to find a single 
>regular expression that will NOT match 'coffecoffe'. Perhaps preg_ 
>functions (available on PHP >= 3.0.9).
>
>And, I tried things like
>
>   split('[^[:alnum:]]*'.$word.'[^[:alnum:]]*', " $phrase ")
>
>...didn't work.
>
>-steve
>
>--
>+--- 12 April 2001: Forty years of manned spaceflight ---+
>| Steve Edberg   University of California, Davis |
>| [EMAIL PROTECTED]   Computer Consultant |
>| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
>+-- www.yurisnight.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]

-- 
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- www.yurisnight.net --+

-- 
PHP General Mailing List (http://www.ph

Re: [PHP] converting DATETIME to a readable date.

2001-04-14 Thread DRN


Brian Clark <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| Hi DRN,
| Try this and see if it functions correctly:
|
| 
|
That works great, thanks Donald



-- 
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] converting DATETIME to a readable date.

2001-04-14 Thread Chris Adams

On 14 Apr 2001 17:31:02 -0700, DRN <[EMAIL PROTECTED]> wrote:
>$date = $row["date"];
>
>$new_date = date("l, j M Y, G:i:s", strtotime($date));
>~~
>
>but I cannot get this to work :(, I get an "unexpected error in
>date()"

At a guess strtotime() is choking on the format MySQL used to return the date,
which would lead date() to fail as well.

The best way of handling this is to eliminate the need for your program to
worry about the day formats. Modify your mysql query so that instead of "SELECT
date" you have something like "SELECT UNIX_TIMESTAMP(date) AS date". Then you
can simply use date($row["date"]) directly. Alternately, you could use MySQL's
date formatting function to return the desired format directly. In either case,
you'll save a great deal of trouble by avoiding the need for PHP and MySQL to
be parsing each other's human-readable date formats.

-- 
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] Display Formatted Query Results

2001-04-14 Thread Brian Clark

Hi Jeff,

@ 8:52:10 PM on 4/14/2001, Jeff Holzfaster wrote:

...
> My apologies if this is too wordy.

A little confusing, but here we go. If this makes no sense what so
ever, maybe someone else can provide a better way of doing what you're
describing here.

...
> I have a form page that looks like this:
> http://www.webtinker.com/fran_info.htm This form has several things
> going on. 1st, the first pull down list needs to reflect the same
> info as the two location descriptions.

That's easy. If you're getting the two locations' data from a mysql
table, just reuse the same information for the pull down.

Is 'location' in your table the 'label' for that meeting? Ie., is
'location' in your SQL below going to be something like "Chicogo Round
Table Discussion"?

If not, add another column for that label and use that for the
listings above the form, and use that again for the select.

> 2nd, the two locations "Round Table Discussion" will grow to an
> unknown number of entries over time so the two may become 6 or 8
> or... My first big (for me) hurdle is to figure out how to get these
> to show up at the top of this form in order of the date with the
> closest one first. They need to be in the same format as they appear
> but with additional rows showing as more entries are made. The ones
> showing can't be past due, or, don't show past dates.

For the date column in your SQL below, use either the value of time()
from PHP, or use one of the built in mysql date functions like
DATETIME.

Then you'll just need to compare the current date to the ones listed
in the table and only show the meetings dated for the current day or
greater. If the expired meetings won't change, you could leave them in
the table and only modify the date down the road. If they're a one
time thing, you can drop the expired listings as you're doing your
date check for the current/future meetings to extract from the table.

Since you're reusing the 'location,' your drop down matching the top
listings should already be taken care of.

> What I have figured out so far is how to populate the pull down, how
> to make the admin form to fill in the needed info into the MySQL
> table and I have had limited success in displaying the meeting info
> at the top of the form.

You'll just need to read the data using mysql_fetch_array() or
mysql_fetch_object(). There are examples of those in the manual at
http://www.php.net. (enough to do what you're wanting to do.)

As you read the data, you can print rows with two cells. If you have 5
meeting entries, you'll end up with a 2 x 3 table with the 2nd cell in
the last row being empty.

Since you'll be reusing the 'location label' from the rows' printing,
your select should be populated with the same information.

> I just can't figure out how to make them wrap into groups of info

No idea what you mean by 'groups of info' unless you mean rows from
the table.

> , say with 5 entries of different meetings. Do I need a separate
> query for each row of info using the limit statement in the query or
> is there a way to do this using  arrays?

Grabbing the data into an array is going to be a lot quicker than
making several separate queries, probably. If you're having trouble
with arrays, there are lots of folks here willing to help to clarify
them when you get into trouble.

...
> Here is the table I am using:

> CREATE TABLE rnd_tbl (
>id tinyint(10) DEFAULT '0' NOT NULL auto_increment,
>location varchar(100) NOT NULL,
>address varchar(45) NOT NULL,
>address2 varchar(45) NOT NULL,
>city varchar(50) NOT NULL,
>state char(2) NOT NULL,
>zip varchar(14) NOT NULL,
>day char(3) NOT NULL,
>date varchar(25) NOT NULL,
>time varchar(25) NOT NULL,

time and date could be combined. You can use PHP's date conversion
functions to convert the date and time into any format you'd like, or
vise versa.

>phone varchar(15) NOT NULL,
>PRIMARY KEY (id)
> );


-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] Display Formatted Query Results

2001-04-14 Thread Jeff Holzfaster

Hi All,

My apologies if this is too wordy.

This is driving me nuts.  I have very little experience or knowledge of PHP
and MySQL but have been put in a position that requires me to build several
applications that require me to figure them out.  I am making progress,
though.  Here is my first delimit:

I have a form page that looks like this:
http://www.webtinker.com/fran_info.htm This form has several things going
on.  1st, the first pull down list needs to reflect the same info as the two
location descriptions.  2nd, the two locations "Round Table Discussion" will
grow to an unknown number of entries over time so the two may become 6 or 8
or...  My first big (for me) hurdle is to figure out how to get these to
show up at the top of this form in order of the date with the closest one
first.  They need to be in the same format as they appear but with
additional rows showing as more entries are made.  The ones showing can't be
past due, or, don't show past dates.

What I have figured out so far is how to populate the pull down, how to make
the admin form to fill in the needed info into the MySQL table and I have
had limited success in displaying the meeting info at the top of the form.
I just can't figure out how to make them wrap into groups of info, say with
5 entries of different meetings.  Do I need a separate query for each row of
info using the limit statement in the query or is there a way to do this
using  arrays?  I have just about every book available and just can't
find a good example of this type of formatted query results.  How do I
approach this?

Here is the table I am using:

CREATE TABLE rnd_tbl (
   id tinyint(10) DEFAULT '0' NOT NULL auto_increment,
   location varchar(100) NOT NULL,
   address varchar(45) NOT NULL,
   address2 varchar(45) NOT NULL,
   city varchar(50) NOT NULL,
   state char(2) NOT NULL,
   zip varchar(14) NOT NULL,
   day char(3) NOT NULL,
   date varchar(25) NOT NULL,
   time varchar(25) NOT NULL,
   phone varchar(15) NOT NULL,
   PRIMARY KEY (id)
);

Many Thanks!!
Short Circuit


-- 
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] converting DATETIME to a readable date.

2001-04-14 Thread Brian Clark

Hi DRN,

@ 8:34:08 PM on 4/14/2001, DRN wrote:

...
> $date = $row["date"];

> $new_date = date("l, j M Y, G:i:s", strtotime($date));
> ~~

> but I cannot get this to work :(, I get an "unexpected error in
> date()"
...

Try this and see if it functions correctly:



Your original code gives me the same error, but the above code
functions normally for me.

-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] converting DATETIME to a readable date.

2001-04-14 Thread DRN

Hi, I have a MySQL table recording errors, 1 of the fields is a
DATETIME, to give me the time of the error.
I have made a file which will then display a table of errors.

I would like to display the date and time in a more readable format,
even just with spaces between the years & months etc.

Having a look through the php online documentation I found this
example:

~~
If you have a MySQL column with of the DATETIME type, and you want to
format the values to a different representation, use this code:

$date = $row["date"];

$new_date = date("l, j M Y, G:i:s", strtotime($date));
~~

but I cannot get this to work :(, I get an "unexpected error in
date()"

I don't (yet) know enough about php to work out what this error is,
could someone help.


Cheers for your help,  Donald
__
As well as learning more,
I learn that there is even more I don't know

http://www.donaldrnoble.f2s.com
¯¯



-- 
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] session

2001-04-14 Thread Yasuo Ohgaki
I guess you are using "files" session module.
If you take a look at note in PHP Manual, there is my note why your session
files are not deleted.
(See Session reference)

Hope this helps.
--
Yasuo Ohgaki


""E K L"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>Is there anybody can help to do this:
>
>My web site has 3 pages :a.php, b.php and c.php. I want to capture the
> session in those 3 pages. Without an id, visitor can't view my page. When
> visitors leave the site, thier session should be removed.
>
>The problem is how to remove the session. I have tried several function
> of session such as session_destroy(), session_unregister. But, i still faild
> to clear the session. What should i do?
>
>   For ur information, the session.cookie_lifetime is set to 0 in my server.
> Should i   change the value? If yes, then how to do it? Please give me your
> hands, thank you
>
> E K
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> 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] 2 Different Mysql Server Connection Problem

2001-04-14 Thread Brian Clark

Hi Mesut,

@ 6:19:04 PM on 4/14/2001, Mesut TUNGA wrote:

...
> Warning: MySQL Connection Failed: Can't initialize character set 30
> (path: default) in /home/user/public_html/createtable.php on line 2


http://www.mysql.com/doc/C/a/Cannot_initialize_character_set.html


-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]




Re: [PHP] Sorry :(

2001-04-14 Thread Chris Anderson

Well thanks everyone, don't feel like I'm "leeching" from the community
anymore. Now when it comes to me and napster, thats another story
- Original Message -
From: "Brian Clark" <[EMAIL PROTECTED]>
To: "PHP is not a drug." <[EMAIL PROTECTED]>
Sent: Saturday, April 14, 2001 7:47 PM
Subject: Re: [PHP] Sorry :(


> Hi Chris,
>
> @ 3:51:02 PM on 4/14/2001, Chris Anderson wrote:
>
> > I realized that'll that I don't do much to help this community. I
> > rarely reply to people's questions. Mainly because I have 56.6 and
> > when I get mail people answered already. I also ask alot of
> > questions. Just saying thanks for putting up with me. Chris, The 17
> > yr Old Php Coder
>
> As far as I'm concerned, you don't have a thing to be sorry about.
>
> There isn't a thing wrong with asking questions here. In fact, if you
> have a good book and this list to get help from, you're far more
> likely to become successful with PHP.
>
> -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 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] Sorry :(

2001-04-14 Thread Brian Clark

Hi Chris,

@ 3:51:02 PM on 4/14/2001, Chris Anderson wrote:

> I realized that'll that I don't do much to help this community. I
> rarely reply to people's questions. Mainly because I have 56.6 and
> when I get mail people answered already. I also ask alot of
> questions. Just saying thanks for putting up with me. Chris, The 17
> yr Old Php Coder

As far as I'm concerned, you don't have a thing to be sorry about.

There isn't a thing wrong with asking questions here. In fact, if you
have a good book and this list to get help from, you're far more
likely to become successful with PHP.

-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] next release?

2001-04-14 Thread Michael Kimsal

I'm seeing references to functions that 'are' in 4.0.6, but I wasn't
even
aware that 4.0.5 was released yet.  I've seen references to RCs for
4.0.5,
but nothing's on the php.net page.  Did I miss something?




-- 
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] Extract from string, version 2.0

2001-04-14 Thread Steve Edberg

OK, this is less elegant (to me, anyway), and probably a bit slower, but:

function word_occurrence($word,$phrase) {
$word = strtolower($word); # this way,
$phrase = strtolower($phrase); # case is irrelevant

$Bits = split('[^[:alnum:]]+', $phrase);
$count = 0;
for ($i=0; $iHi all,
>anyone have or know where I can find a small function in order to extract
>from a string the most relevant words in it?
>
>something like this:
>
>$var="I love coffe ... Coffe is from Brazil and coffe with milk ..";
>$occurence=2;
>//$occurence means word that are repeat 2 or more times
>my_dream_funct($var,$occurence);
>//the funct now return the word _ coffe _
>
>many thanks in advance
>max
>
>ps.plz note: I need that it works on php3
>


Well, just offthetopofmyhead:

function word_occurrence($word,$phrase) {
$word = strtolower($word); # this way,
$phrase = strtolower($phrase); # case is irrelevant

$Bits = split($word.'[^[:alnum:]]*', $phrase);

return (count($Bits)-1);
}

I tested this, and it works fine (php 3.0.12) EXCEPT it counts 
'coffecoffe' as TWO words, not zero. If that's the behavior you want, 
then it's fine. Now I'm intrigued...I want to find a single regular 
expression that will NOT match 'coffecoffe'. Perhaps preg_ functions 
(available on PHP >= 3.0.9).

And, I tried things like

split('[^[:alnum:]]*'.$word.'[^[:alnum:]]*', " $phrase ")

...didn't work.

-steve

-- 
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- www.yurisnight.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]




Re: [PHP] What's XML's Purpose??

2001-04-14 Thread Michael Kimsal



Plutarck wrote:

> I use to be really enthusiastically pro-XML just as I was getting into PHP,
> but now I've basically taken a "XML shmexXML" approach. I get the initial
> attraction, but I would think the love would fade off a bit.
>
> The key that so many people seem to forget is the best way to do HTML is
> with, *gasp*, HTML!
>
> If you just want a webpage, XML is using a canon to kill a fly. It's like
> creating classes and objects in PHP for sending text emails.
>

Agreed, but if you have a set of data that you'd like to be able to
"fairly easily" convert into multiple presentation systems (HTML, PDF
and WAP spring to mind), then taking a more structured data and
abstraction approach can pay off quite handsomely on larger projects.


>
> Sure you can do it...but why?
>

Because what you need to do might change some in the future.  Yes,
use mail() all you want, but when you start needing to send attachments,
already you need a class of some sort.   - Aha - I see you qualified and said
'text' attachments.  OK...


>
> XML is new. Common society doesn't do well with new. They always manage to
> screw it up somehow.
>

Depends on what you mean by 'screw it up'.  The notion of a commercial
internet, to me, seems to have been adopted QUITE quickly - even my
parents have coped quite well with this 'new' stuff, and they STILL
can't set their VCR clocks.

>
> XML started as an extensible markup language...that's it. That's all it was
> supposed to do! Now people are using it to query databases, and concoct
> entire search engines, and they are trying to use it to control access to
> restricted data, etc etc.
>

I don't know what you're talking about here.  I've not heard of anyone using
XML to 'control access' to 'restricted data'.  The XML itself IS the data.


>
> It's the same thing that happened with Java. People just aren't good with
> "new".
>

Don't lump Java in with other 'new' technology wholesale.  Sun has made,
imo, a HUGE number of mistakes pushing Java out, so the
less-than-stellar adoption of Java has as much or more to do with Sun themselves

rather than people's ability to adopt to 'new' things.  Again, imo.


>
> XML is nice, and for some things it's even great. But it's not the death of
> plain old HTML, just like ISDN didn't kill POTS (remember when ISDN was "the
> future of telecom"?).
>
> I fear that there are too many cooks in the kitchen on XML, all with a
> seasoning all their own that they are dead set on adding to the broth.
>
> But for me, I say let people play with their Java and XML and new fangled
> widgets. I'll take my PHP and plain-old HTML, and I'll create twice as much
> material with just as high a quality, and I won't need to spend an extra
> minute learning a bleeding-edge technology.
>

Twice as much material?  Is there a contest going on?  Some of us are trying
to use PHP to create advanced applications where we exchange data with
disparate parties.  Having a common standard by which we can exchange
data is a necessity - XML can be that commonality in many cases.

Keep making your HTML webpages - no one is trying to convert you.  Realize
2 things:

1.  The impact and use of 'internet' and related technologies are much larger
than you or I alone can grasp.
2.  New things can come along that don't disrupt your world - you don't need to
come down so heavily on something you don't need or use.

>
> Life's too short to spend it learning how to live it. Translation: Better to
> program than to learn yet _another_ language.
>

Go back to VIC-20 BASIC then.  Things change, and eventually you need to adapt.
At one point you didn't know PHP.  Why did you learn it?  Why not stick
with what you were using before?  Because PHP offered you benefits
you couldn't get elsewhere for the same effort.  SAME thing with XML.  There are

growing pains, yes, and political pissing matches between the "big boys" but
all in all it's a good idea that some of us have a use for.

:)




-- 
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] Sorry :(

2001-04-14 Thread Richard

Hey, take it easy, I started like that too, I think we all did.

- Richard

""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message
001301c0c51c$3cb49e40$0d1012d1@null">news:001301c0c51c$3cb49e40$0d1012d1@null...
I realized that'll that I don't do much to help this community. I rarely
reply to people's questions. Mainly because I have 56.6 and when I get mail
people answered already. I also ask alot of questions. Just saying thanks
for putting up with me.
Chris, The 17 yr Old Php Coder




-- 
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] Sorry :(

2001-04-14 Thread Chris Anderson

I realized that'll that I don't do much to help this community. I rarely reply to 
people's questions. Mainly because I have 56.6 and when I get mail people answered 
already. I also ask alot of questions. Just saying thanks for putting up with me.
Chris, The 17 yr Old Php Coder



[PHP] 2 Different Mysql Server Connection Problem

2001-04-14 Thread Mesut TUNGA

Hi All,

we have 2 mysql server located two dfiferent iss. one of them compiled
latin1 with php-4.0.4pl1  and other one compiled latin5 with
php-4.0.3.pl1. when we tried to connect from latin1 compiled one to
latin5 compiled one, it gives this error:

Warning: MySQL Connection Failed: Can't initialize character set 30
(path: default) in /home/user/public_html/createtable.php on line 2

on createtable.php line 2 there is mysql_connection command.

Is it a bug of php or there would a mistake. if it is a bug is there any
patch to solve it?

Regards,
Mesut Tunga...




-- 
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] Secure Sockets

2001-04-14 Thread phpman

do the socket functions built into PHP work with SSL? Do I need to add some
sort of encryption to get them to?

-dave



-- 
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] Extract from string

2001-04-14 Thread Steve Edberg

At 11:07 PM +0200 4/14/01, n e t b r a i n wrote:
>Hi all,
>anyone have or know where I can find a small function in order to extract
>from a string the most relevant words in it?
>
>something like this:
>
>$var="I love coffe ... Coffe is from Brazil and coffe with milk ..";
>$occurence=2;
>//$occurence means word that are repeat 2 or more times
>my_dream_funct($var,$occurence);
>//the funct now return the word _ coffe _
>
>many thanks in advance
>max
>
>ps.plz note: I need that it works on php3
>


Well, just offthetopofmyhead:

function word_occurrence($word,$phrase) {
$word = strtolower($word); # this way,
$phrase = strtolower($phrase); # case is irrelevant

$Bits = split($word.'[^[:alnum:]]*', $phrase);

return (count($Bits)-1);
}

I tested this, and it works fine (php 3.0.12) EXCEPT it counts 
'coffecoffe' as TWO words, not zero. If that's the behavior you want, 
then it's fine. Now I'm intrigued...I want to find a single regular 
expression that will NOT match 'coffecoffe'. Perhaps preg_ functions 
(available on PHP >= 3.0.9).

And, I tried things like

split('[^[:alnum:]]*'.$word.'[^[:alnum:]]*', " $phrase ")

...didn't work.

-steve

-- 
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- www.yurisnight.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]




Re: [PHP] What's XML's Purpose??

2001-04-14 Thread Jason Caldwell

amen brother!


""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9baam8$6sh$[EMAIL PROTECTED]">news:9baam8$6sh$[EMAIL PROTECTED]...
> I use to be really enthusiastically pro-XML just as I was getting into
PHP,
> but now I've basically taken a "XML shmexXML" approach. I get the initial
> attraction, but I would think the love would fade off a bit.
>
> The key that so many people seem to forget is the best way to do HTML is
> with, *gasp*, HTML!
>
> If you just want a webpage, XML is using a canon to kill a fly. It's like
> creating classes and objects in PHP for sending text emails.
>
> Sure you can do it...but why?
>
> XML is new. Common society doesn't do well with new. They always manage to
> screw it up somehow.
>
> XML started as an extensible markup language...that's it. That's all it
was
> supposed to do! Now people are using it to query databases, and concoct
> entire search engines, and they are trying to use it to control access to
> restricted data, etc etc.
>
> It's the same thing that happened with Java. People just aren't good with
> "new".
>
>
> XML is nice, and for some things it's even great. But it's not the death
of
> plain old HTML, just like ISDN didn't kill POTS (remember when ISDN was
"the
> future of telecom"?).
>
> I fear that there are too many cooks in the kitchen on XML, all with a
> seasoning all their own that they are dead set on adding to the broth.
>
>
> But for me, I say let people play with their Java and XML and new fangled
> widgets. I'll take my PHP and plain-old HTML, and I'll create twice as
much
> material with just as high a quality, and I won't need to spend an extra
> minute learning a bleeding-edge technology.
>
> Life's too short to spend it learning how to live it. Translation: Better
to
> program than to learn yet _another_ language.
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message
> 002001c0c506$c70d7f00$0d1012d1@null">news:002001c0c506$c70d7f00$0d1012d1@null...
> > thanks that helped
> > I stll think it sounds like its more geared for the MS crowd
> > - Original Message -
> > From: "Brian Clark" <[EMAIL PROTECTED]>
> > To: "PHP is not a drug." <[EMAIL PROTECTED]>
> > Sent: Saturday, April 14, 2001 3:29 PM
> > Subject: Re: [PHP] What's XML's Purpose??
> >
> >
> > > Hi Chris,
> > >
> > > @ 12:01:45 AM on 4/14/2001, Chris Anderson wrote:
> > >
> > > > Am I missing something here?
> > >
> > > This has been discussed many times. There was an extremely long thread
> > > last year about XML, but I can't find it in the archives.
> > >
> > > Here's a good start:
> > >
> > > http://marc.theaimsgroup.com/?l=php-general&m=97969195010857&w=2
> > >
> > > Use the 'next in thread' link to follow the thread.
> > >
> > > -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 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] What's XML's Purpose??

2001-04-14 Thread phpman

hold on here,
XML and HTML have, as far as I'm concerned, nothing to do with each other.
I'm using XML to link databases
on the sites I write (with PHP) with disparate databases on other Inernet
servers. A good example would be linking
up with UPS's online rates application server. I send an XML request with
shipment info and get a response XML
file with the pricing, time to delivery, etc..

The tags just tell you what the info between them is. XML is awesome, and
will become very big in the next couple years. You can write all kinds of
business 2 business appz with it.

-dave





""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message
000201c0c501$50264b60$0d1012d1@null">news:000201c0c501$50264b60$0d1012d1@null...
Alright I'll start this out by saying I have a subscription to "Visual Basic
Programmers Journal". Before I converted and realized that I loved PHP so
much I used ASP. Well it seems that in this magazine that XML is a hot topic
in the MS world. I know XML can be used by PHP, but is there a point? I only
know 2 things about it:
1) You can make your own tags:

2) It's supposedly good for databasing?

If its for databasing, why not just use MySQL( or a variation). Am I missing
something here?




-- 
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] HTML and PHP?

2001-04-14 Thread Jason Caldwell

> > Just make sure you don't indent the closing marker or the parser will
miss
> > it!

YES!! -- I struggled with that one for a long time... (at least a couple of
hours, before I said, hmmm... let me [for giggles] remove the TABS before
the closing marker... -- bam... Parser Error went away...)

FYI to other readers: you can indent (or Tab) the leading marker, but the
trailing maker cannot have tabs infront of it.

for example




SOMESTUFF; // notice no tabs here on the end marker "SOMESTUFF"

?>

Jason


"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Steve,
>
> @ 11:34:26 PM on 4/13/2001, Steve Werby wrote:
>
> ...
> >  > echo <<
> > 
> > Yes, echo can use here-docs!  Is it really that *hard* to take 1 minute
to
> > test for yourself? ;-)
> > And you can use whatever marker (the 'STOP' above and below) you choose.
> > Just make sure you don't indent the closing marker or the parser will
miss
> > it!
> > 
>
> > STOP;
> ?>>
>
> Why even bother? Why not just do this?
>
> ?>
>
> 
>   Boo
> 
>
> 
> -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 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 without a webserver

2001-04-14 Thread Plutarck

Btw, thanks for all your answers to far ;)

> I have no idea. What language? Using system() in C and Perl, I'm
> sure you could concoct something. Why would you want to do that?


A move recently being made by game programmers has been to move an
increasing amount of work into a scripting engine. My idea is to jump ahead
of the slow move, so that the program is far more abstracted.

The program, written in C/C++ (or Java, or any language really), is
basically turned into a dumb bot. It's a mindless intermediary. The outer
layer is the Display Engine, which could be a Quake Engine or an MFC style
GUI, which takes all of it's commands from the intermediary layer.

The final layer is the scripting engine. In the script if a move_elevator()
function is called, the script interpreter bundles up some commands and
passes it over to the intermediary layer. The intermediary looks at the
display engine, figures out what commands must be called to fufill the
wishes of the script, and passes over the commands.

This would allow the vast majority of the real "content" of a game or
application to be written in a scripting language, much like web apps are
now. The script would run just as well on Linux as it would on windows.

The intermediary understands the universally written script, and figures out
how to actually do what the script asks it to. So an entire application
could be written to run using OpenGL, DirectX, and a selection of different
engines. So you could switch from using a Quake engine to a Midtown Madness
engine for maximum effectiveness, only by tweaking the intermediary level.
Since there are only so many ways to "rotate camera", code could be reused
to the point that the intermediary level comes packaged with all it needs to
know. And thus the sheer amount of people who have the ability to run such
applications skyrockets.


The creators of the Dark Forces star wars game (correct name?) created a
specific programming language for doing things like moving elevators,
dialog, etc. Now adays everyone has their own script.

Asheron's Call has their own little internal quest scripting, and Ever Quest
made their own, Doom has one, Daggerfall has some, et al. But why go to the
trouble of making a whole stinking language, reinventing the wheel, when
thousands of people have spent years to develop a versitile and extensible
scripting engine in PHP?


Anyway, that's my idea. I'd just be happy to outsource some of my C++ work
to PHP. If I use MFC, goodbye platform independence. If I don't use it, it's
a huge pain in the butt to do heavy string manipulation. So I figure, why
not just have PHP do it, since I already know the language?



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



"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Plutarck,
>
> @ 2:40:28 PM on 4/14/2001, Plutarck wrote:
>
> > Ahh, so it's the location of the script that get's passed.
>
> Yes:
>
> % cat test.php
> 
> while(list($i,$arg) = each($argv))
> {
>   print "$i: $arg\n";
> }
>
> ?>
>
> % php -q test.php a b c d e f g
> 0: test.php
> 1: a
> 2: b
> 3: c
> 4: d
> 5: e
> 6: f
> 7: g
> %
>
> > Now, if the script was coming from a program, is there a way to hand the
> > file directly to PHP, or will a temporary file have to be used?
>
> I have no idea. What language? Using system() in C and Perl, I'm
> sure you could concoct something. Why would you want to do that?
>
> > So if a user filled in a form and clicked a button in the program, the
> > program would toy with the form a little, then send the form to PHP. Is
that
> > possible using the CGI executible?
>
> I have no idea what you're talking about here, but if you're wanting
> to build some type of GUI based application you might as well either
> use PHP-GTK (http://gtk.php.net) or just use a HTML, PHP and a web
> server.
>
> -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 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 XML's Purpose??

2001-04-14 Thread Plutarck

I use to be really enthusiastically pro-XML just as I was getting into PHP,
but now I've basically taken a "XML shmexXML" approach. I get the initial
attraction, but I would think the love would fade off a bit.

The key that so many people seem to forget is the best way to do HTML is
with, *gasp*, HTML!

If you just want a webpage, XML is using a canon to kill a fly. It's like
creating classes and objects in PHP for sending text emails.

Sure you can do it...but why?

XML is new. Common society doesn't do well with new. They always manage to
screw it up somehow.

XML started as an extensible markup language...that's it. That's all it was
supposed to do! Now people are using it to query databases, and concoct
entire search engines, and they are trying to use it to control access to
restricted data, etc etc.

It's the same thing that happened with Java. People just aren't good with
"new".


XML is nice, and for some things it's even great. But it's not the death of
plain old HTML, just like ISDN didn't kill POTS (remember when ISDN was "the
future of telecom"?).

I fear that there are too many cooks in the kitchen on XML, all with a
seasoning all their own that they are dead set on adding to the broth.


But for me, I say let people play with their Java and XML and new fangled
widgets. I'll take my PHP and plain-old HTML, and I'll create twice as much
material with just as high a quality, and I won't need to spend an extra
minute learning a bleeding-edge technology.

Life's too short to spend it learning how to live it. Translation: Better to
program than to learn yet _another_ language.


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


""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message
002001c0c506$c70d7f00$0d1012d1@null">news:002001c0c506$c70d7f00$0d1012d1@null...
> thanks that helped
> I stll think it sounds like its more geared for the MS crowd
> - Original Message -
> From: "Brian Clark" <[EMAIL PROTECTED]>
> To: "PHP is not a drug." <[EMAIL PROTECTED]>
> Sent: Saturday, April 14, 2001 3:29 PM
> Subject: Re: [PHP] What's XML's Purpose??
>
>
> > Hi Chris,
> >
> > @ 12:01:45 AM on 4/14/2001, Chris Anderson wrote:
> >
> > > Am I missing something here?
> >
> > This has been discussed many times. There was an extremely long thread
> > last year about XML, but I can't find it in the archives.
> >
> > Here's a good start:
> >
> > http://marc.theaimsgroup.com/?l=php-general&m=97969195010857&w=2
> >
> > Use the 'next in thread' link to follow the thread.
> >
> > -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 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] What's XML's Purpose??

2001-04-14 Thread Brian Clark

Hi Chris,

@ 1:17:25 PM on 4/14/2001, Chris Anderson wrote:

...
> I stll think it sounds like its more geared for the MS crowd

No way.

"XML is a set of rules, guidelines, conventions, whatever you want to
call them, for designing text formats for such data, in a way that
produces files that are easy to generate and read (by a computer),
that are unambiguous, and that avoid common pitfalls, such as lack of
extensibility, lack of support for internationalization/localization,
and platform-dependency."

http://www.w3.org/XML/


-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]




Re: [PHP] What's XML's Purpose??

2001-04-14 Thread Chris Anderson

thanks that helped
I stll think it sounds like its more geared for the MS crowd
- Original Message - 
From: "Brian Clark" <[EMAIL PROTECTED]>
To: "PHP is not a drug." <[EMAIL PROTECTED]>
Sent: Saturday, April 14, 2001 3:29 PM
Subject: Re: [PHP] What's XML's Purpose??


> Hi Chris,
> 
> @ 12:01:45 AM on 4/14/2001, Chris Anderson wrote:
> 
> > Am I missing something here?
> 
> This has been discussed many times. There was an extremely long thread
> last year about XML, but I can't find it in the archives.
> 
> Here's a good start:
> 
> http://marc.theaimsgroup.com/?l=php-general&m=97969195010857&w=2
> 
> Use the 'next in thread' link to follow the thread.
> 
> -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 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] setuid

2001-04-14 Thread Ulysses Almeida

Hi...
 
   Is there a way to use posix_setuid without set Apache to run as root?
   Or, is there some other function to do the same thing?


  []s

.~.  Ulysses Almeida
   / V \  [EMAIL PROTECTED]
 / (   ) \  Seja livre, use GNU/Linux! 
   ^^-^^


-- 
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 XML's Purpose??

2001-04-14 Thread Brian Clark

Hi Chris,

@ 12:01:45 AM on 4/14/2001, Chris Anderson wrote:

> Am I missing something here?

This has been discussed many times. There was an extremely long thread
last year about XML, but I can't find it in the archives.

Here's a good start:

http://marc.theaimsgroup.com/?l=php-general&m=97969195010857&w=2

Use the 'next in thread' link to follow the thread.

-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]




Re: [PHP] A tricky problem

2001-04-14 Thread Brian Clark

Hi David,

@ 3:06:19 PM on 4/14/2001, David Tandberg-Johansen wrote:

...
> The problem is:
> If a user leaves the site because the user doesn't want to go thrue with the
> order, or if the user closes the broser, then the recods of the selected
> info are still in the temp TABLE. How can I delete this info when the user
> leaves or close the browser?

You don't. Just store the age of the session (date,time,whatever) in
the table along with the other information. Then, when someone visits
the site, the dates are checked in the table and the old entries are
cleared.

-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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Brian Clark

Hi Plutarck,

@ 2:40:28 PM on 4/14/2001, Plutarck wrote:

> Ahh, so it's the location of the script that get's passed.

Yes:

% cat test.php


% php -q test.php a b c d e f g
0: test.php
1: a
2: b
3: c
4: d
5: e
6: f
7: g
%

> Now, if the script was coming from a program, is there a way to hand the
> file directly to PHP, or will a temporary file have to be used?

I have no idea. What language? Using system() in C and Perl, I'm
sure you could concoct something. Why would you want to do that?

> So if a user filled in a form and clicked a button in the program, the
> program would toy with the form a little, then send the form to PHP. Is that
> possible using the CGI executible?

I have no idea what you're talking about here, but if you're wanting
to build some type of GUI based application you might as well either
use PHP-GTK (http://gtk.php.net) or just use a HTML, PHP and a web
server.

-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]




Re: [PHP] Selected Radio Buttons

2001-04-14 Thread Jordan Elver

Hi,
The $article_active comes from a session and I want be able to select the 
radio button (which ever one, yes or no) when the user comes back to the page.

I think thats a bit clearer :-)

Jord

On Saturday 14 April 2001 15:12, you wrote:
> I'm not sure I understand. In the first loop you are seing if
> $article_active equals y. And no where in the code do you set
> $article_active to anything else.
>
> Why would you think $article_active would be anything but "y" or "n"?
>
>
> --
> Plutarck
> Should be working on something...
> but forgot what it was.
>
>
> "Jordan Elver" <[EMAIL PROTECTED]> wrote in message
> 01041415474000.10298@localhost">news:01041415474000.10298@localhost...
>
> > Hi,
> > I think I'm being stupid. Why won't this code work. The $article_active
> > variable is showing y when I echo it?
> >
> >
> > if($article_active == 'y') {
> > echo"Yes";
> > } else {
> > echo"Yes";
> > }
> >
> > if($article_active == 'n') {
> > echo"No";
> > } else {
> > echo"No";
> > }
> >
> >
> > Thanks,
> >
> > Jord
> >
> > --
> > 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 XML's Purpose??

2001-04-14 Thread Chris Anderson

Alright I'll start this out by saying I have a subscription to "Visual Basic 
Programmers Journal". Before I converted and realized that I loved PHP so much I used 
ASP. Well it seems that in this magazine that XML is a hot topic in the MS world. I 
know XML can be used by PHP, but is there a point? I only know 2 things about it:
1) You can make your own tags:

2) It's supposedly good for databasing?

If its for databasing, why not just use MySQL( or a variation). Am I missing something 
here?



[PHP] R: [PHP] CLASSES AND OBJECTS..

2001-04-14 Thread alberto

Yes...
Becouse in some large projects, it's very hard to wok with a single level
inheritance...
i think that PHP is a very good language and come better every day... so i
hope in the future programmers can use multiple inheritante with classes in
PHP.

Thank for the answer
Alberto


"Plutarck" <[EMAIL PROTECTED]> wrote in message
9b9ih0$81h$[EMAIL PROTECTED]
> Nope, I'm afraid not.
>
> Currently PHP will support single level inheritance only. So A can extend
B,
> but C cannot extend B. You will need to create a class of B to extend it
> with C.
>
> I suppose PHP may one day support it, but I am guessing that the Zend API
> can't currently handle it. I think it will need to be retooled.
>
>
> Sounds like a nice thing to shoot for for PHP5, perhaps?
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""alberto"" <[EMAIL PROTECTED]> wrote in message
> 9b9eu7$s6n$[EMAIL PROTECTED]">news:9b9eu7$s6n$[EMAIL PROTECTED]...
> > Anyone know if one day PHP will support multiple inheritance?
> > I think it's very important...
> >
> > For example, will PHP support this code:
> >
> > class A extends B,  extends C   {
> > 
> > }
> >
> > where B and C are classes?
> >
> > Thanks!
> > Alberto
> >
> >
> >
> > --
> > 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] A tricky problem

2001-04-14 Thread David Tandberg-Johansen

This is maybe of topic, but I try.

I have this site where the user first selects a langueage, and then i use
session_register() to register the information.
Then I use the the registered onformatin to dispaly the site text in the
user selected language.

The user put the selected things in a temp TABLE and when they are finnished
the info in the temp TABLE transfere over to a real TABLE. This isn't the
problem

The problem is:
If a user leaves the site because the user doesn't want to go thrue with the
order, or if the user closes the broser, then the recods of the selected
info are still in the temp TABLE. How can I delete this info when the user
leaves or close the browser?

Thanks!

David



-- 
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] HTML and PHP?

2001-04-14 Thread Brian Clark

Hi Les,

@ 2:09:01 PM on 4/14/2001, Les Neste wrote:

> I think the echo approach is pretty handy if you want a subroutine
> to spit out a common chunk of HTML which is less than an entire
> page. And the here-doc marker lets you just paste existing HTML in
> place without having to escape all the quotation marks. To me, this
> is a Good Thing.

And you can do the exact same thing with what I posted.


   bar. didn't "example.com" ain't aren't
   

Granted, one wouldn't bother when only one string needed to be
printed, but it works just fine for large amounts of HTML.

If you needed to interpolate variables, then you'd probably want to
print(), echo() or use here-doc.

-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]




Re: [PHP] antifraud logic for voting poll, banner clicks

2001-04-14 Thread Brian Clark

Hi Keyur,

@ 2:57:56 AM on 4/14/2001, Keyur Kalaria wrote:

...
> Can anyone suggest me how to avoid the fraud rating and fraud banner clicks.
> What all things we need to take care for the same etc.

Have a look at how those are implemented in phpAds and phpPolls:

http://www.phpwizard.net/

-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-CVS] cvs: php4 /ext/ircg config.m4 ircg.c

2001-04-14 Thread Sascha Schumann

sas Sat Apr 14 11:49:04 2001 EDT

  Modified files:  
/php4/ext/ircg  config.m4 ircg.c 
  Log:
  Make it possible to build ircg without thttpd
  
  
Index: php4/ext/ircg/config.m4
diff -u php4/ext/ircg/config.m4:1.6 php4/ext/ircg/config.m4:1.7
--- php4/ext/ircg/config.m4:1.6 Tue Mar 27 12:34:30 2001
+++ php4/ext/ircg/config.m4 Sat Apr 14 11:49:04 2001
@@ -16,6 +16,9 @@
   PHP_EVAL_INCLINE(`$IRCG_CONFIG --cppflags`)
   PHP_ADD_LIBRARY_WITH_PATH(ircg, $PHP_IRCG/lib)
   PHP_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.56 php4/ext/ircg/ircg.c:1.57
--- php4/ext/ircg/ircg.c:1.56   Tue Apr  3 12:41:23 2001
+++ php4/ext/ircg/ircg.cSat Apr 14 11:49:04 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.56 2001/04/03 19:41:23 sas Exp $ */
+/* $Id: ircg.c,v 1.57 2001/04/14 18:49:04 sas Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -633,6 +633,7 @@
 
 PHP_FUNCTION(ircg_set_current)
 {
+#ifdef IRCG_WITH_THTTPD
zval **p1;
php_irconn_t *conn;
 
@@ -656,6 +657,7 @@
msg_empty_buffer(conn);
 
RETURN_TRUE;
+#endif
 }
 
 PHP_FUNCTION(ircg_new_window)



-- 
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] Forcing Case

2001-04-14 Thread Brian Clark

Hi James,

@ 6:44:08 AM on 4/14/2001, James Moore wrote:

...
> http://www.php.net/manual/en/function.strtoupper.php
> http://www.php.net/manual/en/function.strtolower.php
> http://www.php.net/manual/en/function.ucfirst.php

Another extremely useful one is ucwords()

http://www.php.net/manual/en/function.ucwords.php

:)

-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]




Re: [PHP] Any one have PHP voteBOOTH source code...?!?

2001-04-14 Thread Brian Clark


@ 6:50:49 AM on 4/14/2001, news.php.net wrote:

> hello... anyone know where i can downlaod voteBOOTH.php w/ the image
> viewer?! or does anyone have it that you can send to me..?

I don't know anything about a poll type script with an image viewer,
but look around here:

http://www.hotscripts.com/

-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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Plutarck

Ahh, so it's the location of the script that get's passed.

Now, if the script was coming from a program, is there a way to hand the
file directly to PHP, or will a temporary file have to be used?

So if a user filled in a form and clicked a button in the program, the
program would toy with the form a little, then send the form to PHP. Is that
possible using the CGI executible?


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


"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Plutarck,
>
> @ 2:11:35 PM on 4/14/2001, Plutarck wrote:
>
> > Ah, even better. However, how would the script be passed to PHP? As
> > a command line argument?
>
> Install the CGI executable of PHP in c:\php
>
> In your autoexec.bat:
>
> SET PATH=c:\php;%PATH%
>
> Reboot.
>
> From the command line:
>
> php -q script.php
>
> And read about $argc and $argv. If you're familiar with C, those
> shouldn't be a problem.
>
> -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 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] user info?

2001-04-14 Thread Brian Clark

Hi Ramiro,

@ 6:48:38 AM on 4/14/2001, Ramiro Radjiman wrote:

...
> I'm just wondering if there is a method to extract user specific
> info when this user connects to the site.

http://www.php.net/manual/nl/function.getenv.php

May be what you're looking for.

> U user must have a handle, but i don't want him to login. So i
> thaught if i can get specific userinfo from the client, this info
> would be his handle to walk trough the site.

> If he logs in it aint a problem :-)

I'd use sessions:

http://www.php.net/manual/nl/ref.session.php

Because you can't depend on something like IP addresses or hostnames
to build Unique IDs because of things like proxies. And I wouldn't
depend solely on cookies either.

-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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Brian Clark

Hi Plutarck,

@ 2:11:35 PM on 4/14/2001, Plutarck wrote:

> Ah, even better. However, how would the script be passed to PHP? As
> a command line argument?

Install the CGI executable of PHP in c:\php

In your autoexec.bat:

SET PATH=c:\php;%PATH%

Reboot.

>From the command line:

php -q script.php

And read about $argc and $argv. If you're familiar with C, those
shouldn't be a problem.

-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]




Re: [PHP] Supplied argument is not a valid MS SQL-Link resource

2001-04-14 Thread Brian Clark

Hi davek,

@ 1:50:14 PM on 4/14/2001, davek wrote:

> Does anybody know how to fix this error? "Supplied argument is not a
> valid MS SQL-Link resource" I am running:

...
> $Conn=mssql_connect('192.168.1.20','username','password')

or die("Could not connect to the mssql server");

> $ThisConnect=mssql_select_db('My_Database',$Conn)

or die("Could not select My_Database");

> $QueryString="select id, name from my_table";
> $Test=mssql_query($QueryString, $ThisConnect)

or die("Could query mssql server");

> Please help! Thanks.
> Dave


-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]




Re: [PHP] Supplied argument is not a valid MS SQL-Link resource

2001-04-14 Thread Plutarck

http://us.php.net/manual/en/function.mssql-select-db.php

*_select_db does not return a connection id, it returns true or false.

Just change your script like this:

$Conn=mssql_connect('192.168.1.20','username','password');
mssql_select_db('My_Database',$Conn);
$QueryString="select id, name from my_table";
$Test=mssql_query($QueryString, $Conn);


That should work just fine.


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




""davek"" <[EMAIL PROTECTED]> wrote in message
9ba2po$jnb$[EMAIL PROTECTED]">news:9ba2po$jnb$[EMAIL PROTECTED]...
> Does anybody know how to fix this error?  "Supplied argument is not a
valid
> MS SQL-Link resource"  I am running:
>
> NT4
> MSSQL7.0
> IIS4
> PHP 4.0.4pl1
>
> I've been running php3 for some time now without any problems but want to
> upgrade to 4.  This error seems to be occuring at the mssql_query()
> function.
>
> $Conn=mssql_connect('192.168.1.20','username','password');
> $ThisConnect=mssql_select_db('My_Database',$Conn);
> $QueryString="select id, name from my_table";
> $Test=mssql_query($QueryString, $ThisConnect);
>
> Please help! Thanks.
> Dave
>
>
>
>
>
>
>
> --
> 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] PHP without a webserver

2001-04-14 Thread Plutarck

Ah, even better. However, how would the script be passed to PHP? As a
command line argument?


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


"Jeroen Wesbeek" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> well actually you could compile php4
> on it's own so you get a php executable which
> you can use as an interpreter for php4 scripts...
> no webserver needed
>
>
> dowebwedo
> Jeroen Wesbeek
> .programming
> Nieuwekade 213 | 3511 RW Utrecht
> The Netherlands
> p 030 2380544 | f 020 8632045
>
>
> [roses are red, violets are blue,
>  I am schizophrenic and so am I ]
>
>
> -Original Message-
> From: Brian Clark [mailto:[EMAIL PROTECTED]]
> Sent: zaterdag 14 april 2001 19:53
> To: PHP is not a drug.
> Subject: Re: [PHP] PHP without a webserver
>
>
> Hi Plutarck,
>
> @ 11:37:09 AM on 4/14/2001, Plutarck wrote:
>
> > I've heard much about how PHP is far more than just a language for
> > web programming, and I agree. I agree enough that I would like to
> > actually try it. I'd like to use PHP scripting in a C/C++ program
> > that doesn't need a webserver as an intermediary.
>
> It doesn't. You don't have to have a web server installed in order to
> use PHP.
>
> -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 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] Red Hat 7.0

2001-04-14 Thread Mauricio Junqueira

I am trying to start the server and it returns the following in the
interbase.log.

ns1.mautec.com (Client) Sat Apr 14 22:06:05 2001
INET/inet_error: connect errno = 111
 
ns1.mautec.com (Client) Sat Apr 14 22:06:05 2001
/opt/interbase/bin/ibguard: guardian starting bin/ibserver
 
 
ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001
INET/inet_error: read errno = 104
 
ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001
INET/inet_error: receive in try_connect errno = 104
 
ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001
/opt/interbase/bin/ibguard: bin/ibserver normal shutdown.

I have been using interbase super server before but in the
SuSe 7.1 with 2.2.18 without any problems.

I have tried the rpm and the tar installation with the
same results...

Can anyone help me out?

-- 
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 without a webserver

2001-04-14 Thread Les Neste

Can anybody comment on PHPTriad?  This appears to be PHP+MySQL+Apache for
the Windows desktop.  

At 07:51 PM 4/14/2001 +0200, Jeroen Wesbeek wrote:
>well actually you could compile php4
>on it's own so you get a php executable which
>you can use as an interpreter for php4 scripts...
>no webserver needed
>
>
>dowebwedo
>Jeroen Wesbeek
>.programming
>Nieuwekade 213 | 3511 RW Utrecht
>The Netherlands
>p 030 2380544 | f 020 8632045
>
>
>[roses are red, violets are blue,
> I am schizophrenic and so am I ]
>
>
>-Original Message-
>From: Brian Clark [mailto:[EMAIL PROTECTED]]
>Sent: zaterdag 14 april 2001 19:53
>To: PHP is not a drug.
>Subject: Re: [PHP] PHP without a webserver
>
>
>Hi Plutarck,
>
>@ 11:37:09 AM on 4/14/2001, Plutarck wrote:
>
>> I've heard much about how PHP is far more than just a language for
>> web programming, and I agree. I agree enough that I would like to
>> actually try it. I'd like to use PHP scripting in a C/C++ program
>> that doesn't need a webserver as an intermediary.
>
>It doesn't. You don't have to have a web server installed in order to
>use PHP.
>
>-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 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]
>
>


Les Neste  678-778-0382  http://www.lesneste.com

-- 
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] HTML and PHP?

2001-04-14 Thread Les Neste

I think the echo approach is pretty handy if you want a subroutine to spit
out a common chunk of HTML which is less than an entire page.  And the
here-doc marker lets you just paste existing HTML in place without having
to escape all the quotation marks.  To me, this is a Good Thing.

At 01:56 PM 4/14/2001 -0400, Brian Clark wrote:
>Hi Steve,
>
>@ 11:34:26 PM on 4/13/2001, Steve Werby wrote:
>
>...
>> > echo <<
>> 
>> Yes, echo can use here-docs!  Is it really that *hard* to take 1 minute to
>> test for yourself? ;-)
>> And you can use whatever marker (the 'STOP' above and below) you choose.
>> Just make sure you don't indent the closing marker or the parser will miss
>> it!
>> 
>
>> STOP;
>?>>
>
>Why even bother? Why not just do this?
>
>?>
>
>
>  Boo
>
>
>
>-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]
>
>


Les Neste  678-778-0382  http://www.lesneste.com

-- 
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 without a webserver

2001-04-14 Thread Jeroen Wesbeek

well actually you could compile php4
on it's own so you get a php executable which
you can use as an interpreter for php4 scripts...
no webserver needed


dowebwedo
Jeroen Wesbeek
.programming
Nieuwekade 213 | 3511 RW Utrecht
The Netherlands
p 030 2380544 | f 020 8632045


[roses are red, violets are blue,
 I am schizophrenic and so am I ]


-Original Message-
From: Brian Clark [mailto:[EMAIL PROTECTED]]
Sent: zaterdag 14 april 2001 19:53
To: PHP is not a drug.
Subject: Re: [PHP] PHP without a webserver


Hi Plutarck,

@ 11:37:09 AM on 4/14/2001, Plutarck wrote:

> I've heard much about how PHP is far more than just a language for
> web programming, and I agree. I agree enough that I would like to
> actually try it. I'd like to use PHP scripting in a C/C++ program
> that doesn't need a webserver as an intermediary.

It doesn't. You don't have to have a web server installed in order to
use PHP.

-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 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] HTML and PHP?

2001-04-14 Thread Brian Clark

Hi Steve,

@ 11:34:26 PM on 4/13/2001, Steve Werby wrote:

...
>  echo << 
> Yes, echo can use here-docs!  Is it really that *hard* to take 1 minute to
> test for yourself? ;-)
> And you can use whatever marker (the 'STOP' above and below) you choose.
> Just make sure you don't indent the closing marker or the parser will miss
> it!
> 

> STOP;
?>>

Why even bother? Why not just do this?

?>


  Boo


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] Supplied argument is not a valid MS SQL-Link resource

2001-04-14 Thread davek

Does anybody know how to fix this error?  "Supplied argument is not a valid
MS SQL-Link resource"  I am running:

NT4
MSSQL7.0
IIS4
PHP 4.0.4pl1

I've been running php3 for some time now without any problems but want to
upgrade to 4.  This error seems to be occuring at the mssql_query()
function.

$Conn=mssql_connect('192.168.1.20','username','password');
$ThisConnect=mssql_select_db('My_Database',$Conn);
$QueryString="select id, name from my_table";
$Test=mssql_query($QueryString, $ThisConnect);

Please help! Thanks.
Dave







-- 
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 without a webserver

2001-04-14 Thread Brian Clark

Hi Plutarck,

@ 11:37:09 AM on 4/14/2001, Plutarck wrote:

> I've heard much about how PHP is far more than just a language for
> web programming, and I agree. I agree enough that I would like to
> actually try it. I'd like to use PHP scripting in a C/C++ program
> that doesn't need a webserver as an intermediary.

It doesn't. You don't have to have a web server installed in order to
use PHP.

-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] Using gnupg with php - errors

2001-04-14 Thread sohara

Hello all,

This has been covered before, but I can't get it to work and I've searched 
all the archives already.

I am trying to encrypt a small string of data. I am using a script by 
Richard Lynch as my starting point. I found it here:
http://www.weberdev.com/get_example.php3?count=1379

Now, I am on MacOSX trying to get this thing to work. I installed an OSX 
version of gnupg 1.04, without any problems, and created to sets of keys. 
My idea is to get this to work on my local machine first, then eventually 
get it to work on my web hosting account.

Here is the code I am using:

>   putenv("HOME=/Users/sohara/");
>   
> // Explanation follows...
> $command = "echo '$data' | /usr/local/bin/gpg -a --batch 
> --no-secmem-warning -e -u '[EMAIL PROTECTED]' -r 'alien8@alien8recordings.
> com'" ;
>   
>   // Actually execute the command
>   $result = exec($command, $encrypted, $errorcode);
>
>   if ($errorcode)
>   {
>   echo "Error $errorcode encrypting your data.\n";
>   exit;
>   }
>
>   $encrypteddata = implode("\n", $encrypted);
echo "This is the encrypted data: $encrypted \n";

And this always gives returns an error number 2. I can't find a list of 
error numbers at gnupg, so the error number isn't very helpful so far. 
Does anyone know about the gnupg error numbers, or just using gnupg with 
php?

Thanks,
Sean

--
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] Do any of you provide hosting?

2001-04-14 Thread Manuel Lemos

Hello Chris,

On 12-Apr-01 14:05:38, you wrote:


>I currently am using Thehostpros.com for my hosting, but I can't say its been
>a pleasant experience. I had to have them install PHP because they are more
>ASP oriented. So that cost me more. Then I wanted MySQL and they have spent 3
>months saying they'll install that. Basicly here's what I need: Someone who
>can host my domain (I own the domain already) Can provide MySQL and PHP. Both
>up-to-date. Can give around 60 meg of space (ballpark, less should be fine)
>Also a way to set up subdomains without needing to go through the admin (some
>hosts can do his). But this isn't necessary. Can anyone help with that?

For about 3 years I have been hosting my sites at my ISP (
http://phphosting.adgrafix.com/ ) mostly because it provides flexibility
like what you and more.  One of my sites is the popular PHP Classes site
that has now over 30.000 subscribers ( http://phpclasses.UpperDesign.com/ ).

If I need I can ask for human support, but most things like sub-domain and
e-mail account creation (extra subdomains and e-mail accounts are free) can
be configured on demand via a Web interface (give it a try in the address
above).

Even though I am on a virtual server, I can have the database servers I
want provided there is enough space and, except for dedicated servers, it
doesn't require a root account to install the software.

So, in my virtual server account I have a MySQL server, a PostgreSQL
server and a CVS server.  I even had a IRC server although I am not using
it.

I also have PHP and Apache compiled with modules and extensions I need
because I can choose what I want.

To keep all my sites automatic I even have access to my account crontab to
execute periodic operations or verify if all the servers are working ok.

I also have telnet/ssh account access so I can configure things on my own
when I want, but the good part is that when you need help or don't have the
time and patience to do it by yourself, my account manager can do it for
me.  He is very skilled and quick to assist me.

He doesn't work for the hosting company.  He just gets a commission from
them.  So it is in the best of his interest to serve me and other clients
well.  If you are interested in get such 5 stars support service, just mail
me back and I'll orient you to sign-in making sure you get my account
manager as yours too.

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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] strange error

2001-04-14 Thread Phil Driscoll

It may not be responsible for the error, but you ought to move your fclose
to before your return(true) statement, as it never gets executed at all in
your code.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.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] PHP & MySQL Search Results

2001-04-14 Thread Jason Caldwell

Hi Jason,

Say you have a search form that says search for "searchbox" and the search
box has a variable name of "search":



NO Valid search results.



">

 1) {
echo "Previous";
}

if (($num > 25) && (($limit + 25) < $num)) {
echo "Next.";
}

/* End the initial "Else" */
}

?>


__

Here you will see that if no page is assigend as a variable, it is force
assigned to 1.  The limit is the number of results the search is limited to.
If you do some mathematics (ouch) you will see that the limit works like
this:

if the page is equal to 1:
limit is 1 * 25 = 25.
limit = 25 - 25 = 0

The limit in the sql query limits 0,25 (first 25 matches).

if the page is equal to 2:
limit is 2 * 25 = 50
limit is 50 - 25 = 25

The limit in the sql query limits 25,25 (25 matches After the first 25
matches).

if the page is equal to 3:
limit is 3 * 25 = 75
limit = 75 - 50

The limit in the sql query is 50,25 (next 25 matches after the first 50).


Now, towards the bottom of the code I have supplied, I have next and
previous links:

if page is greater than 1, you can show a link to a previous page:
search.php?search=".$search."&page=".($page - 1)

This links back to the search page with the searchg criteria, and the page -
1.

if there are more than 25 results ($num) and the (limit + 25) is less than
the total number of pages, we can add a next link.

If you wanted to add page numbers as links, you could do a while or for
loop, but I'd have to use my brain a little more to try and explain that to
you.

I hope that makes a little sense, I'm not very good at explaining these
things.  There's a really good tutorial on this at devshed.com

James.



-- 
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] strange error

2001-04-14 Thread n e t b r a i n

Hi all,
I don't know why this (quick & dirty) small function:

function esiste_url($file){
@$fp=fopen($file,"r");
if(!$fp){return false;}else{return true;}
@fclose($fp);
}
//it checks if a url submit via form client exist

in two different pages:

a.php3 ---> works fine
b.php3 ---> produce an Internal Error Server

In both file, it's used like this:
if(esiste_url($url)==false){ etc. etc.

I'm sure (?!) that in b.php3 the error is due to this function 'cause w/o
it, the page b.php3 works fine ...

(I'm on linux box,apache,php3)

Any ideas??
Many thanks in advance
max


-- 
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] Javascript in a header

2001-04-14 Thread Dan Harrington

Hello,
Am I brain damaged or will something like this work?

header("Location:javascript:window.open('http://login.php?arg1&arg2','','windowname')");

I want to popup a login script in a sub-browser window, and then pass
the results back to the main window.  Someone told me that the javascript
in the header would work but so far it won't.

However, that javascript typed into the browser "location" field
does work as  I want it to.

ideas?
Thanks
Dan



-- 
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] W2K Install Problem

2001-04-14 Thread Long Lam

Win2k's command prompt is located under the start 
button/programs/accessories/command prompt.


At 09:53 AM 4/14/2001 -0500, Jeff Oien wrote:
>I got it to work. I would still like to know how to open a command
>window in W2K though.
>
>I had a reference to d:/php4/ instead of d:/php/ which is where I
>have it.
>Jeff Oien
>
> > When I try to run a PHP script through a Web browser it just
> > displays the code. I did a clean install of W2K and installed
> > Apache. I copied the php.ini to the WINNT and system folders.
> > Not sure where to go from here.
> >
> > BTW how do you open a command window in W2K? Thanks.
> > Jeff Oien
> >
> > --
> > 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 Digest 14 Apr 2001 15:38:40 -0000 Issue 627

2001-04-14 Thread php-general-digest-help
> ?>
>
> include/Directory.inc has the following in it:
>
>  include('includes/Template.inc');
> $url_array=explode("/",$REQUEST_URI);
> $url_cat=$url_array[3];
> $url_grp=$url_array[4];
> $url_misc=$url_array[5];
> $t = new Template("/www/hostname/ocean/templates/");
> $title = "name";
>
> if($url_misc == 'misc') {
> $Handle='MiscHandle';
> $Template='MiscGadget.tpl';
> }
> elseif ($url_grp == 'tanks') {
> $Handle='TankHandle';
>  $Template='TankGadget.tpl';
> }
> elseif ($url_cat == 'psupply') {
> // These three lines are the same as the first example:
> $Handle='PowerHandle';
> $Template='PowerGadget.tpl';
> }
> elseif ($url_cat == 'purpose') {
> $Handle='PurposeHandle';
> $Template='PurposeGadget.tpl';
> } else {
> $Handle='IntroHandle';
> $Template='IntroGadget.tpl';
> }
> $t->set_file("$Handle","$Template");
> $t->set_var("name",$title);
> $t->parse("MyOutput","$Handle");
> ?>
>
> Now, this setup work without a hitch on my personal development server
> where PHP is loaded as a module in Apache. The file called via the
> 'script' above is loaded into the MainGadget.tpl template and displayed
> without a problem. Everything, including javascript, works great.
>
> Now, I moved this code to the providers server, where the only difference
> I can tell is php works as a cgi , and I get output from the HTML files
> with slashes added to the HTML, such as:
>
>  onMouseOut=\'MM_swapImgRestore()\" 
>onMouseOver=\"MM_swapImage(\'about\',\'\',\'graphics/toolsbar3_01.gif\',1)\"> name=\"about\" border=\"0\" src=\"graphics/toolsbar_01.gif\" width=\"105\" 
>height=\"35\">
>  onMouseOver=\'MM_swapImage(\'contact\',\'\',\'graphics/toolsbar3_02.gif\',1)\"> name=\"contact\" border=\"0\" src=\"graphics/toolsbar_02.gif\" width=\"96\" 
>height=\"35\">
>
> Everything else is output just fine. The only HTML with this in it is the
> {MyOutput} files from templates directory (.tpl files). I am not very
> familiar with PHPLib but imagine there is some other not so subtle item I
> am missing since things work great on my linux/apache/php4 server.
>
> Any ideas? I have tried using stripslashes() in the 'script' above but get
> errors. Is there something unique to the php cgi I am missing? Something
> else?
>
> Any all help is greaty appreciated!!
>
> Thanks,
>
> //frank
>
> --
> 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]





Try this (it should work):

while(list($k, $v) = each($myarray)){
  $myarray[$k] = (int) $v;
}
arsort($myarray);
reset($myarray);
while(list($k, $v) = each($myarray)){
  echo $k, ' == ', $v, "\n;
}



For better comprehension look at this post:

>Hey guys..
>
>I have this array that looks like this:
>
>$myarray = ( "apples" => 0, "oranges" => 2, "peaches" => 9, "pineapples" =>
>12, "stovetopstuffing" => 3, "grits" => 8);
>
>Fine and dandy. But, when I try to sort it in reverse order:
>
>arsort($myarray);
>
>I get THIS for output, obviously NOT what I want:
>
>peaches => 9
>grits => 8
>stovetopstuffing => 3
>oranges => 2
>pineapples => 12
>apples => 0
>
>Obviously, I want the pineapples entry to be at the top, since it has the
>highest value. What do I need to do?

You have stored strings as your values, instead of ints.

IE:(string) '9' > (string) '12' returns TRUE

You will need to take care in creating your array to have (int) values
instead of strings.

If all else fails, the following should work:

while(list($k, $v) = each($myarray)){
  $myarray[$k] = (int) $v;
}
arsort($myarray);
reset($myarray);
while(list($k, $v) = each($myarray)){
  echo $k, ' == ', $v, "\n;
}

















- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 14, 2001 5:19 AM
Subject: [PHP] sorting multi-dimensional arrays


> I have a question about sorting multidimensional arrays. Here is my
problem:
>
> I have an 2-d array:
> $joke[1][rating]=10;
> $joke[2][rating]=20;
> $joke[3][rating]=15;
> 
>
> I

[PHP] PHP without a webserver

2001-04-14 Thread Plutarck

I've heard much about how PHP is far more than just a language for web
programming, and I agree. I agree enough that I would like to actually try
it. I'd like to use PHP scripting in a C/C++ program that doesn't need a
webserver as an intermediary. I basically want to use PHP in a
standalone/TCP-IP program rather than having to build a whole "IMF-esk"
hairball myself.


Are there any articles or documentation which focuses, or at least would
give me useful information, on how such a task would be accomplished? I'm
looking at the API documentation itself which will be helpful, but is there
anything a little more "pointed" than that?

I'd love to see PHP grow an arm of offline scripting. It would just be
_perfect_ for compiling high-level developer-friendly scripts into a format
usable for 3D real-time environment manipulation, for instance.



--
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]




Re: [PHP] Selected Radio Buttons

2001-04-14 Thread Plutarck

I'm not sure I understand. In the first loop you are seing if
$article_active equals y. And no where in the code do you set
$article_active to anything else.

Why would you think $article_active would be anything but "y" or "n"?


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


"Jordan Elver" <[EMAIL PROTECTED]> wrote in message
01041415474000.10298@localhost">news:01041415474000.10298@localhost...
> Hi,
> I think I'm being stupid. Why won't this code work. The $article_active
> variable is showing y when I echo it?
>
>
> if($article_active == 'y') {
> echo"Yes";
> } else {
> echo"Yes";
> }
>
> if($article_active == 'n') {
> echo"No";
> } else {
> echo"No";
> }
>
>
> Thanks,
>
> Jord
>
> --
> 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] Extract from string

2001-04-14 Thread n e t b r a i n

Hi all,
anyone have or know where I can find a small function in order to extract
from a string the most relevant words in it?

something like this:

$var="I love coffe ... Coffe is from Brazil and coffe with milk ..";
$occurence=2;
//$occurence means word that are repeat 2 or more times
my_dream_funct($var,$occurence);
//the funct now return the word _ coffe _

many thanks in advance
max

ps.plz note: I need that it works on php3


-- 
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 on something simple?

2001-04-14 Thread Plutarck

What function are you calling on $result when it returns the error?

Try doing this, all in one place:

$db = mysql_connect("localhost", "username");
mysql_select_db("subsurface_net", $db);

$result = mysql_query("SELECT * FROM customer_genre", $db);

echo mysql_num_rows($result);


When you use a SELECT query the function "mysql_affected_rows" is not valid.
When using an UPDATE, INSERT, or DELETE query, "mysql_num_rows" is invalid.

That may be your problem, because the code you paste in seems not to have
anything wrong with it.


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


""Andrew Durk"" <[EMAIL PROTECTED]> wrote in message
9b9n47$7ej$[EMAIL PROTECTED]">news:9b9n47$7ej$[EMAIL PROTECTED]...
> I can get connected to my host's MySQL database w/o error, but I cannot
seem
> to do anything after that.
>
> I do:
> $db = mysql_connect("localhost", "username");
> mysql_select_db("subsurface_net",$db);
>
> No problem, but if I do this:
> $result = mysql_query("SELECT * FROM customer_genre",$db);
>
> I eventually get:
> Warning: 0 is not a MySQL result index in /test.phtml on line 35
>
> And customer_genre _is_ a table in my database...
>
> Help, anyone!?
> --
> Andrew Durk
> [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] PHP for Apache 2.0

2001-04-14 Thread Alexander Wagner

Patrick Dunford wrote:
> According to Apache, modules made for Apache 1.3 will not work as-is
> in 2.0 due to changes in the API.
>
> Is a version of PHP 4 for Apache 2.0 coming out?

Try the configure-option --with-apxs2 instead of --with-apxs and it 
should work with Apache 2.

PHP 4 supports far more than one Webserver-API.

regards
Wagner

-- 
'When the computer industry is at a low, beer drinking is at a high.' 
Jon 'maddog' Hall said.
By combining both industries into a single course you can make sure you 
always have a job.

-- 
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] Explain recordset

2001-04-14 Thread Plutarck

$result holds a "resource id". When you do anything like mysql_fetch_row it
sends a request to the database. All results, until you "fetch" them, are
kept in MySQL.

If you want to store the results away from the DB you will need to do
something like:

while ($array[] = mysql_fetch_row($result));

That will store all the results into $array...hopefully.


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



"Mike P" <[EMAIL PROTECTED]> wrote in message
9b9lvb$u57$[EMAIL PROTECTED]">news:9b9lvb$u57$[EMAIL PROTECTED]...
> I'm trying to figure out the way recordsets are handled with php and
> mysql.After I issue a query to the Db with $result = mysql_query ($query)
> is the recordset contained in $result or is this just a pointer.I want a
> persistant recordset on the client computer that can be manipulated
without
> going to the server.Is this possable.fetchrow seems to go to the server
> each time or am i wrong?
> Thanks
> Mike P
> [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] counter reseting help!

2001-04-14 Thread Plutarck

How are you saving the current counter amount?

For instance if it's in a database, add a date field.

Check to see if the date is more than 24 hours old before displaying the
current counter. If it is then update the database and make the counter
number 0. If it's not older than 24 hours, just do your counter as normal.


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


""McShen"" <[EMAIL PROTECTED]> wrote in message
9b9mg0$26o$[EMAIL PROTECTED]">news:9b9mg0$26o$[EMAIL PROTECTED]...
> hi
>
> I am writing a small counter for my site. But i am not sure how to reset
the
> counter every 24h. How should i do it? any suggestions would be much
> appreaciated!
>
>
>
> --
> 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] W2K Install Problem

2001-04-14 Thread Jeff Oien

I got it to work. I would still like to know how to open a command
window in W2K though.

I had a reference to d:/php4/ instead of d:/php/ which is where I 
have it.
Jeff Oien

> When I try to run a PHP script through a Web browser it just
> displays the code. I did a clean install of W2K and installed
> Apache. I copied the php.ini to the WINNT and system folders.
> Not sure where to go from here.
> 
> BTW how do you open a command window in W2K? Thanks.
> Jeff Oien
> 
> -- 
> 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] Selected Radio Buttons

2001-04-14 Thread Jordan Elver

Hi,
I think I'm being stupid. Why won't this code work. The $article_active 
variable is showing y when I echo it?


if($article_active == 'y') {
echo"Yes";
} else {
echo"Yes";
}

if($article_active == 'n') {
echo"No";
} else {
echo"No";
}


Thanks,

Jord

-- 
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 on something simple?

2001-04-14 Thread Andrew Durk

I can get connected to my host's MySQL database w/o error, but I cannot seem
to do anything after that.

I do:
$db = mysql_connect("localhost", "username");
mysql_select_db("subsurface_net",$db);

No problem, but if I do this:
$result = mysql_query("SELECT * FROM customer_genre",$db);

I eventually get:
Warning: 0 is not a MySQL result index in /test.phtml on line 35

And customer_genre _is_ a table in my database...

Help, anyone!?
--
Andrew Durk
[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] counter reseting help!

2001-04-14 Thread McShen

hi

I am writing a small counter for my site. But i am not sure how to reset the
counter every 24h. How should i do it? any suggestions would be much
appreaciated!



-- 
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] Explain recordset

2001-04-14 Thread Mike P

I'm trying to figure out the way recordsets are handled with php and 
mysql.After I issue a query to the Db with $result = mysql_query ($query) 
is the recordset contained in $result or is this just a pointer.I want a 
persistant recordset on the client computer that can be manipulated without 
going to the server.Is this possable.fetchrow seems to go to the server 
each time or am i wrong?
Thanks
Mike P
[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] W2K Install Problem

2001-04-14 Thread Jeff Oien

When I try to run a PHP script through a Web browser it just
displays the code. I did a clean install of W2K and installed
Apache. I copied the php.ini to the WINNT and system folders.
Not sure where to go from here.

BTW how do you open a command window in W2K? Thanks.
Jeff Oien

-- 
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] Sessions?

2001-04-14 Thread Plutarck

Ahh. I reread your post and now I see what you were originally asking.


Yes, sessions are the best way to handle it then. The variables "live" by
sending a specially augmented header to the client. The header sort of
"sticks" to the client so that their session ID is automatically sent in
their requests for new pages. It's basically a cookie that isn't stored on
the persons hard drive.

There are instances where a person's browser is, for lack of a better word,
"teflon coated" so that the header/cookie just doesn't "stick" to them.
That's when PHP appends the "PHPSESSID=[long string of characters]" to all
of your links.

So the short answer to your question is "Yes, it's the best way to handle
it".

But it must be noted that when someone submits a variable through the URL it
will _not_ change the value of any session variables. You must do that
explicitly in your code.


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


""Ashley M. Kirchner"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Plutarck wrote:
>
> > The way I do it is to stick all those global variables into an include
file,
> > which I usually named something like global.php.
>
>   Um no.  These aren't static variables.  They change from page to
> page.  For example, page one
>
>   $foo=0, $bar=3, $baz='Closed'
>
> They follow a particular link that changes them to,
>
>   $foo=1, $bar=3, $baz='Open'
>
> They follow yet another link, and this time only $bar changes,
>
>   $foo=1, $bar=2, $baz='Open'
>
>   Right now, the way I've always done that was to include it in the
> URL: next_page.php?foo=0$bar=3&baz='Closed' - they follow a link, and
> those variables get tacked again.  If it's a form, I pass hidden input
> tags.
>
>   But, there's got to be a better, transparent way of doing this.  No?
>
> AMK4
>
> --
> H | Hi, I'm currently out of my mind.  Please leave a message.  BP!
>   |
>   ~
>   Ashley M. Kirchner    .   303.442.6410 x130
>   Director of Internet Operations / SysAdmin. 800.441.3873 x130
>   Photo Craft Laboratories, Inc. .eFax 248.671.0909
>   http://www.pcraft.com  .3550 Arapahoe Ave, #6
>   .. .  .  . .Boulder, CO 80303, U.S.A.
>
>
>
> --
> 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] htaccess question

2001-04-14 Thread Peter Van Dijck

Also,
I am trying to find a way to get this to work:
within the directory I'm in,

1/5/2/3
should be rewritten to
index.php?a=1&b=5&c=2&d=3

I'm sure lots of people have done this before, but the Apache examples 
don't seem to include this. Where can I find a working example?
Thanks!
Peter


>Hi,
>i installed Apache, PHP and mySQL on winNT.
>I am trying to get htaccess files to work.
>
>I created a .htaccess file in a directory with this line in it:
>errordocument 404 /404.php
>
>I changed the httpd.conf file for apache and restarted apache like this:
># AllowOverride None
>AllowOverride All
>
>But when I enter a url that doesn't exist I get this error in the browser:
>Not found
>The requested URL /peter personal/applications 
>development/generic/htdocs/subfolder/dfdfdf was not found on this server.
>Additionally, a 500 Internal Server Error error was encountered while 
>trying to use an ErrorDocument to handle the request.
>
>What is a good way to check if htaccess files are working, and what can I 
>do to get them to work?
>Thanks for any ideas, hints, ...!
>Peter
>~~
>http://liga1.com building multiple language/culture websites
>http://poorbuthappy.editthispage.com online ethnology, up&down
>
>
>--
>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]
>

~~
http://liga1.com building multiple language/culture websites
http://poorbuthappy.editthispage.com online ethnology, up&down


-- 
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] sorting multi-dimensional arrays

2001-04-14 Thread Plutarck

The easiest way is probably to just use a for loop.

For instance (no pun intended...well, maybe just a little one):

$imax = sizeof($joke);

for ($i = 0; $i < $imax; $i++)
{
if (sizeof($joke[$i]) > 1)
{
sort($joke[$i]);
}
}


That will handle the sorting of any two-dimensional array. It won't effect
the first dimension however, so if you want to sort that you will need to do
it first.


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



<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a question about sorting multidimensional arrays. Here is my
problem:
>
> I have an 2-d array:
> $joke[1][rating]=10;
> $joke[2][rating]=20;
> $joke[3][rating]=15;
> 
>
> I would like to sort the jokes into an array based on the rating from
highest
> to lowest. The end result would be something like this:
> Joke 2 : 20 points
> Joke 3: 15 points
> Joke 1: 10 points
>
> How do I accomplish this?
>
> I have tried fooling around with sort(), arsort(), and array_multisort(),
but
> I just can't get it. Thank you very much for your time.
>
> Shane
>



-- 
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] htaccess question

2001-04-14 Thread Peter Van Dijck

Hi,
i installed Apache, PHP and mySQL on winNT.
I am trying to get htaccess files to work.

I created a .htaccess file in a directory with this line in it:
errordocument 404 /404.php

I changed the httpd.conf file for apache and restarted apache like this:
# AllowOverride None
AllowOverride All

But when I enter a url that doesn't exist I get this error in the browser:
Not found
The requested URL /peter personal/applications 
development/generic/htdocs/subfolder/dfdfdf was not found on this server.
Additionally, a 500 Internal Server Error error was encountered while 
trying to use an ErrorDocument to handle the request.

What is a good way to check if htaccess files are working, and what can I 
do to get them to work?
Thanks for any ideas, hints, ...!
Peter
~~
http://liga1.com building multiple language/culture websites
http://poorbuthappy.editthispage.com online ethnology, up&down


-- 
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] CLASSES AND OBJECTS..

2001-04-14 Thread Plutarck

Nope, I'm afraid not.

Currently PHP will support single level inheritance only. So A can extend B,
but C cannot extend B. You will need to create a class of B to extend it
with C.

I suppose PHP may one day support it, but I am guessing that the Zend API
can't currently handle it. I think it will need to be retooled.


Sounds like a nice thing to shoot for for PHP5, perhaps?


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


""alberto"" <[EMAIL PROTECTED]> wrote in message
9b9eu7$s6n$[EMAIL PROTECTED]">news:9b9eu7$s6n$[EMAIL PROTECTED]...
> Anyone know if one day PHP will support multiple inheritance?
> I think it's very important...
>
> For example, will PHP support this code:
>
> class A extends B,  extends C   {
> 
> }
>
> where B and C are classes?
>
> Thanks!
> Alberto
>
>
>
> --
> 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] CLASSES AND OBJECTS..

2001-04-14 Thread alberto

Anyone know if one day PHP will support multiple inheritance?
I think it's very important...

For example, will PHP support this code:

class A extends B,  extends C   {

}

where B and C are classes?

Thanks!
Alberto



-- 
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] A slightly amusing, though mostly dangerous, endless loop

2001-04-14 Thread Plutarck

This is a bug which was apparently fixed in v 4.0.4pl1 at least, but it
still present in 4.0.3

I just found it kind of amusing and it makes a nice warning.

Consider this:

print_r($GLOBALS);


That's it. It prints all the variables available, however part of it is an
array called GLOBALS. Which then prints all available variables, including
an array called GLOBALS...

And it will continue until you hit the Stop button or until the script times
out. But if you have ignore.user.abort on, it will continue till it times
out. If you've screwed with your scripts timeout settings...

...so be wary of that, and ensure you don't try and print out the variables
available in GLOBALS in older versions of PHP. It was fixed with the
anti-recursion feature, which automatically breaks endless loops.



--
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] Abnormal performance of PHP_MSSQL70.DLL

2001-04-14 Thread Jia Li

hi, thank you for taking time reading this email.
i experienced an abnormal happening from my php_MSSQL70.dll. My computer 
config:
AMD 850+SDRAM 256
OS: MS Windows 2000 SERVER + sp1
HTTPD Server :  Apache 1.3.19
PHP version : 4.0.4
MSSQL version : 2000

i altered the Extension part of the php.ini file so that it loads 
php_mssql70.dll (seems there is no php_mssql2000.dll for my MSSQL2000). the 
problem is whenever i load a local page (by typing add in the add bar or 
clicking a hyperlink) in IE, it takes around 10 sec. and i observed that 
when the page is being loaded, the cpu usage reflected from the Task Manager 
is 100% and stays for about 5 sec. THIS HAPPENS EVEN IF THE SCRIPT DIDN"T 
CALL MSSQL FUNCITONS. the problem disappears if i comment that line in 
php.ini which loads that dll.
Why is this happening? anyone can help me?

aijil
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
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] session

2001-04-14 Thread E K L

Hi,
   Is there anybody can help to do this:

   My web site has 3 pages :a.php, b.php and c.php. I want to capture the 
session in those 3 pages. Without an id, visitor can't view my page. When 
visitors leave the site, thier session should be removed.

   The problem is how to remove the session. I have tried several function 
of session such as session_destroy(), session_unregister. But, i still faild 
to clear the session. What should i do?

  For ur information, the session.cookie_lifetime is set to 0 in my server. 
Should i   change the value? If yes, then how to do it? Please give me your 
hands, thank you

E K
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
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] Big sites running PHP

2001-04-14 Thread Phil Driscoll

For those who need to convince their bosses that PHP (+mysql +apache) is up
to the job, the following (recently slashdotted) link may be useful:

http://www.webtechniques.com/archives/2001/05/hong/

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.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] Forcing Case

2001-04-14 Thread Christian Reiniger

On Saturday 14 April 2001 09:15, you wrote:
> Is there any way to force case...like if I have a string and want it to
> appear in all lowercase (or uppercase, God forbid)?

http://www.php.net/strtolower

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

...1000100011010101101010110100111010113...

--
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] user info?

2001-04-14 Thread Ramiro Radjiman

Hi there,

I'm just wondering if there is a method to extract user specific info when
this user connects to the site.

U user must have a handle, but i don't want him to login. So i thaught if i
can get specific userinfo from the client, this info would be his handle to
walk trough the site.

If he logs in it aint a problem :-)

Could someone help.

I know there must be something, i ones read it.

with kind regards,

Ramiro Radjiman

HOLLAND



-- 
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] header( )

2001-04-14 Thread Christian Reiniger

On Saturday 14 April 2001 03:47, you wrote:

> On 11 Apr 2001 08:12:20 -0700 AD in php.general, Chris Lee said:
> >I'll post you a simple HTTP auth script. but you should realize =
> >something about header()
> >
> >client -> server
> >server -> client
> >
> >the client sends some HTTP request to the server, then the server
> > sends = some HTTP response to the client. php is strictly server
> > side, you have = full control over the HTTP headers sent to the user,
> > but not from the = user to the server. ie. method=3D'post' that is
> > sending client data to = the server, you will have no control over
> > this at all...
>
> There are in fact two different servers: the web server and the PHP
> server. IMO it should be possible for the PHP server, executing PHP

Wrong. PHP runs as part of the webserver.

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

...1000100011010101101010110100111010113...

--
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] Any one have PHP voteBOOTH source code...?!?

2001-04-14 Thread news.php.net

hello... anyone know where i can downlaod voteBOOTH.php w/ the image
viewer?! or does anyone have it that you can send to me..?

thanxz!




-- 
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] Forcing Case

2001-04-14 Thread James Moore

RTFM:

http://www.php.net/manual/en/function.strtoupper.php
http://www.php.net/manual/en/function.strtolower.php
http://www.php.net/manual/en/function.ucfirst.php

- James

> -Original Message-
> From: midget2000x [mailto:[EMAIL PROTECTED]]
> Sent: 14 April 2001 08:16
> To: [EMAIL PROTECTED]
> Subject: [PHP] Forcing Case
> 
> 
> Is there any way to force case...like if I have a string and want 
> it to appear
> in all lowercase (or uppercase, God forbid)?
> 
> Thanks,
> 
> Rory
>  ---
> providing the finest in midget technology
> 
> -- 
> 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] PHP for Apache 2.0

2001-04-14 Thread Patrick Dunford

According to Apache, modules made for Apache 1.3 will not work as-is in 2.0 
due to changes in the API.

Is a version of PHP 4 for Apache 2.0 coming out?

-- 
===
Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/

   Ill-gotten treasures are of no value, but righteousness delivers
from death.
-- Proverbs 10:2
http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010414
===
Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/

-- 
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 /ext/dbx dbx_pgsql.c /ext/pgsql pgsql.c

2001-04-14 Thread Rui Hirokawa

hirokawaSat Apr 14 03:32:14 2001 EDT

  Modified files:  
/php4/ext/dbx   dbx_pgsql.c 
/php4/ext/pgsql pgsql.c 
  Log:
  deleted warning output in dbx/pgsql.
  
Index: php4/ext/dbx/dbx_pgsql.c
diff -u php4/ext/dbx/dbx_pgsql.c:1.5 php4/ext/dbx/dbx_pgsql.c:1.6
--- php4/ext/dbx/dbx_pgsql.c:1.5Wed Apr 11 01:14:57 2001
+++ php4/ext/dbx/dbx_pgsql.cSat Apr 14 03:32:14 2001
@@ -236,6 +236,7 @@
 /* returns array[0..columncount-1] as strings on success or 0 
   as long on failure */
 int number_of_arguments=2;
+   int save_error_reporting=0;
 zval ** arguments[2];
 zval * zval_row=NULL;
 zval * returned_zval=NULL;
@@ -250,7 +251,14 @@
return 0;
}
 */
+   if (EG(error_reporting) & E_WARNING){
+   save_error_reporting = EG(error_reporting);
+   EG(error_reporting) &= ~E_WARNING;
+   }
 dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_fetch_array", 
&returned_zval, number_of_arguments, arguments);
+   if (save_error_reporting) {
+   EG(error_reporting) = save_error_reporting;
+   }
 if (!returned_zval || returned_zval->type!=IS_ARRAY) {
 if (returned_zval) zval_ptr_dtor(&returned_zval);
 FREE_ZVAL(zval_row);
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.97 php4/ext/pgsql/pgsql.c:1.98
--- php4/ext/pgsql/pgsql.c:1.97 Thu Apr  5 05:29:24 2001
+++ php4/ext/pgsql/pgsql.c  Sat Apr 14 03:32:14 2001
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.97 2001/04/05 12:29:24 romolo Exp $ */
+/* $Id: pgsql.c,v 1.98 2001/04/14 10:32:14 hirokawa Exp $ */
 
 #include 
 
@@ -532,8 +532,6 @@
}

ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, "PostgreSQL link", 
le_link, le_plink);
-
-   printf("\npg_close %d\n",id);
 
if (id==-1) { /* explicit resource number */
zend_list_delete(Z_RESVAL_PP(pgsql_link));



-- 
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 / TODO-4.1.txt

2001-04-14 Thread Thies C. Arntzen

thies   Sat Apr 14 03:30:05 2001 EDT

  Modified files:  
/php4   TODO-4.1.txt 
  Log:
  .
  
  
Index: php4/TODO-4.1.txt
diff -u php4/TODO-4.1.txt:1.2 php4/TODO-4.1.txt:1.3
--- php4/TODO-4.1.txt:1.2   Fri Apr 13 16:52:15 2001
+++ php4/TODO-4.1.txt   Sat Apr 14 03:30:05 2001
@@ -12,3 +12,6 @@
 
 * renaming functions so that they all are conform to one standard form
 
+* allow foreach($arrray as $key => &value)
+
+* clean up "$instance = &new object" syntax.



-- 
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] Installing PHP 4 as rpm on RedHat 6.2 !!

2001-04-14 Thread Mohamedou

Hello All,


I have already php 3.0.18 installed on my RH 6.2 box.
I want to install PHP 4 now.
But if I still the following message:

[root@proxy mohamedou]# rpm -Uvh php-4.0.4pl1-3.i386.rpm
error: failed dependencies:
libdb-3.1.so is needed by php-4.0.4pl1-3
libgd.so.1.8 is needed by php-4.0.4pl1-3
libc.so.6(GLIBC_2.1.3) is needed by php-4.0.4pl1-3
libc.so.6(GLIBC_2.2) is needed by php-4.0.4pl1-3
libresolv.so.2(GLIBC_2.2) is needed by php-4.0.4pl1-3
php = 3.0.18 is needed by php-imap-3.0.18-6.2horde1
php = 3.0.18 is needed by php-mysql-3.0.18-6.2horde1
[root@proxy mohamedou]#  

Which rpms are responsible for that?

Every help will be apreciated
Thnx in advance

Moh



  1   2   >