OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: php3 Digest 19 Apr 2000 04:58:04 -0000 Issue 1616
From: php3-digest-helplists.php.net
Date: Tue Apr 18 2000 - 23:58:04 CDT


php3 Digest 19 Apr 2000 04:58:04 -0000 Issue 1616

Topics (messages 86519 through 86642):

Strange behaviour (win 98 + apache + access + PHP)
        86519 by: "Richard Allsebrook" <richard.allsebrookeasysoft.com>

oracle connection need help!
        86520 by: Rouvas Stathis <rouvasdi.uoa.gr>
        86625 by: "Mark Nold" <MarkNawi.com.au>

Anyone can help me?
        86521 by: "Christian Sakshaug" <christiansakshaug.net>

NEED HELP!
        86522 by: Mostafa Attariani <mostafaaxis.com>

COldFusion/Netobjects v.s. PHP
        86523 by: "Mike Sheldon" <msheldondesertraven.com>
        86528 by: Pablo A.Godel <godelconectacom.com>
        86530 by: "Mike Sheldon" <msheldondesertraven.com>
        86532 by: "Peter Kocks" <peter.kocksbaygate.com>
        86534 by: "PHPList" <phplistwowmation.com>
        86536 by: Zak Greant <zakfreeimages.com>
        86542 by: Mark Selby <selby_markyahoo.com>
        86548 by: "Mike Sheldon" <msheldondesertraven.com>
        86553 by: "Steven Sajous" <ssajoushotmail.com>
        86555 by: Mark Selby <selby_markyahoo.com>
        86557 by: "PHPList" <phplistwowmation.com>
        86558 by: "Mike Sheldon" <msheldondesertraven.com>
        86565 by: brad <bradkieser.net>
        86569 by: Matt McClanahan <cardinaldodds.net>

PHP Module for NSAPI?
        86524 by: Sascha Schumann <saschaschumann.cx>

Using sessions under windows NT
        86525 by: "Bara'a" <baraasimaint2.co.ae>
        86614 by: richardzend.com (Richard Lynch)
        86616 by: richardzend.com (Richard Lynch)

Finding favourites: a tough job
        86526 by: Doug Semig <dougslistc3net.net>

Anyone using PHP3/4 on WinNT on a production site
        86527 by: Anders Gaarsdal Holst <anderscolorweb.dk>

Recall: Oracle, Windows, and PHP
        86529 by: Zack Beatty <ZackBmamamedia.com>

e-commerce
        86531 by: Gerardo Herrera <gerardomorphos.com>
        86567 by: Francisco Hernandez <xy0xy0earthlink.net>
        86568 by: Derek Sivers <listhitmedia.com>

Question: Stateful connections for security & authentication?
        86533 by: "I.S. Manager" <ismgrpctc.com>
        86540 by: Mark Selby <selby_markyahoo.com>
        86541 by: Lars Torben Wilson <torbenpinc.com>
        86550 by: "A Robertson" <elite2000btinternet.com>
        86554 by: "I.S. Manager" <ismgrpctc.com>
        86580 by: "A Robertson" <elite2000btinternet.com>

[newbie] Compilation problems on Turbolinux
        86535 by: Chad Day <chadbeachassociates.com>

String Input
        86537 by: "GwangHee Yi" <GwangHeeglobalist.net>
        86546 by: Gregor Welters <gregorwelters.de>
        86552 by: "A Robertson" <elite2000btinternet.com>
        86598 by: richardzend.com (Richard Lynch)

searching a string or an array
        86538 by: Keith Vance <keithvbzln.com>
        86543 by: Michael Pohl <michaelnewtopia.com>
        86545 by: Gregor Welters <gregorwelters.de>
        86559 by: Keith Vance <keithvbzln.com>
        86601 by: richardzend.com (Richard Lynch)
        86602 by: php3developersdesk.com

Last key value
        86539 by: "Bryan - Utopian Web Productions" <bryanuwebpro.com>
        86544 by: Gregor Welters <gregorwelters.de>
        86551 by: "Bryan - Utopian Web Productions" <bryanuwebpro.com>
        86563 by: "Phillip Buzzard" <artsphphotmail.com>
        86566 by: Bill Zeller <billzelleryahoo.com>
        86578 by: "Bryan - Utopian Web Productions" <bryanuwebpro.com>
        86595 by: richardzend.com (Richard Lynch)
        86599 by: "Jason Brooke" <jasonqgl.org>

Strange Error
        86547 by: Mark Lo <marklokynetvigator.com>
        86562 by: Matt McClanahan <cardinaldodds.net>
        86603 by: richardzend.com (Richard Lynch)

Help with php-3.0.16 FreeBSD 3.4-STABLE and Oracle 8.0.5
        86549 by: Todd Mortensen <todd.mortensenvisitalk.com>

uploading an image file
        86556 by: Gurkan Nisanci <nisanciBilkent.EDU.TR>
        86604 by: richardzend.com (Richard Lynch)

hello
        86560 by: "Ahti" <ahtistarline.ee>
        86605 by: richardzend.com (Richard Lynch)
        86606 by: richardzend.com (Richard Lynch)

GANA DINERO CASI DE IMMEDIATO
        86561 by: ebiznavegalia.com

PHP/MySQL numbers
        86564 by: Michael Kimsal <michaeltapinternet.com>
        86570 by: "Mark Maggelet" <maggeletmminternet.com>
        86577 by: Michael Kimsal <michaeltapinternet.com>
        86585 by: "Mark Maggelet" <maggeletmminternet.com>

Redhat CCVS vs CyberCash
        86571 by: Francisco Hernandez <xy0xy0earthlink.net>

PHP4 is SUPER FAST!
        86572 by: "Jonathan Griffin" <jgriffinmmind.net>
        86573 by: Boaz Yahav <berbernetvision.net.il>
        86576 by: Mark Selby <selby_markyahoo.com>
        86613 by: "Manuel Lemos" <mlemosacm.org>

Plz help me guys...
        86574 by: "Marian Vasile" <iceblink_2001yahoo.com>
        86575 by: "Greg Donald" <webmasterdestiney.com>
        86634 by: richardzend.com (Richard Lynch)

Installing PHP, MySQL and Apache
        86579 by: Lazaro Gonzalez <lgonza18fiu.edu>

image naming question
        86581 by: Eric Lic Hang Lee <lichangleeyahoo.com>

Zend Optimizer
        86582 by: Chris Cameron <chrisupnix.org>

command in fputs <?fputs($f,"<?echo \$bild1;?>"\n?>
        86583 by: "Helmut Ott" <ottmyokay.net>

Where are the result ?
        86584 by: "Marian Vasile" <iceblink_2001yahoo.com>

window POP up
        86586 by: "Yurais Fernandez Leal" <yuraismedired.scu.sld.cu>

php as middle tier
        86587 by: dgoa <dgoaou.edu>

ETA for PHP4???
        86588 by: CDitty <mailredhotsweeps.com>
        86589 by: "Henry F. Marquardt" <hankyerpso.net>
        86590 by: CDitty <mailredhotsweeps.com>
        86596 by: "Mike Sheldon" <msheldondesertraven.com>
        86629 by: Matt McClanahan <cardinaldodds.net>

addslashes and odbc
        86591 by: "Rossi Designs" <webmasterrossidesigns.net>
        86594 by: "Phil Driscoll" <phildialsolutions.co.uk>

Automatically generating passwords
        86592 by: Marcus D Hanwell <linuxcryos.net>
        86593 by: "Boget, Chris" <chriswild.net>
        86597 by: Marcus D Hanwell <linuxcryos.net>
        86600 by: "Boget, Chris" <chriswild.net>

Strange URL
        86607 by: richardzend.com (Richard Lynch)

where is php3.ini?
        86608 by: CDitty <mailredhotsweeps.com>
        86611 by: "Mark Maggelet" <maggeletmminternet.com>
        86615 by: "Jason Cox" <jasoncwebpipe.net>
        86632 by: "Jason Brooke" <jasonqgl.org>

Recursive function calling.
        86609 by: richardzend.com (Richard Lynch)

warnings with pg_fetch_array
        86610 by: richardzend.com (Richard Lynch)

Problem building PHP4.0 RC1
        86612 by: "Dave 'Duke of URL' Weiner" <davewwebmast.com>

Max execution time?
        86617 by: richardzend.com (Richard Lynch)

Renaming table in postgres
        86618 by: richardzend.com (Richard Lynch)

files or db?
        86619 by: richardzend.com (Richard Lynch)

Biting the hand that feeds ...
        86620 by: "Mark Nold" <MarkNawi.com.au>
        86628 by: "Mike Sheldon" <msheldondesertraven.com>

newbie help!!
        86621 by: richardzend.com (Richard Lynch)

porting from MySQL to Oracle
        86622 by: richardzend.com (Richard Lynch)

How to do some tasks that require ROOT's privilege ?
        86623 by: kenatlas.net.tw
        86626 by: "Jason Cox" <jasoncwebpipe.net>

Hierarchy Links
        86624 by: "Mark Nold" <MarkNawi.com.au>
        86630 by: richardzend.com (Richard Lynch)

ms access in php
        86627 by: richardzend.com (Richard Lynch)

Fw: [PHP3] Hierarchy Links
        86631 by: richardzend.com (Richard Lynch)

netscape layering
        86633 by: richardzend.com (Richard Lynch)

signal Segmentation fault (11)
        86635 by: richardzend.com (Richard Lynch)

Stopping a script from being started twice
        86636 by: richardzend.com (Richard Lynch)

connecting to oscar (aol) Please read!!!
        86637 by: Bill Zeller <billzelleryahoo.com>

problems with pg_exec (again)
        86638 by: Juan Luis Baptiste <juanchometallica.com>

php and soap, wddx, xmlrpc
        86639 by: dgoa <dgoaou.edu>

Formating Output with printf() or echo
        86640 by: "Cass Surek" <csmaster.com.br>

mysql_connect PB need help
        86641 by: richardzend.com (Richard Lynch)

open file search and add if not exist
        86642 by: richardzend.com (Richard Lynch)

Administrivia:

To subscribe to the digest, e-mail:
        php3-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php3-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php3lists.php.net

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

attached mail follows:


What's the SQL you are trying to execute?

  _____

~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, No3 The Embankment, Leeds, LS1 4BJ
http://www.easysoft.com <http://www.easysoft.com>
The Home of Data Access Middleware
"A computer lets you make more mistakes faster than any invention in human
history-with the possible exceptions of handguns and tequila."

  _____

-----Original Message-----
From: piotr [mailto:piotr]On Behalf Of Piotr L
Sent: Tuesday, April 18, 2000 9:13 AM
To: php3lists.php.net
Subject: [PHP3] Strange behaviour (win 98 + apache + access + PHP)

Hi all,
I am using PHP3 in Windows 98 and Appache 1-3-12 and MS Access 97.
System DSN in ODBC manager is set corectly.
I can do "odbc_connect" and "odbc_close" successfully but when I try to
use
"odbc_exec" or "odbc_prepare" I am getting the following error:

Warning: SQL error: [Microsoft][ODBC Driver Manager] Driver does not
support this function,
SQL state IM001 in SQLSetStmtOption in C:\Program Files\Apache
Group\Apache\htdocs/try.php3

Any comments would be appreciated.

Regards,

Piotr

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


You need to add the appropriate entries to the machine that PHP is running. I assume that you already have done this. Test it with tnsping. That's what I use for connecting to Ora.

dl("php3_oci80.dll"); putenv("ORACLE_SID=orcl"); $c = ocilogon("user","pass");

-Stathis.

Zack Beatty wrote: > > I added the entry into the tnsnames.ora file on my server to talk to the > database server. Now what do I do. The Oracle functions in PHP still can't > connect to the database. The phpinfo() function prints rows for "Oracle" and > "OCI8", but they are blank. The oracle dll's have been added to the php.ini > file. > > Extensions > Extensions Additional Information > > Calendar No additional information. > Microsoft SQL Allow persistent links: Yes > Persistent links: 0/Unlimited > Total links: 0/Unlimited > Application name: PHP > Client API information: MSSQL 6.5 > Imap 4R1 Imap Support enabled > Imap c-client Version: Imap 4.1 > Oracle > OCI8 > Basic Functions No additional information. > etc. > etc. > > Any ideas? I use PHP 3.014 (Win32 binary) on NT 4.0. > Thanks again. > -Zack > > > ______________________________________ > > Zack Beatty | Enterprise Software Consultant > > zackbmamamedia.com > > > > http://www.MaMaMedia.com > > Named one of the “100 Best Sites for 2000,” > > Yahoo! Internet Life, January 2000. > > > > MaMaMedia, Inc. > > 110 Greene Street, 3rd Floor > > New York, NY 10012 > > Phone: 212.334.3277 x477 > > Fax: 212.334.3276 > > -----Original Message----- > From: Mitch Pirtle [mailto:mitchybuzzwerks.com] > Sent: Wednesday, April 12, 2000 10:01 AM > To: Zack Beatty > Subject: RE: oracle connection need help ,please suggest me > > On Wed, 12 Apr 2000, you wrote: > > Any luck with the Oracle connection? I can't connect PHP (on Windows NT) > to > > a remote Oracle server. Do I need to configure Net8 or do something with > a > > "tnsnames.ora" file? > > Please help. > > -zack > > Hey Zack, > > You will need to configure Net8 to get from the webserver to the database > box. > Basically, if you can use sqlplus (or whatever GUI client that Oracle ships > for > NT) and get to the database, you are golden. > > This is done by adding an entry in the tnsnames.ora file (which, in typical > installations, is scattered all about the filesystem). Sadly, for each > Oracle > product you install (Oracle8i, Enterprise Manager, Application Server, etc.) > there will be yet another tnsnames.ora file to deal with. I always "Find > file..." for tnsnames.ora and copy the edit to all of the files. > > Let me know if you still have trouble, ok? > > Let me know how the Oracle thing goes. > > -- > > 01101101 01101001 01110100 01100011 01101000 01111001 > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

-- 
+-----------------------------+
|Rouvas Stathis               |
|University of Athens         |
|Department of Informatics    |
|http://www.di.uoa.gr/~rouvas |
|rouvasdi.uoa.gr             |
+-----------------------------+

attached mail follows:


Zack,

You should forget about PHP for now.

Put c:\orawin95\bin (or whatever the bin dir is) in your PATH.

Make sure your TNSANMES.ORA entry is correct (check host and port and SID with your DBA)

Make sure the Oracle listener is up on the DB server (again ask your DBA if you have no access).

Next, from your windows box open a command line and type tnsping TNSNAME Where the TNSNAME is your target DB, you should get something like;

TNS Ping Utility for 32-bit Windows: Version 2.3.2.1.0 - Production on 19-APR-00 10:23:12 Copyright , 1996(c) Oracle Corporation 1995. All rights reserved. Attempting to contact (ADDRESS=(COMMUNITY=TCP.world)(PROTOCOL=TCP)(Host=permims) (Port=1521)) OK (280 msec)

Look for the OK.

Next fire up sql*plus (you should have installed it as part of your ora install) and try logging into your newly proven db connection with a username and password your DBA has provided you with. Try something like SELECT COUNT(*) FROM mytable;

And you should get the number of row in mytable (of course change mytable to your table.)

Do all of this before you even think about PHP, if you can't do this you will not get PHP to work with Oracle. If you don't have a DBA surely somebody owns the box you are trying to talk to so talk to them or maybe get in contact with a oracle consultant to help you connect as described above (should take a very short time for someone who knows what they are doing.. again dont confuse isses by adding PHP into the mix)

Also don't even think "Bugger this i'll just use ODBC" as surprise surprise ODBC must have SQL*Net set up correctly and working as described above for it to work.

Once you can happily do a SELECT COUNT(.. from SQL*plus then start trying to connect via PHP (which is very simple from there on ;)

mn

Mark Nold marknalverstone.com.au Systems Consultant

Change is inevitable, except from vending machines.

>>> Zack Beatty <ZackBmamamedia.com> 04/19 12:26 am >>> I added the entry into the tnsnames.ora file on my server to talk to the database server. Now what do I do. The Oracle functions in PHP still can't connect to the database. The phpinfo() function prints rows for "Oracle" and "OCI8", but they are blank. The oracle dll's have been added to the php.ini file.

Extensions Extensions Additional Information Calendar No additional information. Microsoft SQL Allow persistent links: Yes Persistent links: 0/Unlimited Total links: 0/Unlimited Application name: PHP Client API information: MSSQL 6.5 Imap 4R1 Imap Support enabled Imap c-client Version: Imap 4.1 Oracle OCI8 Basic Functions No additional information. etc. etc.

Any ideas? I use PHP 3.014 (Win32 binary) on NT 4.0. Thanks again. -Zack

> ______________________________________ > Zack Beatty | Enterprise Software Consultant > zackbmamamedia.com > > http://www.MaMaMedia.com > Named one of the "100 Best Sites for 2000," > Yahoo! Internet Life, January 2000. > > MaMaMedia, Inc. > 110 Greene Street, 3rd Floor > New York, NY 10012 > Phone: 212.334.3277 x477 > Fax: 212.334.3276

-----Original Message----- From: Mitch Pirtle [mailto:mitchybuzzwerks.com] Sent: Wednesday, April 12, 2000 10:01 AM To: Zack Beatty Subject: RE: oracle connection need help ,please suggest me

On Wed, 12 Apr 2000, you wrote: > Any luck with the Oracle connection? I can't connect PHP (on Windows NT) to > a remote Oracle server. Do I need to configure Net8 or do something with a > "tnsnames.ora" file? > Please help. > -zack

Hey Zack,

You will need to configure Net8 to get from the webserver to the database box. Basically, if you can use sqlplus (or whatever GUI client that Oracle ships for NT) and get to the database, you are golden.

This is done by adding an entry in the tnsnames.ora file (which, in typical installations, is scattered all about the filesystem). Sadly, for each Oracle product you install (Oracle8i, Enterprise Manager, Application Server, etc.) there will be yet another tnsnames.ora file to deal with. I always "Find file..." for tnsnames.ora and copy the edit to all of the files.

Let me know if you still have trouble, ok?

Let me know how the Oracle thing goes.

-- 

01101101 01101001 01110100 01100011 01101000 01111001

attached mail follows:


First i will said that this mailling list just rulez :)

can i make this script easier?

<----------start----------->

<?php

function showheader ($title) { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <TITLE> <?php echo $title ?> </TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <CENTER> <?php }

function showfooter () { ?> </CENTER> </BODY> </HTML> <?php }

$table = ("users");

mysql_connect("localhost", "user", "pass"); mysql_select_db("database");

$PassLength = strlen($Password); $PassAllow = ("5");

if ($Password == $Password2) {

if ($Passlength >= $PassAllow) {

$user = mysql_query("SELECT * FROM $table WHERE (Name='$Name')"); if (mysql_num_rows($user) > 0) { showheader("User Name Taken !"); ?> User Name <B><?php echo $Name ?></B> Is already Taken. <?php showfooter(); } else {

if (ereg("^([a-zA-Z0-9_-])+([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+", $Email) == 1) {

$today = date("d-m-Y H:i:s"); $user = mysql_query("INSERT INTO $table VALUES ('$RealName','$Name','$Password','$Email','$Url','$today')"); setcookie("site_user", $Name, time() + 31536000, "/"); setcookie("site_pass", $Password, time() + 31536000, "/"); showheader("Registration Success!"); ?> You have registered.<BR> Real Name: <?php echo $RealName ?><br> User Name: <?php echo $Name ?> <BR> Password: <?php echo $Password ?> <br> Email: <?php echo $Email ?><br> HomePage: <?php echo $Url ?><br> <?php echo $today ?><br>

<?php showfooter();

}

else { showheader("Email error"); ?> Email error: use userdomain.com <?php showfooter(); } } }

else { showheader("Registration Error!"); ?> Your Passwords have to a least 5 character or more... <?php echo $PassLength ?> <?php echo $PassAllow ?> <?php showfooter(); }

} else { showheader("Registration Error!"); ?> Your Two Passwords Did Not Match <?php showfooter(); }

?>

<----------stop----------->

Best Regards, Christian Sakshaug

--
Tel:    +47 913 95 618
Email:  christiansakshaug.net
Url:    www.sakshaug.net

attached mail follows:


Hi I installed apache on my computer. It uses Linux as operative system . Now a days I try to learn PHP3, so I need apache as well. In short these are the steps that I did:

1. gunzip apache_1.3.x.tar.gz 2. tar xvf apache_1.3.x.tar 3. gunzip php-3.0.x.tar.gz 4. tar xvf php-3.0.x.tar 5. cd apache_1.3.x 6. ./configure --prefix=/www 7. cd ../php-3.0.x 8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars 9. make 10. make install 11. cd ../apache_1.3.x 12. ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a 13. make 14. make install

Instead of this step you may prefer to simply copy the httpd binary overtop of your existing binary. Make sure you shut down your server first though.

15. cd ../php-3.0.x 16. cp php3.ini-dist /usr/local/lib/php3.ini

You can edit /usr/local/lib/php3.ini file to set PHP options. If you prefer this file in another location, use --with-config-file-path=/path in step 8.

17. Edit your httpd.conf or srm.conf file and add:

AddType application/x-httpd-php3 .php3

You can choose any extension you wish here. .php3 is simply the one we suggest.

18. Use your normal procedure for starting the Apache server. (You must stop and restart the server, not just cause the server to reload by use a HUP or USR1 signal.)

And I think that everything went well, because, It appeared a message something like this: ... the installation has been successful ...

BUT, NOW the problem is, that I can execute, my PHP-program which I wrote (I called it php4.php3, and saved in under the "www/httpdocs") ,but I can not see the result on the web-server (NETSCAPE)!!!!!! It just appears blank.

What did I do wrong here?

Thank you very much with regards Mostafa mostafaaxis.com

attached mail follows:


Lord I hope this is a joke.

Error logs are for polite little notes that your program leaves you to tell you it came across something unexpected, but was able to detect and compensate for it. They're not barf buckets.

Silly me, I actually like to detect and compensate for errors instead of having my programs blow chunks. Ideally, a visitor to my site should never know there was a problem. Structured error-handling gives me a consistent, predictable means of meeting this goal. I find it ironic that CF, with its unquestionably more primitive language, has better error-handling structures than PHP, which has far better language structure.

Michael J. Sheldon Internet Applications Developer Phone: 480.699.1084 http://www.desertraven.com/ PGP Key Available on Request

-----Original Message----- From: godelconectacom.com [mailto:godelconectacom.com] Sent: Tuesday, April 18, 2000 06:42 To: Mike Sheldon Cc: 'Toshihide Nakamura'; php3lists.php.net Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP

You can disable "error displaying" editing php.ini and also you can send all error messages to a file, so you can check it periodically for bugs...

What more do you want?

Regards, Pablo Godel

Quoting Mike Sheldon <msheldondesertraven.com>:

> I actively develop in both CF and PHP, and tend to use each for their > strengths. >

> Error-handling: > CF has good try/catch functionality, making formal error handling possible. > PHP has no formal error handling. (This can REALLY bite! Throwing error > messages to the browser is not acceptable behaviour.) What little > error-handling exists is inconsistent, and many errors cannot be trapped in > code at all.

--
Pablo Godel
godelconectacom.com
Conectacom, Inc.

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribelists.php.net To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


What is the problem on sending all the errors to a file instead of the browser ??? You (and only you) can check for the errors and not everybody... Sometimes error messages may represent a security problem...

That's my point of view..

Regards, Pablo Godel

Quoting Mike Sheldon <msheldondesertraven.com>:

> Lord I hope this is a joke. > > Error logs are for polite little notes that your program leaves you to tell > you it came across something unexpected, but was able to detect and > compensate for it. They're not barf buckets. > > Silly me, I actually like to detect and compensate for errors instead of > having my programs blow chunks. Ideally, a visitor to my site should never > know there was a problem. Structured error-handling gives me a consistent, > predictable means of meeting this goal. I find it ironic that CF, with its > unquestionably more primitive language, has better error-handling > structures > than PHP, which has far better language structure.

> -----Original Message----- > From: godelconectacom.com [mailto:godelconectacom.com] > Sent: Tuesday, April 18, 2000 06:42 > To: Mike Sheldon > Cc: 'Toshihide Nakamura'; php3lists.php.net > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > You can disable "error displaying" editing php.ini and also you can > send all error messages to a file, so you can check it periodically > for bugs... > > What more do you want? > > Regards, > Pablo Godel >

attached mail follows:


The point is not to send them to the browser OR to file. The point is to catch them in the CODE, and do something to compensate for it. Sending errors to file is better than sending them to the browser in the same way that having my car's motor silently melt into a slag heap is better than having it explode. It won't cause as much harm, but it certainly isn't doing me any good, either.

Michael J. Sheldon Internet Applications Developer Phone: 480.699.1084 http://www.desertraven.com/ PGP Key Available on Request

-----Original Message----- From: godelconectacom.com [mailto:godelconectacom.com] Sent: Tuesday, April 18, 2000 11:21 To: Mike Sheldon Cc: 'Pablo A.Godel'; 'Toshihide Nakamura'; php3lists.php.net Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP

What is the problem on sending all the errors to a file instead of the browser ??? You (and only you) can check for the errors and not everybody... Sometimes error messages may represent a security problem...

That's my point of view..

Regards, Pablo Godel

Quoting Mike Sheldon <msheldondesertraven.com>:

> Lord I hope this is a joke. > > Error logs are for polite little notes that your program leaves you to tell > you it came across something unexpected, but was able to detect and > compensate for it. They're not barf buckets. > > Silly me, I actually like to detect and compensate for errors instead of > having my programs blow chunks. Ideally, a visitor to my site should never > know there was a problem. Structured error-handling gives me a consistent, > predictable means of meeting this goal. I find it ironic that CF, with its > unquestionably more primitive language, has better error-handling > structures > than PHP, which has far better language structure.

> -----Original Message----- > From: godelconectacom.com [mailto:godelconectacom.com] > Sent: Tuesday, April 18, 2000 06:42 > To: Mike Sheldon > Cc: 'Toshihide Nakamura'; php3lists.php.net > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > You can disable "error displaying" editing php.ini and also you can > send all error messages to a file, so you can check it periodically > for bugs... > > What more do you want? > > Regards, > Pablo Godel >

attached mail follows:


Do you use the register_shutdown_function() ?

I use it all the time to implement what I believe you're looking for. Write your own error handling routine that sends a message to error_log and then effectively deal with your code. Any time the user aborts or exit() is called you'll get the registered shutdown function called.

That said, I do agree that some improvement is needed. For example, while method constructors exist in classes, method destructors do not, let alone exception handling.

--pk

> -----Original Message----- > From: Mike Sheldon [mailto:msheldondesertraven.com] > Sent: Tuesday, April 18, 2000 10:54 AM > To: 'Pablo A.Godel' > Cc: 'Toshihide Nakamura'; php3lists.php.net > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > Lord I hope this is a joke. > > Error logs are for polite little notes that your program leaves > you to tell > you it came across something unexpected, but was able to detect and > compensate for it. They're not barf buckets. > > Silly me, I actually like to detect and compensate for errors instead of > having my programs blow chunks. Ideally, a visitor to my site should never > know there was a problem. Structured error-handling gives me a consistent, > predictable means of meeting this goal. I find it ironic that CF, with its > unquestionably more primitive language, has better error-handling > structures > than PHP, which has far better language structure. > > > Michael J. Sheldon > Internet Applications Developer > Phone: 480.699.1084 > http://www.desertraven.com/ > PGP Key Available on Request > > -----Original Message----- > From: godelconectacom.com [mailto:godelconectacom.com] > Sent: Tuesday, April 18, 2000 06:42 > To: Mike Sheldon > Cc: 'Toshihide Nakamura'; php3lists.php.net > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > You can disable "error displaying" editing php.ini and also you can > send all error messages to a file, so you can check it periodically > for bugs... > > What more do you want? > > Regards, > Pablo Godel > > Quoting Mike Sheldon <msheldondesertraven.com>: > > > I actively develop in both CF and PHP, and tend to use each for > their > > strengths. > > > > > Error-handling: > > CF has good try/catch functionality, making formal error handling > possible. > > PHP has no formal error handling. (This can REALLY bite! Throwing > error > > messages to the browser is not acceptable behaviour.) What little > > error-handling exists is inconsistent, and many errors cannot be > trapped in > > code at all. > > > > -- > Pablo Godel > godelconectacom.com > Conectacom, Inc. > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


> That said, I do agree that some improvement is needed. For example, while > method constructors exist in classes, method destructors do not, let alone > exception handling.

I think (like others do) that PHP surpasses other packages in so many ways, but we can always learn from what others are doing. For the people, such as myself, that have used Cold Fusion, it might be an idea (possibly off-list?) to discuss what we liked about the CF error-reporting and then to find out if it is possible to recreate this for PHP.

I'd be interested in hearing what others think

Ade

attached mail follows:


Hello Mike and List Member!

>Quoting Mike Sheldon <msheldondesertraven.com> > >Error logs are for polite little notes that your program leaves you to tell >you it came across something unexpected, but was able to detect and >compensate for it. They're not barf buckets.

You must run a very tight ship <grin>. One of my work places' clients teaches a programming class. He had all of his students upload their class work to their Unix account for testing on the web. Later that night, their partition was full - in about 6 hours their scripts had dumped almost 600 meg of error messages into their log files.

>Silly me, I actually like to detect and compensate for errors instead of >having my programs blow chunks. Ideally, a visitor to my site should never >know there was a problem. Structured error-handling gives me a consistent, >predictable means of meeting this goal. I find it ironic that CF, with its >unquestionably more primitive language, has better error-handling structures >than PHP, which has far better language structure.

It is fairly simple to roll your own error-handling routines.

You should be able to do something like this:

function malformed_query ($email_address, $message) { mail ($email_address, 'Error in file: '. __FILE__.' on line: '.__LINE__', $message); }

function catch ($expression) { global $php_errormsg; if ($php_errormsg) { eval $expression; // Execute the expression passed to catch unset ($php_errormsg); // Clear out caught error } }

error_reporting(52); // Probably shouldn't turn off everything :) // or you could use for specific lines

$query = mysql_query( "SELECT * FROM table" ); catch ( 'malformed_query ("adminserver.com", "Your pants just fell down! ")' );

I believe that a significant part of the 'far better language structure' of PHP is its flexibility.

Ciao,

Zak

>>Quoting Pablo Godel <godelconectacom.com> >> >>You can disable "error displaying" editing php.ini and also you can >>send all error messages to a file, so you can check it periodically >>for bugs... >> >>What more do you want?

>>Quoting Mike Sheldon <msheldondesertraven.com> >> >>> I actively develop in both CF and PHP, and tend to use each for >>> their strengths. >> >>> Error-handling: >>> CF has good try/catch functionality, making formal error handling >>> possible. PHP has no formal error handling. (This can REALLY bite! >>> Throwing error messages to the browser is not acceptable behaviour.) >>> What little error-handling exists is inconsistent, and many errors >>> cannot be trapped in code at all.

attached mail follows:


Half of this is complete b**lshit - it's hardly uncommon to come across a site which spits CF errors all over the (usually) frames (often high profile sites running on NT.) If you think your code is going to have problems :- Redesign it Redesign the hardware Redesign the functions PHP can't help if you're writing shite.

--- Peter Kocks <peter.kocksbaygate.com> wrote: > > Do you use the register_shutdown_function() ? > > I use it all the time to implement what I believe > you're looking for. Write > your own error handling routine that sends a message > to error_log and then > effectively deal with your code. Any time the user > aborts or exit() is > called you'll get the registered shutdown function > called. > > That said, I do agree that some improvement is > needed. For example, while > method constructors exist in classes, method > destructors do not, let alone > exception handling. > > --pk > > > > > -----Original Message----- > > From: Mike Sheldon > [mailto:msheldondesertraven.com] > > Sent: Tuesday, April 18, 2000 10:54 AM > > To: 'Pablo A.Godel' > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > > Lord I hope this is a joke. > > > > Error logs are for polite little notes that your > program leaves > > you to tell > > you it came across something unexpected, but was > able to detect and > > compensate for it. They're not barf buckets. > > > > Silly me, I actually like to detect and compensate > for errors instead of > > having my programs blow chunks. Ideally, a visitor > to my site should never > > know there was a problem. Structured > error-handling gives me a consistent, > > predictable means of meeting this goal. I find it > ironic that CF, with its > > unquestionably more primitive language, has better > error-handling > > structures > > than PHP, which has far better language structure. > > > > > > Michael J. Sheldon > > Internet Applications Developer > > Phone: 480.699.1084 > > http://www.desertraven.com/ > > PGP Key Available on Request > > > > -----Original Message----- > > From: godelconectacom.com > [mailto:godelconectacom.com] > > Sent: Tuesday, April 18, 2000 06:42 > > To: Mike Sheldon > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > > You can disable "error displaying" editing php.ini > and also you can > > send all error messages to a file, so you can > check it periodically > > for bugs... > > > > What more do you want? > > > > Regards, > > Pablo Godel > > > > Quoting Mike Sheldon <msheldondesertraven.com>: > > > > > I actively develop in both CF and PHP, and tend > to use each for > > their > > > strengths. > > > > > > > > Error-handling: > > > CF has good try/catch functionality, making > formal error handling > > possible. > > > PHP has no formal error handling. (This can > REALLY bite! Throwing > > error > > > messages to the browser is not acceptable > behaviour.) What little > > > error-handling exists is inconsistent, and many > errors cannot be > > trapped in > > > code at all. > > > > > > > > -- > > Pablo Godel > > godelconectacom.com > > Conectacom, Inc. > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > >

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


Just because programmers don't USE the tools they are given does not mean that the tools are worthless. Yes, a LOT of CF sites throw errors to the user instead of being handled properly. However, this is caused by sloppy/under-educated programmers and poor managment, not the tools.

Yes, I *CAN* catch errors in PHP, but it takes a *LOT* more code to do it, and is nowhere near as foolproof. Will this stop me from writing in PHP? No, it won't. The other benefits very often outweigh the disabilities. But that doesn't mean that I don't wish for better tools occasionally.

The strength of Open Source is often learning from other projects, and incorporating their strengths into your product. However, if you get into a state of irrational denial, whereby you stop believing that other projects could possibly have good features, then you stop looking for ways to improve your own product. If everyone believed that way, no Open Source projects would exist at all, because we'd have all been blindly defending MS-DOS as the best thing ever.

There are precious few things in this life that cannot be improved if only you would take the time to step back and get some perspective.

Relax. No one's going to take away your toys.

'scuse me while I go play with my Greyhounds for a little while...

Michael J. Sheldon Internet Applications Developer Phone: 480.699.1084 http://www.desertraven.com/ PGP Key Available on Request

-----Original Message----- From: Mark Selby [mailto:selby_markyahoo.com] Sent: Tuesday, April 18, 2000 12:27 To: peter.kocksbaygate.com; Mike Sheldon; 'Pablo A.Godel' Cc: 'Toshihide Nakamura'; php3lists.php.net Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP

Half of this is complete b**lshit - it's hardly uncommon to come across a site which spits CF errors all over the (usually) frames (often high profile sites running on NT.) If you think your code is going to have problems :- Redesign it Redesign the hardware Redesign the functions PHP can't help if you're writing shite.

--- Peter Kocks <peter.kocksbaygate.com> wrote: > > Do you use the register_shutdown_function() ? > > I use it all the time to implement what I believe > you're looking for. Write > your own error handling routine that sends a message > to error_log and then > effectively deal with your code. Any time the user > aborts or exit() is > called you'll get the registered shutdown function > called. > > That said, I do agree that some improvement is > needed. For example, while > method constructors exist in classes, method > destructors do not, let alone > exception handling. > > --pk > > > > > -----Original Message----- > > From: Mike Sheldon > [mailto:msheldondesertraven.com] > > Sent: Tuesday, April 18, 2000 10:54 AM > > To: 'Pablo A.Godel' > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > > Lord I hope this is a joke. > > > > Error logs are for polite little notes that your > program leaves > > you to tell > > you it came across something unexpected, but was > able to detect and > > compensate for it. They're not barf buckets. > > > > Silly me, I actually like to detect and compensate > for errors instead of > > having my programs blow chunks. Ideally, a visitor > to my site should never > > know there was a problem. Structured > error-handling gives me a consistent, > > predictable means of meeting this goal. I find it > ironic that CF, with its > > unquestionably more primitive language, has better > error-handling > > structures > > than PHP, which has far better language structure. > > > > > > Michael J. Sheldon > > Internet Applications Developer > > Phone: 480.699.1084 > > http://www.desertraven.com/ > > PGP Key Available on Request > > > > -----Original Message----- > > From: godelconectacom.com > [mailto:godelconectacom.com] > > Sent: Tuesday, April 18, 2000 06:42 > > To: Mike Sheldon > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > > You can disable "error displaying" editing php.ini > and also you can > > send all error messages to a file, so you can > check it periodically > > for bugs... > > > > What more do you want? > > > > Regards, > > Pablo Godel > > > > Quoting Mike Sheldon <msheldondesertraven.com>: > > > > > I actively develop in both CF and PHP, and tend > to use each for > > their > > > strengths. > > > > > > > > Error-handling: > > > CF has good try/catch functionality, making > formal error handling > > possible. > > > PHP has no formal error handling. (This can > REALLY bite! Throwing > > error > > > messages to the browser is not acceptable > behaviour.) What little > > > error-handling exists is inconsistent, and many > errors cannot be > > trapped in > > > code at all. > > > > > > > > -- > > Pablo Godel > > godelconectacom.com > > Conectacom, Inc. > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > >

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


caffeine overdose?

>From: "Mike Sheldon" <msheldondesertraven.com> >To: "'Mark Selby'" <selby_markyahoo.com>, <php3lists.php.net> >CC: "'Toshihide Nakamura'" <tonycrystaldonuts.com>, "'Pablo A.Godel'" ><godelconectacom.com>, <peter.kocksbaygate.com> >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP >Date: Tue, 18 Apr 2000 12:50:43 -0700 >MIME-Version: 1.0 >Received: from va.php.net ([216.200.201.204]) by >hunnington.familyonline.net (Post.Office MTA v3.5.3 release 223 >ID# 0-61021U6500L550S0V35) with SMTP id net for ><ssajousthis.com>; Tue, 18 Apr 2000 12:58:54 -0700 >Received: (qmail 777 invoked by uid 518); 18 Apr 2000 19:48:48 -0000 >Received: (qmail 771 invoked from network); 18 Apr 2000 19:48:48 -0000 >Return-Path: <php3-return-86548-ssajous=this.comlists.php.net> >Mailing-List: contact php3-helplists.php.net; run by ezmlm >Delivered-To: mailing list php3lists.php.net >Message-ID: <02c101bfa96f$61f1e510$0178a8c0desertraven.com> >X-Priority: 3 (Normal) >X-MSMail-Priority: Normal >X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) >Importance: Normal >In-Reply-To: <20000418192707.17458.qmailweb206.mail.yahoo.com> >X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 > >Just because programmers don't USE the tools they are given does not mean >that the tools are worthless. Yes, a LOT of CF sites throw errors to the >user instead of being handled properly. However, this is caused by >sloppy/under-educated programmers and poor managment, not the tools. > >Yes, I *CAN* catch errors in PHP, but it takes a *LOT* more code to do it, >and is nowhere near as foolproof. Will this stop me from writing in PHP? >No, >it won't. The other benefits very often outweigh the disabilities. But that >doesn't mean that I don't wish for better tools occasionally. > >The strength of Open Source is often learning from other projects, and >incorporating their strengths into your product. However, if you get into a >state of irrational denial, whereby you stop believing that other projects >could possibly have good features, then you stop looking for ways to >improve >your own product. If everyone believed that way, no Open Source projects >would exist at all, because we'd have all been blindly defending MS-DOS as >the best thing ever. > >There are precious few things in this life that cannot be improved if only >you would take the time to step back and get some perspective. > > >Relax. No one's going to take away your toys. > >'scuse me while I go play with my Greyhounds for a little while... > >Michael J. Sheldon >Internet Applications Developer >Phone: 480.699.1084 >http://www.desertraven.com/ >PGP Key Available on Request > >-----Original Message----- >From: Mark Selby [mailto:selby_markyahoo.com] >Sent: Tuesday, April 18, 2000 12:27 >To: peter.kocksbaygate.com; Mike Sheldon; 'Pablo A.Godel' >Cc: 'Toshihide Nakamura'; php3lists.php.net >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > >Half of this is complete b**lshit - it's hardly >uncommon to come across a site which spits CF errors >all over the (usually) frames (often high profile >sites running on NT.) If you think your code is going >to have problems :- >Redesign it >Redesign the hardware >Redesign the functions >PHP can't help if you're writing shite. > >--- Peter Kocks <peter.kocksbaygate.com> wrote: > > > > Do you use the register_shutdown_function() ? > > > > I use it all the time to implement what I believe > > you're looking for. Write > > your own error handling routine that sends a message > > to error_log and then > > effectively deal with your code. Any time the user > > aborts or exit() is > > called you'll get the registered shutdown function > > called. > > > > That said, I do agree that some improvement is > > needed. For example, while > > method constructors exist in classes, method > > destructors do not, let alone > > exception handling. > > > > --pk > > > > > > > > > -----Original Message----- > > > From: Mike Sheldon > > [mailto:msheldondesertraven.com] > > > Sent: Tuesday, April 18, 2000 10:54 AM > > > To: 'Pablo A.Godel' > > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > > > > > Lord I hope this is a joke. > > > > > > Error logs are for polite little notes that your > > program leaves > > > you to tell > > > you it came across something unexpected, but was > > able to detect and > > > compensate for it. They're not barf buckets. > > > > > > Silly me, I actually like to detect and compensate > > for errors instead of > > > having my programs blow chunks. Ideally, a visitor > > to my site should never > > > know there was a problem. Structured > > error-handling gives me a consistent, > > > predictable means of meeting this goal. I find it > > ironic that CF, with its > > > unquestionably more primitive language, has better > > error-handling > > > structures > > > than PHP, which has far better language structure. > > > > > > > > > Michael J. Sheldon > > > Internet Applications Developer > > > Phone: 480.699.1084 > > > http://www.desertraven.com/ > > > PGP Key Available on Request > > > > > > -----Original Message----- > > > From: godelconectacom.com > > [mailto:godelconectacom.com] > > > Sent: Tuesday, April 18, 2000 06:42 > > > To: Mike Sheldon > > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > > > > > You can disable "error displaying" editing php.ini > > and also you can > > > send all error messages to a file, so you can > > check it periodically > > > for bugs... > > > > > > What more do you want? > > > > > > Regards, > > > Pablo Godel > > > > > > Quoting Mike Sheldon <msheldondesertraven.com>: > > > > > > > I actively develop in both CF and PHP, and tend > > to use each for > > > their > > > > strengths. > > > > > > > > > > > Error-handling: > > > > CF has good try/catch functionality, making > > formal error handling > > > possible. > > > > PHP has no formal error handling. (This can > > REALLY bite! Throwing > > > error > > > > messages to the browser is not acceptable > > behaviour.) What little > > > > error-handling exists is inconsistent, and many > > errors cannot be > > > trapped in > > > > code at all. > > > > > > > > > > > > -- > > > Pablo Godel > > > godelconectacom.com > > > Conectacom, Inc. > > > > > > -- > > > PHP 3 Mailing List <http://www.php.net/> > > > To unsubscribe, send an empty message to > > php3-unsubscribelists.php.net > > > To subscribe to the digest, e-mail: > > php3-digest-subscribelists.php.net > > > To search the mailing list archive, go to: > > > http://www.php.net/mailsearch.php3 > > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > > > > > > -- > > > PHP 3 Mailing List <http://www.php.net/> > > > To unsubscribe, send an empty message to > > php3-unsubscribelists.php.net > > > To subscribe to the digest, e-mail: > > php3-digest-subscribelists.php.net > > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to > > php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: > > php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > > >__________________________________________________ >Do You Yahoo!? >Send online invitations with Yahoo! Invites. >http://invites.yahoo.com > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: >http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net >

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com

attached mail follows:


So you don't normally bother catching errors because it's extra code?

--- Steven Sajous <ssajoushotmail.com> wrote: > > caffeine overdose? > > >From: "Mike Sheldon" <msheldondesertraven.com> > >To: "'Mark Selby'" <selby_markyahoo.com>, > <php3lists.php.net> > >CC: "'Toshihide Nakamura'" > <tonycrystaldonuts.com>, "'Pablo A.Godel'" > ><godelconectacom.com>, <peter.kocksbaygate.com> > >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > >Date: Tue, 18 Apr 2000 12:50:43 -0700 > >MIME-Version: 1.0 > >Received: from va.php.net ([216.200.201.204]) > by > >hunnington.familyonline.net (Post.Office MTA v3.5.3 > release 223 > >ID# 0-61021U6500L550S0V35) with SMTP id net > for > ><ssajousthis.com>; Tue, 18 Apr 2000 12:58:54 -0700 > >Received: (qmail 777 invoked by uid 518); 18 Apr > 2000 19:48:48 -0000 > >Received: (qmail 771 invoked from network); 18 Apr > 2000 19:48:48 -0000 > >Return-Path: > <php3-return-86548-ssajous=this.comlists.php.net> > >Mailing-List: contact php3-helplists.php.net; run > by ezmlm > >Delivered-To: mailing list php3lists.php.net > >Message-ID: > <02c101bfa96f$61f1e510$0178a8c0desertraven.com> > >X-Priority: 3 (Normal) > >X-MSMail-Priority: Normal > >X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 > (9.0.2910.0) > >Importance: Normal > >In-Reply-To: > <20000418192707.17458.qmailweb206.mail.yahoo.com> > >X-MimeOLE: Produced By Microsoft MimeOLE > V5.00.2919.6600 > > > >Just because programmers don't USE the tools they > are given does not mean > >that the tools are worthless. Yes, a LOT of CF > sites throw errors to the > >user instead of being handled properly. However, > this is caused by > >sloppy/under-educated programmers and poor > managment, not the tools. > > > >Yes, I *CAN* catch errors in PHP, but it takes a > *LOT* more code to do it, > >and is nowhere near as foolproof. Will this stop me > from writing in PHP? > >No, > >it won't. The other benefits very often outweigh > the disabilities. But that > >doesn't mean that I don't wish for better tools > occasionally. > > > >The strength of Open Source is often learning from > other projects, and > >incorporating their strengths into your product. > However, if you get into a > >state of irrational denial, whereby you stop > believing that other projects > >could possibly have good features, then you stop > looking for ways to > >improve > >your own product. If everyone believed that way, no > Open Source projects > >would exist at all, because we'd have all been > blindly defending MS-DOS as > >the best thing ever. > > > >There are precious few things in this life that > cannot be improved if only > >you would take the time to step back and get some > perspective. > > > > > >Relax. No one's going to take away your toys. > > > >'scuse me while I go play with my Greyhounds for a > little while... > > > >Michael J. Sheldon > >Internet Applications Developer > >Phone: 480.699.1084 > >http://www.desertraven.com/ > >PGP Key Available on Request > > > >-----Original Message----- > >From: Mark Selby [mailto:selby_markyahoo.com] > >Sent: Tuesday, April 18, 2000 12:27 > >To: peter.kocksbaygate.com; Mike Sheldon; 'Pablo > A.Godel' > >Cc: 'Toshihide Nakamura'; php3lists.php.net > >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > >Half of this is complete b**lshit - it's hardly > >uncommon to come across a site which spits CF > errors > >all over the (usually) frames (often high profile > >sites running on NT.) If you think your code is > going > >to have problems :- > >Redesign it > >Redesign the hardware > >Redesign the functions > >PHP can't help if you're writing shite. > > > >--- Peter Kocks <peter.kocksbaygate.com> wrote: > > > > > > Do you use the register_shutdown_function() ? > > > > > > I use it all the time to implement what I > believe > > > you're looking for. Write > > > your own error handling routine that sends a > message > > > to error_log and then > > > effectively deal with your code. Any time the > user > > > aborts or exit() is > > > called you'll get the registered shutdown > function > > > called. > > > > > > That said, I do agree that some improvement is > > > needed. For example, while > > > method constructors exist in classes, method > > > destructors do not, let alone > > > exception handling. > > > > > > --pk > > > > > > > > > > > > > -----Original Message----- > > > > From: Mike Sheldon > > > [mailto:msheldondesertraven.com] > > > > Sent: Tuesday, April 18, 2000 10:54 AM > > > > To: 'Pablo A.Godel' > > > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. > PHP > > > > > > > > > > > > Lord I hope this is a joke. > > > > > > > > Error logs are for polite little notes that > your > > > program leaves > > > > you to tell > > > > you it came across something unexpected, but > was > > > able to detect and > > > > compensate for it. They're not barf buckets. > > > > > > > > Silly me, I actually like to detect and > compensate > > > for errors instead of > > > > having my programs blow chunks. Ideally, a > visitor > > > to my site should never > > > > know there was a problem. Structured > > > error-handling gives me a consistent, > > > > predictable means of meeting this goal. I find > it > > > ironic that CF, with its > > > > unquestionably more primitive language, has > better > > > error-handling > > > > structures > > > > than PHP, which has far better language > structure. > > > > > > > > > > > > Michael J. Sheldon > > > > Internet Applications Developer > > > > Phone: 480.699.1084 > > > > http://www.desertraven.com/ > > > > PGP Key Available on Request > > > > > > > > -----Original Message----- > > > > From: godelconectacom.com > > > [mailto:godelconectacom.com] > > > > Sent: Tuesday, April 18, 2000 06:42 > > > > To: Mike Sheldon > > > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. > PHP > > > > > > > > > > > > You can disable "error displaying" editing > php.ini > > > and also you can > > > > send all error messages to a file, so you can > > > check it periodically > > > > for bugs... > === message truncated ===

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


Please can everyone calm down on this subject :)

At the end of the day we must look at other applications, such as Cold Fusion, to see if they have features that we should use within PHP. I like the error handling within Cold Fusion and think it would be really good to have something similar for PHP. If you want this feature, great, let's do something about it. If not, then I for one don't think there's any need to start being rude to others on the list - just don't get involved.

Anyone who wants to talk off-list about the possibility of adding error-handling features to PHP, please contact me.

Kind regards

Ade

attached mail follows:


Yes, I catch the errors. Pardon me for wishing it took four lines of code per page instead of 100.

Michael J. Sheldon Internet Applications Developer Phone: 480.699.1084 http://www.desertraven.com/ PGP Key Available on Request

-----Original Message----- From: Mark Selby [mailto:selby_markyahoo.com] Sent: Tuesday, April 18, 2000 13:03 To: Steven Sajous; php3lists.php.net Cc: tonycrystaldonuts.com; godelconectacom.com; peter.kocksbaygate.com Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP

So you don't normally bother catching errors because it's extra code?

--- Steven Sajous <ssajoushotmail.com> wrote: > > caffeine overdose? > > >From: "Mike Sheldon" <msheldondesertraven.com> > >To: "'Mark Selby'" <selby_markyahoo.com>, > <php3lists.php.net> > >CC: "'Toshihide Nakamura'" > <tonycrystaldonuts.com>, "'Pablo A.Godel'" > ><godelconectacom.com>, <peter.kocksbaygate.com> > >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > >Date: Tue, 18 Apr 2000 12:50:43 -0700 > >MIME-Version: 1.0 > >Received: from va.php.net ([216.200.201.204]) > by > >hunnington.familyonline.net (Post.Office MTA v3.5.3 > release 223 > >ID# 0-61021U6500L550S0V35) with SMTP id net > for > ><ssajousthis.com>; Tue, 18 Apr 2000 12:58:54 -0700 > >Received: (qmail 777 invoked by uid 518); 18 Apr > 2000 19:48:48 -0000 > >Received: (qmail 771 invoked from network); 18 Apr > 2000 19:48:48 -0000 > >Return-Path: > <php3-return-86548-ssajous=this.comlists.php.net> > >Mailing-List: contact php3-helplists.php.net; run > by ezmlm > >Delivered-To: mailing list php3lists.php.net > >Message-ID: > <02c101bfa96f$61f1e510$0178a8c0desertraven.com> > >X-Priority: 3 (Normal) > >X-MSMail-Priority: Normal > >X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 > (9.0.2910.0) > >Importance: Normal > >In-Reply-To: > <20000418192707.17458.qmailweb206.mail.yahoo.com> > >X-MimeOLE: Produced By Microsoft MimeOLE > V5.00.2919.6600 > > > >Just because programmers don't USE the tools they > are given does not mean > >that the tools are worthless. Yes, a LOT of CF > sites throw errors to the > >user instead of being handled properly. However, > this is caused by > >sloppy/under-educated programmers and poor > managment, not the tools. > > > >Yes, I *CAN* catch errors in PHP, but it takes a > *LOT* more code to do it, > >and is nowhere near as foolproof. Will this stop me > from writing in PHP? > >No, > >it won't. The other benefits very often outweigh > the disabilities. But that > >doesn't mean that I don't wish for better tools > occasionally. > > > >The strength of Open Source is often learning from > other projects, and > >incorporating their strengths into your product. > However, if you get into a > >state of irrational denial, whereby you stop > believing that other projects > >could possibly have good features, then you stop > looking for ways to > >improve > >your own product. If everyone believed that way, no > Open Source projects > >would exist at all, because we'd have all been > blindly defending MS-DOS as > >the best thing ever. > > > >There are precious few things in this life that > cannot be improved if only > >you would take the time to step back and get some > perspective. > > > > > >Relax. No one's going to take away your toys. > > > >'scuse me while I go play with my Greyhounds for a > little while... > > > >Michael J. Sheldon > >Internet Applications Developer > >Phone: 480.699.1084 > >http://www.desertraven.com/ > >PGP Key Available on Request > > > >-----Original Message----- > >From: Mark Selby [mailto:selby_markyahoo.com] > >Sent: Tuesday, April 18, 2000 12:27 > >To: peter.kocksbaygate.com; Mike Sheldon; 'Pablo > A.Godel' > >Cc: 'Toshihide Nakamura'; php3lists.php.net > >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP > > > > > >Half of this is complete b**lshit - it's hardly > >uncommon to come across a site which spits CF > errors > >all over the (usually) frames (often high profile > >sites running on NT.) If you think your code is > going > >to have problems :- > >Redesign it > >Redesign the hardware > >Redesign the functions > >PHP can't help if you're writing shite. > > > >--- Peter Kocks <peter.kocksbaygate.com> wrote: > > > > > > Do you use the register_shutdown_function() ? > > > > > > I use it all the time to implement what I > believe > > > you're looking for. Write > > > your own error handling routine that sends a > message > > > to error_log and then > > > effectively deal with your code. Any time the > user > > > aborts or exit() is > > > called you'll get the registered shutdown > function > > > called. > > > > > > That said, I do agree that some improvement is > > > needed. For example, while > > > method constructors exist in classes, method > > > destructors do not, let alone > > > exception handling. > > > > > > --pk > > > > > > > > > > > > > -----Original Message----- > > > > From: Mike Sheldon > > > [mailto:msheldondesertraven.com] > > > > Sent: Tuesday, April 18, 2000 10:54 AM > > > > To: 'Pablo A.Godel' > > > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. > PHP > > > > > > > > > > > > Lord I hope this is a joke. > > > > > > > > Error logs are for polite little notes that > your > > > program leaves > > > > you to tell > > > > you it came across something unexpected, but > was > > > able to detect and > > > > compensate for it. They're not barf buckets. > > > > > > > > Silly me, I actually like to detect and > compensate > > > for errors instead of > > > > having my programs blow chunks. Ideally, a > visitor > > > to my site should never > > > > know there was a problem. Structured > > > error-handling gives me a consistent, > > > > predictable means of meeting this goal. I find > it > > > ironic that CF, with its > > > > unquestionably more primitive language, has > better > > > error-handling > > > > structures > > > > than PHP, which has far better language > structure. > > > > > > > > > > > > Michael J. Sheldon > > > > Internet Applications Developer > > > > Phone: 480.699.1084 > > > > http://www.desertraven.com/ > > > > PGP Key Available on Request > > > > > > > > -----Original Message----- > > > > From: godelconectacom.com > > > [mailto:godelconectacom.com] > > > > Sent: Tuesday, April 18, 2000 06:42 > > > > To: Mike Sheldon > > > > Cc: 'Toshihide Nakamura'; php3lists.php.net > > > > Subject: RE: [PHP3] COldFusion/Netobjects v.s. > PHP > > > > > > > > > > > > You can disable "error displaying" editing > php.ini > > > and also you can > > > > send all error messages to a file, so you can > > > check it periodically > > > > for bugs... > === message truncated ===

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


May I add (as the person who started this all) that the discussions here have been VERY helpful. As always, the guys on this list have been fantastic in supplying me with excellent, first-hand, practical experience of both ColdFusion and working with PHP.

It has helped us compile an excellent presentation and we have a good, handy reference on the subject.

Once again, OpenSource has show itself to be the best possible solution. If we had tried to get this sort of information from Allaire we would have had salesment calling, brochures, marketing bumpf.

The OpenSource community, as always, acknowledged both the strengths and weaknesses of their (our) product, and this balanced view can only serve to make

the platform even better, even stronger, even more robust.

Oh, yes, and even more error-handling friendly!

Thanks to all! EVERYONE here is great!

Brad

PHPList wrote:

> Please can everyone calm down on this subject :) > > At the end of the day we must look at other applications, such as Cold > Fusion, to see if they have features that we should use within PHP. I like > the error handling within Cold Fusion and think it would be really good to > have something similar for PHP. If you want this feature, great, let's do > something about it. If not, then I for one don't think there's any need to > start being rude to others on the list - just don't get involved. > > Anyone who wants to talk off-list about the possibility of adding > error-handling features to PHP, please contact me. > > Kind regards > > Ade > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


On Tue, 18 Apr 2000, brad wrote:

> May I add (as the person who started this all) that the discussions > here have been > VERY helpful. As always, the guys on this list have been fantastic in > supplying me with excellent, first-hand, practical experience of both > ColdFusion and working with PHP. > > It has helped us compile an excellent presentation and we have a good, > handy reference on the subject.

So, in the interests of simplifying the process next time somebody asks, would it be feasible to make this presentation accessible to the public?

Considering how often it comes up, some public documentation comparing the two would probably be a handy thing.

Matt

attached mail follows:


On Tue, Apr 18, 2000 at 09:19:30AM -0700, Jayakumar Muthukumarasamy wrote: > > Is there a PHP Module for NSAPI? I couldn't find any with the PHP > distributions. Is there a reason why this isn't supported yet? Thanks very much.

Reason: Noone has done it yet.

You can find information on the NSAPI 4.1/4.0/3.x API here:

http://docs.iplanet.com/docs/manuals/enterprise.html

- Sascha

attached mail follows:


Believe me you PHP is not of any worth under NT it ment to be for open environment. Microsoft are again succeeding in forcing us to use their integrated package. I faced a problem with loading the LDAP library on NT and posted my problem everywhere, no one could help, even the core developers of PHP. Actually they didn't try, very busy I believe.

So what to do, go back to VBScript! although I would really love to try building my system with PHP, it's butiful language it seems!

Bara'a.

----- Original Message ----- From: Sascha Schumann <saschaschumann.cx> To: Lukas Hazlehurst <sofnologyxtra.co.nz> Cc: PHP User Mailing List <php3lists.php.net> Sent: Tuesday, April 18, 2000 3:54 PM Subject: Re: [PHP3] Using sessions under windows NT

> On Wed, Apr 19, 2000 at 01:10:37AM +1200, Lukas Hazlehurst wrote: > > Hello, > > > > I apologise if i've sent this twice, i tried sending it thru the newsgroup > > interface but i'm having some trouble with my news reader software. > > > > I'm running into a problem using sessions with PHP 4 rc1 on a win 2000 > > server with iis4 using isapi. > > > > What is happening is that as soon as php encounters a session_start() call > > in a page it completely dies and the page stops, it doesn't hang, it just > > stops at that point. > > > > When viewing the event log the following error is generated coming from the > > WAM service > > > > The HTTP server encountered an unhandled exception while processing the > > ISAPI Application ' > > php4isapi + 0x1137 > > wam!SE_TABLE::ReleaseExtension(class HSE_BASE *) + 0x6D6 > > wam!SE_TABLE::ReleaseExtension(class HSE_BASE *) + 0x1C3F > > w3svc!_WamDictatorDumpInfo8 + 0x4A5 > > w3svc!PARAM_LIST::CanonList(void) + 0x2386 > > w3svc!HTTP_REQ_BASE::BuildURLMovedResponse(class BUFFER *,class STR > > *,unsigned long,int) + 0x38D6 > > w3svc!HTTP_REQ_BASE::BuildURLMovedResponse(class BUFFER *,class STR > > *,unsigned long,int) + 0x3875 > > w3svc!HTTP_REQ_BASE::TestConnection(void) + 0x828 > > w3svc!HTTP_REQUEST::ReprocessURL(char *,enum HTTP_VERB) + 0x25D > > w3svc!DumpW3InfoToHTML + 0xA89 > > w3svc!DumpW3InfoToHTML + 0x1754 > > w3svc!MULTISZ::~MULTISZ(void) + 0x182 > > w3svc + 0x1862 > > w3svc!ADDRESS_CHECK::UnbindAddr(void) + 0x175 > > w3svc!ADDRESS_CHECK::UnbindAddr(void) + 0xEF > > ISATQ + 0x13D1 > > ISATQ + 0x1281 > > + 0x1B9518EF > > '. > > > > I have seen other references to php sessions on NT being very sensitive to > > the save_path not being correct. I have this set to /tmp but as i'm not > > sure exactly where php is looking for i have basically put /tmp directories > > _everywhere_, still no luck. > > Why don't you set it to c:\temp or some other existing directory? > > > > > Apart from this, the rest of PHP seems to be working really well under NT. > > > > Any help would be really appreciated, > > Lukas > > > > Sofnology Ltd. > > sofnologyxtra.co.nz > > http://www.sofnology.pctv.co.nz/ > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > - Sascha > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


It's late, and I'm tired, and a lot of this comes off more negatively than I would like. I'd love to find the time to rewrite it, and tone it down a lot, but I just don't have that kind of time. So, here it is, warts and all, and apologies in advance:

(I'm really not a mean person. Honest.)

In article <008501bfa981$962efb80$24f8e5c3emirates.net.ae>, baraasimaint2.co.ae ("Bara'a") wrote:

> Believe me you PHP is not of any worth under NT it ment to be for open > environment.

PHP works perfectly fine under Windows NT. Certainly faster than ASP, and interfaces to about 20 times as many other software packages.

It's certainly worth far more than the money you paid for ASP, and it's *FREE* to boot.

> Microsoft are again succeeding in forcing us to use their > integrated package.

ASP integrates to LDAP? Wow. That's interesting. Is that native, through ODBC, or via a third-party proprietary COM/DCOM object. If COM/DCOM, how much does it cost and who makes it?

Hey, if it's COM, maybe you could use the PHP COM support instead of trying to find/compile the LDAP libraries.

> I faced a problem with loading the LDAP library on NT > and posted my problem everywhere, no one could help, even the core > developers of PHP. Actually they didn't try, very busy I believe.

Correct me if I'm wrong, but you were trying to load LDAP under PHP4, which is still in Beta (okay, Release Candidate). Not everything is all packed up and ready to roll in a Beta release.

I'm not making any promises on behalf of other *volunteers*, but you're probably going to have working LDAP libraries under PHP4 much faster than you'll ever get any real help out of M$. All I ever got from M$ tech support was annoying phone calls at ungodly hours waking me up to say that they wanted to close the case. Not that they had a solution, or anything, they just wanted to close it. I think they have to close cases just to keep their numbers good.

You are correct about one thing: The PHP developers are frightfully busy, and can't drop everything to compile LDAP, a relatively esoteric piece of software with few users. Actually, there are probably only one or two PHP core developers who have ever compiled LDAP on Windows, and they're probably the most busy, what with a brand-spanking-new ISAPI module to make rock-solid for every PHP/IIS user on the planet. Though I guess Zeev and Andi might win the "most busy" award, what with a new company with multiple products slated for release, an all-new Zend engine, and innumerable little things I can't even guess at.

It's also Passover in Tel Aviv, so the whole city is pretty much closed down...

If you really want that LDAP library, the source code is (presumably) out there somewhere, and there's nothing to stop you from acquiring it, compiling it, and getting it to work, except perhaps the lack of a VC++ 6.x IDE. (Sure wish PHP compiled on a free Windows compiler. Oh well.)

I will apologize for not yet responding to your direct followup email asking me where to find the LDAP DLLs. I don't know. I'm not really a Windows user, and have never used LDAP, and barely even understand what LDAP is or what it's for (kinda like a database crossed with a data soup?), so really don't know where it is. It's on my list to surf the net and search for you, but since I reckon you can utilise an Internet search engine as well as I can, it didn't exactly rocket to the top of my list... > So what to do, go back to VBScript! although I would really love to try > building my system with PHP, it's butiful language it seems!

It is a beautiful language: Made so by developers taking the responsiblity to pick up where other volunteers have left off when they find a feature that they need is missing or a task that they want completed is incomplete.

Again, this is probably sounds a lot more sarcastic and critical than it is meant to be: PHP is OpenSource. The way OpenSource works is that when something is wrong, you work to fix it.

attached mail follows:


In article <035501bfa937$7d811450$0101a8c0LUKAS>, sofnologyxtra.co.nz ("Lukas Hazlehurst") wrote:

> Hello, > > I apologise if i've sent this twice, i tried sending it thru the newsgroup > interface but i'm having some trouble with my news reader software.

I think the PHP newsgroup is read only.

The mailing list is open, expressly so that one can read news and email questions/answers without subscribing.

Your news software may allow you to "reply via email" and then alter the To: or Cc: to include php3lists.php.net

attached mail follows:


Not so hard at all, Mr. Tate.

Let's say you have a table called completed (to hold the completed quizzes), and it contains 2 ids like this:

create table completed_quizzes ( player int, quiz int );

"player" is a foreign key to some table with player information and "quiz" is a foreign key to some table with quiz information.

(Of course, you'll want a primary key on (player, quiz) and probably non-unique indexes on the player and the quiz columns to help speed up queries such as the one below.

Let's populate the table a bit (view this in an ASCII mail reader, because it contains the tab character for formatting):

player quiz

1 1 1 5 1 3 2 1 2 2 3 1 3 2 3 5 3 4

A new player comes along and plays quiz #2.

Run this SQL:

SELECT quiz, count(player) AS ct FROM completed_quizzes WHERE player IN (SELECT player FROM completed_quizzes WHERE quiz = 2) AND quiz != 2 GROUP BY quiz ORDER BY ct DESC;

And you'll get the following:

quiz|ct ----+-- 1| 2 4| 1 5| 1 (3 rows)

Which is exactly what you want! Notice that the only thing you have to replace are the 2's in "...WHERE quiz = 2) AND quiz != 2...", which is easily done with variables. In a PHP program, it's something like "...WHERE quiz = $quiznum) AND quiz != $quiznum...".

Doug

Mr. Tate was heard at 05:49 PM 4/18/00 +0200 to say: >First of all, this is my first attempt at posting to this NG, so please >forgive me if I ask questions already answered. I checked myself here and in >the archive and couldn't find any reference to what I'm asking. > >It looks like I'm having a lot of trouble finding an answer, so I thank in >advance anyone who can share a thought on this. > >I have a MySQL database that handles a quizzes high scores. Database has >name of the quiz, score and name of the player. At the end of every quiz I >would like to recommend the player other quizzes, based on what other >players played. This is something similar to what Amazon does with books and >videos. >My logical steps would be: >1) Finding a DISTINCT list of every player who played, say, quiz A. I will >call this list of player "A-Players". >2) Finding a DISTINCT list of every quiz played by those contained in the >"A-Players" list. I will call this list "A-Players-Favourites". >3) Count the "A-Players-Favourites" list and sort it so that I can have just >the 3-4 top played quizzes. >4) Suggest every player who plays the quiz A the first 3-4 quizzes of >"A-Players-Favourites" list. > >Is there a way to do this using a PHP file? If not, is there anything >similar to this? > >Thanks very much in advance! >

attached mail follows:


Hello!

Is there actually anyone out there who is using PHP3/4 on Win NT on a production site, that is a real life site serving some serious amount of pages?

I have been thinking of doing this, but I am a bit uncertain about the stability and perfomance of PHP3/4 under Win NT?

Do I have any reasons why I should feel this way?

Best regards, Anders Gaarsdal Holst

attached mail follows:


Zack Beatty would like to recall the message, "Oracle, Windows, and PHP".

attached mail follows:


Hi

I have red hat 6.1 and i'm looking for a software to process financial transactions with suport for php3.

Do you know about one

Thanks.

attached mail follows:


Gerardo Herrera wrote:

> Hi > > I have red hat 6.1 and i'm looking for a software to process financial > transactions with suport for php3. > > Do you know about one > > Thanks. > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

Redhat CCVS http://www.redhat.com/products/ccvs/

attached mail follows:


At 02:26 PM 4/18/00 , Gerardo Herrera wrote: >i'm looking for a software to process financial >transactions with suport for php3.

Just start an account with Cybercash: www.cybercash.com or Signio: www.signio.com

Then, when you're all set up with them, download their MCK software, and compile PHP4 --with-cybercash=/your-cybercash-mck/c-api/

I'm about to set up a site with this. Other folks on the list here have said it's not hard.

attached mail follows:


Well, I checked the FAQ, and there's nothing there -- in fact the FAQ is adamant that persistant connections are *not* what I'm looking for.

Essentially, I want to be able to run a web site where users enter a username/password before accessing pages. Once validated, they may do *several* things, and I need to be able to track and validate them for each operation without requiring re-entering their ID each time. Passing post/get variables is too hackable, cookies are turned off on many people's browsers, so I'm left hoping for something similar to how java servlets do it. Any advice? Anyone successfully doing something like this with PHPx ?

---
Dennis Taylor
---
The opinions expressed herein are mine. Get your own opinions!
---

attached mail follows:


Hackability is always a factor - the gold in the Bank of England is potentially 'hackable.' Ultimately you need to decide to get something done - why not mimic what some of the high profile sites have done? They'd have been hacked if it was easy enough - are you protecting the Bank of England?

--- "I.S. Manager" <ismgrpctc.com> wrote: > Well, I checked the FAQ, and there's nothing there > -- in fact the FAQ is > adamant that persistant connections are *not* what > I'm looking for. > > Essentially, I want to be able to run a web site > where users enter a > username/password before accessing pages. Once > validated, they may do > *several* things, and I need to be able to track and > validate them for each > operation without requiring re-entering their ID > each time. Passing > post/get variables is too hackable, cookies are > turned off on many people's > browsers, so I'm left hoping for something similar > to how java servlets do > it. Any advice? Anyone successfully doing something > like this with PHPx ? > > --- > Dennis Taylor > --- > The opinions expressed herein are mine. Get your own > opinions! > --- > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > >

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


I.S. Manager writes: > Well, I checked the FAQ, and there's nothing there -- in fact the FAQ is > adamant that persistant connections are *not* what I'm looking for. > > Essentially, I want to be able to run a web site where users enter a > username/password before accessing pages. Once validated, they may do > *several* things, and I need to be able to track and validate them for each > operation without requiring re-entering their ID each time. Passing > post/get variables is too hackable, cookies are turned off on many people's > browsers, so I'm left hoping for something similar to how java servlets do > it. Any advice? Anyone successfully doing something like this with PHPx ? > > --- > Dennis Taylor > --- > The opinions expressed herein are mine. Get your own opinions! > ---

What you're looking for is called session management. It is available natively in PHP4 (check the manual), and can be bolted onto PHP3 using stuff like PHPLIB or by writing your own. The general idea is that you generate a unique (and hopefully hard to guess :) ID for the user, and store the user-specific information server-side. You use some method of getting the ID from page to page (hidden variables, embedded URL values, etc; the generally recommended way is via a cookie). Then, when a page is loaded, you receive this ID back from the client and use it to find that client's information, be it in a database or text file or whatever.

Some links that should help you figure things out:

http://phplib.netuse.de http://www.php.net/manual/ref.session.php

Cheers,

Torben

-- 
+----------------------------------------------------------------+
|Torben Wilson <torbenphp.net>                     Netmill iTech|
|http://www.coastnet.com/~torben            http://www.netmill.fi|
|Ph: 1 250 383-9735                             torbennetmill.fi|
+----------------------------------------------------------------+

attached mail follows:


>>Passing post/get variables is too hackable, cookies are turned off on many people's >>browsers, so I'm left hoping for something similar to how java servlets do >>it. Any advice? Anyone successfully doing something like this with PHPx ?

Ok smack me if I'm wrong here but this is exactly how java servlets (yuk) do this. That is why there are the methods isRequestedSessionIdFromCookie() and isRequestedSessionIdFromURL() (http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpServlet Request.html)

(gotta love those snappy and easy to remember Java method names :)

and why it says in the manual : "The server can maintain a session in many ways such as using cookies or rewriting URLs." (http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpSes sion.html)

As the others have said use phpLib for PHP3 and the inbuilt sessions of PHP4. You can even make your own if your kind of paranoid, it's not hard and there are examples out there. The important thing is to make them as unhackable as possible by making a hard to guess session ID (ie something like "sessIDA34hfsHLL8wwjfsas8d9ASDha9aaksdjh" instead of just "1" :)

Adam

attached mail follows:


Huh. I was under the impression that servlets actually maintained state, possibly by a dedicated process and a tcp connection. I'm prepared to sit corrected.

I have vague memories of a type of cookie that exists in-memory only, i.e. is never written to disk, and disappears as soon as the browser is closed. 1) Am I hallucinating? 2) Is this portable? (i.e. not a proprietary m$ thing) and 3) Does it bypass the dont-write-cookies problem or will this not work either if user has cookies turned off?

At 08:50 PM 4/18/00 +0100, A Robertson wrote: > >Ok smack me if I'm wrong here but this is exactly how java servlets (yuk) do >this. >That is why there are the methods isRequestedSessionIdFromCookie() and >isRequestedSessionIdFromURL() >(http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpServlet >Request.html) >

---
Dennis Taylor
---
The opinions expressed herein are mine. Get your own opinions!
---

attached mail follows:


Hi,

>Huh. I was under the impression that servlets actually maintained state, >possibly by a dedicated process and a tcp connection. I'm prepared to sit >corrected.

I'm no servlet expert but thats what came up when I searched the online docs. Seems to me if you used a dedicated connection you'd end up with a whole heap more problems from firewalls , proxys etc, but I could be wrong as well :)

>I have vague memories of a type of cookie that exists in-memory only, i.e. >is never written to disk, and disappears as soon as the browser is closed. >1) Am I hallucinating? Nope, just set the cookies lifetime to 0.

>2) Is this portable? (i.e. not a proprietary m$ thing) and Well I guess it depends on the browser to actualy respect the cookie lifetime but as a rule YES.

> 3) Does it bypass the dont-write-cookies problem or will this >not work either if user has cookies turned off? Again depends on the browser but I can see a lot of cookie paranoids complaining if it did. Most systems (eg phpLib, PHP4 etc) will test if cookies are enabled and drop back to appending a query string on all links if needed.

Adam

attached mail follows:


Trying to compile on Turbolinux 6.0, PHP 4.0RC1 w/ apache 1.3.12 and mod_perl-1.22.

[root]#./configure --with-mysql --with-apache=../apache_1.3.12 --enable-track-vars

(etc etc)

[root]#make Making all in Zend make[1]: Entering directory `/usr/local/php-4.0RC1/Zend' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/php-4.0RC1/Zend' Making all in ext make[1]: Entering directory `/usr/local/php-4.0RC1/ext' Making all in db make[2]: Entering directory `/usr/local/php-4.0RC1/ext/db' make[3]: Entering directory `/usr/local/php-4.0RC1/ext/db' make[3]: Nothing to be done for `all-p'. make[3]: Leaving directory `/usr/local/php-4.0RC1/ext/db' make[2]: Leaving directory `/usr/local/php-4.0RC1/ext/db' Making all in gd make[2]: Entering directory `/usr/local/php-4.0RC1/ext/gd' make[3]: Entering directory `/usr/local/php-4.0RC1/ext/gd' gcc -DHAVE_CONFIG_H -I. -I/usr/local/php-4.0RC1/ext/gd -I../.. -I../../Zend -I/usr/local/php-4.0RC1 -I/usr/include/freetype -I/usr/local/php-4.0RC1/ext/mysql/libmysql -I/usr/local/php-4.0RC1/ext/xml/expat/xmltok -I/usr/local/php-4.0RC1/ext/xml/expat/xmlparse -I/usr/include -DXML_BYTE_ORDER=12 -D_REENTRANT -g -O2 -Wall -c gd.c && touch gd.lo In file included from gd.c:32: php_gd.h:50: gd.h: No such file or directory gd.c:46: gd.h: No such file or directory gd.c:47: gdfontt.h: No such file or directory gd.c:48: gdfonts.h: No such file or directory gd.c:49: gdfontmb.h: No such file or directory gd.c:50: gdfontl.h: No such file or directory gd.c:51: gdfontg.h: No such file or directory make[3]: *** [gd.lo] Error 1 make[3]: Leaving directory `/usr/local/php-4.0RC1/ext/gd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/php-4.0RC1/ext/gd' make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/local/php-4.0RC1/ext' make: *** [all-recursive] Error 1

So I go to the site and poke around the faq, and seem to find the answer in question 4.3.. so I try some different configuration lines, such as below.

./configure --with-apache=../apache_1.3.12 --enable-track-vars --with-mysql --with-gdbm=/usr/include/gdbm

env CPPFLAGS=-I/usr/include LDFLAGS=-L/usr/lib ./configure

same results.. what am I doing wrong?

Thanks, Chad

attached mail follows:


Dear All,

Would you give me a tip for this problem. I want to put a word in strings. ex) $string="This is a test" want to change $string_result="This is not a test"

Thanks,


attached mail follows:


At 20:19 18.04.2000, GwangHee Yi wrote: > > Dear All, > >Would you give me a tip for this problem. >I want to put a word in strings. >ex) > $string="This is a test" >want to change >$string_result="This is not a test" > >Thanks, >

are you kidding? this is neither a question nor a problem and you answered it yourself!

mit freundlichen Grüßen,

Gregor Welters

----------------------------- Welters PC-Service Grafenberger Allee 81 40237 Düsseldorf Germany Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093 mailto: gwelterswelters.de look at: http://www.welters.de

attached mail follows:


You need to know where you want to put the new word. I'd use str_replace (http://www.php.net/manual/function.str-replace.php3) eg : $string_result = str_replace("a", "not a", $string);

Oh, and please don't use html mail, it messes up the digest versions of this list and dumb old Outlook will not let me turn it off to reply! :)

Adam

-----Original Message----- From: GwangHee Yi [mailto:GwangHeeglobalist.net] Sent: 18 April 2000 19:20 To: php3lists.php.net Subject: [PHP3] String Input

Dear All,

Would you give me a tip for this problem. I want to put a word in strings. ex) $string="This is a test" want to change $string_result="This is not a test"

Thanks,


attached mail follows:


> At 20:19 18.04.2000, GwangHee Yi wrote:

> > > >Would you give me a tip for this problem. > >I want to put a word in strings. > >ex) > > $string=3D"This is a test" > >want to change > >$string_result=3D"This is not a test"

$string_result = substr($string, 0, 7) . " not " . substr($string, 8);

attached mail follows:


I am trying to search an string or an array for a specific value and can not figure out an efficient way of doing it. Here is the problem. I have two strings or arrays if that would be easier.

First string looks like this. 1 3 4

Second string looks like this.

1 2 3 4 5 6 7 8 9 10

All the integers are seperated by a \n character. I need to find out which numbers from the 2nd string are not in the first string. The numbers represent distribution lists ID numbers and I want to find out which lists someone is NOT a member of.

Thanks,

Keith Vance Web Developer keithvbzlninc.com (206) 436-3874

attached mail follows:


On Tue, 18 Apr 2000, Keith Vance wrote:

> I am trying to search an string or an array for a specific value and can > not figure out an efficient way of doing it. Here is the problem. I have > two strings or arrays if that would be easier.

Hi Keith--

Associative arrays are useful for finding the difference between two arrays.

<?php $string1 = "1\n3\n4"; $string2 = "1\n2\n3\n4\n5\n6\n7\n8\n9\n10"; $array1 = explode("\n", $string1); $array2 = explode("\n", $string2); for ($i = 0; $i < count($array1); $i++) { $associative_array[$array1[$i]] = 1; } print "Not a member of the following lists:<br>\n"; for ($i = 0; $i < count($array2); $i++) { if (!$associative_array[$array2[$i]]) { print "$array2[$i]<br>\n"; } } ?>

michael

attached mail follows:


At 20:59 18.04.2000, Keith Vance wrote: >I am trying to search an string or an array for a specific value and can >not figure out an efficient way of doing it. Here is the problem. I have >two strings or arrays if that would be easier. > >First string looks like this. >1 >3 >4 > >Second string looks like this. > >1 >2 >3 >4 >5 >6 >7 >8 >9 >10 > >All the integers are seperated by a \n character. I need to find out >which numbers from the 2nd string are not in the first string. The >numbers represent distribution lists ID numbers and I want to find out >which lists someone is NOT a member of.

RTFM: array-functions,string-functions: explode() , in_array() , strpos() (rem: doesn't function correctly, therefore read strlen() and strstr() to replace strpos with strlen(strstr()) mit freundlichen Grüßen,

Gregor Welters

----------------------------- Welters PC-Service Grafenberger Allee 81 40237 Düsseldorf Germany Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093 mailto: gwelterswelters.de look at: http://www.welters.de

attached mail follows:


Thank you. That was the kind of good information I needed to get me going in the right direction.

-----Original Message----- From: Michael Pohl [mailto:michaelnewtopia.com] Sent: Tuesday, April 18, 2000 12:33 PM To: Keith Vance Cc: PHP3 Support (E-mail) Subject: Re: [PHP3] searching a string or an array

On Tue, 18 Apr 2000, Keith Vance wrote:

> I am trying to search an string or an array for a specific value and can > not figure out an efficient way of doing it. Here is the problem. I have > two strings or arrays if that would be easier.

Hi Keith--

Associative arrays are useful for finding the difference between two arrays.

<?php $string1 = "1\n3\n4"; $string2 = "1\n2\n3\n4\n5\n6\n7\n8\n9\n10"; $array1 = explode("\n", $string1); $array2 = explode("\n", $string2); for ($i = 0; $i < count($array1); $i++) { $associative_array[$array1[$i]] = 1; } print "Not a member of the following lists:<br>\n"; for ($i = 0; $i < count($array2); $i++) { if (!$associative_array[$array2[$i]]) { print "$array2[$i]<br>\n"; } } ?>

michael

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


In article <3BBB77BA22DBD31184C80050DA7AA660128B9C144.bzln.com>, keithvbzln.com (Keith Vance) wrote:

> I am trying to search an string or an array for a specific value and can > not figure out an efficient way of doing it. Here is the problem. I have > two strings or arrays if that would be easier. > > First string looks like this. > 1 > 3 > 4 > > Second string looks like this. > > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > > All the integers are seperated by a \n character. I need to find out > which numbers from the 2nd string are not in the first string. The > numbers represent distribution lists ID numbers and I want to find out > which lists someone is NOT a member of.

If the lists are always in order, you can probably iterate through each string with strtok faster than exploding and suchlike...

attached mail follows:


Addressed to: Keith Vance <keithvbzln.com> php3lists.php.net

** Reply to note from Keith Vance <keithvbzln.com> Tue, 18 Apr 2000 11:59:07 -0700 > > I am trying to search an string or an array for a specific value and > can not figure out an efficient way of doing it. Here is the problem. > I have two strings or arrays if that would be easier. > > First string looks like this. 1 3 4 > > Second string looks like this. > > 1 2 3 4 5 6 7 8 9 10 > > All the integers are seperated by a \n character. I need to find out > which numbers from the 2nd string are not in the first string. The > numbers represent distribution lists ID numbers and I want to find out > which lists someone is NOT a member of. >

I would do something like this:

# Make list 1 into an array. $A = explode( "\n", $String1 );

# Now pack it into a hash with the index set to the value. The # value of the hash is not important. while( list( $Index, $Value ) = each( $A )) { $Hash[ $Value ] = true; }

# Yes, I know hashes and arrays are the same thing in PHP, but # I still think of arrays as having sequential numeric indexes # and hashes as having arbitrary index values...

# Make list 2 into an array $A = explode( "\n", $String2 );

# Find out... while( list( $Index, $Value ) = each( $A )) { if( empty( $Hash[ $Value ] )) { echo( "The value $Value IS in string2, but not string1<BR>\n" ); } }

Rick Widmer Internet Marketing Specialists www.developersdesk.com

attached mail follows:


How do I find the last primary key value when performing a SELECT on a mySQL database?

Basically, I'm trying to get the last 'ID' (primary key) in a table. I then want to add one to that number to identify the next ID number. Boy, I hope that makes sense?

I have used:

$records=mySQL_num_rows($housesresult); $nextrecord=$records+1;

but this only return the total number of records in the database, not the last/next ID value.

Bryan

attached mail follows:


At 21:21 18.04.2000, Bryan - Utopian Web Productions wrote: >How do I find the last primary key value when performing a SELECT on a >mySQL database? > >Basically, I'm trying to get the last 'ID' (primary key) in a table. I >then want to add one to that number to identify the next ID number. Boy, I >hope that makes sense? > >I have used: > > $records=mySQL_num_rows($housesresult); > $nextrecord=$records+1; > >but this only return the total number of records in the database, not the >last/next ID value.

you mean the mysql_insert_id() RTFM: mysql-functions

mit freundlichen Grüßen,

Gregor Welters

----------------------------- Welters PC-Service Grafenberger Allee 81 40237 Düsseldorf Germany Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093 mailto: gwelterswelters.de look at: http://www.welters.de

attached mail follows:


This only works with an INSERT query and REPLACE operations. I was wondering if there is a way to retrieve the last key when a SELECT query is performed?

Bryan

----- Original Message ----- From: Gregor Welters <gregorwelters.de> To: Bryan - Utopian Web Productions <bryanuwebpro.com> Cc: <php3lists.php.net> Sent: Tuesday, April 18, 2000 3:36 PM Subject: Re: [PHP3] Last key value

> At 21:21 18.04.2000, Bryan - Utopian Web Productions wrote: > >How do I find the last primary key value when performing a SELECT on a > >mySQL database? > > > >Basically, I'm trying to get the last 'ID' (primary key) in a table. I > >then want to add one to that number to identify the next ID number. Boy, I > >hope that makes sense? > > > >I have used: > > > > $records=mySQL_num_rows($housesresult); > > $nextrecord=$records+1; > > > >but this only return the total number of records in the database, not the > >last/next ID value. > > you mean the mysql_insert_id() RTFM: mysql-functions > > > > mit freundlichen Grüßen, > > Gregor Welters > > ----------------------------- > Welters PC-Service Grafenberger Allee 81 40237 Düsseldorf Germany > Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093 > mailto: gwelterswelters.de look > at: http://www.welters.de > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

attached mail follows:


Try this and let me know if it works. I got it from section "7.4.13 Functions for use with GROUP BY clauses" in the MySQL manual. select MAX(what ever your primary key is)from table It should find what ever highest value then you can add one to it. Phillip

How do I find the last primary key value when performing a SELECT on a mySQL database?

Basically, I'm trying to get the last 'ID' (primary key) in a table. I then want to add one to that number to identify the next ID number. Boy, I hope that makes sense?

I have used:

$records=mySQL_num_rows($housesresult); $nextrecord=$records+1;

but this only return the total number of records in the database, not the last/next ID value.

Bryan

attached mail follows:


Hi,

If the last id value is also the greatest, you could do: <? $result = MYSQL_QUERY("SELECT id FROM table_name order by id desc limit 1") or die("Bad query: ".mysql_error()); $row=mysql_fetch_array($result);

$this_id = $row["id"]; echo "This id = $this_id<BR>\n";

$next_id = $row["id"]+1; echo "Next id = $next_id<BR>\n"; ?>

Best Regards, Bill Zeller -> Scriptmakers.com (in beta)

--- Bryan - Utopian Web Productions <bryanuwebpro.com> wrote: > This only works with an INSERT query and REPLACE > operations. I was wondering > if there is a way to retrieve the last key when a > SELECT query is performed? > > Bryan > > > ----- Original Message ----- > From: Gregor Welters <gregorwelters.de> > To: Bryan - Utopian Web Productions > <bryanuwebpro.com> > Cc: <php3lists.php.net> > Sent: Tuesday, April 18, 2000 3:36 PM > Subject: Re: [PHP3] Last key value > > > > At 21:21 18.04.2000, Bryan - Utopian Web > Productions wrote: > > >How do I find the last primary key value when > performing a SELECT on a > > >mySQL database? > > > > > >Basically, I'm trying to get the last 'ID' > (primary key) in a table. I > > >then want to add one to that number to identify > the next ID number. Boy, > I > > >hope that makes sense? > > > > > >I have used: > > > > > > $records=mySQL_num_rows($housesresult); > > > $nextrecord=$records+1; > > > > > >but this only return the total number of records > in the database, not the > > >last/next ID value. > > > > you mean the mysql_insert_id() RTFM: > mysql-functions > > > > > > > > mit freundlichen Grüßen, > > > > Gregor Welters > > > > ----------------------------- > > Welters PC-Service Grafenberger Allee 81 40237 > Düsseldorf Germany > > Tel: 0211/9660096 Mobil: 0173/2776469 > Fax: > 0211/9660093 > > mailto: gwelterswelters.de look > > at: http://www.welters.de > > > > > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > >

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


Thanks everyone.

Actually, I took a few bits from everyone's advise and put the following together. WORKS GREAT !!

$next_sql="SELECT max(ID) FROM $table_name"; $result=mySQL_db_query($data_base, $next_sql, $conn); $row=mySQL_fetch_array($result); $nextrecord=$row[0]+1;

echo $nextrecord;

Bryan

----- Original Message ----- From: Bill Zeller <billzelleryahoo.com> To: Bryan - Utopian Web Productions <bryanuwebpro.com>; Gregor Welters <gregorwelters.de> Cc: <php3lists.php.net> Sent: Tuesday, April 18, 2000 5:09 PM Subject: Re: [PHP3] Last key value

> Hi, > > If the last id value is also the greatest, you could > do: > <? > $result = MYSQL_QUERY("SELECT id FROM table_name order > by id desc limit 1") or die("Bad query: > ".mysql_error()); > $row=mysql_fetch_array($result); > > $this_id = $row["id"]; > echo "This id = $this_id<BR>\n"; > > $next_id = $row["id"]+1; > echo "Next id = $next_id<BR>\n"; > ?> > > > > > Best Regards, > Bill Zeller -> Scriptmakers.com (in beta) > > --- Bryan - Utopian Web Productions > <bryanuwebpro.com> wrote: > > This only works with an INSERT query and REPLACE > > operations. I was wondering > > if there is a way to retrieve the last key when a > > SELECT query is performed? > > > > Bryan > > > > > > ----- Original Message ----- > > From: Gregor Welters <gregorwelters.de> > > To: Bryan - Utopian Web Productions > > <bryanuwebpro.com> > > Cc: <php3lists.php.net> > > Sent: Tuesday, April 18, 2000 3:36 PM > > Subject: Re: [PHP3] Last key value > > > > > > > At 21:21 18.04.2000, Bryan - Utopian Web > > Productions wrote: > > > >How do I find the last primary key value when > > performing a SELECT on a > > > >mySQL database? > > > > > > > >Basically, I'm trying to get the last 'ID' > > (primary key) in a table. I > > > >then want to add one to that number to identify > > the next ID number. Boy, > > I > > > >hope that makes sense? > > > > > > > >I have used: > > > > > > > > $records=mySQL_num_rows($housesresult); > > > > $nextrecord=$records+1; > > > > > > > >but this only return the total number of records > > in the database, not the > > > >last/next ID value. > > > > > > you mean the mysql_insert_id() RTFM: > > mysql-functions > > > > > > > > > > > > mit freundlichen Grüßen, > > > > > > Gregor Welters > > > > > > ----------------------------- > > > Welters PC-Service Grafenberger Allee 81 40237 > > Düsseldorf Germany > > > Tel: 0211/9660096 Mobil: 0173/2776469 > > Fax: > > 0211/9660093 > > > mailto: gwelterswelters.de look > > > at: http://www.welters.de > > > > > > > > > > > > > > > -- > > > PHP 3 Mailing List <http://www.php.net/> > > > To unsubscribe, send an empty message to > > php3-unsubscribelists.php.net > > > To subscribe to the digest, e-mail: > > php3-digest-subscribelists.php.net > > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > > > > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to > > php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: > > php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: > > http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > > > __________________________________________________ > Do You Yahoo!? > Send online invitations with Yahoo! Invites. > http://invites.yahoo.com >

attached mail follows:


In article <008c01bfa96b$4ab2f460$5dbe4518orgl1.on.wave.home.com>, bryanuwebpro.com ("Bryan - Utopian Web Productions") wrote:

> How do I find the last primary key value when performing a SELECT on a = > mySQL database? > > Basically, I'm trying to get the last 'ID' (primary key) in a table. I = > then want to add one to that number to identify the next ID number. Boy, = > I hope that makes sense?

You don't.

Don't do that.

Remember that your communications are asynchronous.

It's only a matter of time before your site has two hits at the same time, and two people's IDs get crossed, or they both get the same ID the way you are doing it.

Do the insert, and use mysql_get_lastid() or whatever it is. Anything else, and you're just asking for trouble.

attached mail follows:


welcome back Richard Lynch

jason

attached mail follows:


Hi,

I am having a problem...please help me out. Thanks...

If I set a cookie name called "customer".

And in the same page i have the following form

<form method="post" action="whatever">

<input type="checkbox" name="customer[0]" value="yes"> <input type="checkbox" name="customer[1]" value="yes"> <input type="checkbox" name="customer[2]" value="yes">

</form>

when i use post method to get the checkbox value to next pages.... the values of those check box should be customer[0]="yes", customer[1]="yes" and customer[2]="yes"...assume i have checked all boxes...

But , My problem is that those check box values are changed....not "yes" anymore...something strange...eg...customer[0]="m" , customer[1]="a" and customer[2]="r"...eventhough...i did not check the box at the first place...

I wonder what is happening ...or Do I allow to use the same name for cookie and input box name such as "customer"....or this is a bug????...or my machine fault???? or Memory problem????

Thank You so Much

Mark Lo

attached mail follows:


On Wed, 19 Apr 2000, Mark Lo wrote:

> If I set a cookie name called "customer". > > And in the same page i have the following form > > <form method="post" action="whatever"> > > <input type="checkbox" name="customer[0]" value="yes"> > <input type="checkbox" name="customer[1]" value="yes"> > <input type="checkbox" name="customer[2]" value="yes"> > > </form> > > when i use post method to get the checkbox value to next pages.... > the values of those check box should be customer[0]="yes", > customer[1]="yes" and customer[2]="yes"...assume i have checked all > boxes... > > But , My problem is that those check box values are changed....not > "yes" anymore...something strange...eg...customer[0]="m" , > customer[1]="a" and customer[2]="r"...eventhough...i did not check the > box at the first place... > > I wonder what is happening ...or Do I allow to use the same name for > cookie and input box name such as "customer"....or this is a > bug????...or my machine fault???? or Memory problem????

What I imagine is happening is that since the variable $customer is taken by the cookie you set, the form variables named cookie are being discarded when you submit the form. The reason you're seeing values for $customer[0], [1], and [2] is probably that your cookie is set to a string that begins with 'mar'. This is because strings can be used like arrays. So if you set a cookie and read it like so:

SetCookie('Test','foof');

echo 'Test[0] is: ' . $Test[0]; // This will be 'f' echo '<br>Test[1] is: ' . $Test[1]; // This will be 'o' echo '<br>Test[2] is: ' . $Test[2]; // This will be 'o' echo '<br>Test[3] is: ' . $Test[3]; // This will be 'f'

I'd suggest simply keeping your cookie names distinct from your form variable names.

Matt

attached mail follows:


In article <38FCB99A.FE84CD99netvigator.com>, marklokynetvigator.com (Mark Lo) wrote:

> Hi, > > I am having a problem...please help me out. Thanks... > > If I set a cookie name called "customer". > > And in the same page i have the following form > > <form method="post" action="whatever"> > > <input type="checkbox" name="customer[0]" value="yes"> > <input type="checkbox" name="customer[1]" value="yes"> > <input type="checkbox" name="customer[2]" value="yes"> > > </form> > > when i use post method to get the checkbox value to next pages.... > the values of those check box should be customer[0]="yes", > customer[1]="yes" and customer[2]="yes"...assume i have checked all > boxes... > > But , My problem is that those check box values are changed....not > "yes" anymore...something strange...eg...customer[0]="m" , > customer[1]="a" and customer[2]="r"...eventhough...i did not check the > box at the first place... > > I wonder what is happening ...or Do I allow to use the same name for > cookie and input box name such as "customer"....or this is a > bug????...or my machine fault???? or Memory problem????

You're better off just switching one variable name or the other, but you *could* use $HTTP_POST_VARS and $HTTP_COOKIE_VARS.

Whether Cookies over-ride Post or vice versa (and throw Get in the mix as well) is controlled by the GPC settings in php3.ini

But unless you have a really good reason for making obscure code, just change one of the variable names.

attached mail follows:


I am having some trouble getting php-3.0.16 to compile and link properly with oracle 8.0.5 support under freebsd 3.4-STABLE I have all the linux emultation enabled correctly. But here are the errors I am getting.

php configure

./configure --with-apache=../apache_1.3.12 --with-xml --with-oracle=/usr/local/src/oracle/app/oracle/product/8.0.5 --with-track-vars

-- Output cut out. --

compiles ok with these options.

next I cd back into the apache-1.3.12

and try to configure the php module, But it fails on the test compile.

./configure --activate-module=src/modules/php3/libphp3.a Configuring for Apache, Version 1.3.12 + using installation path layout: Apache (config.layout) + activated php3 module (modules/php3/libphp3.a) Creating Makefile Creating Configuration.apaci in src Creating Makefile in src + configured for FreeBSD 3.4 platform + setting C compiler to gcc + setting C pre-processor to gcc -E + checking for system header files + adding selected modules o php3_module uses ConfigStart/End + checking sizeof various data types + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. The below error output from the compilation ** test will give you an idea what is failing. Note that ** Apache requires an ANSI C Compiler, such as gcc. cd ..; gcc -funsigned-char -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` -o helpers/dummy helpers/dummy.c -R/usr/local/src/oracle/app/oracle/product/8.0.5/lib -R/usr/local/lib -L/usr/local/src/oracle/app/oracle/product/8.0.5/lib -L/usr/local/lib -lexpat -Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -lclntsh -lpsa -lcore4 -lnlsrtl3 -lclntsh -lnsl -lm -lpam -lm -lcrypt -lcrypt /usr/libexec/elf/ld: cannot open -lnsl: No such file or directory *** Error code 1 Stop. ======== Error Output for sanity check ======== ============= End of Error Report ============= Aborting!

Here is the output of ldconfig -r. #9 is the nsl library.

$ ldconfig -r

/var/run/ld-elf.so.hints: search directories: /usr/compat/linux/lib 0:-lBrokenLocale.1 => /usr/compat/linux/lib/libBrokenLocale.so.1 1:-lNoVersion.1 => /usr/compat/linux/lib/libNoVersion.so.1 2:-lc.6 => /usr/compat/linux/lib/libc.so.6 3:-lcrypt.1 => /usr/compat/linux/lib/libcrypt.so.1 4:-ldb.2 => /usr/compat/linux/lib/libdb.so.2 5:-ldb.3 => /usr/compat/linux/lib/libdb.so.3 6:-ldb1.2 => /usr/compat/linux/lib/libdb1.so.2 7:-ldl.2 => /usr/compat/linux/lib/libdl.so.2 8:-lm.6 => /usr/compat/linux/lib/libm.so.6 ** 9:-lnsl.1 => /usr/compat/linux/lib/libnsl.so.1 10:-lnss1_compat.1 => /usr/compat/linux/lib/libnss1_compat.so.1 11:-lnss1_db.1 => /usr/compat/linux/lib/libnss1_db.so.1 12:-lnss1_dns.1 => /usr/compat/linux/lib/libnss1_dns.so.1 13:-lnss1_files.1 => /usr/compat/linux/lib/libnss1_files.so.1 14:-lnss1_nis.1 => /usr/compat/linux/lib/libnss1_nis.so.1 15:-lnss_compat.2 => /usr/compat/linux/lib/libnss_compat.so.2 16:-lnss_db.2 => /usr/compat/linux/lib/libnss_db.so.2 17:-lnss_dns.2 => /usr/compat/linux/lib/libnss_dns.so.2 18:-lnss_files.2 => /usr/compat/linux/lib/libnss_files.so.2 19:-lnss_hesiod.2 => /usr/compat/linux/lib/libnss_hesiod.so.2 20:-lnss_nis.2 => /usr/compat/linux/lib/libnss_nis.so.2 21:-lnss_nisplus.2 => /usr/compat/linux/lib/libnss_nisplus.so.2 22:-lpthread.0 => /usr/compat/linux/lib/libpthread.so.0 23:-lresolv.2 => /usr/compat/linux/lib/libresolv.so.2 24:-lrt.1 => /usr/compat/linux/lib/librt.so.1 25:-lutil.1 => /usr/compat/linux/lib/libutil.so.1 26:-lnss_nis.1 => /usr/compat/linux/lib/libnss_nis.so.1 27:-lnss_files.1 => /usr/compat/linux/lib/libnss_files.so.1 28:-lnss_dns.1 => /usr/compat/linux/lib/libnss_dns.so.1 29:-lnss_db.1 => /usr/compat/linux/lib/libnss_db.so.1 30:-lnss_compat.1 => /usr/compat/linux/lib/libnss_compat.so.1 31:-ltermcap.2 => /usr/compat/linux/lib/libtermcap.so.2 32:-ldl.1 => /usr/compat/linux/lib/libdl.so.1

Any ideas ??

attached mail follows:


Hi, I am using php4 on win98 and Xitami webserver. I found a code to upload something to a directory. The code is:

<? $upload="c:\\film\\"; echo "upload=".upload; if(isset($upload) && $upload != "none") /*ie reports upload as none*/ { $error = 0; if($upload_size > 5000000) /* size checking*/ { /* some code*/ $error = 1; } if($upload_type != "image/gif" && $upload_type != "image/jpeg" && $upload_type != "image/pjpeg") { /* allow only gif, jpeg and progressively encoded jpeg */ echo "You can only upload Gif and Jpeg image types\n"; $error = 2; } if(!$error) { /* we have a valid image at this point!!*/ /* $upload contains the filename */ /* AFAIK its a temp file and should be copied to a permanant*/ /*location*/ $hasimage = 1; $imagefilename = $basedir.$siteurl."/".basename($upload); $imageurl = "./".basename($upload); copy($upload, $imagefilename); unlink($upload); } } ?> <html> <form method="post" name="newpage" action="up.php" enctype="multipart/form-data"> <p>Upload Image <input type="file" name="upload"></P> <P><input type="submit" name="Submit" value="Submit"></P> </FORM> </html>

But when I run this code it gives the errors:

Warning: Unable to open 'c:\film\' for reading: No such file or directory in C:/XITAMI/webpages/proje/up.php on line 28

Warning: Unlink failed (No such file or directory) in C:/XITAMI/webpages/proje/up.php on line 29

What is the problem and how can I correct the code?

attached mail follows:


In article <Pine.GSO.4.05.10004182314320.19338-100000firat>, nisanciBilkent.EDU.TR (Gurkan Nisanci) wrote:

> Hi, > I am using php4 on win98 and Xitami webserver. I found a code to upload > something to a directory. The code is: > > <? > $upload="c:\\film\\"; > echo "upload=".upload;

Missing a $ there...

> if(isset($upload) && $upload != "none") /*ie reports upload as none*/

You've just set $upload to the path, blowing away the $upload coming from the FORM that you are trying to check here.

$upload will always be set, and will never be "none". It will always be "c:\\file\\"

attached mail follows:


i can't install php3 on win95 with apache 1.3.. i do everything that the documentation says, but it just keeps giving me errors...

attached mail follows:


In article <000801bfa96d$d61cbc00$0100007flocalhost>, ahtistarline.ee ("Ahti") wrote:

> i can't install php3 on win95 with apache 1.3.. i do everything that the > documentation says, but it just keeps giving me errors...

You'd have to tell us which errors, at a minimum, for us to try and help...

You could also try searching the mailing list archives for various keywords in your error messages, since it's likely somebody else encountered them.

attached mail follows:


In article <8dg4r9$l0f$1va.php.net>, cristiansantanahotmail.com ("Cristian") wrote:

> php3 > db: mysql > > > > I have a form where I have the possibility of saving the data of a > consultation to Excel format (xls). my question is: since this in php3 > becomes > > help me.

You probably could most easily save as or otherwise output "tab-delimited ASCII text" to migrate to/from Excel/MySQL...

attached mail follows:


Hola,

Puede que usted sea una persona que le interesan las oportunidades; si estoy en un error, por favor una disculpa.

Gane de $40-100 USD diarios. Resultados en 24 horas!!

Utilice nuestro Sistema Automatizado de Promocion. Es muy facil.

Solicite informes enviando un email en blanco al visitar nuestra pagina en:

http://way.to/mmarketing/ http://nikkei.st/to/ebiz/ http://www.lanzadera.com/ebiz

Si encuentra que algunos de estos links no funciona, visite el siguiente. Se agradece informe del fallo

O envie un email a:

<mailto:info-ebizeudoramail.com?subject=informacion>

Gracias por su atencion ----------------------------------------------------------------------------------------------------------------------------------------- Puede borrarse de la lista en cualquiera de las direcciones ofrecidas. No obstante este email solo lo recibira esta vez desde esta direccion por lo que no es necesario darse de baja. Por otro lado el envio de este email es legal desde el punto de vista de las leyes españolas.

___________________________________________________________

attached mail follows:


For kicks, I ran a comparison of PHP/MySQL and ASP/MSSQL doing inserts into a table. I'd always heard that MySQL is slow at multiple inserts (no row-level locking, etc.) but these numbers were pretty good. (numbers I show are for 1 client benchmarks - I also simulated multiple clients hitting this benchmark, but don't have the numbers handy).

inserting 5000 rows into MySQL with PHP = 3 seconds inserting 5000 rows into MSSQL7 with ASP = 28 seconds

Hardware isn't quite the same - ASP=single processor and PHP=dual, with more memory, but the bottleneck wouldn't be the web host, I wouldn't think - it'd be the database. Both DB machines are equivalent: dual 550, raid (1 I think), 512 megs. No - actually the SQL7 has 1 gig, MySQL has 512.

I'm not trying to start a war here, but am interested in some benchmarks that others have run recently on similar hardware comparing ASP and PHP, if you have them.

I've a bit more info at http://www.tapinternet.com/bench.php3

Thanks!

--
==========================
Michael Kimsal
http://www.tapinternet.com
734-480-9961

attached mail follows:


who cares how fast it can do an insert? if your inserts are that much of a load you can do 'insert delayed' and mysql will wait until it's not doing anything.

the real benchmark is the speed of a 'select'.

- Mark

***********************************************

On 4/18/00 at 5:00 PM Michael Kimsal wrote:

>For kicks, I ran a comparison of PHP/MySQL and >ASP/MSSQL doing inserts into a table. I'd always >heard that MySQL is slow at multiple inserts >(no row-level locking, etc.) but these numbers were >pretty good. (numbers I show are for 1 client >benchmarks - I also simulated multiple clients >hitting this benchmark, but don't have the numbers >handy). > >inserting 5000 rows into MySQL with PHP = 3 seconds >inserting 5000 rows into MSSQL7 with ASP = 28 seconds > >Hardware isn't quite the same - ASP=single >processor and PHP=dual, with more memory, but the >bottleneck wouldn't be the web host, I wouldn't think - >it'd be the database. Both DB machines are equivalent: >dual 550, raid (1 I think), 512 megs. No - actually the >SQL7 has 1 gig, MySQL has 512. > >I'm not trying to start a war here, but am interested in >some benchmarks that others have run recently on >similar hardware comparing ASP and PHP, if you >have them. > >I've a bit more info at http://www.tapinternet.com/bench.php3 > >Thanks! > >-- >========================== >Michael Kimsal >http://www.tapinternet.com >734-480-9961 > > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


In my case, the inserts are of more importance, because that's where the perceived bottle neck was. The inserts are what get the orders too us. I don't particularly care if 5000 customers *select* catalog information, but if 5000 *insert* orders to us, I want to be able to handle those as quickly as possible. Am I missing something? (FWIW, I still got very good results on PHP/MySQL on a single 350mhz with 128megs and both processes on one machine).

There are all kinds of arguments to be made for platform choice (speed of development, ease of use, support, etc.), but having *some* numbers to support a platform choice doesn't help. Saying "we prefer PHP/MySQL" or even "it's cheaper" doesn't cut it with all our clients - some people equare $ with quality/speed. Saying 'for 90% of standard operations (select, insert, update, etc.) PHP/MySQL on equivalent hardware is y% faster than platform x' helps convince decision makers.

I'll be doing some select benchmarks in the next few days.

Mark Maggelet wrote:

> who cares how fast it can do an insert? if your inserts are that much of a load > you can do 'insert delayed' and mysql will wait until it's not doing anything. > > the real benchmark is the speed of a 'select'. > > - Mark > > *********************************************** > > On 4/18/00 at 5:00 PM Michael Kimsal wrote: > > >For kicks, I ran a comparison of PHP/MySQL and > >ASP/MSSQL doing inserts into a table. I'd always > >heard that MySQL is slow at multiple inserts > >(no row-level locking, etc.) but these numbers were > >pretty good. (numbers I show are for 1 client > >benchmarks - I also simulated multiple clients > >hitting this benchmark, but don't have the numbers > >handy). > > > >inserting 5000 rows into MySQL with PHP = 3 seconds > >inserting 5000 rows into MSSQL7 with ASP = 28 seconds > > > >Hardware isn't quite the same - ASP=single > >processor and PHP=dual, with more memory, but the > >bottleneck wouldn't be the web host, I wouldn't think - > >it'd be the database. Both DB machines are equivalent: > >dual 550, raid (1 I think), 512 megs. No - actually the > >SQL7 has 1 gig, MySQL has 512. > > > >I'm not trying to start a war here, but am interested in > >some benchmarks that others have run recently on > >similar hardware comparing ASP and PHP, if you > >have them. > > > >I've a bit more info at http://www.tapinternet.com/bench.php3 > > > >Thanks! > > > >-- > >========================== > >Michael Kimsal > >http://www.tapinternet.com > >734-480-9961 > > > > > > > >-- > >PHP 3 Mailing List <http://www.php.net/> > >To unsubscribe, send an empty message to php3-unsubscribelists.php.net > >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > >To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

--
==========================
Michael Kimsal
http://www.tapinternet.com
734-480-9961

attached mail follows:


>In my case, the inserts are of more importance, because that's >where the perceived bottle neck was. The inserts are what >get the orders too us. I don't particularly care if 5000 >customers >*select* catalog information, but if 5000 *insert* orders to >us, I want to be able to handle those as quickly as possible. >Am I missing something? (FWIW, I still got very good results >on PHP/MySQL on a single 350mhz with 128megs and both >processes on one machine).

if you're really seeing a bottleneck on insert and don't care about select, you should still use 'insert delayed' (with a small queue size if it's that important that you have it that current) and maybe try dropping any indexes on the table.

The benchmarks still don't mean anything because the two different databases must be tweaked differently for optimal performance, maybe if you were to get a mysql guru and a mssql guru to work on identical machines you could get a fair benchmark, but otherwise I don't see how.

- Mark

attached mail follows:


What do you guys think of both Redhat CCVS and CyberCash? CyberCash has a builtin module for PHP3.. CCVS has php3 support as well.. and many many language bindings.. hmm...

i was ready to fork over $1000 to CCVS too..

attached mail follows:


To All:

WOW...what can I say. I've been waiting to run PHP4 for until RC1 was released. I installed it on our server (Windows 2000 Server...I haven't sold my boss on Linux yet), tested it, and then placed our existing Intranet along with a few PHP apps on it.

From the moment I pulled up my browser, I was floored. The pages were coming up as soon as I clicked! No delay. This is my first time to being running the Zend engine, so for alot of you, this is old news.

But for the newbie or those still waiting to move to PHP4...don't delay. The performance improvements will soon have your company signing the praises of PHP!

Jonathan Griffin Software Developer MasterMind Internet Services

attached mail follows:


hmmm, what are you running? I didn't really notice any change in speed after the move to PHP4B2.

Are you running on the same computer?

Sincerely

Boaz Yahav (berber) CTO Nana Portal & Ecommerce NetVision LTD http://www.nana.co.il

-----Original Message----- From: Jonathan Griffin [mailto:jgriffinmmind.net] Sent: Wednesday, April 19, 2000 12:03 AM To: php3lists.php.net Subject: [PHP3] PHP4 is SUPER FAST!

To All:

WOW...what can I say. I've been waiting to run PHP4 for until RC1 was released. I installed it on our server (Windows 2000 Server...I haven't sold my boss on Linux yet), tested it, and then placed our existing Intranet along with a few PHP apps on it.

From the moment I pulled up my browser, I was floored. The pages were coming up as soon as I clicked! No delay. This is my first time to being running the Zend engine, so for alot of you, this is old news.

But for the newbie or those still waiting to move to PHP4...don't delay. The performance improvements will soon have your company signing the praises of PHP!

Jonathan Griffin Software Developer MasterMind Internet Services

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


It's running on Windows, required a reboot and voila - lots of memory back?!

--- Boaz Yahav <berbernetvision.net.il> wrote: > hmmm, what are you running? > I didn't really notice any change in speed after the > move to PHP4B2. > > Are you running on the same computer? > > Sincerely > > Boaz Yahav (berber) > CTO Nana Portal & Ecommerce > NetVision LTD > http://www.nana.co.il > > > -----Original Message----- > From: Jonathan Griffin [mailto:jgriffinmmind.net] > Sent: Wednesday, April 19, 2000 12:03 AM > To: php3lists.php.net > Subject: [PHP3] PHP4 is SUPER FAST! > > > To All: > > WOW...what can I say. I've been waiting to run PHP4 > for until RC1 was > released. I installed it on our server (Windows > 2000 Server...I haven't > sold my boss on Linux yet), tested it, and then > placed our existing Intranet > along with a few PHP apps on it. > > From the moment I pulled up my browser, I was > floored. The pages were > coming up as soon as I clicked! No delay. This is > my first time to being > running the Zend engine, so for alot of you, this is > old news. > > But for the newbie or those still waiting to move to > PHP4...don't delay. > The performance improvements will soon have your > company signing the praises > of PHP! > > > > > Jonathan Griffin > Software Developer > MasterMind Internet Services > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to > php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: > php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: > php-list-adminlists.php.net > >

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


Hello Boaz,

On 18-Apr-00 21:08:57, you wrote:

>hmmm, what are you running? >I didn't really notice any change in speed after the move to PHP4B2.

>Are you running on the same computer?

He was running PHP 3 on Windows (standalone CGI executable). :-)

As Apache module you only notice a big difference in pure processing scripts. If you use the optimizer it may even run slower if your scripts are mostly HTML with little PHP. Other than that database and network I/O will make speed improvements much less noticeable.

Regards, Manuel Lemos

Web Programming Components using PHP Classes. Look at: acm.org">http://phpclasses.UpperDesign.com/?user=mlemosacm.org

--
E-mail: mlemosacm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--

attached mail follows:


I put the Windows code for PHP but I have a big problem. I want to configure my Internet Explorer and when I point to a php file to see in the browser the result of the excution of the php code. The problem is that when I point Internet Explorer to a php file... it's starting php.exe file and it's closes imediatelly...

I really need this guys...

--
Ice Blink
________________
Email: iceblinkyahoo.com

attached mail follows:


I think you may want to install a web server. Just a thought...

Greg

-----Original Message----- From: Marian Vasile [mailto:iceblink_2001yahoo.com] Sent: Tuesday, April 18, 2000 5:28 PM To: php3lists.php.net Subject: [PHP3] Plz help me guys...

I put the Windows code for PHP but I have a big problem. I want to configure my Internet Explorer and when I point to a php file to see in the browser the result of the excution of the php code. The problem is that when I point Internet Explorer to a php file... it's starting php.exe file and it's closes imediatelly...

I really need this guys...

--
Ice Blink
________________
Email: iceblinkyahoo.com

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribelists.php.net To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


In article <8dina3$71c$1va.php.net>, iceblink_2001yahoo.com ("Marian Vasile") wrote:

> I put the Windows code for PHP but I have a big problem. > I want to configure my Internet Explorer and when I point to a php file to > see in the browser the result of the excution of the php code. > The problem is that when I point Internet Explorer to a php file... it's > starting php.exe file and it's closes imediatelly... > > I really need this guys...

Open up a DOS prompt and do:

php -f /path/to/your/file.php3

and see what comes out...

attached mail follows:


This is a very good site!

http://www.goodnet.com/~tim/mysql.html

-----Original Message----- From: Jason Brooke [SMTP:jasonqgl.org] Sent: Tuesday, April 18, 2000 12:08 PM To: Mike Hatcher; php3lists.php.net Subject: Re: [PHP3] Installing PHP, MySQL and Apache

Try the INSTALL.REDHAT file in the source distribution

jason

> Where can I find a good tutorial for installing PHP, MySQL and Apache on Red > Hat 5.2? > > Thank you in advanced. > > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


Hi,

I have been implementing a online photo album, which has thumbnail, regular and zoom images. So I went to a online store to see how it manages the book cover images in its website. There are thumbnail, medium and large book cover images for each title and I am interested by the naming convention of the images:

0871137658.01.THUMBZZZ.jpg for thumbnail images 0871137658.01.MZZZZZZZ.jpg for medium size 0871137658.01.LZZZZZZZ.jpg for large size

The numbers at the beginning are ISBN. My question is, why they put the "Z" at the end of the filenames? I am interested to know if there is any advantage of doing that, and if so then I may apply the same technique in my own project.

Any comment is welcome.

Eric

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


Could there be a situation where the Zend Optimizer could actually slow a script down? Say if there wasn't any specific place where it could "optimize", it'd of already passed 7 times already.

I have a script that does mostly just straight math, and it needs to be fast. Is there a chance the optimizer could actually slow things down in this situation?

Thanks, Chris

attached mail follows:


I´m a Newby and thats simply too much:

I am trying to write this output (as parsed result) <?echo $bild ;?> into a php3.file using "fputs".

Therefore I write <?fputs($f,"<?echo \$bild1;?>"\n?> into file_1.php3 which reads the output to file_2.php3.

When I parse file_1 I only find <?echo thecontentofthevariable;?> instead of <?echo $bild ;?> in file_2.

Can anybody shed light on this?

Helmut

attached mail follows:


Why I can't see the result of the execution in my browser ? I'm using Windows 2000 Server and I think I made all the steps in the documentation but I satill don't get the results in the browser... Why ? ALl I have is that DOS box that it's opening and showing me the html code... but why that code is not in the browser ?...

Thank you very much,

--
Ice Blink
________________
Email: iceblinkyahoo.com

attached mail follows:


I guess you'll have to use Javascript code... ----- Original Message ----- From: Mark Lo To: php3lists.php.net Sent: Tuesday, April 18, 2000 5:49 AM Subject: window POP up

Hi,

I would like to know how to make a pop up window in PHP3.

I mean when i click the button , then a small window will pop up automatically..and let user fill in informations.

Thank You

Mark Lo

--kgenpidkemdlbhobkcgd Content-Type: message/rfc822 Content-Disposition: inline; filename="php3.86461"

attached mail follows:


I know I have to setup a 3 tiered system. Database->business objects->client software

Candidates for the front end are -------------------------------------- Visual Basic applications on Windows Sun Java Applications on mulitple platforms HTML pages with DHTML and Microsoft Active X controls.

I was wondering if anyone was doing something similar and what kind of protocol they use to communicate with the client applications? Soap or http post for example?

thanks, william

attached mail follows:


I know this is an open ended question, but I am curious. Does anyone know any estimated eta of PHP4? I am starting to get into session management and if version 4 is around the corner, I can wait. If not, I will jump into the phplib.

Thanks

CDitty

attached mail follows:


I haven't had RC1 blow up on anything I've thrown at it - in fact the last couple betas were stable enough for me. Use it and upgrade to the final after it's released.

Hank

-----Original Message----- From: CDitty [mailto:mailredhotsweeps.com] Sent: Tuesday, April 18, 2000 8:04 PM To: php3lists.php.net Subject: [PHP3] ETA for PHP4???

I know this is an open ended question, but I am curious. Does anyone know any estimated eta of PHP4? I am starting to get into session management and if version 4 is around the corner, I can wait. If not, I will jump into the phplib.

Thanks

CDitty

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


Thought about that, but with this being a production machine and me not to up on compiling programs. I would like to do this just once. :)

Chris

At 08:16 PM 4/18/00 , Henry F. Marquardt wrote: >I haven't had RC1 blow up on anything I've thrown at it - in fact the last >couple betas were stable enough for me. Use it and upgrade to the final >after it's released. > >Hank > >-----Original Message----- >From: CDitty [mailto:mailredhotsweeps.com] >Sent: Tuesday, April 18, 2000 8:04 PM >To: php3lists.php.net >Subject: [PHP3] ETA for PHP4??? > > >I know this is an open ended question, but I am curious. Does anyone know >any estimated eta of PHP4? I am starting to get into session management >and if version 4 is around the corner, I can wait. If not, I will jump >into the phplib. > >Thanks > >CDitty > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: >http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


I actually upgraded my production machine a few weeks back because certain functionality is more stable in PHP4RC1 than in current builds of PHP3. (WDDX is *much* improved, thanks guys!)

I can understand the reluctance to do multiple builds, but in this case, it might be worth it. Besides, the second one will be easier, since you'll already know what to do. :)

Sorry I can't help you with the ETA on the final. I'm all on pins and needles too.

Michael J. Sheldon Internet Applications Developer Phone: 480.699.1084 http://www.desertraven.com/ PGP Key Available on Request

-----Original Message----- From: CDitty [mailto:mailredhotsweeps.com] Sent: Tuesday, April 18, 2000 18:31 To: Henry F. Marquardt; php3lists.php.net Subject: RE: [PHP3] ETA for PHP4???

Thought about that, but with this being a production machine and me not to up on compiling programs. I would like to do this just once. :)

Chris

At 08:16 PM 4/18/00 , Henry F. Marquardt wrote: >I haven't had RC1 blow up on anything I've thrown at it - in fact the last >couple betas were stable enough for me. Use it and upgrade to the final >after it's released. > >Hank > >-----Original Message----- >From: CDitty [mailto:mailredhotsweeps.com] >Sent: Tuesday, April 18, 2000 8:04 PM >To: php3lists.php.net >Subject: [PHP3] ETA for PHP4??? > > >I know this is an open ended question, but I am curious. Does anyone know >any estimated eta of PHP4? I am starting to get into session management >and if version 4 is around the corner, I can wait. If not, I will jump >into the phplib. > >Thanks > >CDitty > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: >http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


On Tue, 18 Apr 2000, CDitty wrote:

> I know this is an open ended question, but I am curious. Does anyone know > any estimated eta of PHP4? I am starting to get into session management > and if version 4 is around the corner, I can wait. If not, I will jump > into the phplib.

Soon. Have faith. :)

I'd suggest going to PHP4 now if you don't have any Rules that require you to use released, tried-and-true versions. PHP4-RC1 is considered release quality, hence the name release candidate.

Matt

attached mail follows:


HI List, I'm doing my first odbc site on NT and I ran in to a little snag. When a field contains a ' or a " I get this error message:

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''this shouldn\'t work')'., SQL state 37000 in SQLExecDirect in d:\www\bouncersbible.com\add_bouncer.php3 on line 85

and using addslashes() does not work.

What am I missing?

Rossi Designs PO Box 1084 Holly Hill, FL 32125-1084 Phone : (904) 226-8979 URL : http://rossidesigns.net

attached mail follows:


I think your problem is that Microsoft in their infinite wisdom do not use slashes to escape special characters in strings. From memory (probably very flaky at 3am), they use single quotes as an escape character. When I had to talk to access, I seem to remember using something along the lines of the following functions to get the strings into and out of access.

function AccessAddSlashes($S) {

$S=str_replace("\\'","''",$S); $S=str_replace("\\\"","\"\"",$S); return $S; }

function AccessStripSlashes($S) { $S=str_replace("\"\"","\\\"",$S); $S=stripslashes($S); return $S; }

--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org

attached mail follows:


I am developing a web site where I need to validate that the e-mail address supplied by users is validated by sending an e-mail to them with their password. They can then follow the link in the e-mail to my site, and use their password to activate their account, and then change the password.

It is for this reason that I would like to know what your thoughts are on the best way to automatically generate a password, which should be between 5 and 15 characters.

All the data is stored in a mySQL database, using PHP 3.0.13 and Apache 1.3.9.

I would welcome all your opinions, thoughts and advice on this.

Regards,

Marcus D Hanwell

attached mail follows:


> I am developing a web site where I need to validate that the e-mail > It is for this reason that I would like to know what your thoughts are > on the best way to automatically generate a password, which should be > between 5 and 15 characters. > I would welcome all your opinions, thoughts and advice on this.

This is the fuction I use to generate passwords:

function makeUserPassword() { /* Subroutine that determins password */ $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*1000000); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } // End function makeUserPassword

It's worked for me for the last 2 years.

Chris

attached mail follows:


"Boget, Chris" wrote:

> > I am developing a web site where I need to validate that the e-mail > > It is for this reason that I would like to know what your thoughts are > > on the best way to automatically generate a password, which should be > > between 5 and 15 characters. > > I would welcome all your opinions, thoughts and advice on this. > > This is the fuction I use to generate passwords: > > function makeUserPassword() { > > /* Subroutine that determins password */ > > $salt = "abchefghjkmnpqrstuvwxyz0123456789"; > srand((double)microtime()*1000000); > $i = 0; > while ($i <= 7) { > $num = rand() % 33; > $tmp = substr($salt, $num, 1); > $pass = $pass . $tmp; > $i++; > > } > > return $pass; > > } // End function makeUserPassword > > It's worked for me for the last 2 years. > > Chris

Thanks, that's just what I was looking for. It would have taken me ages to have come up with such a nice and simple solution. I was thinking I'd have to load up a table with possible passwords, and select one at random or something.

Once again, thank you for your help.

Marcus

attached mail follows:


> Thanks, that's just what I was looking for. It would have > taken me ages to have come up with such a nice and simple > solution. I was thinking I'd have to load up a table with > possible passwords, and select one at random or something.

Well, you could do that if you really wanted. :P > Once again, thank you for your help.

No problem.

Chris

attached mail follows:


In article <003201bfa924$3356b320$15f3a2cdcc0.net>, davecalinet.com ("Dave") wrote:

> The ";" ?? > > pretty much useless unless someone more learned has an idea. In my > experience it would be a dead var...or pretty much nothing at all...

By exploding/parsing the $PATH_INFO yourself, it's pretty easy to choose any reasonable token as a delimiter.

attached mail follows:


I am trying to install phplib on my virtual server and cannot find the php3.ini. I have looked through the documentation and can't seem to find anything like this. Can someone please tell me the default path for php and it's files on a Unix box?

Thanks

CDitty

attached mail follows:


you probably don't have read permissions on the file, but you can try: find / | grep php3.ini

- Mark

***********************************************

On 4/18/00 at 9:33 PM CDitty wrote:

>I am trying to install phplib on my virtual server and cannot find the >php3.ini. I have looked through the documentation and can't seem to find >anything like this. Can someone please tell me the default path for php >and it's files on a Unix box? > >Thanks > >CDitty > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


I believe by default it is in /usr/local/apache/ but you can specify the location at compile time. You should be able to do a find on it. 'find /usr -name php.ini' and it'll find it for you.

jason

-----Original Message----- From: CDitty [mailto:mailredhotsweeps.com] Sent: Tuesday, April 18, 2000 8:34 PM To: php3lists.php.net Subject: [PHP3] where is php3.ini?

I am trying to install phplib on my virtual server and cannot find the php3.ini. I have looked through the documentation and can't seem to find anything like this. Can someone please tell me the default path for php and it's files on a Unix box?

Thanks

CDitty

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

_______________________________________________________ Site Design, Hosting, and E-Commerce at www.webpipe.net

attached mail follows:


In older versions of php, by default it's in /usr/local/lib - I think with new versions it doesn't install by default - you need to copy the default version found in the top-level src dir to /usr/local/lib yourself

jason

----- Original Message ----- From: "Jason Cox" <jasoncwebpipe.net> To: "CDitty" <mailredhotsweeps.com> Cc: <php3lists.php.net> Sent: Wednesday, April 19, 2000 1:10 PM Subject: RE: [PHP3] where is php3.ini?

> I believe by default it is in /usr/local/apache/ but you can specify the > location at compile time. You should be able to do a find on it. 'find > /usr -name php.ini' and it'll find it for you. > > jason > > -----Original Message----- > From: CDitty [mailto:mailredhotsweeps.com] > Sent: Tuesday, April 18, 2000 8:34 PM > To: php3lists.php.net > Subject: [PHP3] where is php3.ini? > > > I am trying to install phplib on my virtual server and cannot find the > php3.ini. I have looked through the documentation and can't seem to find > anything like this. Can someone please tell me the default path for php > and it's files on a Unix box? > > Thanks > > CDitty > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > _______________________________________________________ > Site Design, Hosting, and E-Commerce at www.webpipe.net > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

attached mail follows:


In article <NCBBLMADCLAALGCHBFFNGEPCDIAA.richard.heyesheyes-computing.net>, phpheyes-computing.net ("Richard Heyes") wrote:

> Is calling a (user defined) function from within that function bad in any > way shape or form? Not a large amount of times (ie <20 usually).

Recursive functions are always more memory-intensive and slower than simple iteration.

Each function call involves some overhead; specifically, the location in RAM where the computer "is" at the moment, and every variable (or its address in the case of pass-by-reference) passed to the function must be stored by the computer. It's all stored on a "stack" on entry, and then "popped" off the stack on exit, so it all piles up and unwinds and comes out even.

There are entire college graduate courses whose sole purpose is to teach one to convert recursive functions into iterative for performance reasons. The conversion can get real gnarly sometimes. Trust me on this one. :-)

Of course, if the resulting code is unmaintainable, the benefits are dubious.

But if you have two otherwise equally attractive implementations, one recursive and one iterative, pick the iterative one. Every time.

Recursion is "cool" and a real nifty idea, and in some rare and complex situations, it's the only right tool for the job. (Unless that function is the bottleneck in your raw performance tests, in which case the un-maintainable, but highly documented, iterative alternative is the right tool...)

Alas, most CS majors are churned out of school only learning that recursion is cool and a real nifty idea. :-^

[the following statement will only be amusing to a few] I'm a Lisp hacker for cripe's sake, so don't even challenge me on this one :-)

attached mail follows:


In article <3.0.5.32.20000418042751.007af720mail.c3net.net>, dougslistc3net.net (Doug Semig) wrote:

> The sign would work (as Richard Lynch said below...I didn't have the > original message so I had to reply to Richard's message)--leaving the while > condition checking for $fila to be false--or it could be coded just a bit > differently. > > For example: > > $sql= "SELECT id,nombre FROM empresa"; > $resultado=pg_exec($conn,$sql); > $row=0; > $numrows = pg_numrows($resultado); // How many times do we loop?

I don't think PostgreSQL/PHP pre-determines the number of rows, so this can be expensive: PostgreSQL/PHP has to go count the number of rows, and then you iterate through them all.

Of course, it's probably not the bottleneck in any solution, but...

Disclaimer: I'm not certain of this, and PostgreSQL/PHP could easily have changed since it came up last.

attached mail follows:


I've been running PHP 3.0.14 as a module under Apache 1.3.11 on a 600Mhz Athalon machine with 512MB of RAM running Mandrake 7.0.

I went and grabbed the source for PHP4 RC1 today, and tried to build it, and I'm getting a strange problem during ./configure.

Here's my ./configure command:

./configure --with-apxs=/usr/sbin/apxs \ --prefix=/usr \ --with-gd \ --with-mysql \ --with-zlib \ --with-dbase \ --with-filepro \ --with-ndbm \ --with-config-file-path=/etc/httpd/conf \ --with-fdftk=no \ --disable-debug \ --enable-magic-quotes \ --enable-track-vars \ --enable-safe-mode \ --with-exec-dir=/usr/bin \ --with-system-regex

./configure errors with this message:

checking whether to include zlib support... yes checking for gzgets in -lz... no configure: error: Zlib module requires zlib >= 1.0.9.

Yes, as far as I can tell, I have zlib 1.1.3 installed!

[rootpeabody php-4.0RC1]# rpm -q zlib zlib-1.1.3-9mdk [rootpeabody php-4.0RC1]#

[rootpeabody lib]# pwd /usr/lib [rootpeabody lib]# ls -l libz* lrwxrwxrwx 1 root root 13 Mar 13 13:04 libz.so.1 -> libz.so.1.1.3* -rwxr-xr-x 1 root root 62664 Nov 1 21:48 libz.so.1.1.3*

So, could this be a bug in the ./configure script? I'm currently digging thru it, but any help is appreciated.

TIA,

Dave Weiner - Chief Technology Officer WebMasters, Inc. - www.webmast.com NOC: 302-838-2704 OFF: 800-472-9203

attached mail follows:


In article <p04310100b521f1e9b9ab[210.242.165.48]>, roninacemedia.com.tw ("Yuhsaku Godai [Ronin]") wrote:

> Is there a way that I can set how long a PHP page waits for data to > return from say a TCP/IP socket? I've already set my > max_execute_time line in php3.ini to 300000 but it doesn't seem like > it's waiting that long before showing me a timeout page. Any ideas?

I think you want to use set_socket_blocking() and then time it yourself in a loop...

That's if I'm correctly interpreting previous answers to similar questions: No actual experience.

attached mail follows:


In article <Pine.LNX.4.21.0004172243180.26026-100000localhost.localdomain>, tonycrystaldonuts.com (Toshihide Nakamura) wrote:

> Hello all, > > I, the newbie, have yet another simple question in postgresql. > The question is simple: How do I rename the table? When I issue the > following command, > alter table whatever rename to newtable; > it gives the following error: > ERROR: renamerel: unable to rename file: jobseeker > Does anyone have idea why?

Wild Guess Alert: Perhaps the user you are logged in as is not allowed to do that? Try logging in as postgres user and then doing that SQL. It might also be the kind of thing you can alter permissions on if you own the table, to allow yourself permission to do what you want.

attached mail follows:


In article <15490.000418mdq.com>, cooliomdq.com (coolio) wrote:

> Hi... I´m going to do a web site with a lot of news... and I will do > it with forms from where some journalist will upload the news... > the doubt that I have is: is better use a database to store the news, > or generate a file for each news? > what do you think? I will also use an internal search engine for my > site, in mysql..

This thread has gone by several times on this list.

Most of the pros with actual experience, if I'm judging correctly, say:

Store the articles as files, either inside or outside the web-tree depending on how easy you want it to be for folks to find them bypassing your Web interface, and use htdig to be the search engine.

There's a PHP/htdig article out there that's particularly useful: I can never remember the URL offhand, but it's been mentioned lots.

attached mail follows:


I cant agree more with Richard on the point of DB abstraction.

I often do development and demonstrations with MySQL or even Access DB's (i just have my class regex the substr's to mid's on the way through ;) without a DB abstraction layer this would be an extremely painful exercise. Also i have many clients who use the same applications but on different platforms. Hoping to support them all without an abstraction layer again would be a nightmare.

I understand that some work is being done on this as part of Pear (???) or something similar and i also saw some PHP classes as part of the PHP4 distro (source i think) so i assume this problem will be solved without having to turn to a third party solution (like PHPlib which is very impressive) or rolling your own.

But i suppose on the other hand ASP and CF use ODBC which in PHP has a single generic interface... so they avoid the problem by not having the choice.

mn

Mark Nold marknalverstone.com.au Systems Consultant

Change is inevitable, except from vending machines.

>>> Richard Lynch <richardzend.com> 04/18 2:24 pm >>> I got this through a circuitous route, and haven't actually read the PHP list since the news server is (was?) down today...

>-----Original Message----- >From: Rasmus Lerdorf [mailto:rasmusphp.net] >Sent: Monday, April 17, 2000 10:54 PM >To: Mike Sheldon >Cc: 'Toshihide Nakamura'; php3lists.php.net >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP

Not that anybody will ever convince me to use CF with its ugly tags instead of PHP... I do have to play devil's advocate. :-)

>> PHP has extremely strong native DB support. Different DBs have different >> command syntax, making mid-stream database changes painful. A bit more >> complex to retrieve results. > >Database abstraction is included in PHP 4. I still question this argument >every time it comes up. By far the least of your worries when switching >databases halfway through a project is the few PHP-level calls you will >need to change. Modifying your schemas, stored procedures, triggers and >SQL syntax will take much much more effort and none of this is made any >easier by a database abstraction layer.

Not necessarily: If one is using a development laptop box with, say, MySQL or even (blech) MS Access and a production box with Oracle, *and* is willing to forgo funky Oracle SQL syntax in favor of portability (perhaps sacrificing performance), it is not unfeasible to wish for a simple switch from DB to DB.

Sure, if Oracle was chosen for performance reasons rather than replication or non-technical (aka pointy-haired bosses or "because it was there") reasons, this would be a foolish way to do things: But it's not that radical an idea that you'd have Oracle on some hefty web server but were using PHP to develop some sort of back-end application for some low-traffic pages and wanted to use PHP to develop on a different machine sans Oracle. Then just flip the switch from MySQL to Oracle.

Of course, you can code such a thing readily and easily, and for PHP to have too much database abstraction... I can't even begin to envision how that can work internally and be useful without throwing away all the super-fast native code. Fortunately, I'm not one of the guys writing the software :-)

attached mail follows:


>>But i suppose on the other hand ASP and CF use ODBC which in PHP has a single generic interface... so they avoid the problem by not having the choice.<<

Actually, no. CF also supports OLEDB and native drivers (Enterprise version), and the syntax is the same for them, too. In CF, a big part of it is due to the connection parameters being handled through the administrator interface, and given a datasource name that is referenced in the code.

What I wouldn't mind in PHP is having the connection function be database-specific, with the query and fetch functions being common/abstracted. I usually place the connection and database selection functions in a global include anyway.

Michael J. Sheldon Internet Applications Developer Phone: 480.699.1084 http://www.desertraven.com/ PGP Key Available on Request

-----Original Message----- From: Mark Nold [mailto:MarkNawi.com.au] Sent: Tuesday, April 18, 2000 19:03 To: php3lists.php.net; richardzend.com Subject: [PHP3] Re: Biting the hand that feeds ...

I cant agree more with Richard on the point of DB abstraction.

I often do development and demonstrations with MySQL or even Access DB's (i just have my class regex the substr's to mid's on the way through ;) without a DB abstraction layer this would be an extremely painful exercise. Also i have many clients who use the same applications but on different platforms. Hoping to support them all without an abstraction layer again would be a nightmare.

I understand that some work is being done on this as part of Pear (???) or something similar and i also saw some PHP classes as part of the PHP4 distro (source i think) so i assume this problem will be solved without having to turn to a third party solution (like PHPlib which is very impressive) or rolling your own.

But i suppose on the other hand ASP and CF use ODBC which in PHP has a single generic interface... so they avoid the problem by not having the choice.

mn

Mark Nold marknalverstone.com.au Systems Consultant

Change is inevitable, except from vending machines.

>>> Richard Lynch <richardzend.com> 04/18 2:24 pm >>> I got this through a circuitous route, and haven't actually read the PHP list since the news server is (was?) down today...

>-----Original Message----- >From: Rasmus Lerdorf [mailto:rasmusphp.net] >Sent: Monday, April 17, 2000 10:54 PM >To: Mike Sheldon >Cc: 'Toshihide Nakamura'; php3lists.php.net >Subject: RE: [PHP3] COldFusion/Netobjects v.s. PHP

Not that anybody will ever convince me to use CF with its ugly tags instead of PHP... I do have to play devil's advocate. :-)

>> PHP has extremely strong native DB support. Different DBs have different >> command syntax, making mid-stream database changes painful. A bit more >> complex to retrieve results. > >Database abstraction is included in PHP 4. I still question this argument >every time it comes up. By far the least of your worries when switching >databases halfway through a project is the few PHP-level calls you will >need to change. Modifying your schemas, stored procedures, triggers and >SQL syntax will take much much more effort and none of this is made any >easier by a database abstraction layer.

Not necessarily: If one is using a development laptop box with, say, MySQL or even (blech) MS Access and a production box with Oracle, *and* is willing to forgo funky Oracle SQL syntax in favor of portability (perhaps sacrificing performance), it is not unfeasible to wish for a simple switch from DB to DB.

Sure, if Oracle was chosen for performance reasons rather than replication or non-technical (aka pointy-haired bosses or "because it was there") reasons, this would be a foolish way to do things: But it's not that radical an idea that you'd have Oracle on some hefty web server but were using PHP to develop some sort of back-end application for some low-traffic pages and wanted to use PHP to develop on a different machine sans Oracle. Then just flip the switch from MySQL to Oracle.

Of course, you can code such a thing readily and easily, and for PHP to have too much database abstraction... I can't even begin to envision how that can work internally and be useful without throwing away all the super-fast native code. Fortunately, I'm not one of the guys writing the software :-)

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


In article <006d01bfa908$26844b60$4600a8c0ufficio.intra>, gborrinimarketingmedia.it ("Giulio Borrini") wrote:

> hi to everyone, > > i'm pretty new to php so my question is pretty stupid. > > i'm implementing an automated news web sites where journalist can add news > via web. > > my problems are the images. i'm currently coping the image of each news from > the temp in a directory called /images/. but if someone will upload two > files with the same filename but different content the new one will > overwrite the old one. > > how can i solve it?

Generate a unique name (see uniquid function) for the files to really store them. You can maintain the "name" the user uploaded with for searching in a database.

So you'll need a table with the "uploadName" and "fileName", where each fileName is unique, if somewhat obtruse.

attached mail follows:


In article <3415.143T1940T3114901mlemosacm.org>, mlemosacm.org ("Manuel Lemos") wrote:

> Hello Richard, > > On 18-Apr-00 05:31:04, you wrote: > > >> I'm working on a site right now that I need to setup originally in MySQL, > >> and then I'm going to have to port the site to use Oracle in the near > >> future. Are there any steps I should take initially to make this port as > >> easy and smooth as possible? Has anyone else done this and have any tips? > >> Certain database calls that are easy to change, etc? > > >Write wrapper functions to the two databases to connect/execute your SQL, > >and put that all in one file, then use those functions religiously to do > >all your database work. > > >There shouldn't be much SQL you can write in MySQL that won't work in > >Oracle, but test each SQL statement as you go in Oracle if at all > >possible. > > I wish that was anywhere near the truth. Oracle is a major pain to deal > with. Many concepts work differently. > > For instance, In Oracle a database is not the same thing as a database in > MySQL. The CREATE DATABASE SQL statement in Oracle creates a new server > instance while in MySQL it just creates a new table space in the current > database server instance. If you really want to create a new fully > isolated table space in Oracle you need to create a new user. That's a > smart way from Oracle to make you pay an higher license fees.

Well, yeah, but most folks won't be doing a CREATE DATABASE in their PHP code.

> But let's talk of simpler things that you user every day. If you don't > have a function to count the number of rows in a result set because result > retrieval is asynchronous so by the time you start getting result rows the > server still doesn't know how many rows there will be in total in the whole > result set.

Row-counting in anything except MySQL is problematic: Even when the function exists, it is usually performance-intensive. While row-counting is nifty, most applications can live without it. > If you want to LIMIT the number of rows that the server returns in a result > set, in MySQL it is as simple appending the LIMIT keyword to your SELECT > query. In Oracle there is no easy way that I know. You may request as > many rows as you need, but if you want to skip a given amount of rows of > the begining of the result set, I don't know any simple solution.

I'd be pretty surprised if Oracle didn't have cursors (or something similar) to allow one to skip huge chunks of rows. For $10,000, it damn well better have something to do this sort of thing :-) > I was willing to pay a prize to any solution to do that in Oracle that > would work with arbitrary SELECT queries (including those with ORDER BY > clause), would not require any non-standard stored procedures and would > return the names of the columns with the same names as when you don't LIMIT > the returned rows.

I dunno about the names of the columns coming back, though...

> That is not all, but to summarize, you'd better stick with an existing well > tested database abstraction layer that isolates you from handling all these > differences by yourself.

I think a database abstraction layer is great for large projects, or where a library is needed to interface one software package to a large number of diverse database packages: But for a site where you know you are only going to need to do two databases, and the SQL itself will not be complex, I think it's overkill. > Imagine your surprise if you forgot things like that when you tried to move > one database application to another server of a different vendor.

Well, yeah. But if you are planning on moving from the beginning and test as you go, the problems tend to be dealt with quickly and easily.

attached mail follows:


Dears :

I am trying to figure out how can I let php to do some tasks that require ROOT's privilege ? For example , thru webpage & php code , I can add a true user account in a unix box ? Is it possible ?

Thanks a lot

Ken

attached mail follows:


PHP runs as the same user as apache, I believe it is user 'nobody' bu default. So you would not wouldn't be able to do things like adding users. Besides, that opens HUGE security holes. Someone could perhaps hit your script and add a user to your box and give that user, hmmmmm root priveldges perhaps? Not a very good thing to do.

jason

-----Original Message----- From: kenatlas.net.tw [mailto:kenatlas.net.tw] Sent: Tuesday, April 18, 2000 9:39 PM To: php3lists.php.net Subject: [PHP3] How to do some tasks that require ROOT's privilege ?

Dears :

I am trying to figure out how can I let php to do some tasks that require ROOT's privilege ? For example , thru webpage & php code , I can add a true user account in a unix box ? Is it possible ?

Thanks a lot

Ken

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

_______________________________________________________ Site Design, Hosting, and E-Commerce at www.webpipe.net

attached mail follows:


Bryan,

Attached is a simple recursive tree walking function, it was just a quick test on my part but should give you the general idea.

With Bobs db structure you should be able to solve you problem.

mn

Mark Nold marknalverstone.com.au Systems Consultant

Change is inevitable, except from vending machines.

>>> Bob Lutz <php3lutz-engr.com> 04/18 8:19 pm >>> The preferred way to set up the database is to normalize it by using two tables, one with destination and a destination index, the second with name, ID, and destination index. The resulting database takes up less space this way.

For the list, you can make one query:

"SELECT table1.*, table2.* FROM table1 JOIN table2 WHERE table1.destination_index = table2.destination_index ORDER BY table2.destination_name"

Then create sections by destination using nested while loops and creating a new destination section each time the destination name changes.

Bob

Bryan - Utopian Web Productions wrote:

> Hello everyone, First off, I want you all to know how much I have > enjoyed reading the informative way people in this mail list > correspond. I have found it very enlightening. I am having a > really tough time finding a way to create a dynamic hierarchy for > links. The three variables (ID, name, destination) are held in a mySQL > database. I would like to list the names under the hierarchy of each > destination. Does this require two db tables? or can it be completed > it with a single/multiple SELECT command? I am currently using a > WHILE statement to list all of the names, but this will soon become > too large and unmanageable. I have taken a look at the Zend's code > gallery and found something similar, but I'm not sure this will do the > job. Any suggestions? > Bryan

attached mail follows:


In article <006301bfa92d$8b6a86a0$5dbe4518orgl1.on.wave.home.com>, bryanuwebpro.com ("Bryan - Utopian Web Productions") wrote:

> I am having a really tough time finding a way to create a dynamic = > hierarchy for links. The three variables (ID, name, destination) are = > held in a mySQL database. I would like to list the names under the = > hierarchy of each destination. Does this require two db tables? or can = > it be completed it with a single/multiple SELECT command?

Hierarchies in SQL have been covered extensively in the past in the mailing list archives. Search for "phorum" and "tree" and similar keywords.

The various solutions are too diverse and complex to even try to summarize here, if I even understood all of them, which I don't.

attached mail follows:


In article <000d01bfa89e$cb103780$6c2da0d4jedrek>, jedrekplj.pl (=?iso-8859-2?B?SupkcnplaiBLb2xlc2nxc2tp?=) wrote:

> Well i've installed this php3 and apache and its working (quite slowe but > still its something). But the question is :

Slow where/when/how? If you can quantify the slowness, and describe where/when it seems to be most prevelant or where it happens in the chain of events, you might get a misconfiguration advice to fix it. > How to work with MS_Access base ? How to connect etc. ODBC ? The file is > called : jedrek.mdb

> Warning: Bad ODBC connection number (0) in c:\apache\htdocs/start.php3 on > line 1

You'll need to create an ODBC data source name (DSN) in your Control Panels, and point it to jedrek.mdb

It varies from M$ OS to OS (M$ never releases any two pieces of interface quite the same), but basically you'll open up the ODBC Control Panel, create a DSN with a unique name (say, jedrek_odbc) and point it to jedrek.mdb Dink around with any parameters you understand and leave the rest as defaults. Then use "jedrek_odbc" in your odbc_connect statement. And you may need "localhost" or "127.0.0.1" in there somewhere.

Oh yeah: M$ doesn't create a hosts file, so the DNS (Domain Name Services) only work by timing out after 10 seconds, and then, err, somehow it looks stuff up... Okay, I'm now confusing myself about what's broken where, since I'm not an M$ user, but if it takes forever to load a database page, but it works, then search the mailing list archives for "hosts file".

PS MS-Access is one of the more broken M$ products. Don't even think of trying it on even a moderate traffic site.

attached mail follows:


In article <001901bfa94f$3c154280$5dbe4518orgl1.on.wave.home.com>, bryanuwebpro.com ("Bryan - Utopian Web Productions") wrote:

> Thank you Bob for your reply. This is what I am attempting to get the = > results I want (but not quite). This routine is showing the results of = > only one destination and a list of it's names, and then stops. What am I = > doing wrong? > > > $no_sql=3D"SELECT destination,ID,name FROM $table_name ORDER BY = > destination,name ASC"; > > $housesresult=3Dmysql_db_query($data_base, $no_sql, $conn); > $records=3Dmysql_num_rows($housesresult); > $nextrecord=3D$records+1; > > echo " <tr align=3D'left' valign=3D'top'>=20 > <td width=3D'10'>&nbsp;</td> > <td><font size=3D'5'><a href=3D'houses.php'><br> > Houses </a></font><font size=3D'2'>($records)</font></td> > </tr> > <tr align=3D'left' valign=3D'top'>=20 > <td width=3D'10'>&nbsp;</td> > <td>"; > > while ($row =3D mysql_fetch_row($housesresult)) { > $housedest=3D$row[0]; > =20 > > =20 > echo " <table width=3D'100%' border=3D'0' cellspacing=3D'0' = > cellpadding=3D'1'> > <tr>=20 > <td width=3D'10%' align=3D'center'><img = > src=3D'../graphics/links/dot_blue.gif' width=3D'10' height=3D'10'>=20 > </td> > <td colspan=3D'2'>$housedest</td> > </tr>";

You're at the end of the RecordSet, and need to hit "rewind". Look for a function called something like mysql_data_seek() or somesuch. > while ($row =3D mysql_fetch_row($housesresult)) { > $ID=3D$row[1]; > $housename=3D$row[2]; > echo " > <tr>=20 > <td colspan=3D'2' align=3D'right'><img = > src=3D'../graphics/links/dot_red.gif' width=3D'10' height=3D'10'></td> > <td><a = > href=3D'houses_02.php?houseID=3D$ID'>$housename</a></td> > </tr>"; > } > echo " </table>"; > > }

attached mail follows:


In article <38FBFEF8.E445BFD5edlabs.com>, johnedlabs.com (John) wrote:

> hi... > > i coded a javascript function that pops up a menu OnMouseOver... > IE works perfectly.. > But for Netscape , the text boxes, check boxes, radio button and submit > buttons.. are all covering my popup menu... > i played around with z-index.. but it doesn't work.. > anyone knows how to correct it?

The PHP site determines the browser and delivers different DHTML/Layer stuff for the two browsers...

So maybe check out how it does it.

attached mail follows:


In article <NDBBKBLLLJEIFMNFNPHMKEIHDGAA.listglogger.ch>, listglogger.ch ("Steven Glogger") wrote:

> anyone know's whats going wrong here... > > each time i load a page from the webserver (html or php..it doesn't matter) > i get: > [Sat Apr 15 12:01:43 2000] [notice] child pid 26002 exit signal Segmentation > fault (11) > [Sat Apr 15 12:01:43 2000] [notice] child pid 26001 exit signal Segmentation > fault (11) > [Sat Apr 15 12:01:43 2000] [notice] child pid 25997 exit signal Segmentation > fault (11) > [Sat Apr 15 12:01:43 2000] [notice] child pid 19888 exit signal Segmentation > fault (11)

I never did get mmap and SSL to be nice to each other, but I'm no guru.

Maybe follow the directions in bugs.php.net to get a backtrace and narrow the problem down to a specific function/package.

attached mail follows:


In article <NDBBIDDFELNBLGHCIGGIOEDDCBAA.trho_ewuispchannel.com>, trho_ewuispchannel.com ("Tom Rhodes") wrote:

> How do I make a script not be started twice? The script writes data to a > file and I only want one version started. Thanks

I don't know about stopping the script from being started, but you could flock() the file, and then only one script at a time could use it...

You'd be better off to use a database to handle the concurrency, for a variety of reasons, but if you need to use a file, also look into register_shutdown_function to be sure the file is released even if your script breaks, and, err, something else I forgot, but should probably be linked from register_shutdown_function.

attached mail follows:


Hi,

Has anyone written, or is interested in helping me write, a script that connects to AIM and tells if a user is online or not? I have the complete documentation.

Thanks for your time...

Best Regards, Bill Zeller

__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com

attached mail follows:


Hi, I don't know if this is a bug or what from the 3.0.12 version (the one that comes with redhat 6.1) but here is the problem:

I got a table in postgresql with two fields id_emp,id_con. The primary key are both fields. I insert for example the values id_emp=1 and id_con=1 with no problem. But if then I try to insert other values like id_emp=1 and id_con=2 I get the following php error:

Warning: PostgresSQL query failed: ERROR: Cannot insert a duplicate key into a unique index in funciones_contacto.inc on line 48

If I do the inserts manually with psql in the database there's no problem, but from php I get that error.

Any help would be appreciated.

--------------------------------- Juan Luis Baptiste M. Pontificia Universidad Javeriana Ingenieria de Sistemas Linux Registered User #119248

http://www.merlinux.org

"We're back to the times when men where men and wrote their own drivers" Linus Torvalds. --------------------------------- ______________________________________________________________________ Check out Metallica's Official Web Site at http://www.metallica.com For 200+ channel 24/7 commercial free music visit http://radio.www.com

attached mail follows:


I read on the lists mailing archives that soap is "bogus". Why is it bogus? Is it because the XML payload is too big or for some other reason?

I think it would be excellent to have a platform independent method of communication between server and clientside objects that can do the things that soap claims to do so simply. So I must be missing something.

What method should I be looking into instead for communicating between php, vb client apps, java applets, foxpro client apps? just Http? XML/Rpc, wddx?

thanks, william

attached mail follows:


Hi,

This might seem a little basic, but here in Brazil we print 8.948,00 for Eight Thousand Nine Hundred and Fourty-eight (notice the comma and dot, switched place from the American use).

Any ideas of how to print a float correctly like the stated above? I´ve used printf("%.2f",$var) but it´ll leave the dot for the cents and it won´t use the commas for the thousands.

Thank you,

Cass Surek

attached mail follows:


In article <26E297953E3A7AB366A00766dns3.cyse.net>, webmastercyse.net ("Patrick SILVA") wrote:

> Hello > > I use PHP3 with MySQl on NT server > > When I try the function mysql_connect (example FaceMySQL) > I have a error message : > call unsuported or undefined function > is someone can help me

Create a page with just this in it:

<?php phpinfo();?>

Then, look for the php3.ini file on your server. It should be where phpinfo() says it is, but you may have to move it. Don't have two copies laying around. That will confuse php

Then, edit the php3.ini file and uncomment the line with mysql and dll in it.

Reload the phpinfo() page, and it should say something about MySQL support.

Finally, you may need to move the mysql DLL from where-ever the instructions told you to put it to one of these locations: Same directory as php.exe The Windows directory (or WinNT, or whatever it was called) The Windows/System directory various other random directories until it works... It's Windows, after all.

attached mail follows:


In article <8dhnv4$lts$1va.php.net>, bartsonik.pl ("Bartosz Aninowski") wrote:

> <?php > > // check if exists > > if (!$string) { > die ("Musisz podaæ adres e-mail.") ; > } > > // check if looks good > > elseif (!ereg("", $string)) { > > die ("Z³y format adresu") ; > } > > // check if exists in txt > > function subscribed($string){ > $path = "/tmp/test"; > $fd = fopen($path, "r") or die("Couldnt open $path<BR>Check > permissions"); > $found = 0; > while (!feof($fd) && !$found){ > $line = fgets($fd, 1000000); > file://Trim off newline fgets leaves (I think) > $line = substr($line, 0, -1); > $found = ($line == $string); > } > fclose($fd); > return $found; > } > > // and problem, I want to add $string if doesn't exist in txt, but nothing > happen, next 6 lines are avoided and "elseif" is executed and if $string > exists or not I see "bla bla is subscribed" > > if (!$string) { > $fp = fopen("/tmp/test", "a"); > fwrite($fp, "$string\n"); > fclose($fp) ; > echo "$string zostal dodany do bazy"; > } > > > > elseif > et($ > ng)) > > die ("$string is subscribed"); > > } > > > ?>

Everything between "function(...){ and the closing bracketer after "return $found" is a function definition.

None of this code is executed unless you actually *call* the function:

Change the if (!$string) after the function definition to be:

if (!subscribed($string)){

so that the code in subscribed is actually used, instead of just defined.

Also, the function definition could and should be moved to the tip-top of your page for aesthetic reasons.