php-general Digest 5 Feb 2001 03:36:42 -0000 Issue 493

Topics (messages 38109 through 38183):

Newbie:Cannot send session cookie...
        38109 by: james
        38121 by: Teodor Cimpoesu

Re: HTTP compression
        38110 by: Sean Cazzell
        38116 by: Alain Fontaine
        38120 by: Teodor Cimpoesu
        38122 by: Alain Fontaine
        38124 by: Carsten Gehling
        38129 by: Teodor Cimpoesu
        38135 by: Sander Pilon
        38137 by: Sander Pilon

Re: % operator
        38111 by: Steve Werby

Re: Arrays from forms
        38112 by: Steve Werby

Problem with Zend Encoder testdrive - Win2k
        38113 by: Carsten Gehling

PHP Authenticate
        38114 by: FredrikAT

Re: PHP and Oracle resources
        38115 by: Jon Jacob

db paging with MS Sql
        38117 by: Scott Parks
        38123 by: Alain Fontaine
        38152 by: Michael Kimsal
        38161 by: Manuel Lemos
        38163 by: Joe Stump
        38164 by: Michael Kimsal
        38170 by: Manuel Lemos
        38171 by: Manuel Lemos
        38172 by: Joe Stump
        38174 by: Andrew Hill
        38175 by: Manuel Lemos

2 questions
        38118 by: Adrian Teasdale
        38119 by: andreas \(.work\)
        38126 by: Steve Werby
        38150 by: WreckRman2

Re: Is this a missing feature?
        38125 by: Lux
        38130 by: Teodor Cimpoesu
        38134 by: Steve Edberg
        38136 by: Lux
        38138 by: Teodor Cimpoesu
        38145 by: Christian Reiniger
        38157 by: Lux
        38159 by: Josh G
        38160 by: Lux
        38162 by: Christian Reiniger
        38165 by: Lux

Re: Session With Cookies
        38127 by: phpLover

Re: Replacing A Word in HTML page
        38128 by: phpLover
        38132 by: Steve Werby
        38146 by: Christian Reiniger

Connectivity to AS/400
        38131 by: Pete Lancashire

Re: [PHP-DB] Connectivity to AS/400
        38133 by: szii.sziisoft.com

XML Parsing with PHP
        38139 by: Steve Haemelinck
        38142 by: Joe Stump

Email Selected Data
        38140 by: Website4S.aol.com
        38147 by: Christian Reiniger
        38177 by: David Robley
        38181 by: Andrew Hill

Installing Verisign PFPro Support
        38141 by: Brady J. Horenstein
        38143 by: John Donagher

Re: PHP hosting - the final frontier.
        38144 by: Boaz Yahav
        38149 by: Robert Covell
        38151 by: Christian Reiniger
        38168 by: Robert Covell

Strange behavior with parser/methods?
        38148 by: T.S.Bhatnagar

Learning MySQL
        38153 by: Jeff Oien
        38155 by: eschmid+sic.s.netic.de
        38169 by: Toby Butzon

db forms creator?
        38154 by: Jaxon

upload
        38156 by: DragoslaV \( Paul \)

I should apologize
        38158 by: Lux
        38167 by: Michael Kimsal
        38183 by: Sean Cazzell

Re: reload help!!!
        38166 by: Wen Ni Leong

Re: Help with XSLT!
        38173 by: Theo Brinkman

Re: [PHP-DB] .htpasswd?
        38176 by: Victor Foitzik

Apache and PHP
        38178 by: Patrick L. Olson
        38179 by: Michael Kimsal
        38180 by: Jason Brooke
        38182 by: Sean Cazzell

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]


----------------------------------------------------------------------


1. Cannot send session cookie - headers already sent by (output started at
c:/program files/apache group/apache/htdocs/index.php4:10) in c:/program
files/apache group/apache/htdocs/index.php4 on line 11


What does it mean?

Any hints?

2. Another problem:

My htm page has two frames (left and right).
I activate php4 script from button on left frame.

Question: How can I print the result of query on the right frame?


Thanks in advance


Jacek Wojcik








james wrote:
> 
> 1. Cannot send session cookie - headers already sent by (output started at
> c:/program files/apache group/apache/htdocs/index.php4:10) in c:/program
> files/apache group/apache/htdocs/index.php4 on line 11
> 
> What does it mean?
> 
> Any hints?
the error message is quite explicit. By the time it reaches the line 11
in index.php4
you already sent something to output, so if you have on index.php4:11
something like
header(), setCookie() or session_start() which imply sending a header,
is no longer 
possible [ you cannot send a header after you already started sending
the body ].

> 
> 2. Another problem:
> 
> My htm page has two frames (left and right).
> I activate php4 script from button on left frame.
> 
> Question: How can I print the result of query on the right frame?

<frame name="that_one_with_the_button" action="show.php"
target="left_frame_name">
...
 
-- teodor




Alain,

When PHP parses a file, it treats the stuff that's not in <?php?> blocks
as though each line were a print or echo statement.  So your whole file
will be compressed and sent to the browser.

Regards,

Sean

On Sun, 4 Feb 2001, Alain Fontaine wrote:

> Rasmus,
> 
> Thanks for the clarification; it seems obvious, too, that mixing compressed
> and non compressed content would be quite difficult to implement; at least
> it would partially compromise the speed/size gain because of added protocol
> overhead.
> 
> Now, imagining that we have enabled compression by calling
> ob_start("ob_gzhandler"), what happens for a document that contains
> something along these lines:
> 
> <!-- snip -->
> ...
> <?
> // Enable HTTP compression
> ob_start("ob_gzhandler");
> 
> // PHP content
> $content = "This is some content.";
> ?>
> 
> <div>This is a normal HTML section</div>
> 
> <?
> // PHP content continues
> $content .= "And the rest of it.";
> echo $content;
> ?>
> ...
> <!-- snip -->
> 
> In this particular case, what would be compressed ? As far as I have
> understood, nothing at all, because some part of the output is not "passing
> through" PHP, right ?
> 
> > -----Message d'origine-----
> > De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > Envoye : dimanche 4 fevrier 2001 14:34
> > A : Alain Fontaine
> > Cc : [EMAIL PROTECTED]
> > Objet : Re: [PHP] HTTP compression
> >
> >
> > > I've just started experimenting with ob_start("ob_gzhandler") a
> > bit, and I
> > > have found that if any output is generated before ob_start() is called,
> > > nothing at all gets compressed; if ob_start() is called before
> > any output,
> > > everything is compressed.
> > >
> > > Is this the case, I mean, is this "by design" ?
> >
> > Yes, it wouldn't really work any other way.  You can't mix non-compressed
> > and compressed in the same request.
> >
> > -Rasmus
> >
> >
> 
> 
> 
> -- 
> 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]
> 





Sean,

Thanks, I see. How about headers ? Do they need to be compressed, too; in
other words, do headers "belong" to the output ?

> -----Message d'origine-----
> De : Sean Cazzell [mailto:[EMAIL PROTECTED]]
> Envoye : dimanche 4 fevrier 2001 17:39
> A : Alain Fontaine
> Cc : [EMAIL PROTECTED]
> Objet : RE: [PHP] HTTP compression
>
>
> Alain,
>
> When PHP parses a file, it treats the stuff that's not in <?php?> blocks
> as though each line were a print or echo statement.  So your whole file
> will be compressed and sent to the browser.
>
> Regards,
>
> Sean
>
> On Sun, 4 Feb 2001, Alain Fontaine wrote:
>
> > Rasmus,
> >
> > Thanks for the clarification; it seems obvious, too, that
> mixing compressed
> > and non compressed content would be quite difficult to
> implement; at least
> > it would partially compromise the speed/size gain because of
> added protocol
> > overhead.
> >
> > Now, imagining that we have enabled compression by calling
> > ob_start("ob_gzhandler"), what happens for a document that contains
> > something along these lines:
> >
> > <!-- snip -->
> > ...
> > <?
> > // Enable HTTP compression
> > ob_start("ob_gzhandler");
> >
> > // PHP content
> > $content = "This is some content.";
> > ?>
> >
> > <div>This is a normal HTML section</div>
> >
> > <?
> > // PHP content continues
> > $content .= "And the rest of it.";
> > echo $content;
> > ?>
> > ...
> > <!-- snip -->
> >
> > In this particular case, what would be compressed ? As far as I have
> > understood, nothing at all, because some part of the output is
> not "passing
> > through" PHP, right ?
> >
> > > -----Message d'origine-----
> > > De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > > Envoye : dimanche 4 fevrier 2001 14:34
> > > A : Alain Fontaine
> > > Cc : [EMAIL PROTECTED]
> > > Objet : Re: [PHP] HTTP compression
> > >
> > >
> > > > I've just started experimenting with ob_start("ob_gzhandler") a
> > > bit, and I
> > > > have found that if any output is generated before
> ob_start() is called,
> > > > nothing at all gets compressed; if ob_start() is called before
> > > any output,
> > > > everything is compressed.
> > > >
> > > > Is this the case, I mean, is this "by design" ?
> > >
> > > Yes, it wouldn't really work any other way.  You can't mix
> non-compressed
> > > and compressed in the same request.
> > >
> > > -Rasmus
> > >
> > >
> >
> >
> >
> > --
> > 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]
> >
>
>








Alain Fontaine wrote:
> 
> Sean,
> 
> Thanks, I see. How about headers ? Do they need to be compressed, too; in
> other words, do headers "belong" to the output ?

a HTTP response is made of response header(s) and the response body.
Only the body
is compressed, and this is signaled in the headers so the User Agent
will know
not to stare to a bunch of binary data :)

-- teodor




Teodor,


Looked at it from that point of view, the question was pretty stupid ! ;)

> -----Message d'origine-----
> De : Teodor Cimpoesu [mailto:[EMAIL PROTECTED]]
> Envoye : dimanche 4 fevrier 2001 19:09
> A : Alain Fontaine
> Cc : Sean Cazzell; [EMAIL PROTECTED]
> Objet : Re: [PHP] HTTP compression
> 
> 
> 
> 
> Alain Fontaine wrote:
> > 
> > Sean,
> > 
> > Thanks, I see. How about headers ? Do they need to be 
> compressed, too; in
> > other words, do headers "belong" to the output ?
> 
> a HTTP response is made of response header(s) and the response body.
> Only the body
> is compressed, and this is signaled in the headers so the User Agent
> will know
> not to stare to a bunch of binary data :)
> 
> -- teodor
> 





From: "Teodor Cimpoesu" <[EMAIL PROTECTED]>
Sent: Sunday, February 04, 2001 7:08 PM

> a HTTP response is made of response header(s) and the response body.
> Only the body
> is compressed, and this is signaled in the headers so the User Agent
> will know
> not to stare to a bunch of binary data :)

Where can I get the specs on the compression algorithm? Is it specified in a
RFC?

- Carsten








Carsten Gehling wrote:
> 
> From: "Teodor Cimpoesu" <[EMAIL PROTECTED]>
> Sent: Sunday, February 04, 2001 7:08 PM
> 
> > a HTTP response is made of response header(s) and the response body.
> > Only the body
> > is compressed, and this is signaled in the headers so the User Agent
> > will know
> > not to stare to a bunch of binary data :)
> 
> Where can I get the specs on the compression algorithm? Is it specified in a
> RFC?

erm, it's gzip I guess.
PHP uses zlib to send compressed output, afaik [i.e. you must have
--with-zlib
in order to use the output compression handler ]

-- teodor




Check the http 1.1 rfc - http://www.faqs.org/rfcs/rfc2616.html

It links to the gzip file format rfc - http://www.faqs.org/rfcs/rfc1952.html


> -----Original Message-----
> From: Carsten Gehling [mailto:[EMAIL PROTECTED]]
> Sent: 4 February 2001 19:19
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] HTTP compression
>
>
> From: "Teodor Cimpoesu" <[EMAIL PROTECTED]>
> Sent: Sunday, February 04, 2001 7:08 PM
>
> > a HTTP response is made of response header(s) and the response body.
> > Only the body
> > is compressed, and this is signaled in the headers so the User Agent
> > will know
> > not to stare to a bunch of binary data :)
>
> Where can I get the specs on the compression algorithm? Is it
> specified in a
> RFC?
>
> - Carsten
>
>
>
> --
> 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]
>
>





> Sean,
>
> Thanks, I see. How about headers ? Do they need to be compressed, too; in
> other words, do headers "belong" to the output ?

How about RTFR? :)

(Read the ...... RFC.)

Really, when you've read http://www.faqs.org/rfcs/rfc2616.html you'll be
able to understand a lot more about how http requests and responses work,
and how stuff like compression fits into the picture, etc, etc. Basically a
must-read for anyone serious about working with the web on a technical
level. (That'd be you, php'ers :)






"Dhaval Desai" <[EMAIL PROTECTED]> wrote:
> what is the use of %

It returns a remainder.  For example 7 % 2 = 1.

> Is it called modulo..what is it's use in PHP.?

There are plenty of situations where it's useful.  For example, if you're
displaying data in rows and want to shade every other row:

if ( 1 == $row_count % 2 ) { echo "<tr><td>$data</td></tr>"; }
else { echo "<tr><td class='shade-1'>$data</td></tr>"; }

Or if you have a data set you want to display in an HTML table across
multiple rows, you'll probably find it useful for determining when to put
<tr> or </tr> as you loop through your data set and use it to calculate
whether you will need to fill cells at the end of the table with
non-breaking spaces.  There are many other applications, but these two come
up pretty frequently in web applications.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





"Jamie" <[EMAIL PROTECTED]> wrote:
> $results = mysql_query("SELECT option_type, code FROM options WHERE
> code='000' ORDER BY option_type",$db);
>  mysql_fetch_array($results);
> // From what  understand I should have an array some thig like this:
> // ("Size"=>"A4" , "Size" => "A3", "Size"=>"A5", "Colour"=>"Red", etc..);

According to your SQL statement that doesn't appear to be true.  According
to your SQL statement you'll return two fields: option_type and code.

>  $types = array_values($results);
> // OK so now I think I have an array like this:
> // ("A4" , "A3", "A5", "Red", etc..);
>   while ($type =array_pop($types)){
>    echo $type."<br>";
>  }

I'd avoid using array_values() and array_pop().  Simply do this:

while ( $row = mysql_fetch_array( $result ) )
    {
    $option_type = $row[option_type];
    $code = $row[code];
    echo "$option_type $code<br>";
    }

Hopefully that'll be enough to get you going.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





Downloaded the Encoder testdrive and installed it with a license file
(zend_encoder.dat). Did what the manual stated, except that I installed it
on E:\program files\zend instead of C:\program files\zend (I did modify the
install_license.reg before installing it into the registration database)

When I run the zendenc.exe, I get a dialog stating that it cannot find the
license data. I'm able to specify it manually, but then I get another
errormessage saying "Error in saving configuration settings".

Anyone else had this problem?

- Carsten






Hi... I have a problem with PHP Authenticate....
...if I enter user/pw wrong the first time it stops and I have to close/open
browser.!
I've tried to unset $PHP_AUTH_USER but then it just loops...

if(!isset($PHP_AUTH_USER)) {
    Header("WWW-Authenticate: Basic realm=\".: Privat område :.\"");
    Header("HTTP/1.0 401 Unauthorized");
    echo "<br><font face=\"arial, helvetica, sans-serif\" size=\"2\"
color=\"#0060CF\">Secured Area!</font>";
    exit;
  } else {
    $PHP_AUTH_PW_ENCRYPTED = crypt("$PHP_AUTH_PW", "wP");

    $connect = mysql_connect($hostname,$username,$password) or die ("Klarer
ikke koble til MqSQL db...");

    $query = "SELECT * FROM forfatter";
    $query .= " where id = $PHP_AUTH_USER";
    $result = mysql_db_query($db, $query);

    while($row = mysql_fetch_array($result)) {
 $id = $row["id"];
      $navn = $row["navn"];
      $pw = $row["pw"];
    }

    if (($id == $PHP_AUTH_USER) AND ($pw == $PHP_AUTH_PW_ENCRYPTED))

      $bruker_ok = true;
    } else

    exit;
    }
  }



---------------------------------
Fredrik A. Takle
[EMAIL PROTECTED]







Kristofer Widholm wrote:
> 
> Well, I've been given the joyous task of implementing the DaveTV
> project at CBS via PHP, using Oracle as a database.
> 
> I've never used Oracle before.
> 
> Looking at the PHP functions for Oracle, and having heard about it in
> the past, it seems like quite a different approach than any SQL
> database I've ever used.  I still don't get the whole point of cursor
> objects, etc. :-)
> 
> It would all be pretty hilarious if it weren't so real, and with a
> big fat deadline looming smack for the end of February.
> 
> To get to the point: Anyone have any good PHP & Oracle tutorials,
> resources, books, etc, to point me to?  EVERYTHING I see is MySQL,
> MySQL, MySQL, and all I get for Oracle are lists of unexplained PHP
> function calls.
> 
> Just point me in the right direction. I can walk there myself.
> 
> Thanks for the help.
> 
> Kristofer
> --
> ______________________________________
> 
> Kristofer Widholm
> Web Pharmacy
> [EMAIL PROTECTED]
> 191 Grand Street, Brooklyn  NY  11211
> 718.599.4893
> ______________________________________
> 
> --
> 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]

A list of Oracle related PHP functions can be found at:

http://www.php.net/manual/en/ref.oci8.php

Good luck,

Jon




Has anyone seen a good lession or code example on paging records from MS Sql
7?  Say I have 300 records and
want to break them down to 10 per page using [previous | next ] and a list
of page numbers at the bottom.

tia





Scott,

As far as I know, MS SQL supports a syntax like this:

SELECT TOP 10 FROM table_name WHERE etc etc

However, I don't know how to make it start from a certain offset; I guess MS
SQL's documentation, especially the T-SQL doc, should help.

""Scott Parks"" <[EMAIL PROTECTED]> a écrit dans le message news:
00b601c08ed1$ef153f30$[EMAIL PROTECTED]
> Has anyone seen a good lession or code example on paging records from MS
Sql
> 7?  Say I have 300 records and
> want to break them down to 10 per page using [previous | next ] and a list
> of page numbers at the bottom.
>
> tia
>
>
> --
> 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]
>






I'm pretty sure there's no other way to do it but to read them all in and
only display what you need.

AFAIK, MSSQL doesn't support paging itself, but relies on the
ADO driver to do this.  If you make an reference to an ADO object in
VBScript, you can set how many rows are in a 'page', then tell it to jump to
a specific page, to jump to that group of rows.

My terminology is probably wrong above, haven't used ADO/VBScript stuff
in awhile.  But that's the gist.



Scott Parks wrote:

> Has anyone seen a good lession or code example on paging records from MS Sql
> 7?  Say I have 300 records and
> want to break them down to 10 per page using [previous | next ] and a list
> of page numbers at the bottom.
>
> tia
>
> --
> 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 Scott,

On 04-Feb-01 14:41:58, you wrote:

>Has anyone seen a good lession or code example on paging records from MS Sql
>7?  Say I have 300 records and
>want to break them down to 10 per page using [previous | next ] and a list
>of page numbers at the bottom.

You may want to use Metabase that lets you pick the range of rows that are
returned by a SELECT query.  It works not only with Microsoft SQL server
but also many other databases supported by PHP.

http://phpclasses.UpperDesign.com/browse.html/package/20


You may also want to try this query result table display class that displays
select query result rows in HTML tables and may generate automatically links
to move go to the Previous, Next, First, Last or any other page of query
results.

http://phpclasses.UpperDesign.com/browse.html/package/130


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





AFAIK this is more of a SQL thing than a DB specific thing. Just look up the
LIMIT equivilent in MS SQL (should just be LIMIT) and use that for paging, once
you get the hang of it it's quite easy.

You can look through my paging class at www.miester.org/software - it goes one
deeper and does [ prev ] [1] [2] [3] [ next ] and then only shows X ammount of
pages so when you get to page 10 it would show [9] [10] [11]

Hope that helps.

--Joe

On Sun, Feb 04, 2001 at 10:02:06PM -0300, Manuel Lemos wrote:
> Hello Scott,
> 
> On 04-Feb-01 14:41:58, you wrote:
> 
> >Has anyone seen a good lession or code example on paging records from MS Sql
> >7?  Say I have 300 records and
> >want to break them down to 10 per page using [previous | next ] and a list
> >of page numbers at the bottom.
> 
> You may want to use Metabase that lets you pick the range of rows that are
> returned by a SELECT query.  It works not only with Microsoft SQL server
> but also many other databases supported by PHP.
> 
> http://phpclasses.UpperDesign.com/browse.html/package/20
> 
> 
> You may also want to try this query result table display class that displays
> select query result rows in HTML tables and may generate automatically links
> to move go to the Previous, Next, First, Last or any other page of query
> results.
> 
> http://phpclasses.UpperDesign.com/browse.html/package/130
> 
> 
> 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]

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------





AFAICT there is no 'LIMIT' feature in MS SQL products (TOP and supposedly BOTTOM,
but BOTTOM has never worked for me and TOP doesn't seem to work on all versions).

How is metabase handling this?  Pulling everything, looping thru, and only
returning the requested rows?

Yes, I could log in/download/uncompile and spend the next 20 minutes finding it
for myself, but I'm in the midst of work!  ;)  And getting and explanation from
the horse's mouth might be more instructive anyway.  !!!

Manuel Lemos wrote:

> Hello Scott,
>
> On 04-Feb-01 14:41:58, you wrote:
>
> >Has anyone seen a good lession or code example on paging records from MS Sql
> >7?  Say I have 300 records and
> >want to break them down to 10 per page using [previous | next ] and a list
> >of page numbers at the bottom.
>
> You may want to use Metabase that lets you pick the range of rows that are
> returned by a SELECT query.  It works not only with Microsoft SQL server
> but also many other databases supported by PHP.
>
> http://phpclasses.UpperDesign.com/browse.html/package/20
>
> You may also want to try this query result table display class that displays
> select query result rows in HTML tables and may generate automatically links
> to move go to the Previous, Next, First, Last or any other page of query
> results.
>
> http://phpclasses.UpperDesign.com/browse.html/package/130
>
> 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]





Hello Michael,

On 04-Feb-01 21:23:26, you wrote:

>AFAICT there is no 'LIMIT' feature in MS SQL products (TOP and supposedly
>BOTTOM, but BOTTOM has never worked for me and TOP doesn't seem to work on
>all versions).

>How is metabase handling this?  Pulling everything, looping thru, and only
>returning the requested rows?

No, Metabase use server side cursors.  It just seeks for the first row that
it is requested and starts fetching rows from there. It works on MS SQL 6.5
on which the TOP clause is not available.


>Yes, I could log in/download/uncompile and spend the next 20 minutes finding
>it for myself, but I'm in the midst of work!  ;)  And getting and explanation
>from the horse's mouth might be more instructive anyway.  !!!

:-)

Ok, now that you got your explanation you may download Metabase to look in
for the details. 

http://phpclasses.UpperDesign.com/browse.html/package/20


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





Hello Joe,

On 04-Feb-01 21:18:55, you wrote:

>AFAIK this is more of a SQL thing than a DB specific thing. Just look up the
>LIMIT equivilent in MS SQL (should just be LIMIT) and use that for paging,
>once you get the hang of it it's quite easy.

>You can look through my paging class at www.miester.org/software - it goes
>one deeper and does [ prev ] [1] [2] [3] [ next ] and then only shows X
>ammount of pages so when you get to page 10 it would show [9] [10] [11]

I suppose you mean MySQL and not MS (MicroSoft) SQL .  They are not
compatible.


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





I was just meaning plain SQL - can't microsoft say ANSI? All I ask for is a
simple little standard and for people to follow it - I'm not asking for every
feature of the standard - just a following.

--Joe

On Sun, Feb 04, 2001 at 10:43:37PM -0300, Manuel Lemos wrote:
> Hello Joe,
> 
> On 04-Feb-01 21:18:55, you wrote:
> 
> >AFAIK this is more of a SQL thing than a DB specific thing. Just look up the
> >LIMIT equivilent in MS SQL (should just be LIMIT) and use that for paging,
> >once you get the hang of it it's quite easy.
> 
> >You can look through my paging class at www.miester.org/software - it goes
> >one deeper and does [ prev ] [1] [2] [3] [ next ] and then only shows X
> >ammount of pages so when you get to page 10 it would show [9] [10] [11]
> 
> I suppose you mean MySQL and not MS (MicroSoft) SQL .  They are not
> compatible.
> 
> 
> 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
> --
> 

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------





Joe,

Does SQL92 count?

Best regards,
Andrew
---------------------------------------
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.com


On 2/4/01 8:09 PM, "Joe Stump" <[EMAIL PROTECTED]> wrote:

> I was just meaning plain SQL - can't microsoft say ANSI? All I ask for is a
> simple little standard and for people to follow it - I'm not asking for every
> feature of the standard - just a following.
> 
> --Joe
> 
> On Sun, Feb 04, 2001 at 10:43:37PM -0300, Manuel Lemos wrote:
>> Hello Joe,
>> 
>> On 04-Feb-01 21:18:55, you wrote:
>> 
>>> AFAIK this is more of a SQL thing than a DB specific thing. Just look up the
>>> LIMIT equivilent in MS SQL (should just be LIMIT) and use that for paging,
>>> once you get the hang of it it's quite easy.
>> 
>>> You can look through my paging class at www.miester.org/software - it goes
>>> one deeper and does [ prev ] [1] [2] [3] [ next ] and then only shows X
>>> ammount of pages so when you get to page 10 it would show [9] [10] [11]
>> 
>> I suppose you mean MySQL and not MS (MicroSoft) SQL .  They are not
>> compatible.
>> 
>> 
>> 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
>> --
>> 





Hello Joe,

On 04-Feb-01 22:01:37, you wrote:

>I was just meaning plain SQL - can't microsoft say ANSI? All I ask for is a

I don't think there is a standard way of achieving what the LIMIT clause
can that works for all or at least most databases.


>simple little standard and for people to follow it - I'm not asking for every
>feature of the standard - just a following.

Well, if you use Metabase you can tell the range of rows that you want to
retrieve just by calling MetabaseSetSelectedRowRange($database_handle,$first,$limit)
before executing your query.

AFAIK, Metabase is the only abstraction layer, not just for PHP but for any
other language, that I know that provide this facility portably that is
very important for Web application development.  Enjoy and be proud of
using it.

Manuel Lemos


>--Joe

>On Sun, Feb 04, 2001 at 10:43:37PM -0300, Manuel Lemos wrote:
>> Hello Joe,
>> 
>> On 04-Feb-01 21:18:55, you wrote:
>> 
>> >AFAIK this is more of a SQL thing than a DB specific thing. Just look up
>> >the LIMIT equivilent in MS SQL (should just be LIMIT) and use that for
>> >paging, once you get the hang of it it's quite easy.
>> 
>> >You can look through my paging class at www.miester.org/software - it goes
>> >one deeper and does [ prev ] [1] [2] [3] [ next ] and then only shows X
>> >ammount of pages so when you get to page 10 it would show [9] [10] [11]
>> 
>> I suppose you mean MySQL and not MS (MicroSoft) SQL .  They are not
>> compatible.
>> 
>> 
>> 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
>> --
>> 

>-- 

>-----------------------------------------------------------------------------
>-- Joe Stump, PHP Hacker, [EMAIL PROTECTED]                               
> -o) http://www.miester.org http://www.care2.com                             
>   /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
>    _\_V
>-----------------------------------------------------------------------------
>--


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



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





Hi I have a couple of questions.  One about hosting and the other about IP
addresses.  The first on the IP's.........

I have been speaking to a company that I am looking at getting a dedicated
server from.  They ONLY do one IP address per server and use name-based
hosting.  I have asked for dedicated IP's, but their answer has been that
all hosting companies are going to have to go to name-based hosting now.
What is everyone's feeling on this?  Years ago, the company I was with used
name-based and I remember that the search engines did not like this

On to hosting, the above server is a Cobalt Raq 4i.  Does anyone else on the
list use one of these and what do you think? I want to make sure that it's
easy enough to compile latest php and mysql whenever I want to

Thanks for any advice

Ade





Hi,

name-based hostig is quite okay but you shoulsd know that the
cobald raq needs an extra ip for each site offering anonymous ftp and
using ssl-certificate !!

i installed php4.04pl1  and mysql 3.22.32  ( its easy and straightforward )
[ have a look at cobalt-users list ]


greetings

andreas


----- Original Message -----
From: "Adrian Teasdale" <[EMAIL PROTECTED]>
To: "PHP List Post" <[EMAIL PROTECTED]>
Sent: Sunday, February 04, 2001 6:47 PM
Subject: [PHP] 2 questions


> Hi I have a couple of questions.  One about hosting and the other about IP
> addresses.  The first on the IP's.........
>
> I have been speaking to a company that I am looking at getting a dedicated
> server from.  They ONLY do one IP address per server and use name-based
> hosting.  I have asked for dedicated IP's, but their answer has been that
> all hosting companies are going to have to go to name-based hosting now.
> What is everyone's feeling on this?  Years ago, the company I was with
used
> name-based and I remember that the search engines did not like this
>
> On to hosting, the above server is a Cobalt Raq 4i.  Does anyone else on
the
> list use one of these and what do you think? I want to make sure that it's
> easy enough to compile latest php and mysql whenever I want to
>
> Thanks for any advice
>
> Ade
>
>
> --
> 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]
>





"Adrian Teasdale" <[EMAIL PROTECTED]> wrote:
> I have been speaking to a company that I am looking at getting a dedicated
> server from.  They ONLY do one IP address per server and use name-based
> hosting.  I have asked for dedicated IP's, but their answer has been that
> all hosting companies are going to have to go to name-based hosting now.
> What is everyone's feeling on this?  Years ago, the company I was with
used
> name-based and I remember that the search engines did not like this

Search engines handle name-based sites just fine now.  Very old browsers (I
don't recall what generation) are not able to access name-based sites, but
that's probably not justification for needing individual IPs for each site.
If you plan on hosting many sites and need anonymous FTP or SSL for these
sites you'll need more IP addresses.  IP addresses can be hard to come by
for some hosting companies so if you actually need them you should shop
around or explain your situation to the hosting company you're talking to.
There are *tons* of web hosting companies that will lease or colocate a RaQ4
for a reasonable price with more than 1 IP.

> On to hosting, the above server is a Cobalt Raq 4i.  Does anyone else on
the
> list use one of these and what do you think? I want to make sure that it's
> easy enough to compile latest php and mysql whenever I want to

Until about six months ago when I joined another business I did a lot of
business as an independent Cobalt consultant.  You shouldn't have any
problem installing PHP and MySQL with whatever configuration options you
want.  In fact, I currently run several older generation RaQs that use the
Mips architecture instead of the x86 architecture used by the RaQ4 and I've
been installing development versions of PHP and MySQL as they were released
every few weeks.  You may want to visit www.cobalt.com and sign up for the
cobalt-users mailing list and/or bookmark a mailing list archive of it like
the one found at http://marc.theaimsgroup.com/.  As far as the RaQ4 itself
goes, for less_than_expert Linux system administrators, the GUI makes
certain functions very easy to do (add users, websites, control DNS), but if
you're comfortable doing things from the commandline or you expect heavy CPU
usage or you plan on installing a lot of programs and modifying the system
or you need redundancy and failover it might not be the best server for you.
With that said, it's a great server [appliance] for basic web and email
hosting and less than enterprise level database usage.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





    I use a RaQ3 and have no problems running PHP and MySQL. I started out
using one IP but the biggest problem I found was that in order to view the
site or make changes to it, the domain name must resolve to the server
before it would work. I decided it would be best for me to assign each site
an IP and go with it. I am not sure who you are talking to about a dedicated
RaQ but look into http://www.4webspace.com. I have a RaQ3 with 100 gig
transfer and 30 IP's for $110 a month. They do have RaQ4's for a little more
money.

David Smith


----- Original Message -----
From: Adrian Teasdale <[EMAIL PROTECTED]>
To: PHP List Post <[EMAIL PROTECTED]>
Sent: Sunday, February 04, 2001 12:47 PM
Subject: [PHP] 2 questions


> Hi I have a couple of questions.  One about hosting and the other about IP
> addresses.  The first on the IP's.........
>
> I have been speaking to a company that I am looking at getting a dedicated
> server from.  They ONLY do one IP address per server and use name-based
> hosting.  I have asked for dedicated IP's, but their answer has been that
> all hosting companies are going to have to go to name-based hosting now.
> What is everyone's feeling on this?  Years ago, the company I was with
used
> name-based and I remember that the search engines did not like this
>
> On to hosting, the above server is a Cobalt Raq 4i.  Does anyone else on
the
> list use one of these and what do you think? I want to make sure that it's
> easy enough to compile latest php and mysql whenever I want to
>
> Thanks for any advice
>
> Ade
>
>
> --
> 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]
>





Where do I make a formal request for a feature?  In Perl or Ruby, I 
could have said:

foo ({ 'var1' => 'value', 'var2' => 'value'});

and it is so much more elegant than having to say:

$hash = array (
   'var1' => 'value',
   'var2' => 'value'
);
foo ($hash);

elegance is everything, man.

lux

Christian Reiniger wrote:

> On Sunday 04 February 2001 07:31, John Luxford wrote:
> 
> 
> 
> 
>>     function foo (&$hash) {
> 
>>        while (list ($k, $v) = each ($hash)) {
> 
>>           echo "$k :: $v<br />\n";
> 
>>        }
> 
>>     }
> 
> 
> 
>>     // but what I want to say is something like this
> 
>> 
> 
>>     foo (["one" => "value", "two" => "value"]);
> 
> 
> 
> foo () is declared to take a reference to a variable. This only works 
> 
> with "real" variables, not the temporary ones returned from array() etc.
> 
> Modify it to
> 
>      function foo ($hash) {
> 
> 
> 
> and it will work


-- 

John Luxford
Simian Systems

w: www.simian.ca
e: [EMAIL PROTECTED]
p: 204.946.5955

--







Lux wrote:
> 
> Where do I make a formal request for a feature?  In Perl or Ruby, I
> could have said:
> 
> foo ({ 'var1' => 'value', 'var2' => 'value'});
> 
> and it is so much more elegant than having to say:
> 
> $hash = array (
>    'var1' => 'value',
>    'var2' => 'value'
> );
> foo ($hash);
> 
> elegance is everything, man.
> 
> lux
lux in latin means 'light' right? :) let me enlighten then :-P
  foo ($hash = array('var1'=>'value', 'var2'=>'value'));
should work.

Now, I don't undestand why exactly do you need references. By default
everything is passed in a referenced manner, if I undestood correct the
explanation Zeev wrote right after 4.0 was out, or so.

Don't take references like something that will boost your skript speed
to 200%.
Use them only when you need them, and to find out when you actually need
them
check out an article on references at zend.com.

Now, let me tell you that somehow I agreed with you :) cause I love
Python way
of dealing with arrays, but we are in PHP, so we have to figure PHP way,
not 
<your-fav-lang> way.

ciao 

-- teodor




At 8:40 PM +0200 2/4/01, Teodor Cimpoesu wrote:
>Lux wrote:
>>
>>  Where do I make a formal request for a feature?  In Perl or Ruby, I
>>  could have said:
>>
>>  foo ({ 'var1' => 'value', 'var2' => 'value'});
>>
>>  and it is so much more elegant than having to say:
>>
>>  $hash = array (
>>     'var1' => 'value',
>>     'var2' => 'value'
>>  );
>>  foo ($hash);
>>
>>  elegance is everything, man.
>>
>>  lux
>lux in latin means 'light' right? :) let me enlighten then :-P
>   foo ($hash = array('var1'=>'value', 'var2'=>'value'));
>should work.


And just to turn up the wattage a little further (hey, I work for the 
University of California whose motto is 'Fiat Lux', menaing either 
Lux drives an Italian car or 'Let there be light')...

You don't need the $hash in that function call unless you need to use 
it later on in your main program, so you can just say:

        foo (array('var1'=>'value', 'var2'=>'value'));

which is basically the same as the Perl or Ruby (??? never heard of 
that...) call above, with the addition of array(...). I use the

        function(array('param1'=>'value', ...))

syntax a lot instead of individual parameters in function calls. I 
don't have to remember function argument order that way.

        - steve




>Now, I don't undestand why exactly do you need references. By default
>everything is passed in a referenced manner, if I undestood correct the
>explanation Zeev wrote right after 4.0 was out, or so.
>
>Don't take references like something that will boost your skript speed
>to 200%.
>Use them only when you need them, and to find out when you actually need
>them
>check out an article on references at zend.com.
>
>Now, let me tell you that somehow I agreed with you :) cause I love
>Python way
>of dealing with arrays, but we are in PHP, so we have to figure PHP way,
>not
><your-fav-lang> way.
>
>ciao
>
>-- teodor


-- 
+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg                           University of California, Davis |
| [EMAIL PROTECTED]                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+-------------------------------------- FBI Special Agent Dale Cooper ---+




Thanks, just what I was looking for!

> Now, let me tell you that somehow I agreed with you :) cause I love
> 
> Python way
> 
> of dealing with arrays, but we are in PHP, so we have to figure PHP way,
> 
> not 
> 
> <your-fav-lang> way.

Let's make PHP our favourite language!  If another has a better feature, 
take it.

later,

Lux

> 
> 
> 
> ciao 
> 
> 
> 
> -- teodor


-- 

John Luxford
Simian Systems

w: www.simian.ca
e: [EMAIL PROTECTED]
p: 204.946.5955

--






> >   foo ($hash = array('var1'=>'value', 'var2'=>'value'));
> >should work.

> You don't need the $hash in that function call unless you need to use
> it later on in your main program, so you can just say:
> 
>         foo (array('var1'=>'value', 'var2'=>'value'));

that won't work (Lux's complaint) when foo() is declared function foo
(&$hash)
cause PHP cannot extract the reference of an array unbound to any PHP
variable.

There is only one exception, which is for objects created with new.

-- teodor




On Sunday 04 February 2001 20:09, Lux wrote:

> > Now, let me tell you that somehow I agreed with you :) cause I love
> > Python way
> > of dealing with arrays, but we are in PHP, so we have to figure PHP
> > way,

> Let's make PHP our favourite language!  If another has a better
> feature, take it.

But the feature is useless :)

Let me elaborate:

You declared your function as
 function foo (&$hash)

That is you take a reference to that parameter ($hash). That's only 
useful if you want to modify that parameter in such a way that the caller 
also notices that modification.
Now if you pass an anonymous array to the function, you could modify 
that, but after your function exits that array is automatically 
destroyed, before the caller can do anything with it.

So if you don't have a good reason to use a reference in that place (I 
very much assume you don't), use normal pass-by-value. In PHP4 that's 
just as fast as pass-by-reference (read 
http://www.zend.com/zend/art/ref-count.php)


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

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."

- Isaac Asimov




> But the feature is useless :)

Here, I removed the reference, so we can stop fussing over it (it wasn't the
question to begin with), and here's an example of a potential use for this
(a stupid example, but still...).  I'm not weighing out the benefits of
references, I'm striving to achieve the cleanest and most elegant code I
can, because the larger the project, the more code you have to read, and
the uglier it can get.

That's where a language like Ruby excels.  There's less syntactical crap,
it's very easy to read, and it's caused me to consider switching to eRuby
(like mod_perl, allows <% ruby this, ruby that %> in your html) because it
is structurally easier and more geared towards larger projects.

(that last statement will probably get me murdered on a PHP list)

But honestly, the only problem is finding a host running eRuby that I don't
have to maintain myself.  I'm lazy, after all.

later,

lux

<?php

    function a ($hash, $text = "") {
       $attr_text = "";
       while (list ($k, $v) = each ($hash)) {
          $attr_text .= " $k=\"$v\"";
       }
       return "<a$attr_text>$text</a>";
    }

    function img ($hash) {
       $attr_text = "";
       while (list ($k, $v) = each ($hash)) {
         $attr_text .= " $k=\"$v\"";
       }
       return "<img$attr_text />";
    }

    // works this way

    $attrs = array (
       "href" => "http://www.google.com/",
       "target" => "_blank"
    );
    echo a ($attrs, "Visit Google!");

    echo "\n\n";

    // also this way (thanx teodor!)

    echo a ($attrs = array (
         "href" => "http://www.google.com/",
         "target" => "_blank"
    ), "Visit Google!");

    // ideally, i'd like to say this though...
    // echo a (["href" => "http://www.google.com/", "target" => 
"_blank"], "Visit Google!");

    // what also doesn't work
    // echo a (array("href" => "http://www.google.com/", "target" => 
"_blank"), "Visit Google!");

    echo "\n\n";

    // another example

    echo a ($attrs = array ("href" => "http://www.google.com/"),
         img ($attrs = array (
             "src" => "http://www.google.com/images/title_homepage4.gif",
             "alt" => "Visit Google!",
             "border" => "0")
         )
    );

    /* now ideally, this could be written much more cleanly, perhaps...

    echo a(['href' => [http://www.google.com/'],
         img(['src' => 
'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit 
Google!', 'border' => '0'])
    );

    */

?>

-- 

John Luxford
Simian Systems

w: www.simian.ca
e: [EMAIL PROTECTED]
p: 204.946.5955

--





What's this ruby? Care to send the list a URL so we can go have a
look for ourselves?

Gfunk         -          http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.


----- Original Message -----
From: "Lux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 10:51 AM
Subject: Re: [PHP] Is this a missing feature?


> > But the feature is useless :)
>
> Here, I removed the reference, so we can stop fussing over it (it wasn't
the
> question to begin with), and here's an example of a potential use for this
> (a stupid example, but still...).  I'm not weighing out the benefits of
> references, I'm striving to achieve the cleanest and most elegant code I
> can, because the larger the project, the more code you have to read, and
> the uglier it can get.
>
> That's where a language like Ruby excels.  There's less syntactical crap,
> it's very easy to read, and it's caused me to consider switching to eRuby
> (like mod_perl, allows <% ruby this, ruby that %> in your html) because it
> is structurally easier and more geared towards larger projects.
>
> (that last statement will probably get me murdered on a PHP list)
>
> But honestly, the only problem is finding a host running eRuby that I
don't
> have to maintain myself.  I'm lazy, after all.
>
> later,
>
> lux
>
> <?php
>
>     function a ($hash, $text = "") {
>        $attr_text = "";
>        while (list ($k, $v) = each ($hash)) {
>           $attr_text .= " $k=\"$v\"";
>        }
>        return "<a$attr_text>$text</a>";
>     }
>
>     function img ($hash) {
>        $attr_text = "";
>        while (list ($k, $v) = each ($hash)) {
>          $attr_text .= " $k=\"$v\"";
>        }
>        return "<img$attr_text />";
>     }
>
>     // works this way
>
>     $attrs = array (
>        "href" => "http://www.google.com/",
>        "target" => "_blank"
>     );
>     echo a ($attrs, "Visit Google!");
>
>     echo "\n\n";
>
>     // also this way (thanx teodor!)
>
>     echo a ($attrs = array (
>          "href" => "http://www.google.com/",
>          "target" => "_blank"
>     ), "Visit Google!");
>
>     // ideally, i'd like to say this though...
>     // echo a (["href" => "http://www.google.com/", "target" =>
> "_blank"], "Visit Google!");
>
>     // what also doesn't work
>     // echo a (array("href" => "http://www.google.com/", "target" =>
> "_blank"), "Visit Google!");
>
>     echo "\n\n";
>
>     // another example
>
>     echo a ($attrs = array ("href" => "http://www.google.com/"),
>          img ($attrs = array (
>              "src" => "http://www.google.com/images/title_homepage4.gif",
>              "alt" => "Visit Google!",
>              "border" => "0")
>          )
>     );
>
>     /* now ideally, this could be written much more cleanly, perhaps...
>
>     echo a(['href' => [http://www.google.com/'],
>          img(['src' =>
> 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit
> Google!', 'border' => '0'])
>     );
>
>     */
>
> ?>
>
> --
>
> John Luxford
> Simian Systems
>
> w: www.simian.ca
> e: [EMAIL PROTECTED]
> p: 204.946.5955
>
> --
>
>
> --
> 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]
>





sure

here's the ruby page: http://www.ruby-lang.org/
here's another ruby site: http://www.rubycentral.com/

there's also a really good book you can find info about here:
http://pragmaticprogrammer.com/ruby/index.html

it's not really used much yet anywhere except japan, where it's
actually overtaken python in popularity!

later

lux

Josh G wrote:

> What's this ruby? Care to send the list a URL so we can go have a
> 
> look for ourselves?
> 
> 
> 
> Gfunk         -          http://www.gfunk007.com/
> 
> 
> 
> I sense much beer in you. Beer leads to intoxication, intoxication to
> 
> hangovers, and hangovers to... suffering.
> 
> 
> 
> 
> 
> ----- Original Message -----
> 
> From: "Lux" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, February 05, 2001 10:51 AM
> 
> Subject: Re: [PHP] Is this a missing feature?
> 
> 
> 
> 
> 
> 
>>> But the feature is useless :)
> 
>> 
>> Here, I removed the reference, so we can stop fussing over it (it wasn't
> 
> 
> the
> 
> 
>> question to begin with), and here's an example of a potential use for this
> 
>> (a stupid example, but still...).  I'm not weighing out the benefits of
> 
>> references, I'm striving to achieve the cleanest and most elegant code I
> 
>> can, because the larger the project, the more code you have to read, and
> 
>> the uglier it can get.
> 
>> 
> 
>> That's where a language like Ruby excels.  There's less syntactical crap,
> 
>> it's very easy to read, and it's caused me to consider switching to eRuby
> 
>> (like mod_perl, allows <% ruby this, ruby that %> in your html) because it
> 
>> is structurally easier and more geared towards larger projects.
> 
>> 
> 
>> (that last statement will probably get me murdered on a PHP list)
> 
>> 
> 
>> But honestly, the only problem is finding a host running eRuby that I
> 
> 
> don't
> 
> 
>> have to maintain myself.  I'm lazy, after all.
> 
>> 
> 
>> later,
> 
>> 
> 
>> lux
> 
>> 
> 
>> <?php
> 
>> 
> 
>>     function a ($hash, $text = "") {
> 
>>        $attr_text = "";
> 
>>        while (list ($k, $v) = each ($hash)) {
> 
>>           $attr_text .= " $k=\"$v\"";
> 
>>        }
> 
>>        return "<a$attr_text>$text</a>";
> 
>>     }
> 
>> 
> 
>>     function img ($hash) {
> 
>>        $attr_text = "";
> 
>>        while (list ($k, $v) = each ($hash)) {
> 
>>          $attr_text .= " $k=\"$v\"";
> 
>>        }
> 
>>        return "<img$attr_text />";
> 
>>     }
> 
>> 
> 
>>     // works this way
> 
>> 
> 
>>     $attrs = array (
> 
>>        "href" => "http://www.google.com/",
> 
>>        "target" => "_blank"
> 
>>     );
> 
>>     echo a ($attrs, "Visit Google!");
> 
>> 
> 
>>     echo "\n\n";
> 
>> 
> 
>>     // also this way (thanx teodor!)
> 
>> 
> 
>>     echo a ($attrs = array (
> 
>>          "href" => "http://www.google.com/",
> 
>>          "target" => "_blank"
> 
>>     ), "Visit Google!");
> 
>> 
> 
>>     // ideally, i'd like to say this though...
> 
>>     // echo a (["href" => "http://www.google.com/", "target" =>
>> "_blank"], "Visit Google!");
> 
>> 
> 
>>     // what also doesn't work
> 
>>     // echo a (array("href" => "http://www.google.com/", "target" =>
>> "_blank"), "Visit Google!");
> 
>> 
> 
>>     echo "\n\n";
> 
>> 
> 
>>     // another example
> 
>> 
> 
>>     echo a ($attrs = array ("href" => "http://www.google.com/"),
> 
>>          img ($attrs = array (
> 
>>              "src" => "http://www.google.com/images/title_homepage4.gif",
> 
>>              "alt" => "Visit Google!",
> 
>>              "border" => "0")
> 
>>          )
> 
>>     );
> 
>> 
> 
>>     /* now ideally, this could be written much more cleanly, perhaps...
> 
>> 
> 
>>     echo a(['href' => [http://www.google.com/'],
> 
>>          img(['src' =>
>> 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit
> 
>> Google!', 'border' => '0'])
> 
>>     );
> 
>> 
> 
>>     */
> 
>> 
> 
>> ?>
>> 
>> --
> 
>> 
> 
>> John Luxford
> 
>> Simian Systems
> 
>> 
> 
>> w: www.simian.ca
> 
>> e: [EMAIL PROTECTED]
> 
>> p: 204.946.5955
> 
>> 
> 
>> --
> 
>> 
> 
>> 
> 
>> --
> 
>> 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]
> 
>> 


-- 

John Luxford
Simian Systems

w: www.simian.ca
e: [EMAIL PROTECTED]
p: 204.946.5955

--





On Monday 05 February 2001 00:51, Lux wrote:
> > But the feature is useless :)

>     function a ($hash, $text = "") {
>        $attr_text = "";
>        while (list ($k, $v) = each ($hash)) {
>           $attr_text .= " $k=\"$v\"";
>        }
>        return "<a$attr_text>$text</a>";
>     }

>     // what also doesn't work
>     // echo a (array("href" => "http://www.google.com/", "target" =>
> "_blank"), "Visit Google!");

Works fine for me, sorry (php 4.0.4)


>     // another example
>
>     echo a ($attrs = array ("href" => "http://www.google.com/"),
>          img ($attrs = array (
>              "src" =>
> "http://www.google.com/images/title_homepage4.gif", "alt" => "Visit
> Google!",
>              "border" => "0")
>          )
>     );

works, rewritten to 
echo a (array ("href" => "http://www.google.com/"),
        img (array (
                    "src" => "http://www.google.com/images/title_homepage4.gif",
                    "alt" => "Visit Google!",
                    "border" => "0")
            )
       );


>     /* now ideally, this could be written much more cleanly, perhaps...
>
>     echo a(['href' => [http://www.google.com/'],
>          img(['src' =>
> 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit
> Google!', 'border' => '0'])
>     );
>
>     */


So it basically boils down to "array (a => b)" versus "[a => b]"
And I personally feel the array () notation is at least as nice as the [] 
one. Well, it's a matter of taste. But it certainly isn't harder to read, 
not detrimental on cleanness and elegance of the code.

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

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."

- Isaac Asimov




I should check my version then... =O)

lux

Christian Reiniger wrote:

> On Monday 05 February 2001 00:51, Lux wrote:
> 
> 
>>> But the feature is useless :)
> 
>> 
> 
>>     function a ($hash, $text = "") {
> 
>>        $attr_text = "";
> 
>>        while (list ($k, $v) = each ($hash)) {
> 
>>           $attr_text .= " $k=\"$v\"";
> 
>>        }
> 
>>        return "<a$attr_text>$text</a>";
> 
>>     }
> 
> 
> 
>>     // what also doesn't work
> 
>>     // echo a (array("href" => "http://www.google.com/", "target" =>
>> "_blank"), "Visit Google!");
> 
> 
> 
> Works fine for me, sorry (php 4.0.4)
> 
> 
> 
> 
> 
> 
>>     // another example
> 
>> 
> 
>>     echo a ($attrs = array ("href" => "http://www.google.com/"),
> 
>>          img ($attrs = array (
> 
>>              "src" =>
>> "http://www.google.com/images/title_homepage4.gif", "alt" => "Visit
> 
>> Google!",
> 
>>              "border" => "0")
> 
>>          )
> 
>>     );
> 
> 
> 
> works, rewritten to 
> 
> echo a (array ("href" => "http://www.google.com/"),
> 
>       img (array (
> 
>                   "src" => "http://www.google.com/images/title_homepage4.gif",
> 
>                   "alt" => "Visit Google!",
> 
>                   "border" => "0")
> 
>           )
> 
>        );
> 
> 
> 
> 
> 
> 
>>     /* now ideally, this could be written much more cleanly, perhaps...
> 
>> 
> 
>>     echo a(['href' => [http://www.google.com/'],
> 
>>          img(['src' =>
>> 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit
> 
>> Google!', 'border' => '0'])
> 
>>     );
> 
>> 
> 
>>     */
> 
> 
> 
> 
> So it basically boils down to "array (a => b)" versus "[a => b]"
> 
> And I personally feel the array () notation is at least as nice as the [] 
> 
> one. Well, it's a matter of taste. But it certainly isn't harder to read, 
> 
> not detrimental on cleanness and elegance of the code.


-- 

John Luxford
Simian Systems

w: www.simian.ca
e: [EMAIL PROTECTED]
p: 204.946.5955

--





I never wanted this question to be an offense for anyone. I thank you all
for your answers.

Regards
PHPLover

Lux <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> It's unlikely I suppose, but there's a must-have book you should look at
> if you want info on hacks, including browser hacks (Hacking Exposed:
> Network Security Secrets and Solutions, 2nd Edition).  The cookie hack
> that comes to mind only works in IE or MS products (but that's only
> what, 90% of the web), but all it is is a line or so of html code that
> somebody places on their site (say in an iframe...) that sends them all
> your cookie data (if the user uses outlook, they can also just place it
> in an email).  from there, they use the cookie data to pose as that
> person on various sites trying to gain sensitive info.  but if you're
> already giving them the password, how much more sensitive can you get?
>
> so really, if they don't close their browser for a while, this
> possibility increases.  and it may be a slim possibility, but it's
> better to be safe than sorry.
>
> later
>
> lux
>
> > Well .. I am ... nobody but the user itself can see the login and
password
> >
> > in the cookie. Unless it's on non-SSL connection and somebody is
> >
> > packet-shiffing around. Otherwise there would be no leak for somebody
else
> >
> > to get this information, is there?
> >
> > And if the user doesn't logout, the cookie is still destroyed when the
> >
> > browser is closed anyway.
> >
> >
> >
> > Eelco.
>
>
> --
>
> John Luxford
> Simian Systems
>
> w: www.simian.ca
> e: [EMAIL PROTECTED]
> p: 204.946.5955
>
> --
>
>
> --
> 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]
>






Thanks for your answerm but what does eregi_replace() do?

Regards


"Steve Werby" <[EMAIL PROTECTED]> wrote in message
045801c08e7f$3c4f61c0$6401a8c0@mobile">news:045801c08e7f$3c4f61c0$6401a8c0@mobile...
> "phpLover" <[EMAIL PROTECTED]> wrote:
> > I want to read an HTML page from another site and replace certain
> characters
> > with capital letters and show them in another dynamically generated web
> page
> > on my site. I know this is possible in Perl, but can this be done in
PHP?
> If
> > yes, then how?
>
> It's definitely possible in PHP.  I've done it.  You probably want to use
a
> combination of fopen() and other file handling functions, eregi_replace()
> and str_replace().
>
> --
> Steve Werby
> COO
> 24-7 Computer Services, LLC
> Tel: 804.817.2470
> http://www.247computing.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]
>






"phpLover" <[EMAIL PROTECTED]> wrote:
> Thanks for your answerm but what does eregi_replace() do?

Short answer is to see
http://www.php.net/manual/en/function.eregi-replace.php.  Usage examples can
be found right on php.net.  See longer answer below.

Previously "phpLover" <[EMAIL PROTECTED]> wrote:
> I want to read an HTML page from another site and replace certain
> characters
> with capital letters and show them in another dynamically generated web
> page on my site.

I should have said use ereg_replace().  It matches text using regular
expressions (regular expressions allow for complex matching) in a
case-sensitive manner.  Depending on the specifics of what you're attempting
it may be of use.  You could use it to replace certain characters within a
specific part of the HTML source page (but ignore the same characters within
other parts of the page) with capital letters (like you described).  If you
simply want to replace all matches within the page str_replace() is a better
choice.  Regular expressions are a more difficult concept to master than a
lot of other concepts within PHP so you may want to look at some tutorials
or books on the subject.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





On Sunday 04 February 2001 19:23, phpLover wrote:
> Thanks for your answerm but what does eregi_replace() do?

Exactly the thing that's written in the documentation for it :)

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

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."

- Isaac Asimov




I'm going to be trying to connect to the native DB2 database in a AS/400
So far thats all I know about the IBM side.

Can someone give me a short update on what options I have ?

TIA !!!

-pete




There's been a lot of talk about this recently.  Check the archives for the
last 2 months, and PHPBuilder.com

Last I heard, you needed DRDA(DB2 Connect) installed, as well as
the runtime client.

Also on the client - DB2 Application Development package.  Use this to
compile PHP --with-ibm-db2=<path>.  Make sure you run the CATALOG
commands on the client so that it can find the AS400 database.

'Luck!

-Szii

At 10:41 AM 2/4/2001 -0800, Pete Lancashire wrote:
>I'm going to be trying to connect to the native DB2 database in a AS/400
>So far thats all I know about the IBM side.
>
>Can someone give me a short update on what options I have ?
>
>TIA !!!
>
>-pete
>
>-- 
>PHP Database 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]
>




Where can I find some info on parsing XML with PHP?
I am not looking for functions, but examples and explanations !

Thx





phpbuilder.com - there are a few articles on the site about XML

--Joe

On Sun, Feb 04, 2001 at 05:02:43PM +0100, Steve Haemelinck wrote:
> Where can I find some info on parsing XML with PHP?
> I am not looking for functions, but examples and explanations !
> 
> Thx
> 
> 
> -- 
> 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]

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------





Hi,

I am selecting data using the below and trying to insert it into a mail, it 
does everything except send the data selected, anyone have an idea?

$SQLStatement = "SELECT * FROM Orders Where Status='N' Order by OrderID";
$SQLConn = mysql_connect($host, $user, $pass);
$db = mysql_select_db($dbase, $SQLConn);
$SQLResult = mysql_query($SQLStatement);
$num_rows=mysql_num_rows($SQLResult);

for ($i=0; $i<$num_rows; $i++)
 {
mysql_data_seek($SQLResult, $i);
  $array=mysql_fetch_array($SQLResult);
$content=printf("First Name: %s\nLast Name: %s\n",$array['FirstName'], 
$array['LastName']);
}
mail($MAIL, "Order", $content , "From:[EMAIL PROTECTED]");

I know it is working to a degree because it prints out the data on the 
resulting page and sends a blank email, it just doesn`t put it in the email.

TIA
Ade




On Sunday 04 February 2001 21:31, [EMAIL PROTECTED] wrote:

> for ($i=0; $i<$num_rows; $i++)
>  {
> mysql_data_seek($SQLResult, $i);
>   $array=mysql_fetch_array($SQLResult);
> $content=printf("First Name: %s\nLast Name: %s\n",$array['FirstName'],

Re-read the documentation for "printf". You want to use sprintf() here.

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

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."

- Isaac Asimov




On Mon,  5 Feb 2001 07:01, [EMAIL PROTECTED] wrote:
> Hi,
>
> I am selecting data using the below and trying to insert it into a mail,
> it does everything except send the data selected, anyone have an idea?
>
> $SQLStatement = "SELECT * FROM Orders Where Status='N' Order by OrderID";
> $SQLConn = mysql_connect($host, $user, $pass);
> $db = mysql_select_db($dbase, $SQLConn);
> $SQLResult = mysql_query($SQLStatement);
> $num_rows=mysql_num_rows($SQLResult);
>
> for ($i=0; $i<$num_rows; $i++)
>  {
> mysql_data_seek($SQLResult, $i);
>   $array=mysql_fetch_array($SQLResult);
> $content=printf("First Name: %s\nLast Name: %s\n",$array['FirstName'],
> $array['LastName']);
> }
> mail($MAIL, "Order", $content , "From:[EMAIL PROTECTED]");
>
> I know it is working to a degree because it prints out the data on the
> resulting page and sends a blank email, it just doesn`t put it in the
> email.
>
> TIA
> Ade

I think your logic is wrong here, if you are trying to send one email with 
all the results from the DB query in it.

Each time you run through the for loop, you are assigning a new value to 
$contents, rather than appending new information to it. I think you need

$content .= printf(blah blah);

or without the printf complexity

$content .= "First Name: " . $array["FirstName"] . "\nLast Name: " . 
$array["LastName"] . "\n";

You'ld need to ensure $content is empty before starting the for loop, of 
course.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Ade,

You can try something like this:

while (list($column_name,  $row_value) = each($row)) {
echo "$column_name,$row_value <br>" ;
}
// loop thru each row and get an array of values for each row, listing them
// as name:value pairs

the above would be for mysql_fetch_array($array, MYSQL_ASSOC)
for other array elements such as MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH.
see: http://www.php.net/manual/en/function.mysql-fetch-array.php

Best regards,
Andrew
---------------------------------------
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.com




On 2/4/01 9:01 PM, "David Robley" <[EMAIL PROTECTED]>
wrote:

> On Mon,  5 Feb 2001 07:01, [EMAIL PROTECTED] wrote:
>> Hi,
>> 
>> I am selecting data using the below and trying to insert it into a mail,
>> it does everything except send the data selected, anyone have an idea?
>> 
>> $SQLStatement = "SELECT * FROM Orders Where Status='N' Order by OrderID";
>> $SQLConn = mysql_connect($host, $user, $pass);
>> $db = mysql_select_db($dbase, $SQLConn);
>> $SQLResult = mysql_query($SQLStatement);
>> $num_rows=mysql_num_rows($SQLResult);
>> 
>> for ($i=0; $i<$num_rows; $i++)
>>  {
>> mysql_data_seek($SQLResult, $i);
>>   $array=mysql_fetch_array($SQLResult);
>> $content=printf("First Name: %s\nLast Name: %s\n",$array['FirstName'],
>> $array['LastName']);
>> }
>> mail($MAIL, "Order", $content , "From:[EMAIL PROTECTED]");
>> 
>> I know it is working to a degree because it prints out the data on the
>> resulting page and sends a blank email, it just doesn`t put it in the
>> email.
>> 
>> TIA
>> Ade
> 
> I think your logic is wrong here, if you are trying to send one email with
> all the results from the DB query in it.
> 
> Each time you run through the for loop, you are assigning a new value to
> $contents, rather than appending new information to it. I think you need
> 
> $content .= printf(blah blah);
> 
> or without the printf complexity
> 
> $content .= "First Name: " . $array["FirstName"] . "\nLast Name: " .
> $array["LastName"] . "\n";
> 
> You'ld need to ensure $content is empty before starting the for loop, of
> course.





Hello!

I'm trying to configure PHP with Verisign PayFlow PRO support on my server.
I'm running FreeBSD 4, Apache 1.3.12, mod_ssl, openSSL, and mySQL 3.23.32.

I downloaded the newest release of PHP (4.0.4pl2) and tried compiling it,
using the ./configure --with-pfpro=[dir] thing and I get the following
error:

/usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
`pthread_mutex_unlock'
/usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
`pthread_self'
/usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
`pthread_mutex_destroy'
/usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
`pthread_mutex_lock'
/usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
`pthread_mutex_init'

I've never done anything like this before, so I'm not really sure what's
goin' on.

Any insight into the problem would be greatly appreciated!

Thanks!

-brady

--
Brady J. Horenstein
[EMAIL PROTECTED]






Brady-

Regardless of your compilation problems, Verisign has not yet released their
fixed SDK for BSD. They've only released it for Linux (libc5 & glibc2) and
Solaris. You're kind of SOL until they do. See the user comments on
www.php.net/pfpro for why you're SOL.

John

On Sun, 4 Feb 2001, Brady J. Horenstein wrote:

> Hello!
> 
> I'm trying to configure PHP with Verisign PayFlow PRO support on my server.
> I'm running FreeBSD 4, Apache 1.3.12, mod_ssl, openSSL, and mySQL 3.23.32.
> 
> I downloaded the newest release of PHP (4.0.4pl2) and tried compiling it,
> using the ./configure --with-pfpro=[dir] thing and I get the following
> error:
> 
> /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
> `pthread_mutex_unlock'
> /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
> `pthread_self'
> /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
> `pthread_mutex_destroy'
> /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
> `pthread_mutex_lock'
> /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to
> `pthread_mutex_init'
> 
> I've never done anything like this before, so I'm not really sure what's
> goin' on.
> 
> Any insight into the problem would be greatly appreciated!
> 
> Thanks!
> 
> -brady
> 
> --
> Brady J. Horenstein
> [EMAIL PROTECTED]
> 
> 
> 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD





No need to get upset :) just stating MHO (nothing personal).

In your own words you say : "People have taken a chance with me"
and that's really what they did. Cause you know what happens to
backup plans that don't have backup plans that don't...

I'm assuming that there may be an audience for this kind of hosting
but personally I wouldn't host my site under such circumstances.

Prices are so cheep today and you can get so much for so less with
many ISP's that have a department of people running the show.

As for the Service, well, if you chose a company and don't like the service
you can always go somewhere else. Most companies that I worked with
gave amazing service.

Today I work with PhenomiNET and the service is simply amazing.
you can look at what they offer here :

http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm

This is your one stop shop for hosting. WeberDev.com is hosted there
and I can tell you that their service is amazing. They are fast, reliable
and more than anything, very professional (specially in PHP / MySQL).

Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-----Original Message-----
From: Robert Covell [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 03, 2001 10:40 PM
To: Boaz Yahav; Ben Peter; Chris Mason
Cc: Php-General
Subject: RE: [PHP] PHP hosting - the final frontier.


I shouldn't even reply to this...

Yes I would host with me.

Have you ever heard of a backup plan.  People that would step in if
something happens to me?  People that I trust to keep the company going if
it fails.

With all due respect, how do people host with a company that doesn't give a
rats ass about them or their business.  How many big companies redirect your
call, or brush you away when problems occur.  I been over backwards for my
clients.  Providing better service then many of the bigger companies out
there.  That is why people do and will continue to host with me.  Like I
said, I plan on hiring people in the near future.  Things take time to
evolve.

I am not saying that my company is for everyone.  If you don't like a one
man shop then don't go there.  People have taken a chance with me and have
not been disappointed like so many times before.

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-----Original Message-----
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 03, 2001 1:38 PM
To: 'Robert Covell'; Ben Peter; Chris Mason
Cc: Php-General
Subject: RE: [PHP] PHP hosting - the final frontier.


And if, God forbid, something was to happen to you...
120 People / Companies would be left with a server
that no one knows the root password too?

With all due respect, how can someone in his
right mind host with a one man gang company?

For all I know you can be a hosting genius and
give the best service around  but you are still one
man.

Would you host with you ? :)

Sincerely

      berber

Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.


-----Original Message-----
From: Robert Covell [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 03, 2001 9:16 PM
To: Ben Peter; Chris Mason
Cc: Php-General
Subject: RE: [PHP] PHP hosting - the final frontier.


I am going to have to disagree on this one.

I run a successful (and profitable) hosting company(http://www.rolet.com).
My employees total 1 (me, myself and I).  The number of clients hosted is
roughly 120.  I provide a wide variety of services on Linux, FreeBSD, NT,
and W2K.  Yes it is hard to believe that 1 person can be available 24x7, or
not take vacations, but this is what I do and LOVE every second of it.  I
value customer satisfaction and strive to provide that best Internet
services possible.  For me this is a career for life, not just a job.  So I
do believe that 1 person can be available 24x7 and not take vacations.
Don't get me wrong, some days it is tough.  I would like to have other
employees in the future, but don't mind the sacrifices taken to get there.

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ben Peter
Sent: Saturday, February 03, 2001 11:59 AM
To: Chris Mason
Cc: Php-General
Subject: Re: [PHP] PHP hosting - the final frontier.


Chris,

This all sounds good but for one thing: I firmly believe that one man
with a root password is not enogh to look after even one client. I have
hosted with 3 one-man-companies, and it always came to the point where I
couldn't reach someone for a week, or I waited for 3 months, only to be
granted connect privileges to the mysql database - no offense meant! I
think it's just too much for one man, you cannot be available 24/7, and
you will want holidays.

Still, a PHP-specialized hosting environment would be worth much.

Cheers,
Ben

Chris Mason wrote:
>
> I see a lot of traffic regarding php hosting. From experience I know that
> the general hosting companies provide a minimal PHP environment which is
> often insufficient for PHP developers.
> With this in mind, I'm considering offering specialized hosting for PHP
> projects.
>
> The server will be tuned to the needs of PHP projects, and will have the
> latest PHP4 and mySQL versions, up to date XML libraries, IMAP and POP,
and
> will run php as a apache module for performance. The server will have a
low
> user count and I will offer migration alternatives as user's needs grow.
The
> machines will be hosted at a major data center with multiple large
internet
> feeds, and all the other essential requirements.
>
> I plan to be available to users to assist in configuration problems and
will
> stay abreast of developments in PHP to make our projects run faster and
> better.
>
> I'd like to hear from people interested in participating or with
> configuration suggestions. I'm not looking to start a large hosting
company
> but to be a specialized service provider on a small scale.
>
> Let me know what you think, guys.
>
> Chris Mason
> Box 340, The Valley, Anguilla, British West Indies
> Tel: 264 497 5670 Fax: 264 497 8463
> USA Fax (561) 382-7771
> Take a virtual tour of the island
> http://net.ai/ The Anguilla Guide
> Find out more about NetConcepts
> www.netconcepts.ai
> Talk to me in real time with Instant Messenger: [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]




I understand your concerns, but with this type of logic this mailing list
not not be around.  Niether would Linux, Apache, MySql or anyother open
source tool that so many people utilize today.  We would all be on NT
instead of Linux and using IIS with ASP instead of PHP.  Do think Ramsus
when he started out on PHP/FI was thinking I am only one person I shouldn't
even try to make it because the big guys are more reliable.  Or Linus
thought the same thing when he made his first kernel.  I really doubt it,
and neither did I when I decided to take a chance learn PHP/FI on Linux
using Apache about 5 years ago.  Look at where they are today and the
bazillion people who rely on the tools that one or two people took the time
and a chance on developing.

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

----- Original Message -----
From: "Boaz Yahav" <[EMAIL PROTECTED]>
To: "'Robert Covell'" <[EMAIL PROTECTED]>; "Boaz Yahav"
<[EMAIL PROTECTED]>; "Ben Peter" <[EMAIL PROTECTED]>; "Chris Mason"
<[EMAIL PROTECTED]>
Cc: "Php-General" <[EMAIL PROTECTED]>
Sent: Sunday, February 04, 2001 3:29 PM
Subject: RE: [PHP] PHP hosting - the final frontier.


> No need to get upset :) just stating MHO (nothing personal).
>
> In your own words you say : "People have taken a chance with me"
> and that's really what they did. Cause you know what happens to
> backup plans that don't have backup plans that don't...
>
> I'm assuming that there may be an audience for this kind of hosting
> but personally I wouldn't host my site under such circumstances.
>
> Prices are so cheep today and you can get so much for so less with
> many ISP's that have a department of people running the show.
>
> As for the Service, well, if you chose a company and don't like the
service
> you can always go somewhere else. Most companies that I worked with
> gave amazing service.
>
> Today I work with PhenomiNET and the service is simply amazing.
> you can look at what they offer here :
>
> http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm
>
> This is your one stop shop for hosting. WeberDev.com is hosted there
> and I can tell you that their service is amazing. They are fast, reliable
> and more than anything, very professional (specially in PHP / MySQL).
>
> Sincerely
>
>       berber
>
> Visit http://www.weberdev.com Today!!!
> To see where PHP might take you tomorrow.
>
>
> -----Original Message-----
> From: Robert Covell [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 03, 2001 10:40 PM
> To: Boaz Yahav; Ben Peter; Chris Mason
> Cc: Php-General
> Subject: RE: [PHP] PHP hosting - the final frontier.
>
>
> I shouldn't even reply to this...
>
> Yes I would host with me.
>
> Have you ever heard of a backup plan.  People that would step in if
> something happens to me?  People that I trust to keep the company going if
> it fails.
>
> With all due respect, how do people host with a company that doesn't give
a
> rats ass about them or their business.  How many big companies redirect
your
> call, or brush you away when problems occur.  I been over backwards for my
> clients.  Providing better service then many of the bigger companies out
> there.  That is why people do and will continue to host with me.  Like I
> said, I plan on hiring people in the near future.  Things take time to
> evolve.
>
> I am not saying that my company is for everyone.  If you don't like a one
> man shop then don't go there.  People have taken a chance with me and have
> not been disappointed like so many times before.
>
> Sincerely,
>
> Robert T. Covell
> President / Owner
> Rolet Internet Services, LLC
> Web: www.rolet.com
> Email: [EMAIL PROTECTED]
> Phone: 816.210.7145
> Fax: 816.753.1952
>
> -----Original Message-----
> From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 03, 2001 1:38 PM
> To: 'Robert Covell'; Ben Peter; Chris Mason
> Cc: Php-General
> Subject: RE: [PHP] PHP hosting - the final frontier.
>
>
> And if, God forbid, something was to happen to you...
> 120 People / Companies would be left with a server
> that no one knows the root password too?
>
> With all due respect, how can someone in his
> right mind host with a one man gang company?
>
> For all I know you can be a hosting genius and
> give the best service around  but you are still one
> man.
>
> Would you host with you ? :)
>
> Sincerely
>
>       berber
>
> Visit http://www.weberdev.com Today!!!
> To see where PHP might take you tomorrow.
>
>
> -----Original Message-----
> From: Robert Covell [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 03, 2001 9:16 PM
> To: Ben Peter; Chris Mason
> Cc: Php-General
> Subject: RE: [PHP] PHP hosting - the final frontier.
>
>
> I am going to have to disagree on this one.
>
> I run a successful (and profitable) hosting company(http://www.rolet.com).
> My employees total 1 (me, myself and I).  The number of clients hosted is
> roughly 120.  I provide a wide variety of services on Linux, FreeBSD, NT,
> and W2K.  Yes it is hard to believe that 1 person can be available 24x7,
or
> not take vacations, but this is what I do and LOVE every second of it.  I
> value customer satisfaction and strive to provide that best Internet
> services possible.  For me this is a career for life, not just a job.  So
I
> do believe that 1 person can be available 24x7 and not take vacations.
> Don't get me wrong, some days it is tough.  I would like to have other
> employees in the future, but don't mind the sacrifices taken to get there.
>
> Sincerely,
>
> Robert T. Covell
> President / Owner
> Rolet Internet Services, LLC
> Web: www.rolet.com
> Email: [EMAIL PROTECTED]
> Phone: 816.210.7145
> Fax: 816.753.1952
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ben Peter
> Sent: Saturday, February 03, 2001 11:59 AM
> To: Chris Mason
> Cc: Php-General
> Subject: Re: [PHP] PHP hosting - the final frontier.
>
>
> Chris,
>
> This all sounds good but for one thing: I firmly believe that one man
> with a root password is not enogh to look after even one client. I have
> hosted with 3 one-man-companies, and it always came to the point where I
> couldn't reach someone for a week, or I waited for 3 months, only to be
> granted connect privileges to the mysql database - no offense meant! I
> think it's just too much for one man, you cannot be available 24/7, and
> you will want holidays.
>
> Still, a PHP-specialized hosting environment would be worth much.
>
> Cheers,
> Ben
>
> Chris Mason wrote:
> >
> > I see a lot of traffic regarding php hosting. From experience I know
that
> > the general hosting companies provide a minimal PHP environment which is
> > often insufficient for PHP developers.
> > With this in mind, I'm considering offering specialized hosting for PHP
> > projects.
> >
> > The server will be tuned to the needs of PHP projects, and will have the
> > latest PHP4 and mySQL versions, up to date XML libraries, IMAP and POP,
> and
> > will run php as a apache module for performance. The server will have a
> low
> > user count and I will offer migration alternatives as user's needs grow.
> The
> > machines will be hosted at a major data center with multiple large
> internet
> > feeds, and all the other essential requirements.
> >
> > I plan to be available to users to assist in configuration problems and
> will
> > stay abreast of developments in PHP to make our projects run faster and
> > better.
> >
> > I'd like to hear from people interested in participating or with
> > configuration suggestions. I'm not looking to start a large hosting
> company
> > but to be a specialized service provider on a small scale.
> >
> > Let me know what you think, guys.
> >
> > Chris Mason
> > Box 340, The Valley, Anguilla, British West Indies
> > Tel: 264 497 5670 Fax: 264 497 8463
> > USA Fax (561) 382-7771
> > Take a virtual tour of the island
> > http://net.ai/ The Anguilla Guide
> > Find out more about NetConcepts
> > www.netconcepts.ai
> > Talk to me in real time with Instant Messenger: [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]
>





On Sunday 04 February 2001 23:18, Robert Covell wrote:
> I understand your concerns, but with this type of logic this mailing
> list not not be around.  Niether would Linux, Apache, MySql or anyother
> open source tool that so many people utilize today.  We would all be on
> NT instead of Linux and using IIS with ASP instead of PHP.  Do think
> Ramsus when he started out on PHP/FI was thinking I am only one person
> I shouldn't even try to make it because the big guys are more reliable.

That's comparing apples to oranges. If all of Rasmus's computers fail 
while he's on holiday for 3 weeks, who cares? (Sorry Rasmus :)
If some machine at a hosting company shows glitches while the only admin 
is sick, things will be very bad for the hosted people/companies.

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

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."

- Isaac Asimov




I agree, point taken...

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952


----- Original Message ----- 
From: "Christian Reiniger" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Sunday, February 04, 2001 4:37 PM
Subject: Re: [PHP] PHP hosting - the final frontier.


On Sunday 04 February 2001 23:18, Robert Covell wrote:
> I understand your concerns, but with this type of logic this mailing
> list not not be around.  Niether would Linux, Apache, MySql or anyother
> open source tool that so many people utilize today.  We would all be on
> NT instead of Linux and using IIS with ASP instead of PHP.  Do think
> Ramsus when he started out on PHP/FI was thinking I am only one person
> I shouldn't even try to make it because the big guys are more reliable.

That's comparing apples to oranges. If all of Rasmus's computers fail 
while he's on holiday for 3 weeks, who cares? (Sorry Rasmus :)
If some machine at a hosting company shows glitches while the only admin 
is sick, things will be very bad for the hosted people/companies.

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

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."

- Isaac Asimov

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







[script at end]

Does it seem strange that although object members can
store functions, they can't be used as methods?

That is, we can have
  $TestObject->mTestMember = create_function('','echo "TestMember<br>";');
but we can't do
  $TestObject->mTestMember();

Can I get around this using clever placement of {}'s or ()'s?
Or do I have to make two separate calls, such as
  $temp = $TestObject->mTestMember;
  $temp();

At first glance, it seems like a parser problem.
But I couldn't get it to go away by placing ()'s
and {}'s...  Perhaps I wasn't being clever enough.

Can anyone help?  It seems odd that accessing members
as methods wouldn't be allowed, but variable functions
(http://www.php.net/manual/en/functions.variable-functions.php PHP Manual, Chap 12)
would be.

On the other hand, it's not safe to willy-nilly be
introducing methods to a class.  But then again,
I can still do
  $TestObject->mPreviouslyUndeclaredMember = 'Huh?';
so, I don't buy this line of reasoning.

Bug or language feature or other?

Thanks,
TSB


Here's a script which illustrates this problem...
<?php
class TestClass {
  function TestMethod() {
    echo "TestMethod<br>";
  }

  function Init() {
    $this->mTestMember = create_function('','echo "TestMember<br>";');
  }

  var $mTestMember;
}

$Tc = new TestClass;

//case 1: works (standard method invocation)
$Tc->TestMethod();

$Tc->Init();

//case 2: doesn't work (member as method)
//$Tc->mTestMember(); //doesn't work

//case 3: works (two-step)
$holder = $Tc->mTestMember;
$holder();

?>







What would your advice be for learning MySQL with PHP on an 
Apache server? I know a little Perl and am beginning to learn PHP.
I'm more of a designer than a programmer (not enough geek genes). 
I went through the tutorial at WebMonkey and have it all installed
and working, but the tutorial isn't able to go in depth about the 
basic functions of MySQL. Is this something better learned from
a book? Suggestions for books and/or tutorials online would be
appreciated.
Jeff Oien, WebDesigns 
http://www.webdesigns1.com/




On Sun, Feb 04, 2001 at 05:06:02PM -0600, Jeff Oien wrote:
> What would your advice be for learning MySQL with PHP on an 
> Apache server? I know a little Perl and am beginning to learn PHP.
> I'm more of a designer than a programmer (not enough geek genes). 
> I went through the tutorial at WebMonkey and have it all installed
> and working, but the tutorial isn't able to go in depth about the 
> basic functions of MySQL. Is this something better learned from
> a book? Suggestions for books and/or tutorials online would be
> appreciated.

Read the book from Paul DuBois about MySQL. You can find this book at the
end of http://php.net/books.php

-Egon

-- 
http://www.linuxtag.de/
http://php.net/books.php 
http://www.concert-band.de/
http://www.php-buch.de/




I agree. It's a great reference & learning guide, but you _have_ to be
patient and not skip around too much with it or it'll be quite
intimidating.

--Toby

[EMAIL PROTECTED] wrote:
> 
> On Sun, Feb 04, 2001 at 05:06:02PM -0600, Jeff Oien wrote:
> > What would your advice be for learning MySQL with PHP on an
> > Apache server? I know a little Perl and am beginning to learn PHP.
> > I'm more of a designer than a programmer (not enough geek genes).
> > I went through the tutorial at WebMonkey and have it all installed
> > and working, but the tutorial isn't able to go in depth about the
> > basic functions of MySQL. Is this something better learned from
> > a book? Suggestions for books and/or tutorials online would be
> > appreciated.
> 
> Read the book from Paul DuBois about MySQL. You can find this book at the
> end of http://php.net/books.php
> 
> -Egon
> 
> --
> http://www.linuxtag.de/
> http://php.net/books.php
> http://www.concert-band.de/
> http://www.php-buch.de/
> 
> --
> 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]




Hi, can anyone point me towards an easy way to generate forms to update a
mysql database?

I've seen some sites where I can specify a list of table fields and the
datatype for each, and get an output of:

1. the sql to create the table
2. a php form that can be used to update the table

problem is I can't find the site now :)

has anyone else found this?

Regards,
jaxon





Hello,

How can i upload a file from a client to server ? I tryed copy() but it
doesint works.

Paul





I don't mean to bash php in any way (as in the Ruby plugs in my last 
post).  I use it because it has so many advantages over other more 
system-oriented not web-oriented languages for this type of work.  It's 
fantastic.

I see so much enthusiasm on the web for this language, a significant 
codebase, feature list (I'm not sure, but does ASP generate SWF files, 
PDF files, support IMAP, etc), and it has a lot of great developers 
dedicated to it.  But we need to be constantly self-critical, or we 
won't see areas we can improve in.

I also feel it's good to know more than one language, so you get more 
than one approach and you're more adaptable to situations that PHP (or 
whatever your language of choice may be) can't work in.

(And I'm far too opinionated for my own good)

later

Lux

-- 

John Luxford
Simian Systems

w: www.simian.ca
e: [EMAIL PROTECTED]
p: 204.946.5955

--







Lux wrote:

> I don't mean to bash php in any way (as in the Ruby plugs in my last
> post).  I use it because it has so many advantages over other more
> system-oriented not web-oriented languages for this type of work.  It's
> fantastic.
>

Yes it is.  :)

>
> I see so much enthusiasm on the web for this language, a significant
> codebase, feature list (I'm not sure, but does ASP generate SWF files,
> PDF files, support IMAP, etc), and it has a lot of great developers
> dedicated to it.

To be fair, PHP doesn't either.  You have to get the packages, compile them,

and dl() or compile them into your PHP.  Most, if not all, of the
capabilities
of PHP can be had in ASP, through third party objects.  Major problem is
cost for most people.


> But we need to be constantly self-critical, or we
> won't see areas we can improve in.
>
> I also feel it's good to know more than one language, so you get more
> than one approach and you're more adaptable to situations that PHP (or
> whatever your language of choice may be) can't work in.
>

WRT web programming, there's probably very little that PHP *can't* do,
but your point is still well taken.

>
> (And I'm far too opinionated for my own good)

No problem.  :)

Speaking of "other languages" - anyone have any input or comments on REBOL?






> I don't mean to bash php in any way (as in the Ruby plugs in my last 
> post).  I use it because it has so many advantages over other more 
> system-oriented not web-oriented languages for this type of work.  It's 
> fantastic.

I don't think anyone will take offense to your mentioning the advantages
of another language (especially another open source language).  PHP
definately has it's worts and there's no point in sticking our heads in
the sand and pretending they are not there.

> I see so much enthusiasm on the web for this language, a significant 
> codebase, feature list (I'm not sure, but does ASP generate SWF files, 
> PDF files, support IMAP, etc), and it has a lot of great developers 
> dedicated to it.  But we need to be constantly self-critical, or we 
> won't see areas we can improve in.

Exactly.  If the volume of this list is any indicator, I'd say PHP has
grown quite a bit in the past six months.
 
> I also feel it's good to know more than one language, so you get more 
> than one approach and you're more adaptable to situations that PHP (or 
> whatever your language of choice may be) can't work in.

Definately.  Knowing Java or C will change the way your write code in Perl
or PHP (and vice versa).  I've written code in everything from ASM to toy
scripting languages (by "toy scripting languages", I mean the small
embedded scripting languages found in some applications - not PHP) and I'm
a better programmer because of it.

(Ruby does look very cool...I need to pick up the "Pragmatic Programmers
Guide to Ruby" - the guys that wrote it also wrote "The Pragmatic
Programmer" which is a great book.)


Regards,

Sean







Wen Ni Leong wrote:
> 
> Can you please explain more detail because I'm new in Javascript and
> PHP?  How should I write my coding in order to target the parent
> window?  I am trying so many ways but I'm still can't manage to do it.
> 
> Please help me again.
> 
> This is in Parent window.  The delete buttons are looping buttons.
> 
> #### Delete button in parent window########
>       print "<TD><input name=\"delbutton$count\" type=\"button\"
> value=\"del\"
> 
>onclick=\"NewWin=window.open('URL?count=$count&doc_var=$doc_var&doc_no=$doc_no&doc_rev=$doc_rev&flow_no=$flow_no','NewWin','toolbar=no,status=no,scrollbars=yes,width=400,height=200')\"></TD>\n";
> 
> #########################
> In child window have two delete buttons:
> 
> ###############################
> function delopt()
> ###############################
> {
> global $h,$newbutton,$doc_var,$count,$doc_no,$doc_rev,$flow_no;
> 
> $db = mysql_select_db("tkenet_db");
> 
> print "<HTML>
>          <HEAD>
>             <TITLE>PMP Document Approval</TITLE>
>          </HEAD>
>          <BODY background=images/bg_tkenet.gif >\n";
>   print "<SCRIPT LANGUAGE =\"JavaScript\"> \n";
>          print "function confirm_del()
>            {
>              if(confirm('Are you sure you want to delete!'))
>                {self.location.href=\"URL\"}
>            else
>              {return false;}
> 
>             }\n";
> print "</SCRIPT>\n";
> 
>         print" <form method=\"Post\" name=\"deleteform\"
> action=\"newwin.php\" onSubmit=\"return confirm_del(); window.close\">
>          <center>
>          <H1>Delete Option</H1>
>          </center>
>          <UL>
>            <LI>Delete Link = Delete the document number in the textbox
>            <LI>Delete All = Delete the document number in all tables
>          </UL>
>          <center>
>          <input name=\"newbutton\" type=\"submit\" value=\"Delete
> Link\">
>          <input name=\"newbutton\" type=\"submit\" value=\"Delete All\">
>          </center>
>          <INPUT TYPE=hidden NAME=\"doc_no\" VALUE=\"$doc_no\">
>            <INPUT TYPE=hidden NAME=\"doc_rev\" VALUE=\"$doc_rev\">
>            <INPUT TYPE=hidden NAME=\"flow_no\" VALUE=\"$flow_no\">
>          <INPUT TYPE=hidden NAME=\"doc_var\" VALUE=\"$doc_var\">
>            <INPUT TYPE=hidden NAME=\"count\" VALUE=\"$count\">
> 
> </center></form></body>
> </HTML>\n";
> }
> 
> ####################################################################
> 
> John Luxford wrote:
> >
> > Could you not just set the target in the new window form to the name of
> > the parent window, and use an onsubmit="window.close ()" to lose the
> > popup as well?
> >
> > Lux
> >
> > Wen Ni Leong wrote:
> >
> > > I am not sure whether this is related to PHP.  I'm using PHP and
> > >
> > > Javascript to do my program.
> > >
> > > I have some problem with my reloading parent window.
> > >
> > >
> > >
> > > In my program, I have a delete button which will pop up a child window
> > >
> > > once the user clicked the button.  In the child window will have two
> > >
> > > option of delete buttons.
> > >
> > > Once the user clicked either one button, i want the child window to be
> > >
> > > close and at the same time the parent window will reload.  How should I
> > >
> > > do this.
> > >
> > > Please give some advise or tips to me.
> > >
> > >
> > >
> > > thanks.




Ok, well from the looks of it I've got it working, thanks to whoever 
pointed out the conf.php.net archive of the slideshow.  The sample files 
from that slide work fine, but I can't get any of the other samples I've 
snagged to work.  Maybe they're what's broken, but I don't see how.

Now that that's over with, can anybody point me towards a good tutorial 
on XSLT with PHP?

                - Theo

Rasmus Lerdorf wrote:

> Go to conf.php.net and read through the Linuxcare LWE Booth talk
> presentation.  There is an XSLT slide in there.
> 
> -Rasmus
> 
> On Sat, 3 Feb 2001, Theo Brinkman wrote:
> 
> 
>> I'm trying to learn XSLT and thought that PHP 4.0.4 with the Sablotron
>> extension would be ideal for this, but I quite simply cannot get any
>> samples I find to work.  I'm trying to use the class.XSLTransform.php
>> file mentioned in the annotated PHP manual, but I get a fatal error on
>> line 113 (don't have the exact text,but it doesn't say anything more
>> useful).
>> 
>> I've compiled PHP --with-sablot --enable-sablot-errors-descriptive
>> --with-pgsql, and tried two sets of sample files which are said to work.
>>   One from phpbuilder, the other from another php site, that I don't
>> remember the name of off hand.  (The second set of files has to do with
>> recipes, in case anyone out there might know where I found that set of
>> files.)
>> 
>> I'm running PHP 4.0.4 on Apache 1.3.14 on Linux Mandrake 7.1.  I've also
>> tried both 4.0.4 and 4.0.4pl1 on Apache 1.3.14 on NT 4 with identical
>> results.  Is there a problem with the sablotron extension that isn't
>> mentioned anywhere I can find, or am I doing something wrong?
>> 
>> Some simple samples that any of you have gotten working would be greatly
>> appreciated.
>> 
>>      - Theo
>> 
>> 
>> --
>> 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]
>> 





James Smith wrote:

>Is there a way that when a user signs up for a
>user/pass on a site, to automatically update the
>.htpasswd on the site?  Right now I'm running a Win2k
>Pro, with Apache installed and MySQL/PHP.  
>
>Thanks,
>
>James

The quite simpliest method is to put appropriate directives in a .htaccess 
file in appropriate (e.g. to be protected) directories like this:

AuthName "Restricted Area"
AuthUserFile /www/users/users
AuthGroupFile /www/users/groups
AuthType Basic
Require registeredusers

Then all you have to do is to regenerate the user and the group file 
according to your needs.

Another way to do this directly with MySQL is to use the apache auth_mysql 
module which allows you to store authentication data in a MySQL DB. See
http://mysql.com/downloads/contrib.html
and 
http://httpd.apache.org/docs/misc/FAQ-G.html
for more info. 

HTH
Victor





I must be missing something while I had no problem getting
perl and SSI working getting PHP to work is eluding me
for some reason. I have added this to httpd.conf
can someone enlighten me on what may be missing

# And for PHP 4.x, use:
    #
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

if I call it like http://127.0.0.1/cgi-bin/one.php
with the shebang line #!php.exe
I get the following error
No input file specified
if I call it without the shebang I get
the Internal Server Error
Error logs indicate the the #! is needed
if I call it in the web root as
http://127.0.0.1/one.php4
it prints the code to the screen
any insight welcome

Thanks
going to RRTFM :)







Do you normally have #!perl.exe as your shebang?

Normally I'd see something like #!/usr/local/bin/perl or
#!/usr/local/bin/php

not sure of pathing issues on Windows for that.

#!c:\program files\php4\php.exe
?


"Patrick L. Olson" wrote:

> I must be missing something while I had no problem getting
> perl and SSI working getting PHP to work is eluding me
> for some reason. I have added this to httpd.conf
> can someone enlighten me on what may be missing
>
> # And for PHP 4.x, use:
>     #
>     AddType application/x-httpd-php .php
>     AddType application/x-httpd-php-source .phps
>
> if I call it like http://127.0.0.1/cgi-bin/one.php
> with the shebang line #!php.exe
> I get the following error
> No input file specified
> if I call it without the shebang I get
> the Internal Server Error
> Error logs indicate the the #! is needed
> if I call it in the web root as
> http://127.0.0.1/one.php4
> it prints the code to the screen
> any insight welcome
>
> Thanks
> going to RRTFM :)
>
> --
> 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]





I'm not even sure that the shell escape is even used in win32 perl - I think
it's done via a regular file association. I clearly remember setting it to
#!/some/fake/rubbish one time as a test and it still worked fine

I imagine the same would go for php.exe

jason



> Do you normally have #!perl.exe as your shebang?
>
> Normally I'd see something like #!/usr/local/bin/perl or
> #!/usr/local/bin/php
>
> not sure of pathing issues on Windows for that.
>
> #!c:\program files\php4\php.exe
> ?
>
>
> "Patrick L. Olson" wrote:
>
> > I must be missing something while I had no problem getting
> > perl and SSI working getting PHP to work is eluding me
> > for some reason. I have added this to httpd.conf
> > can someone enlighten me on what may be missing
> >
> > # And for PHP 4.x, use:
> >     #
> >     AddType application/x-httpd-php .php
> >     AddType application/x-httpd-php-source .phps
> >
> > if I call it like http://127.0.0.1/cgi-bin/one.php
> > with the shebang line #!php.exe
> > I get the following error
> > No input file specified
> > if I call it without the shebang I get
> > the Internal Server Error
> > Error logs indicate the the #! is needed
> > if I call it in the web root as
> > http://127.0.0.1/one.php4
> > it prints the code to the screen
> > any insight welcome
> >
> > Thanks
> > going to RRTFM :)







> I'm not even sure that the shell escape is even used in win32 perl - I think
> it's done via a regular file association. 

So maybe he just needs to associate .php files with php.exe?


-Sean (who hasn't ever used php on windows)



Reply via email to