OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Sat Mar 31 2001 - 01:49:49 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    php-general Digest 31 Mar 2001 07:49:49 -0000 Issue 599

    Topics (messages 46369 through 46437):

    Size Limit for PHP scripts
            46369 by: Wally Hartshorn
            46371 by: Cal Evans
            46390 by: Wally Hartshorn
            46392 by: Michael Kimsal
            46393 by: Jon Rosenberg
            46402 by: Greg Donald
            46427 by: Yasuo Ohgaki
            46436 by: Yasuo Ohgaki

    hash suggestions wanted
            46370 by: David P. Schwartz

    Re: PHP Editor for Linux
            46372 by: Eric Knudstrup
            46378 by: Adi Wibowo

    Re: PHP SITE REDESIGN - What happened to older source files ?
            46373 by: Krznaric Michael

    Tab Index Functionality
            46374 by: Wayne Joyner
            46380 by: Data Driven Design

    Re: PHP with DOMXML
            46375 by: Dominique Paquin

    Re: constants and case sensitivity
            46376 by: Johnson, Kirk

    Paying BIG e-dollars for older php source!!!
            46377 by: Krznaric Michael
            46382 by: Philip Hallstrom

    Re: BSD/GD/PHP/APACHE/SOS
            46379 by: ..s.c.o.t.t.. [gts]
            46381 by: ..s.c.o.t.t.. [gts]

    daylight savings time
            46383 by: bill

    How to send e-mail using PHP with the sender's address is my company's e-mail ??
            46384 by: Bass¨Ð¦õªv
            46387 by: John Huggins

    (8)Exec format error???
            46385 by: Brandon Orther

    header() vs. no cache, it doesn't work.
            46386 by: Scott Fletcher
            46388 by: Brian S. Dunworth

    Dynamic Modules
            46389 by: Dave

    php3 & php4
            46391 by: Brooks, Ken

    php to process mail attachments.
            46394 by: Larry Hotchkiss

    what exactly are /path/to/blah looking for? .h? .so? .a? what?!
            46395 by: Daevid Vincent
            46397 by: Andrew Hill
            46403 by: Daevid Vincent

    How to eliminate bad fields from a mysql query?
            46396 by: Bob Stone

    sanity check please
            46398 by: Les Neste
            46399 by: Jerry Lake
            46400 by: Michael Kimsal
            46401 by: ..s.c.o.t.t.. [gts]

    Re: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah looking for? .h? .so? .a? what?!
            46404 by: Andrew Hill

    Recompiling under RH7
            46405 by: Jon Jacob
            46406 by: Jon Jacob

    Re: header() vs HTTP_REFERER (Netscape 6)
            46407 by: Yasuo Ohgaki

    compiling PHP4
            46408 by: ..s.c.o.t.t.. [gts]
            46409 by: dempsejn.georgetown.edu

    Re: Better way (if...elseif...else)
            46410 by: Stephan Ahonen

    No-refresh
            46411 by: David Hynes
            46414 by: Jack Dempsey
            46421 by: Greg Donald

    Re: Catagory list
            46412 by: Mark Bayfield
            46424 by: Mark Bayfield
            46426 by: Basil Groman
            46434 by: Mark Bayfield

    fscanf syntax
            46413 by: Patrick Brown
            46415 by: Brian Clark
            46416 by: Chris Fry
            46418 by: Patrick Brown

    Re: Passing by reference deprecated?
            46417 by: Yasuo Ohgaki

    duplicate tables
            46419 by: McShen
            46423 by: CC Zona

    More questions about installing.....
            46420 by: Jon Jacob
            46422 by: Greg Donald
            46425 by: Jon Jacob
            46428 by: Greg Donald
            46429 by: Jon Jacob
            46431 by: Jon Jacob

    "Here Document" function AWOL
            46430 by: Kristofer Widholm
            46432 by: Jack Dempsey
            46435 by: Kristofer Widholm

    renaming form posted variable names
            46433 by: David Minor

    Re: Compile .php file is possible ?
            46437 by: Yasuo Ohgaki

    Administrivia:

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

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

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

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

    attached mail follows:


    Is there a limit to the size of PHP scripts? I'm having a problem in which scriptA.php is including() scriptB.php, which then requires() scriptC.php. The result is that PHP itself dies. If I remove some code from scriptA.php to reduce the size of the script, it works fine. (The code that I'm removing wasn't being executed during this testing, so the code itself wasn't the problem.)

    If there is some limit, is there a parameter I can set to change it?

    Here's my setup:
      PHP 4.0.4 pl1
      iPlanet 4.1 sp5
      Solaris 2.7
      Sun ES 250, 1GB RAM

    Thanks,
    Wally Hartshorn

    attached mail follows:


    If there is, I've not found it. I have many pages that include files that
    contain class definitions. My average page includes 8 classes and my
    average class is 250-400 lines of code.

    Have you debugged your individual scripts first before including them in
    other pages?

    Cal
    http://www.calevans.com

    -----Original Message-----
    From: Wally Hartshorn [mailto:Wally.Hartshornepa.state.il.us]
    Sent: Friday, March 30, 2001 1:53 PM
    To: php-generallists.php.net
    Subject: [PHP] Size Limit for PHP scripts

    Is there a limit to the size of PHP scripts? I'm having a problem in which
    scriptA.php is including() scriptB.php, which then requires() scriptC.php.
    The result is that PHP itself dies. If I remove some code from scriptA.php
    to reduce the size of the script, it works fine. (The code that I'm removing
    wasn't being executed during this testing, so the code itself wasn't the
    problem.)

    If there is some limit, is there a parameter I can set to change it?

    Here's my setup:
      PHP 4.0.4 pl1
      iPlanet 4.1 sp5
      Solaris 2.7
      Sun ES 250, 1GB RAM

    Thanks,
    Wally Hartshorn

    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    The script I'm calling (member.php) is 41K bytes (1,200 lines) It includes() global.php, which is 8K bytes (300 lines). That in turn requires() sessions.php, which is 13K bytes (370 lines).

    That makes a total code size at execution of about 62K bytes (1,870 lines).

    If I just remove some unused code from member.php, reducing its size to 32K bytes (940 lines), it works fine. (It isn't that particular code. I could remove any large section of unused code and it would work.)

    Note that global.php is also included by several other scripts, each of which are much smaller than member.php, and in each of those cases it works fine.

    Any ideas? If there isn't a limit within PHP on script size, is there perhaps some limit within the iPlanet web server on the PHP script size?

    Wally

    >>> "Cal Evans" <calcalevans.com> 03/30/01 01:53PM >>> If there is, I've not found it. I have many pages that include files that contain class definitions. My average page includes 8 classes and my average class is 250-400 lines of code.

    Have you debugged your individual scripts first before including them in other pages?

    Cal http://www.calevans.com

    -----Original Message----- From: Wally Hartshorn [mailto:Wally.Hartshornepa.state.il.us] Sent: Friday, March 30, 2001 1:53 PM To: php-generallists.php.net Subject: [PHP] Size Limit for PHP scripts

    Is there a limit to the size of PHP scripts? I'm having a problem in which scriptA.php is including() scriptB.php, which then requires() scriptC.php. The result is that PHP itself dies. If I remove some code from scriptA.php to reduce the size of the script, it works fine. (The code that I'm removing wasn't being executed during this testing, so the code itself wasn't the problem.)

    If there is some limit, is there a parameter I can set to change it?

    Here's my setup: PHP 4.0.4 pl1 iPlanet 4.1 sp5 Solaris 2.7 Sun ES 250, 1GB RAM

    Thanks, Wally Hartshorn

    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net 
    For additional commands, e-mail: php-general-helplists.php.net 
    To contact the list administrators, e-mail: php-list-adminlists.php.net 
    

    attached mail follows:


    To reiterate Cal's statement, we've not had issues with PHP size, other than speed. HUGE scripts take longer to compile and parse, but overall we've been fine. I've got scripts that are in excess of 1500 lines, which also include templates and other classes, which would often put the combined files >100k. Runs fine on a 128Meg P300. (ok, not FINE, but adequately, with no crashes).

    Wally Hartshorn wrote:

    > Is there a limit to the size of PHP scripts? I'm having a problem in which scriptA.php is including() scriptB.php, which then requires() scriptC.php. The result is that PHP itself dies. If I remove some code from scriptA.php to reduce the size of the script, it works fine. (The code that I'm removing wasn't being executed during this testing, so the code itself wasn't the problem.) > > If there is some limit, is there a parameter I can set to change it? > > Here's my setup: > PHP 4.0.4 pl1 > iPlanet 4.1 sp5 > Solaris 2.7 > Sun ES 250, 1GB RAM > > Thanks, > Wally Hartshorn

    attached mail follows:


    I have scripts over 150KB running just fine. Maybe it's your execution time that is too long, try raising it in php.ini and up it from 30 seconds.

    ----- Original Message ----- From: "Wally Hartshorn" <Wally.Hartshornepa.state.il.us> To: <calcalevans.com>; <php-generallists.php.net> Sent: Friday, March 30, 2001 4:33 PM Subject: RE: [PHP] Size Limit for PHP scripts

    > The script I'm calling (member.php) is 41K bytes (1,200 lines) > It includes() global.php, which is 8K bytes (300 lines). > That in turn requires() sessions.php, which is 13K bytes (370 lines). > > That makes a total code size at execution of about 62K bytes (1,870 lines). > > If I just remove some unused code from member.php, reducing its size to 32K bytes (940 lines), it works fine. (It isn't that particular code. I could remove any large section of unused code and it would work.) > > Note that global.php is also included by several other scripts, each of which are much smaller than member.php, and in each of those cases it works fine. > > Any ideas? If there isn't a limit within PHP on script size, is there perhaps some limit within the iPlanet web server on the PHP script size? > > Wally > > >>> "Cal Evans" <calcalevans.com> 03/30/01 01:53PM >>> > If there is, I've not found it. I have many pages that include files that > contain class definitions. My average page includes 8 classes and my > average class is 250-400 lines of code. > > Have you debugged your individual scripts first before including them in > other pages? > > > Cal > http://www.calevans.com > > > -----Original Message----- > From: Wally Hartshorn [mailto:Wally.Hartshornepa.state.il.us] > Sent: Friday, March 30, 2001 1:53 PM > To: php-generallists.php.net > Subject: [PHP] Size Limit for PHP scripts > > > Is there a limit to the size of PHP scripts? I'm having a problem in which > scriptA.php is including() scriptB.php, which then requires() scriptC.php. > The result is that PHP itself dies. If I remove some code from scriptA.php > to reduce the size of the script, it works fine. (The code that I'm removing > wasn't being executed during this testing, so the code itself wasn't the > problem.) > > If there is some limit, is there a parameter I can set to change it? > > Here's my setup: > PHP 4.0.4 pl1 > iPlanet 4.1 sp5 > Solaris 2.7 > Sun ES 250, 1GB RAM > > Thanks, > Wally Hartshorn > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    You might check to see if there is some kind of endless loop, it's not like PHP to just die without a reason. Looks like you got plenty of hardware there, so it must be your code... ;)

    > -----Original Message----- > From: Wally Hartshorn [mailto:Wally.Hartshornepa.state.il.us] > Sent: Friday, March 30, 2001 1:53 PM > To: php-generallists.php.net > Subject: [PHP] Size Limit for PHP scripts > > > Is there a limit to the size of PHP scripts? I'm having a problem > in which scriptA.php is including() scriptB.php, which then > requires() scriptC.php. The result is that PHP itself dies. If I > remove some code from scriptA.php to reduce the size of the > script, it works fine. (The code that I'm removing wasn't being > executed during this testing, so the code itself wasn't the problem.) > > If there is some limit, is there a parameter I can set to change it? > > Here's my setup: > PHP 4.0.4 pl1 > iPlanet 4.1 sp5 > Solaris 2.7 > Sun ES 250, 1GB RAM > > Thanks, > Wally Hartshorn > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    If you don't have errata in your script. I think you got similar experience as I did. I use PHP4.0.4pl1/Apache DSO/Linux

    I had a script that will not include files more than 20. PHP silently fails to include statement like and no output on browser what so ever. Note: PHP can include files more than 20 files.

    I changed require_once('file_to_include');

    to

    require('file_to_include');

    then it starts working.

    It also starts working when I edit few lines in those files for some reason. After that, I could never reproduce problem, since I didn't save the script causes this problem.

    My suggestion: 1) Try require/include/require_once/include_once, see if it helps. 2) Change your script a bit, see if it helps.

    I didn't report this as bug, since I don't have script that causes this problem now. I suggest you to report this as a bug and keep scripts that causes this.

    BTW, do you use multi-type char codeset?

    Regards,

    --
    Yasuo Ohgaki
    

    ""Wally Hartshorn"" <Wally.Hartshornepa.state.il.us> wrote in message news:sac4a735.009admisd3.epa.state.il.us... The script I'm calling (member.php) is 41K bytes (1,200 lines) It includes() global.php, which is 8K bytes (300 lines). That in turn requires() sessions.php, which is 13K bytes (370 lines).

    That makes a total code size at execution of about 62K bytes (1,870 lines).

    If I just remove some unused code from member.php, reducing its size to 32K bytes (940 lines), it works fine. (It isn't that particular code. I could remove any large section of unused code and it would work.)

    Note that global.php is also included by several other scripts, each of which are much smaller than member.php, and in each of those cases it works fine.

    Any ideas? If there isn't a limit within PHP on script size, is there perhaps some limit within the iPlanet web server on the PHP script size?

    Wally

    >>> "Cal Evans" <calcalevans.com> 03/30/01 01:53PM >>> If there is, I've not found it. I have many pages that include files that contain class definitions. My average page includes 8 classes and my average class is 250-400 lines of code.

    Have you debugged your individual scripts first before including them in other pages?

    Cal http://www.calevans.com

    -----Original Message----- From: Wally Hartshorn [mailto:Wally.Hartshornepa.state.il.us] Sent: Friday, March 30, 2001 1:53 PM To: php-generallists.php.net Subject: [PHP] Size Limit for PHP scripts

    Is there a limit to the size of PHP scripts? I'm having a problem in which scriptA.php is including() scriptB.php, which then requires() scriptC.php. The result is that PHP itself dies. If I remove some code from scriptA.php to reduce the size of the script, it works fine. (The code that I'm removing wasn't being executed during this testing, so the code itself wasn't the problem.)

    If there is some limit, is there a parameter I can set to change it?

    Here's my setup: PHP 4.0.4 pl1 iPlanet 4.1 sp5 Solaris 2.7 Sun ES 250, 1GB RAM

    Thanks, Wally Hartshorn

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Typo in my post

    ""Yasuo Ohgaki"" <yohgakihotmail.com> wrote in message news:9a3hpe$n1m$1toye.p.sourceforge.net... SNIP > > BTW, do you use multi-type char codeset?

    BTW, do you use multi-byte char codeset?

    > Regards, > > -- > Yasuo Ohgaki

    attached mail follows:


    the PHP crypt function uses DES and it only generates a hash based on the first 8 chars of a string, although it produces a 12-char hash. Md5 can hash a string of indefinite length, but it produces a much longer hash (34 chars or so).

    I need something that can provide me with a 12-16 char hash of an indefinite string (usually under 100 chars in my case) using standard hasing algorithms.

    Any suggestions?

    Thanks -David Schwartz

    attached mail follows:


    I'm looking for a PHP mode for XEmacs and really miss c-mode. Do you know of any packages for it?

    Eric

    > -----Original Message----- > From: Phillip Bow [mailto:philboreilly.com] > Sent: Friday, March 30, 2001 7:18 AM > To: php-generallists.php.net > Subject: Re: [PHP] PHP Editor for Linux > > > Read back a couple of days and you'll probably see multiple > answers to this > question. > -- > phill > > ""Martin Cabrera Diaubalick"" <martinnotodo.com> wrote in message > news:005b01c0b92c$8bd3ff80$12ffa8c0notodo.com... > > VIM? No thanks :-) > > > > :wq > > > > > > ----- Original Message ----- > > From: Michael Champagne <mchampagnecapis.com> > > To: Martin Cabrera Diaubalick <martinnotodo.com> > > Cc: <php-generallists.php.net> > > Sent: Friday, March 30, 2001 5:13 PM > > Subject: Re: [PHP] PHP Editor for Linux > > > > > > > What about the greatness of VIM? > > > > > > > Hi there! > > > > > > > > I use bluefish for HTML and PHP coding, but I'm not too > happy with it. > > Do > > > > you know a good PHP Editor for Linux, besides Emacs and xjed...? > > > > > > > > > > > > > > > > TIA > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Michael Champagne, Software Engineer > > > Capital Institutional Services, Inc. > > > wk: mchampagnecapis.com > > > hm: mchamptexas.net > > > > > > > > > > > > ****************************************************************** > > > This communication is for informational purposes only. It is not > > > intended as an offer or solicitation for the purchase or sale of > > > any financial instrument or as an official confirmation of any > > > transaction, unless specifically agreed otherwise. All market > > > prices, data and other information are not warranted as to > > > completeness or accuracy and are subject to change without > > > notice. Any comments or statements made herein do not > > > necessarily reflect the views or opinions of Capital Institutional > > > Services, Inc. Capital Institutional Services, Inc. accepts no > > > liability for any errors or omissions arising as a result of > > > transmission. Use of this communication by other than intended > > > recipients is prohibited. > > > ****************************************************************** > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > >

    attached mail follows:


    On Fri, 30 Mar 2001, Martin Cabrera Diaubalick wrote: > Hi there! > > I use bluefish for HTML and PHP coding, but I'm not too happy with it. Do > you know a good PHP Editor for Linux, besides Emacs and xjed...?

    I use Quanta+. I was moving from Bluefish to this. And I like it. But it use KDE libraries. So kdelibs and kdebase should be installed before you can use it.

    It provide many highlight mode, html preview, very stable. Plus if you use XFree-4.0.3 and KDE-2.1., true type font will make programming a nicer moment. =)

    http://quanta.sourceforge.net

    Adi Wibowo ------------------------------- * Work matter : adiwpeter.petra.ac.id * Private matter : adiwibowoexcite.com ------------------------------------------

    attached mail follows:


    I guess i have to do something along the lines of

    1. cvs -d :pserver:cvsreadcvs.php.net:/repository co php4/distributions or 2. cvs -d :pserver:cvsreadcvs.php.net:/repository co distributions

    With Number 1 above i get an error saying cvs server: warning: new-born php4/distributions has disappeared

    Mike -----Original Message----- From: James Moore [mailto:jmoorephp.net] Sent: Friday, March 30, 2001 12:18 PM To: Krznaric Michael; 'php-generalLists.php.net' Subject: RE: [PHP] PHP SITE REDESIGN - What happened to older source files?

    > I need an older version of PHP because my pam_auth won't build with > php-4.0.4pl1? With the redesign of the php site, I think they > removed older > source files. Can anyone confirm this, or does anyone know where > I can get > php-4.0.0 - 4.0.4 source files?

    The files are no longer avaible form the site but are still avalible via cvs (cvs.php.net) just checkout the files you want from the distributions directory. I wouldnt advise using anything less recent than 4.0.4pl1 though due to security issues in previous versions.

    James

    --
    James Moore
    jmoorephp.net
    PHP Web Scripting: http://www.php.net/
    PHP QA Team: http://qa.php.net/
    PHP-GTK: http://gtk.php.net/
    VL-SRM: http://www.vl-srm.net/
    

    attached mail follows:


    I am interested in finding out how to use TAB INDEX. I have a form that I would like to order the sequence of field selection. The form consist of HTML with embedded PHP commands that retrieve data from a database to auto populate (or provide) drop down list boxes for the form. Is there any way I can specify the sequence of field selection for users wanting to tab through fields. Unfortunately, I have set the field label descriptions with help sensitive <A HREF to a external help file > and these become stops in the tabbing sequence. I basically want to skip over the help locations when pressing the TAB key. Any help you can provide would be greatly appreciated. Wayne Joyner CSG Systems, Inc. 2525 N. 117th Avenue Mail Stop 1-TSC Omaha, NE (402) 431-7138

    attached mail follows:


    You can specify taborder by inserting a tabindex attribute into your input tags

    <input type="text" name="foo" tabindex="1"> <input type="text" name="foo3" tabindex="3"> <input type="text" name="foo2" tabindex="2">

    In this example tabing order would be 1, 3, 2

    There's also an Internet Explorer only attribute called notab

    Data Driven Design P.O. Box 1084 Holly Hill, FL 32125-1084

    http://www.datadrivendesign.com http://www.rossidesigns.net ----- Original Message ----- From: Wayne Joyner <wayne_joynercsgsystems.com> To: Php-GeneralLists. Php. Net <php-generallists.php.net> Sent: Friday, March 30, 2001 12:02 PM Subject: [PHP] Tab Index Functionality

    > I am interested in finding out how to use TAB INDEX. I have a form that I would like to order the sequence of field selection. The form consist of HTML with embedded PHP commands that retrieve data from a database to auto populate (or provide) drop down list boxes for the form. Is there any way I can specify the sequence of field selection for users wanting to tab through fields. Unfortunately, I have set the field label descriptions with help sensitive <A HREF to a external help file > and these become stops in the tabbing sequence. I basically want to skip over the help locations when pressing the TAB key. > > Any help you can provide would be greatly appreciated. > > > Wayne Joyner > CSG Systems, Inc. > 2525 N. 117th Avenue > Mail Stop 1-TSC > Omaha, NE > (402) 431-7138 > > >

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

    ----
    

    > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Greetings!

    I have been working on a project that will, in part, use XML to store the user list and personal info of the application's users.

    Here is the general look of a single user node (a single xml file contains n users)=

    <user name="username" type="personal"> <host>site1.com</host> <personalInfo> <fullName>John Doe</fullName> <email>johnsite1.com</email> <maxSpace>100</maxSpace> </personalInfo> </user>

    When i access, update or delete these nodes, everything works fine. BUT, when i try to add a new node, it comes out all on a single line.: here is how i do the addition:

    function addUser($_username, $_file, $_name, $_email, $_quota, $_type, $_virtualhost) { $xmlContent = implode(file($_file), ""); $doc = xmldoc($xmlContent);

    // Recuperate the root node $root = $doc->root();

    // Create the node user amd it's sub nodes // ---------------------------------------- $user = $root->new_child("user",""); $user->setattr("name", $_username); $user->setattr("type", $_type); $user->new_child("host", $_virtualhost); $personalInfo = $user->new_child("personalInfo", ""); $personalInfo->new_child("fullName", $_name); $personalInfo->new_child("email", $_email); $personalInfo->new_child("maxSpace", $_quota);

    // Save every thing in the xml file // -------------------------------- if(!($myFile = fopen($_file, "w"))) { print("Error: "); print($_file . "could not be created \n"); exit; } else { file://$XMLcontent = $doc->dumpmem(); fputs($myFile, $doc->dumpmem()); fclose($myFile); } }

    When i call the above function, the addition is done, but all on a single line, and when the nodes are made on a single line, the rest of the application is unable to access the information. Help.

    We are on apache 1.3.19, PHP 4.0.4pl1 on a Linux box with redhat7.0. Kernel 2.2.16.

    Help!

    Dominique Paquin galea secured networks Quebec

    attached mail follows:


    I get the same results as you using PHP4. I can't explain this, since constants are supposed to be case sensitive by default. They sure don't act like they are. Looks like a bug to me.

    Kirk

    > -----Original Message----- > From: almir [mailto:a.kazazicmedienhaus.co.at] > Sent: Friday, March 30, 2001 12:44 PM > To: php-generallists.php.net > Subject: [PHP] constants and case sensitivity > > > just when I thought , nice I didn't know how does it work i > found out that > it is not wroking anyhow if I put > > define ("rights", "RIGHTS", X); > define ("Rights", "RIGHTS", X); > > echo rights . "->" .defined("rights") ." " .Rights ."->" > .defined("Rights")."<br>"; > > regardless of X i always get > RIGHTS->1 Rights->0 > but if i change places of definiton it changes > > define ("rights", "RIGHTS", X); > define ("Rights", "RIGHTS", X); > .. > Rights->0 RIGHTS->1 > > > again I am using 3.0.11 on IIS4 > > thanks > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: > php-list-adminlists.php.net >

    attached mail follows:


    I have no money, but is someone willing to provide php-4.0.3pl1.tar.gz or just anything < 4.0.4pl1 and > 4.0.0. Please just email if possible.

    Mike

    -----Original Message----- From: Krznaric Michael [mailto:mkrznaricrand.com] Sent: Friday, March 30, 2001 3:03 PM To: 'James Moore'; 'php-generalLists.php.net' Subject: RE: [PHP] PHP SITE REDESIGN - What happened to older source files ?

    I guess i have to do something along the lines of

    1. cvs -d :pserver:cvsreadcvs.php.net:/repository co php4/distributions or 2. cvs -d :pserver:cvsreadcvs.php.net:/repository co distributions

    With Number 1 above i get an error saying cvs server: warning: new-born php4/distributions has disappeared

    Mike -----Original Message----- From: James Moore [mailto:jmoorephp.net] Sent: Friday, March 30, 2001 12:18 PM To: Krznaric Michael; 'php-generalLists.php.net' Subject: RE: [PHP] PHP SITE REDESIGN - What happened to older source files?

    > I need an older version of PHP because my pam_auth won't build with > php-4.0.4pl1? With the redesign of the php site, I think they > removed older > source files. Can anyone confirm this, or does anyone know where > I can get > php-4.0.0 - 4.0.4 source files?

    The files are no longer avaible form the site but are still avalible via cvs (cvs.php.net) just checkout the files you want from the distributions directory. I wouldnt advise using anything less recent than 4.0.4pl1 though due to security issues in previous versions.

    James

    --
    James Moore
    jmoorephp.net
    PHP Web Scripting: http://www.php.net/
    PHP QA Team: http://qa.php.net/
    PHP-GTK: http://gtk.php.net/
    VL-SRM: http://www.vl-srm.net/
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    In article <81A3043681E6824EBE672F7421C30E7E2A1983SRVTORONTO.RAND.COM> you write: > I have no money, but is someone willing to provide >php-4.0.3pl1.tar.gz or just anything < 4.0.4pl1 and > 4.0.0. Please just >email if possible.

    http://www.adhesivemedia.com/~philip/php-4.0.2.tar.gz

    It will stay there for awhile (ie. until I clean that directory out)

    -philip

    attached mail follows:


    i did it for linux.

    basically, what i did was to get GD and the other libraries, 'configure' and 'make' them all

    then, go into the PHP directory and tell PHP's configure script where GD and such reside:

    ex: ./configure --with-gd-dir=../gd-1.8.4/ --with-jpeg-dir=../jpeg-6b/

    somthing similar to that should work

    > -----Original Message----- > From: Louis Grenzebach [mailto:aquariuminficad.com] > Sent: Thursday, March 29, 2001 11:53 PM > To: php-generallists.php.net > Subject: [PHP] BSD/GD/PHP/APACHE/SOS > > > Would anyone know of, or could possibly supply, a HOW-TO for installing > GD, with Jpeg and freetype support for php, on a freebsd platform? I'm > currently using apache 1.3.19 (just upgraded from 1.3.12), & php 4.0.4pl1 > on FreeBSD Release 4.0. > > I've been trying for 4 days now to get it working, it's finally down to > everything compiles and installs OK, but when it comes time to actually > run apache, it's unable to find my X11 libs. If you know a work around for > just that, it would also be extremely helpful. > > Thank you in advance. > PKshifted > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    did you compile apache yourself?

    try compiling apache yourself and then compiling PHP as a stanalone-CGI (as opposed to server module) and see if that helps any of your prob's.

    > -----Original Message----- > From: Louis Grenzebach [mailto:aquariuminficad.com] > Sent: Thursday, March 29, 2001 11:53 PM > To: php-generallists.php.net > Subject: [PHP] BSD/GD/PHP/APACHE/SOS > > > Would anyone know of, or could possibly supply, a HOW-TO for installing > GD, with Jpeg and freetype support for php, on a freebsd platform? I'm > currently using apache 1.3.19 (just upgraded from 1.3.12), & php 4.0.4pl1 > on FreeBSD Release 4.0. > > I've been trying for 4 days now to get it working, it's finally down to > everything compiles and installs OK, but when it comes time to actually > run apache, it's unable to find my X11 libs. If you know a work around for > just that, it would also be extremely helpful. > > Thank you in advance. > PKshifted > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    How can I get my PHP/MySQL to recognize dates that are on daylight savings time?

    I have a mysql table with a date field (today would be 2001-03-30).

    I convert a date into a unix timetamp using

    $thisdaysec=mktime($somedate);

    Then, to find a particular date in the database I run a query:

    SELECT name FROM my_database WHERE UNIX_TIMESTAMP(date) = $thisdaysec

    Unfortunately, this code, which used to work fine, begins to fail when looking for dates after this weekend. The two unix timestamps are exactly one hour off. Daylight savings time?

    I appreciate any help.

    kind regards,

    bill hollett

    attached mail follows:


    Hi ,

    My copmany have a website and is hosted on a web server of some web hosting company . I want to use PHP to send e-mail on that server . I use

    $result = mail("abcfoo.com" , "E-mail Test" , "this e-mail is sent by php") ;

    to do it .

    But when I receive the e-mail , the SENDER 's address is the server's domain name ! such as 'anonmyoushostingserver.com'

    It's a large problem if I send a e-mail to my clients with this cos they won't know who send the e-mail !!

    how can I send a e-mail with the sender's address is my company's e-mail ??? for exmaple ' mycompanycompany.com '??

    THX A LOT

    attached mail follows:


    You can always add a "From: yournameyourdomain.com" to the fourth field which includes additional email headers.

    However, the real solution is for your provider to fix their setup to change the address to a proper one as the mail moves through and leaves their system.

    John

    > -----Original Message----- > From: Bass¨Ð¦õªv [mailto:98350193jpolyu.edu.hk] > Sent: Friday, March 30, 2001 3:58 PM > To: php-generallists.php.net > Subject: [PHP] How to send e-mail using PHP with the sender's address is > my company's e-mail ?? > > > Hi , > > My copmany have a website and is hosted on a web server of some > web hosting > company . > I want to use PHP to send e-mail on that server . > I use > > $result = mail("abcfoo.com" , "E-mail Test" , "this e-mail is > sent by php") > ; > > to do it . > > But when I receive the e-mail , the SENDER 's address is the > server's domain > name ! > such as 'anonmyoushostingserver.com' > > It's a large problem if I send a e-mail to my clients with this cos they > won't know > who send the e-mail !! > > how can I send a e-mail with the sender's address is my company's > e-mail ??? > for exmaple ' mycompanycompany.com '?? > > THX A LOT > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hello,

    I am trying to get php to run on my Apache Redhat server. When I run it I just get internal server error. This is the error that I get in my error logs after running my script:

    (8)Exec format error???

    thanks for any help, Brandon

    attached mail follows:


    When I use this script

    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache");

    Next, I browse around and go back one page, the cache does not expire. Sometime I get the error messages said that the header had already start or something. So, what is the other way around to fix this problem????? Or how can I fix it????

    Thanks, Scott

    attached mail follows:


    At 04:03 PM 3/30/01 -0500, Scott Fletcher wrote: >When I use this script > > header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); > header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

    ### oops, don't forget to escape these! ^ ^

    > header("Cache-Control: no-cache, must-revalidate"); > header("Pragma: no-cache"); > >Next, I browse around and go back one page, the cache does not expire. >Sometime I get the error messages said that the header had already start >or something. So, what is the other way around to fix this >problem????? Or how can I fix it????

    ------------------------------------- Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd.

    (850) 875-1500 x225 <briantheprintinghouse.com> -------------------------------------

    attached mail follows:


    Hi All,

    Is loading a dynamic module (such as php_curl.dll) available only to PHP in the CGI flavour or can this be done with the apache php module?

    I dont seem to be able to make this work on my win32 setup although I will soon be migrating to a Red Hat linux.

    Thanks, Dave

    attached mail follows:


    Is there any reason why I shouldn't run php3 and php4 on the same server?

    I have php3 using .php3 files and php4 using .php .phtml and .php4 files.

    Thanks, Ken

    attached mail follows:


    In an effort to automate things a bit I would like to allow users to mail a CSV file to a specific address for processing by a PHP script. I am running RH 7.0, sendmail 8.11 and I am thinking I could use procmail (im running ver 3.14) recipe to extract from/subject for use in the script as well as have metamail uudecode the attachment for processing by php as well. Has anyone done this? Any pointers or recipes would be greatly appreciated. As well as any other possible solutions.

    -- 
    Larry Hotchkiss
    

    attached mail follows:


    > I'm having difficulties with that line: > > ./configure --with-openlink=/path/to/openlink/ > --with-iodbc=/path/to/iodbc/

    so I've tried every combination I can think of related to "iodbc" and "openlink", and none of these are compiling. Every one results in "No such file or directory"!

    ./configure --with-mysql=/usr/local \ --with-apache=../apache \ #--with-iodbc=/usr/local/openlink/lib \ #--with-iodbc=/usr/local/bin \ #--with-iodbc=/usr/local \ #--with-iodbc=/usr/local/include \ #--with-iodbc=../libiodbc \ #--with-openlink=/usr/local/openlink \ #--with-openlink=/usr/local/openlink/lib

    Can someone tell me what exactly is /path/to/openlink and /path/to/iodbc? is it the .h file? is it the .so files? is it the .a files? what the heck is it?

    And why don't the INSTALL directions just tell me that? so if PHP expects to find the .h file, why don't they document it like: "--with-iodbc=/path/to/iodbc .h files" so people aren't confused like me.

    Please help. Thanks.

    D.

    attached mail follows:


    Daevid,

    It's the path/to/odbcsdk It's looking for libiodbc.so

    :)

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

    > -----Original Message----- > From: Daevid Vincent [mailto:DayWalkerTheMatrix.com] > Sent: Friday, March 30, 2001 5:34 PM > To: php-dblists.php.net; PHP General > Cc: ahillopenlinksw.com > Subject: what exactly are /path/to/blah looking for? .h? .so? .a? what?! > > > > I'm having difficulties with that line: > > > > ./configure --with-openlink=/path/to/openlink/ > > --with-iodbc=/path/to/iodbc/ > > so I've tried every combination I can think of related to "iodbc" and > "openlink", and none of these are compiling. Every one results in "No such > file or directory"! > > ./configure --with-mysql=/usr/local \ > --with-apache=../apache \ > #--with-iodbc=/usr/local/openlink/lib \ > #--with-iodbc=/usr/local/bin \ > #--with-iodbc=/usr/local \ > #--with-iodbc=/usr/local/include \ > #--with-iodbc=../libiodbc \ > #--with-openlink=/usr/local/openlink \ > #--with-openlink=/usr/local/openlink/lib > > Can someone tell me what exactly is /path/to/openlink and /path/to/iodbc? > is it the .h file? is it the .so files? is it the .a files? what > the heck is > it? > > And why don't the INSTALL directions just tell me that? so if PHP > expects to > find the .h file, > why don't they document it like: "--with-iodbc=/path/to/iodbc .h files" so > people aren't confused like me. > > Please help. Thanks. > > D. > >

    attached mail follows:


    thanks for replying Andrew, but that's not working for me either.

    Also, do I need both "--with-iodbc" and "--with-openlink" or do I just need one of them?

    These are the instructions I've been following: http://www.iodbc.org/odbc-phpHOWTO.html

    so now I've tried:

    #--with-iodbc=/usr/local/openlink/odbcsdk/lib \ #--with-iodbc=/usr/local/openlink/odbcsdk \ #--with-iodbc=/usr/local/openlink/lib \ #--with-iodbc=/usr/local/bin \ #--with-iodbc=/usr/local \ #--with-iodbc=/usr/local/include \ #--with-iodbc=../libiodbc \ #--with-openlink=/usr/local/openlink/odbcsdk/lib \ #--with-openlink=/usr/local/openlink/odbcsdk \ #--with-openlink=/usr/local/openlink \ #--with-openlink=/usr/local/openlink/lib \

    here is my dir structure: the files are there, why won't PHP see them? In fact I have the "libiodbc.so" library in TWO places I see: "openlink/lib/" and "openlink/odbcsdk/lib/"

    [root=pts/1]3:45pmcontent:{/usr/local/openlink}> ll -r /usr/local/openlink/* -rw-rw-rw- 1 nobody html 0 Mar 29 20:20 /usr/local/openlink/oplrqb.ini -rwxr-xr-x 1 nobody html 707 Mar 30 15:16 /usr/local/openlink/openlink.sh* -rwxr-xr-x 1 nobody html 619 Mar 30 15:16 /usr/local/openlink/openlink.csh* -rw-rw-rw- 1 nobody html 180 Mar 29 20:21 /usr/local/openlink/odbcinst.ini -rw-rw-rw- 1 nobody html 541 Mar 30 13:51 /usr/local/openlink/odbc.ini -rw-rw-rw- 1 nobody html 196347 Mar 29 17:54 /usr/local/openlink/l2oczzzz.taz -rw-rw-rw- 1 nobody html 364085 Mar 30 15:16 /usr/local/openlink/l2kuzzzz.taz -rw-rw-rw- 1 nobody html 512218 Mar 30 15:16 /usr/local/openlink/l2kozzzz.taz -rwxrwxrwx 1 nobody html 16137 Mar 30 15:16 /usr/local/openlink/install.sh*

    /usr/local/openlink/udbcsdk: total 16 drwxr-xr-x 2 nobody html 4096 Mar 7 14:44 lib/ drwxr-xr-x 3 nobody html 4096 Mar 7 14:44 include/ drwxr-xr-x 2 nobody html 4096 Mar 7 14:44 examples/ drwxr-xr-x 2 nobody html 4096 Mar 7 14:44 doc/

    /usr/local/openlink/lib: total 400 -rw-r--r-- 1 nobody html 272057 Mar 7 14:43 oplodbc.so.1.0.0 lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so.1 -> oplodbc.so.1.0.0 lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so -> oplodbc.so.1.0.0 -rw-r--r-- 1 nobody html 678 Mar 7 14:43 oplodbc.la lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libodbc.so -> libiodbc.so.2.1.2* -rwxr-xr-x 1 nobody html 117877 Mar 7 14:43 libiodbc.so.2.1.2* lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so.2 -> libiodbc.so.2.1.2* lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so -> libiodbc.so.2.1.2* -rwxr-xr-x 1 nobody html 669 Mar 7 14:43 libiodbc.la*

    /usr/local/openlink/bin: total 140 -rw------- 1 nobody html 29 Mar 30 15:16 oplrqb.ini -rwxr-xr-x 1 nobody html 92225 Mar 7 14:43 odbctest* -rw-r--r-- 1 nobody html 170 Mar 7 14:43 odbcinst.ini.sample -rw-r--r-- 1 nobody html 170 Mar 7 14:43 odbcinst.ini -rw-r--r-- 1 nobody html 473 Mar 7 14:43 odbc.ini.sample -rw-r--r-- 1 nobody html 473 Mar 7 14:43 odbc.ini -rwxr--r-- 1 nobody html 23260 Mar 7 14:43 inifile*

    /usr/local/openlink/odbcsdk: total 20 drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 lib/ drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 include/ drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 examples/ drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 driver/ drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 doc/

    and then here is the odbcsdk directory tree:

    [root=pts/1]3:51pmcontent:{/usr/local/openlink}> ll -r odbcsdk/* odbcsdk/lib: total 976 -rw-r--r-- 1 nobody html 272057 Mar 7 14:42 oplodbc.so.1.0.0 lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so.1 -> oplodbc.so.1.0.0 lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so -> oplodbc.so.1.0.0 -rw-r--r-- 1 nobody html 678 Mar 7 14:42 oplodbc.la -rw-r--r-- 1 nobody html 431992 Mar 7 14:42 oplodbc.a -rwxr-xr-x 1 nobody html 117877 Mar 7 14:42 libiodbc.so.2.1.2* lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so.2 -> libiodbc.so.2.1.2* lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so -> libiodbc.so.2.1.2* -rwxr-xr-x 1 nobody html 669 Mar 7 14:42 libiodbc.la* -rw-r--r-- 1 nobody html 143692 Mar 7 14:42 libiodbc.a

    odbcsdk/include: total 136 -rw-r--r-- 1 nobody html 11973 Mar 7 14:42 udbcext.h -rw-r--r-- 1 nobody html 6362 Mar 7 14:42 sqltypes.h -rw-r--r-- 1 nobody html 67955 Mar 7 14:42 sqlext.h -rw-r--r-- 1 nobody html 28728 Mar 7 14:42 sql.h -rw-r--r-- 1 nobody html 1161 Mar 7 14:42 isqltypes.h -rw-r--r-- 1 nobody html 1158 Mar 7 14:42 isqlext.h -rw-r--r-- 1 nobody html 1140 Mar 7 14:42 isql.h

    odbcsdk/examples: total 112 -rw-r--r-- 1 nobody html 10321 Mar 7 14:42 odbctest.c -rwxr-xr-x 1 nobody html 92225 Mar 7 14:42 odbctest* -rw-r--r-- 1 nobody html 3460 Mar 7 14:42 Makefile

    odbcsdk/driver: total 124 -rw-r--r-- 1 nobody html 119187 Mar 7 14:42 odbc_src.taz

    odbcsdk/doc: total 16 -rw-r--r-- 1 nobody html 773 Mar 7 14:42 odbcinst.ini -rw-r--r-- 1 nobody html 1010 Mar 7 14:42 odbc.ini -rw-r--r-- 1 nobody html 5127 Mar 7 14:42 odbc.doc

    > -----Original Message----- > From: Andrew Hill [mailto:ahillopenlinksw.com] > Sent: Friday, March 30, 2001 2:57 PM > To: Daevid Vincent; php-dblists.php.net; PHP General > Subject: [PHP] RE: what exactly are /path/to/blah looking for? .h? .so? > .a? what?! > > > Daevid, > > It's the path/to/odbcsdk > It's looking for libiodbc.so > > :) > > Best regards, > Andrew

    attached mail follows:


    Dear PHP Helpers,

    Can you direct me to a solution for this problem:

    How can I eliminate bad (blank or incorrect) fields from a mysql query? In other words, if someone leaves a form field blank or enters a value that does not have a matching entry in the database, how can I eliminate that variable from the query?

    The query that I am using now works fine if the user enters a value in field that exists in the database. However if a field is left blank or incorrect data is entered, no results will display on the screen.

    Here is the code that I am using:

    $result = mysql_query("SELECT salutation, first_name, mid_name, user_name, cert_deg, job_title, institution, address_1, address_2, geo_loc, state, zip, country, phone, fax, e_mail FROM svt_members where first_name like '$first_name' && user_name like '$user_name' && institution like '$institution' && state='$state' && country like '$country'", $db);

    while ($myrow = mysql_fetch_array($result)) {

    printf("Name: <b><font color=\"green\" size=\"5s\">%s %s %s %s\n<br></b></font>", $myrow["salutation"], $myrow["first_name"], $myrow["mid_name"], $myrow["user_name"]);

    printf("Credentials and Degrees: <b><font color=\"blue\" size=\2\">%s</font></b><br>Job Title: <b><font color=\"blue\" size=\2\">%s</font></b><br>Company/Institution: <b><font color=\"blue\" size=\2\">%s<br></font></b>Address: <b><font color=\"blue\" size=\2\">%s %s<br></font></b>City: <b><font color=\"blue\" size=\2\">%s</font></b> State/Province: <b><font color=\"blue\" size=\2\">%s<br></font></b>Country: <b><font color=\"blue\" size=\2\">%s</font></b> Postal Code: <b><font color=\"blue\" size=\2\">%s<br></font></b>Voice: <b><font color=\"blue\" size=\2\">%s</font></b> Fax: <b><font color=\"blue\" size=\2\">%s<br></font></b>E-mail: <b><font color=\"blue\" size=\2\">%s\n<P></b></font>", $myrow["cert_deg"], $myrow["job_title"], $myrow["institution"], $myrow["address_1"], $myrow["address_2"], $myrow["geo_loc"], $myrow["state"], $myrow["country"], $myrow["zip"], $myrow["phone"], $myrow["fax"], $myrow["e_mail"]); }

    So if (for instance) a user enters data for each field except institution, how can I get the query to disregard $institution?

    Or if there is a better approach that I should be using instead of the above, please let me know.

    Thank you,

    Bob

    __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text

    attached mail follows:


    Hi,

    I have a question about security with PHP. I'm building a site with PHP and some of the scripts connect to MySQL. All someone needs to do to get my MySQL passwords is view the PHP source, right? And the recommended approach around this is to use Zend, right?

    Please correct me if I'm off base here. TIA!

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

    attached mail follows:


    you can put you database connection in a file below the web root and include it into the script. that way it isn't visible in the source.

    Jerry Lake - jerryleuropa.com Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com

    -----Original Message----- From: Les Neste [mailto:lesnesteatlnewmedia.com] Sent: Friday, March 30, 2001 3:01 PM To: php-generallists.php.net Subject: [PHP] sanity check please

    Hi,

    I have a question about security with PHP. I'm building a site with PHP and some of the scripts connect to MySQL. All someone needs to do to get my MySQL passwords is view the PHP source, right? And the recommended approach around this is to use Zend, right?

    Please correct me if I'm off base here. TIA!

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

    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    Les Neste wrote:

    > Hi, > > I have a question about security with PHP. I'm building a site with PHP > and some of the scripts connect to MySQL. All someone needs to do to get > my MySQL passwords is view the PHP source, right? And the recommended > approach around this is to use Zend, right? > > Please correct me if I'm off base here. TIA!

    The recommended approach is to keep your scripts in a relatively secure directory and make sure the webserver is always configured to parse the scripts, never to send them as plaintext. You're always using Zend with PHP4, because the engine beneath PHP is the Zend engine. You may have been referring to the 'encoder' product - this is not necessary, and is meant more to help people distribute their applications without giving out source. In a pure web environment using the encoder doesn't make much sense, to me anyway.

    HTH

    attached mail follows:


    well, besides the fact that your code is interpreted and the only data that makes it to the browser is what you decide to output (or error message, but they can be turned off/silenced)

    i dont see how a surfer could get your PHP source code via the webserver.

    > -----Original Message----- > From: Jerry Lake [mailto:jerryleuropa.com] > Sent: Friday, March 30, 2001 6:42 PM > To: php-generallists.php.net > Subject: RE: [PHP] sanity check please > > > you can put you database connection > in a file below the web root > and include it into the script. > that way it isn't visible in the source. > > Jerry Lake - jerryleuropa.com > Web Designer > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.com > > > -----Original Message----- > From: Les Neste [mailto:lesnesteatlnewmedia.com] > Sent: Friday, March 30, 2001 3:01 PM > To: php-generallists.php.net > Subject: [PHP] sanity check please > > > Hi, > > I have a question about security with PHP. I'm building a site with PHP > and some of the scripts connect to MySQL. All someone needs to do to get > my MySQL passwords is view the PHP source, right? And the recommended > approach around this is to use Zend, right? > > Please correct me if I'm off base here. TIA! > > > > > > ............................................................................ > Les Neste 678-778-0382 http://www.lesneste.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Daevid,

    just --with-iodbc or --with-openlink is fine.

    you should be using either:

    --with-iodbc=/usr/local/openlink/odbcsdk \ or --with-openlink=/usr/local/openlink/lib \

    depending on which you use and where you installed the sdk. what error are you getting?

    Best regards, Andrew

    On 3/30/01 6:54 PM, "Daevid Vincent" <DayWalkerTheMatrix.com> wrote:

    > thanks for replying Andrew, but that's not working for me either. > > Also, do I need both "--with-iodbc" and "--with-openlink" or do I just need > one of them? > > These are the instructions I've been following: > http://www.iodbc.org/odbc-phpHOWTO.html > > so now I've tried: > > #--with-iodbc=/usr/local/openlink/odbcsdk/lib \ > #--with-iodbc=/usr/local/openlink/odbcsdk \ > #--with-iodbc=/usr/local/openlink/lib \ > #--with-iodbc=/usr/local/bin \ > #--with-iodbc=/usr/local \ > #--with-iodbc=/usr/local/include \ > #--with-iodbc=../libiodbc \ > #--with-openlink=/usr/local/openlink/odbcsdk/lib \ > #--with-openlink=/usr/local/openlink/odbcsdk \ > #--with-openlink=/usr/local/openlink \ > #--with-openlink=/usr/local/openlink/lib \ > > here is my dir structure: > the files are there, why won't PHP see them? In fact I have the > "libiodbc.so" library in TWO places I see: "openlink/lib/" and > "openlink/odbcsdk/lib/" > > [root=pts/1]3:45pmcontent:{/usr/local/openlink}> ll -r > /usr/local/openlink/* > -rw-rw-rw- 1 nobody html 0 Mar 29 20:20 > /usr/local/openlink/oplrqb.ini > -rwxr-xr-x 1 nobody html 707 Mar 30 15:16 > /usr/local/openlink/openlink.sh* > -rwxr-xr-x 1 nobody html 619 Mar 30 15:16 > /usr/local/openlink/openlink.csh* > -rw-rw-rw- 1 nobody html 180 Mar 29 20:21 > /usr/local/openlink/odbcinst.ini > -rw-rw-rw- 1 nobody html 541 Mar 30 13:51 > /usr/local/openlink/odbc.ini > -rw-rw-rw- 1 nobody html 196347 Mar 29 17:54 > /usr/local/openlink/l2oczzzz.taz > -rw-rw-rw- 1 nobody html 364085 Mar 30 15:16 > /usr/local/openlink/l2kuzzzz.taz > -rw-rw-rw- 1 nobody html 512218 Mar 30 15:16 > /usr/local/openlink/l2kozzzz.taz > -rwxrwxrwx 1 nobody html 16137 Mar 30 15:16 > /usr/local/openlink/install.sh* > > /usr/local/openlink/udbcsdk: > total 16 > drwxr-xr-x 2 nobody html 4096 Mar 7 14:44 lib/ > drwxr-xr-x 3 nobody html 4096 Mar 7 14:44 include/ > drwxr-xr-x 2 nobody html 4096 Mar 7 14:44 examples/ > drwxr-xr-x 2 nobody html 4096 Mar 7 14:44 doc/ > > /usr/local/openlink/lib: > total 400 > -rw-r--r-- 1 nobody html 272057 Mar 7 14:43 oplodbc.so.1.0.0 > lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so.1 -> > oplodbc.so.1.0.0 > lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so -> > oplodbc.so.1.0.0 > -rw-r--r-- 1 nobody html 678 Mar 7 14:43 oplodbc.la > lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libodbc.so -> > libiodbc.so.2.1.2* > -rwxr-xr-x 1 nobody html 117877 Mar 7 14:43 libiodbc.so.2.1.2* > lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so.2 -> > libiodbc.so.2.1.2* > lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so -> > libiodbc.so.2.1.2* > -rwxr-xr-x 1 nobody html 669 Mar 7 14:43 libiodbc.la* > > /usr/local/openlink/bin: > total 140 > -rw------- 1 nobody html 29 Mar 30 15:16 oplrqb.ini > -rwxr-xr-x 1 nobody html 92225 Mar 7 14:43 odbctest* > -rw-r--r-- 1 nobody html 170 Mar 7 14:43 odbcinst.ini.sample > -rw-r--r-- 1 nobody html 170 Mar 7 14:43 odbcinst.ini > -rw-r--r-- 1 nobody html 473 Mar 7 14:43 odbc.ini.sample > -rw-r--r-- 1 nobody html 473 Mar 7 14:43 odbc.ini > -rwxr--r-- 1 nobody html 23260 Mar 7 14:43 inifile* > > /usr/local/openlink/odbcsdk: > total 20 > drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 lib/ > drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 include/ > drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 examples/ > drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 driver/ > drwxr-xr-x 2 nobody html 4096 Mar 30 15:16 doc/ > > and then here is the odbcsdk directory tree: > > [root=pts/1]3:51pmcontent:{/usr/local/openlink}> ll -r odbcsdk/* > odbcsdk/lib: > total 976 > -rw-r--r-- 1 nobody html 272057 Mar 7 14:42 oplodbc.so.1.0.0 > lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so.1 -> > oplodbc.so.1.0.0 > lrwxrwxrwx 1 nobody html 16 Mar 30 15:16 oplodbc.so -> > oplodbc.so.1.0.0 > -rw-r--r-- 1 nobody html 678 Mar 7 14:42 oplodbc.la > -rw-r--r-- 1 nobody html 431992 Mar 7 14:42 oplodbc.a > -rwxr-xr-x 1 nobody html 117877 Mar 7 14:42 libiodbc.so.2.1.2* > lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so.2 -> > libiodbc.so.2.1.2* > lrwxrwxrwx 1 nobody html 17 Mar 30 15:16 libiodbc.so -> > libiodbc.so.2.1.2* > -rwxr-xr-x 1 nobody html 669 Mar 7 14:42 libiodbc.la* > -rw-r--r-- 1 nobody html 143692 Mar 7 14:42 libiodbc.a > > odbcsdk/include: > total 136 > -rw-r--r-- 1 nobody html 11973 Mar 7 14:42 udbcext.h > -rw-r--r-- 1 nobody html 6362 Mar 7 14:42 sqltypes.h > -rw-r--r-- 1 nobody html 67955 Mar 7 14:42 sqlext.h > -rw-r--r-- 1 nobody html 28728 Mar 7 14:42 sql.h > -rw-r--r-- 1 nobody html 1161 Mar 7 14:42 isqltypes.h > -rw-r--r-- 1 nobody html 1158 Mar 7 14:42 isqlext.h > -rw-r--r-- 1 nobody html 1140 Mar 7 14:42 isql.h > > odbcsdk/examples: > total 112 > -rw-r--r-- 1 nobody html 10321 Mar 7 14:42 odbctest.c > -rwxr-xr-x 1 nobody html 92225 Mar 7 14:42 odbctest* > -rw-r--r-- 1 nobody html 3460 Mar 7 14:42 Makefile > > odbcsdk/driver: > total 124 > -rw-r--r-- 1 nobody html 119187 Mar 7 14:42 odbc_src.taz > > odbcsdk/doc: > total 16 > -rw-r--r-- 1 nobody html 773 Mar 7 14:42 odbcinst.ini > -rw-r--r-- 1 nobody html 1010 Mar 7 14:42 odbc.ini > -rw-r--r-- 1 nobody html 5127 Mar 7 14:42 odbc.doc > > >> -----Original Message----- >> From: Andrew Hill [mailto:ahillopenlinksw.com] >> Sent: Friday, March 30, 2001 2:57 PM >> To: Daevid Vincent; php-dblists.php.net; PHP General >> Subject: [PHP] RE: what exactly are /path/to/blah looking for? .h? .so? >> .a? what?! >> >> >> Daevid, >> >> It's the path/to/odbcsdk >> It's looking for libiodbc.so >> >> :) >> >> Best regards, >> Andrew >

    attached mail follows:


    Okay, frustration time under RH7.......

    I am trying to recompile PHP for use with Oracle. (If you are saying to yourself, "but Oracle does not work under RH7....." then don't go there. It does but it takes a significant amount of work.)

    I have done this before under RH6.2 and it did the same thing it is doing now. What it is doing is telling me: "Call to undefined function: ora_logon() in /home/jon/public_html/test.php on line 26" Now, in 6.2 I recompiled using --with-oci8 which did not work then with --with-Oracle which did. Now, neither works. What am I missing or doing wrong.

    Thanks.

    P.S. If you want to get Oracle to work with RH7 write me offlist and I will try and give my version of this gruesome tale : )

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    Jon Jacob wrote:

    > Okay, frustration time under RH7....... > > I am trying to recompile PHP for use with Oracle. (If you are saying to > yourself, "but Oracle does not work under RH7....." then don't go > there. It does but it takes a significant amount of work.) > > I have done this before under RH6.2 and it did the same thing it is > doing now. What it is doing is telling me: "Call to undefined function: > ora_logon() in /home/jon/public_html/test.php on line 26" Now, in 6.2 I > recompiled using --with-oci8 which did not work then with --with-Oracle > which did. Now, neither works. What am I missing or doing wrong. > > Thanks. > > P.S. If you want to get Oracle to work with RH7 write me offlist and I > will try and give my version of this gruesome tale : ) > > _________________________________________________________ > Do You Yahoo!? > Get your free yahoo.com address at http://mail.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    ADDED INFORMATION:

    To recompile PHP, I simply downloaded the tarball from the Zend site, untarred it, did make and make install with the oracle options, and restarted Apache. I forgot, before I sent the last note, to use phpinfo() to check the install. Well, nothing about Oracle.

    It must not be as simple as I thought. What do I need to do to recompile properly? Do I need to recompile Apache as well? If so, with what options. Its amazing that there is no documentation anywhere about this. I have looked.

    Oh well, just another RH7 story. I feel like I am part of that scene in Jaws where the two shark hunters are comparing scares........

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    HTTP_REFERER is set by browser. I treat HTTP_REFERER header as user input, so I don't trust it. Using HTTP_REFERER can open security hole in your web site.

    I suggest to change your authentication code, so that you don't rely on HTTP_REFERER.

    Regards,

    --
    Yasuo Ohgaki
    

    ""Scott Fletcher"" <scottabcoa.com> wrote in message news:9a2cpr$5d0$1toye.p.sourceforge.net... > I had now found the problem. The website that have been in use for a > while work pretty well with IE and Netscape Navigator. Until NS6 came, > that's when the website start having some problem. > The website use the login page and any web pages after logging are > controlled by the security check. Security check is made of scripts that > check to be sure there is no direct access attempt and it also use the cache > expiration, etc. > So, I noticed when I use the HTTP_REFERER on every web pages as part of > the security check, it work pretty well. However, when I use the php code, > "header();" and automatically go to the next web page, the HTTP_REFERER > can't recieve data from the last page that use the php code, "header();". > It only affected NS6, it doesn't affected IE and Netscape Navigator. > > Why is that? What is the work-around to this problem? > > Thanks, > Scott > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    has anyone had trouble compiling PHP and GD on a linux/redhat machine?? (what baffles me the most is that it compiled flawlessly on another, almost identical, machine)

    could anyone offer suggestions or hints, or perhaps suggest a good website/discussion/archive that might address GD-PHP compilation errors?

    thanks a bunch.

    attached mail follows:


    hey scott,

    i compiled php and gd on my redhat 6.2 box a couple weeks ago..took a little tweaking to make sure i had jpeg installed right, etc, but in the end its working well...what was your error? maybe that'll shed some light...

    -jack

    ----- Original Message ----- From: "..s.c.o.t.t.. [gts]" <scottgraphictype.com> Date: Friday, March 30, 2001 7:42 pm Subject: [PHP] compiling PHP4

    > has anyone had trouble compiling PHP and GD on a linux/redhat > machine?? (what baffles me the most is that it compiled > flawlessly on another, almost identical, machine) > > could anyone offer suggestions or hints, or perhaps > suggest a good website/discussiomight address GD-PHP compilation > errors? > thanks a bunch. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list- > adminlists.php.net >

    attached mail follows:


    > $p_arr=array("000","050","100"); > $fc_arr=array("high","med","low"); > $ptext_arr("High","Medium","Low"); > for($x=0;$x<count($p_arr);$x++) > { $pstr.="<option value=\"$p_arr[$x]\" "; > if($priority==$p_arr[$x]) > { > $pstr.="selected"; > $fcol=$fc_arr[$x]; > } > $pstr.=">$ptext_arr[$x]\n"; > }

    Even better! This looks like to winning entry for our mini-programming contest. =)

    Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email

    attached mail follows:


    Does anyone know of a way to stop the user from refreshing a page several times.

    i.e if I add a value to a database using a form and PHP, I don't want the user to be able to simply press refresh and add the value to the database again.

    Please help, Dvaid.

    ----------------------- Fed202 Solutions www.fed202solutions.com Mobile : 07779 293368 -----------------------

    attached mail follows:


    check the archives...you can use javascript or perform a check off the data to be inserted to see if its already there...

    -jack

    David Hynes wrote: > > Does anyone know of a way to stop the user from refreshing a page several > times. > > i.e if I add a value to a database using a form and PHP, I don't want the > user to be able to simply press refresh and add the value to the database > again. > > Please help, > Dvaid. > > ----------------------- > Fed202 Solutions > www.fed202solutions.com > Mobile : 07779 293368 > ----------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    > Does anyone know of a way to stop the user from refreshing a page several > times. > > i.e if I add a value to a database using a form and PHP, I don't want the > user to be able to simply press refresh and add the value to the database > again. > > Please help, > Dvaid.

    Many methods exist, cookies and sessions come to mind first...

    Greg

    attached mail follows:


    Thanks for the code. Its not doing exactly what I want, but with a little modification is is kind of working. The one problem is that it is putting the Title first and the catagory second. so it is coming up with:

    title1 title2 catagory title3 title4 catagory1

    and the last catagory is droping off. I have modified the code as such (if you can help so that the catagory is first and the titles second it would be a great help):

    $result = mysql_query ("SELECT * from article ORDER BY catagory"); $temp = ""; while ($r = mysql_fetch_array($result)) { if (empty($temp)) // will be fired only once! { $temp = $r["catagory"]; // get category name // echo "This is category <b>" . $temp ."</b>, and it's titles are as following:<br>"; //display it // echo "----this is title <a href='update.php?passed=". $r["id"] ."'><b>" . $r["title"] . "</b></a><br>"; }

    if ($temp != $r["catagory"]) // because it's sorted by category, this method will work! echo "This is category <b>" . $temp. "</b>, and it's titles are as following:<br>"; //display it // update last category name

    $temp = $r["catagory"]; // echo "This is category <b>" . $temp. "</b>, and it's titles are as following:<br>"; echo "----this is title <a href='update.php?passed=". $r["id"] ."'><b>" . $r["title"] . "</b></a><br>";

    }

    ""elias"" <elias_bachaalanyyahoo.com> wrote in message news:9a246s$mcv$1toye.p.sourceforge.net... > please try this: > - > I didn't really get what you mean, but i can see that you have a table such: > > Table fields: category, fieldx, fieldy, fieldz, title > > and you want to display it's data as: > > category 1 > title1 (belonging to cat1) > title2 (...) > title3 (....) > title4 (...) > cat2 > titlex > titley > titlez > > that what you said, right? > okay, try this: > > ** > > $result = mysql_query ("SELECT * from article ORDER BY catagory"); > $temp = ""; > while ($r = mysql_fetch_array($result)) > { > if (empty($temp)) // will be fired only once! > { > $temp = $r["category"]; // get category name > echo "This is category $temp, and it's titles are as following:<br>"; // > display it > } > > if ($temp != $r["category"]) // because it's sorted by category, this > method will work! > echo "This is category $temp, and it's titles are as following:<br>"; // > display it > // update last category name > $temp = $r["category"]; > echo "----this is title " . $r["title"] . "<br>"; > > } > ** > - > ""Mark Bayfield"" <mbayfieldoptushome.com.au> wrote in message > news:9a1u3q$k81$1toye.p.sourceforge.net... > > I am trying to make a catagory list that displays a distinct catagory, and > > then listing titles under that catagory. > > Unfortunatly all the data is in one table, and the catagory field is not > set > > catagories, so there is duplicates in that field. > > The code so far is (but I am probably going about it the wrong way, if you > > can see whats wrong with my code plase help, or point me in some > direction), > > > > $query = mysql_query("SELECT DISTINCT catagory from article order by > > catagory"); > > $query2 = mysql_query ("SELECT * from article ORDER BY catagory"); > > > > for ($index = 0; $index < mysql_num_rows($query); $index++) { > > $Catagory = mysql_fetch_row ($query) or die (mysql_error()); > > $name1 = mysql_fetch_row ($query2) or die (mysql_error()); > > $x = $name1; > > $result1 = array_unique($Catagory); > > $result = array_merge($Catagory, $name1); > > > > print ("$result1[0]<BR>"); > > for ($x=0; $x == $result1[0]; $x++) { > > print ("&nbsp;&nbsp;&nbsp;&nbsp;<a > > href='update.php?passed=$name1[0]'>$name1[2]</a><br>\n"); > > } > > } > > > > I am trying everything to get it do just print the following: > > > > Catagory > > title1 > > title2 > > Catagory1 > > title3 > > title4 > > > > Please help me out.... > > > > thanks > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Thanks for the code... I got it to do what I wanted, by modifying it to this....

    $result = mysql_query ("SELECT * from article ORDER BY catagory"); $temp = ""; while ($r = mysql_fetch_array($result)) { if (empty($temp)) // will be fired only once! { $temp = $r["catagory"]; // get category name echo "<font face=verdana size=1><b>" . $temp ."</b></font><br>"; //display it }

    if( $temp != $r["catagory"]) // because it's sorted by category, this method will work! // echo "This is category2 <b>" . $temp. "</b>, and it's titles are as following:<br>"; //display it // update last category name

    if ($temp = $r["catagory"]) echo "<font face=verdana size=1><b>" . $temp . "</b></font><br>"; echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='update.php?passed=". $r["id"] ."'><font face=verdana size=1><b>" . $r["title"] . "</b></font></a><br>";

    }

    ""Mark Bayfield"" <mbayfieldoptushome.com.au> wrote in message news:9a3d8o$e2l$1toye.p.sourceforge.net... > Thanks for the code. Its not doing exactly what I want, but with a little > modification is is kind of working. > The one problem is that it is putting the Title first and the catagory > second. so it is coming up with: > > title1 > title2 > catagory > title3 > title4 > catagory1 > > and the last catagory is droping off. I have modified the code as such (if > you can help so that the catagory is first and the titles second it would be > a great help): > > $result = mysql_query ("SELECT * from article ORDER BY catagory"); > $temp = ""; > while ($r = mysql_fetch_array($result)) > { > if (empty($temp)) // will be fired only once! > { > $temp = $r["catagory"]; // get category name > // echo "This is category <b>" . $temp ."</b>, and it's titles are as > following:<br>"; //display it > // echo "----this is title <a href='update.php?passed=". $r["id"] > ."'><b>" . $r["title"] . "</b></a><br>"; > } > > if ($temp != $r["catagory"]) // because it's sorted by category, this > method will work! > echo "This is category <b>" . $temp. "</b>, and it's titles are as > following:<br>"; //display it > // update last category name > > $temp = $r["catagory"]; > // echo "This is category <b>" . $temp. "</b>, and it's titles are as > following:<br>"; > echo "----this is title <a href='update.php?passed=". $r["id"] ."'><b>" . > $r["title"] . "</b></a><br>"; > > } > > > > ""elias"" <elias_bachaalanyyahoo.com> wrote in message > news:9a246s$mcv$1toye.p.sourceforge.net... > > please try this: > > - > > I didn't really get what you mean, but i can see that you have a table > such: > > > > Table fields: category, fieldx, fieldy, fieldz, title > > > > and you want to display it's data as: > > > > category 1 > > title1 (belonging to cat1) > > title2 (...) > > title3 (....) > > title4 (...) > > cat2 > > titlex > > titley > > titlez > > > > that what you said, right? > > okay, try this: > > > > ** > > > > $result = mysql_query ("SELECT * from article ORDER BY catagory"); > > $temp = ""; > > while ($r = mysql_fetch_array($result)) > > { > > if (empty($temp)) // will be fired only once! > > { > > $temp = $r["category"]; // get category name > > echo "This is category $temp, and it's titles are as following:<br>"; > // > > display it > > } > > > > if ($temp != $r["category"]) // because it's sorted by category, this > > method will work! > > echo "This is category $temp, and it's titles are as following:<br>"; > // > > display it > > // update last category name > > $temp = $r["category"]; > > echo "----this is title " . $r["title"] . "<br>"; > > > > } > > ** > > - > > ""Mark Bayfield"" <mbayfieldoptushome.com.au> wrote in message > > news:9a1u3q$k81$1toye.p.sourceforge.net... > > > I am trying to make a catagory list that displays a distinct catagory, > and > > > then listing titles under that catagory. > > > Unfortunatly all the data is in one table, and the catagory field is not > > set > > > catagories, so there is duplicates in that field. > > > The code so far is (but I am probably going about it the wrong way, if > you > > > can see whats wrong with my code plase help, or point me in some > > direction), > > > > > > $query = mysql_query("SELECT DISTINCT catagory from article order by > > > catagory"); > > > $query2 = mysql_query ("SELECT * from article ORDER BY catagory"); > > > > > > for ($index = 0; $index < mysql_num_rows($query); $index++) { > > > $Catagory = mysql_fetch_row ($query) or die (mysql_error()); > > > $name1 = mysql_fetch_row ($query2) or die (mysql_error()); > > > $x = $name1; > > > $result1 = array_unique($Catagory); > > > $result = array_merge($Catagory, $name1); > > > > > > print ("$result1[0]<BR>"); > > > for ($x=0; $x == $result1[0]; $x++) { > > > print ("&nbsp;&nbsp;&nbsp;&nbsp;<a > > > href='update.php?passed=$name1[0]'>$name1[2]</a><br>\n"); > > > } > > > } > > > > > > I am trying everything to get it do just print the following: > > > > > > Catagory > > > title1 > > > title2 > > > Catagory1 > > > title3 > > > title4 > > > > > > Please help me out.... > > > > > > thanks > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    If I understand what you are looking for, this should work for you:

    $indent_str = '&nbsp;&nbsp;&nbsp;'; $qry = 'SELECT * FROM test ORDER BY category'; $result = mysql_query($qry); $current_category = ""; while ($r = mysql_fetch_array($result)){ if ($r['category'] <> $current_category){ //first time category $current_category = $r['category']; printf("<b>%s</b><br>\n",$current_category); } //Now just print the title in this row printf("$indent_str<i>%s</i><br>\n",$r['title']); }

    basil

    At 11:58 AM 3/31/2001 +1000, Mark Bayfield wrote: >Thanks for the code. Its not doing exactly what I want, but with a little >modification is is kind of working. >The one problem is that it is putting the Title first and the catagory >second. so it is coming up with: > >title1 >title2 >catagory >title3 >title4 >catagory1 > >and the last catagory is droping off. I have modified the code as such (if >you can help so that the catagory is first and the titles second it would be >a great help): > >$result = mysql_query ("SELECT * from article ORDER BY catagory"); >$temp = ""; >while ($r = mysql_fetch_array($result)) >{ > if (empty($temp)) // will be fired only once! > { > $temp = $r["catagory"]; // get category name > // echo "This is category <b>" . $temp ."</b>, and it's titles are as >following:<br>"; //display it > // echo "----this is title <a href='update.php?passed=". $r["id"] >."'><b>" . $r["title"] . "</b></a><br>"; > } > > if ($temp != $r["catagory"]) // because it's sorted by category, this >method will work! > echo "This is category <b>" . $temp. "</b>, and it's titles are as >following:<br>"; //display it > // update last category name > > $temp = $r["catagory"]; > // echo "This is category <b>" . $temp. "</b>, and it's titles are as >following:<br>"; > echo "----this is title <a href='update.php?passed=". $r["id"] ."'><b>" . >$r["title"] . "</b></a><br>"; > >} > > > >""elias"" <elias_bachaalanyyahoo.com> wrote in message >news:9a246s$mcv$1toye.p.sourceforge.net... > > please try this: > > - > > I didn't really get what you mean, but i can see that you have a table >such: > > > > Table fields: category, fieldx, fieldy, fieldz, title > > > > and you want to display it's data as: > > > > category 1 > > title1 (belonging to cat1) > > title2 (...) > > title3 (....) > > title4 (...) > > cat2 > > titlex > > titley > > titlez > > > > that what you said, right? > > okay, try this: > > > > ** > > > > $result = mysql_query ("SELECT * from article ORDER BY catagory"); > > $temp = ""; > > while ($r = mysql_fetch_array($result)) > > { > > if (empty($temp)) // will be fired only once! > > { > > $temp = $r["category"]; // get category name > > echo "This is category $temp, and it's titles are as following:<br>"; >// > > display it > > } > > > > if ($temp != $r["category"]) // because it's sorted by category, this > > method will work! > > echo "This is category $temp, and it's titles are as following:<br>"; >// > > display it > > // update last category name > > $temp = $r["category"]; > > echo "----this is title " . $r["title"] . "<br>"; > > > > } > > ** > > - > > ""Mark Bayfield"" <mbayfieldoptushome.com.au> wrote in message > > news:9a1u3q$k81$1toye.p.sourceforge.net... > > > I am trying to make a catagory list that displays a distinct catagory, >and > > > then listing titles under that catagory. > > > Unfortunatly all the data is in one table, and the catagory field is not > > set > > > catagories, so there is duplicates in that field. > > > The code so far is (but I am probably going about it the wrong way, if >you > > > can see whats wrong with my code plase help, or point me in some > > direction), > > > > > > $query = mysql_query("SELECT DISTINCT catagory from article order by > > > catagory"); > > > $query2 = mysql_query ("SELECT * from article ORDER BY catagory"); > > > > > > for ($index = 0; $index < mysql_num_rows($query); $index++) { > > > $Catagory = mysql_fetch_row ($query) or die (mysql_error()); > > > $name1 = mysql_fetch_row ($query2) or die (mysql_error()); > > > $x = $name1; > > > $result1 = array_unique($Catagory); > > > $result = array_merge($Catagory, $name1); > > > > > > print ("$result1[0]<BR>"); > > > for ($x=0; $x == $result1[0]; $x++) { > > > print ("&nbsp;&nbsp;&nbsp;&nbsp;<a > > > href='update.php?passed=$name1[0]'>$name1[2]</a><br>\n"); > > > } > > > } > > > > > > I am trying everything to get it do just print the following: > > > > > > Catagory > > > title1 > > > title2 > > > Catagory1 > > > title3 > > > title4 > > > > > > Please help me out.... > > > > > > thanks > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Thanks man, this works great...

    "Basil Groman" <basilgroman.com> wrote in message news:4.3.2.7.2.20010330211415.0290f2a8groman.com... > If I understand what you are looking for, this should work for you: > > $indent_str = '&nbsp;&nbsp;&nbsp;'; > $qry = 'SELECT * FROM test ORDER BY category'; > $result = mysql_query($qry); > $current_category = ""; > while ($r = mysql_fetch_array($result)){ > if ($r['category'] <> $current_category){ > //first time category > $current_category = $r['category']; > printf("<b>%s</b><br>\n",$current_category); > } > //Now just print the title in this row > printf("$indent_str<i>%s</i><br>\n",$r['title']); > } > > basil > > At 11:58 AM 3/31/2001 +1000, Mark Bayfield wrote: > >Thanks for the code. Its not doing exactly what I want, but with a little > >modification is is kind of working. > >The one problem is that it is putting the Title first and the catagory > >second. so it is coming up with: > > > >title1 > >title2 > >catagory > >title3 > >title4 > >catagory1 > > > >and the last catagory is droping off. I have modified the code as such (if > >you can help so that the catagory is first and the titles second it would be > >a great help): > > > >$result = mysql_query ("SELECT * from article ORDER BY catagory"); > >$temp = ""; > >while ($r = mysql_fetch_array($result)) > >{ > > if (empty($temp)) // will be fired only once! > > { > > $temp = $r["catagory"]; // get category name > > // echo "This is category <b>" . $temp ."</b>, and it's titles are as > >following:<br>"; //display it > > // echo "----this is title <a href='update.php?passed=". $r["id"] > >."'><b>" . $r["title"] . "</b></a><br>"; > > } > > > > if ($temp != $r["catagory"]) // because it's sorted by category, this > >method will work! > > echo "This is category <b>" . $temp. "</b>, and it's titles are as > >following:<br>"; //display it > > // update last category name > > > > $temp = $r["catagory"]; > > // echo "This is category <b>" . $temp. "</b>, and it's titles are as > >following:<br>"; > > echo "----this is title <a href='update.php?passed=". $r["id"] ."'><b>" . > >$r["title"] . "</b></a><br>"; > > > >} > > > > > > > >""elias"" <elias_bachaalanyyahoo.com> wrote in message > >news:9a246s$mcv$1toye.p.sourceforge.net... > > > please try this: > > > - > > > I didn't really get what you mean, but i can see that you have a table > >such: > > > > > > Table fields: category, fieldx, fieldy, fieldz, title > > > > > > and you want to display it's data as: > > > > > > category 1 > > > title1 (belonging to cat1) > > > title2 (...) > > > title3 (....) > > > title4 (...) > > > cat2 > > > titlex > > > titley > > > titlez > > > > > > that what you said, right? > > > okay, try this: > > > > > > ** > > > > > > $result = mysql_query ("SELECT * from article ORDER BY catagory"); > > > $temp = ""; > > > while ($r = mysql_fetch_array($result)) > > > { > > > if (empty($temp)) // will be fired only once! > > > { > > > $temp = $r["category"]; // get category name > > > echo "This is category $temp, and it's titles are as following:<br>"; > >// > > > display it > > > } > > > > > > if ($temp != $r["category"]) // because it's sorted by category, this > > > method will work! > > > echo "This is category $temp, and it's titles are as following:<br>"; > >// > > > display it > > > // update last category name > > > $temp = $r["category"]; > > > echo "----this is title " . $r["title"] . "<br>"; > > > > > > } > > > ** > > > - > > > ""Mark Bayfield"" <mbayfieldoptushome.com.au> wrote in message > > > news:9a1u3q$k81$1toye.p.sourceforge.net... > > > > I am trying to make a catagory list that displays a distinct catagory, > >and > > > > then listing titles under that catagory. > > > > Unfortunatly all the data is in one table, and the catagory field is not > > > set > > > > catagories, so there is duplicates in that field. > > > > The code so far is (but I am probably going about it the wrong way, if > >you > > > > can see whats wrong with my code plase help, or point me in some > > > direction), > > > > > > > > $query = mysql_query("SELECT DISTINCT catagory from article order by > > > > catagory"); > > > > $query2 = mysql_query ("SELECT * from article ORDER BY catagory"); > > > > > > > > for ($index = 0; $index < mysql_num_rows($query); $index++) { > > > > $Catagory = mysql_fetch_row ($query) or die (mysql_error()); > > > > $name1 = mysql_fetch_row ($query2) or die (mysql_error()); > > > > $x = $name1; > > > > $result1 = array_unique($Catagory); > > > > $result = array_merge($Catagory, $name1); > > > > > > > > print ("$result1[0]<BR>"); > > > > for ($x=0; $x == $result1[0]; $x++) { > > > > print ("&nbsp;&nbsp;&nbsp;&nbsp;<a > > > > href='update.php?passed=$name1[0]'>$name1[2]</a><br>\n"); > > > > } > > > > } > > > > > > > > I am trying everything to get it do just print the following: > > > > > > > > Catagory > > > > title1 > > > > title2 > > > > Catagory1 > > > > title3 > > > > title4 > > > > > > > > Please help me out.... > > > > > > > > thanks > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > > For additional commands, e-mail: php-general-helplists.php.net > > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >For additional commands, e-mail: php-general-helplists.php.net > >To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    I want to parse a file with the following syntax.

    hostname|protocol|number|severity|description

    Each record is on it's own line and have the fields delimited by the pipe character |. The file may have thousands of records and I would like to bring them into a database for reporting.

    Some of you may recognize this a the file format of a Nessus security scan file.

    What function should I use and what would the syntax be?

    Thanks, Pat

    attached mail follows:


    Hi Patrick,

    9:04:59 PM on 3/30/2001, Patrick Brown wrote:

    ... > hostname|protocol|number|severity|description

    > Each record is on it's own line and have the fields delimited by the pipe > character |. The file may have thousands of records and I would like to > bring them into a database for reporting.

    ... > What function should I use and what would the syntax be?

    Try explode().

    <?php

    /* this could be read in from a file instead, of course. */ $line = 'hostname|protocol|number|severity|description';

    $parts = explode('|',$line); /* like perl's split. */

    while(list(,$part) = each($parts)) { /* do something with each $part */ ... }

    ?>

    -Brian

    --
     PGP is spoken here: 0xE4D0C7C8
     Please do not carbon copy me on list replies.
    

    attached mail follows:


    Pat,

    You could read the file into an array;

    $aryNessus = file("/pathtofile/filename", "r");

    Each row of the array then has one line from the file; Get the record count; $intNumRecs = count($aryNessus);

    Now read through the array and extract the values;

    for($i=0;$i<=$intNumRecs;$i++) { $aryNessusFields = explode("|", $aryNessus[$i]); $hostname = $aryNessusFields[0]; $protocol = $aryNessusFields[1]; $number = $aryNessusFields[2]; $severity = $aryNessusFields[3]; $description + $aryNessusFields[4]; // Save the data into the database here }

    Regards

    Chris

    Patrick Brown wrote:

    > I want to parse a file with the following syntax. > > hostname|protocol|number|severity|description > > Each record is on it's own line and have the fields delimited by the pipe > character |. The file may have thousands of records and I would like to > bring them into a database for reporting. > > Some of you may recognize this a the file format of a Nessus security scan > file. > > What function should I use and what would the syntax be? > > Thanks, > Pat > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    --
    Chris Fry
    Quillsoft Pty Ltd
    Specialists in Secure Internet Services and E-Commerce Solutions
    10 Gray Street
    Kogarah
    NSW  2217
    Australia
    

    Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: chrisquillsoft.com.au http://www.quillsoft.com.au

    You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt

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

    This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so.

    This notice should not be removed.

    attached mail follows:


    Thanks Chris,

    That worked great. I didn't know that a file could be read directly into an array.

    --Pat

    "Chris Fry" <chrisquillsoft.com.au> wrote in message news:3AC53DAB.8A1B218Fquillsoft.com.au... > Pat, > > You could read the file into an array; > > $aryNessus = file("/pathtofile/filename", "r"); > > Each row of the array then has one line from the file; > Get the record count; > $intNumRecs = count($aryNessus); > > Now read through the array and extract the values; > > for($i=0;$i<=$intNumRecs;$i++) { > $aryNessusFields = explode("|", $aryNessus[$i]); > $hostname = $aryNessusFields[0]; > $protocol = $aryNessusFields[1]; > $number = $aryNessusFields[2]; > $severity = $aryNessusFields[3]; > $description + $aryNessusFields[4]; > // Save the data into the database here > } > > > Regards > > Chris > > Patrick Brown wrote: > > > I want to parse a file with the following syntax. > > > > hostname|protocol|number|severity|description > > > > Each record is on it's own line and have the fields delimited by the pipe > > character |. The file may have thousands of records and I would like to > > bring them into a database for reporting. > > > > Some of you may recognize this a the file format of a Nessus security scan > > file. > > > > What function should I use and what would the syntax be? > > > > Thanks, > > Pat > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > Chris Fry > Quillsoft Pty Ltd > Specialists in Secure Internet Services and E-Commerce Solutions > 10 Gray Street > Kogarah > NSW 2217 > Australia > > Phone: +61 2 9553 1691 > Fax: +61 2 9553 1692 > Mobile: 0419 414 323 > eMail: chrisquillsoft.com.au > http://www.quillsoft.com.au > > You can download our Public CA Certificate from:- > https://ca.secureanywhere.com/htdocs/cacert.crt > > ********************************************************************** > > This information contains confidential information intended only for > the use of the authorised recipient. If you are not an authorised > recipient of this e-mail, please contact Quillsoft Pty Ltd by return > e-mail. > In this case, you should not read, print, re-transmit, store or act > in reliance on this e-mail or any attachments, and should destroy all > copies of them. > This e-mail and any attachments may also contain copyright material > belonging to Quillsoft Pty Ltd. > The views expressed in this e-mail or attachments are the views of > the author and not the views of Quillsoft Pty Ltd. > You should only deal with the material contained in this e-mail if > you are authorised to do so. > > This notice should not be removed. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    I benched function with and without reference for a relatively large data (512KB, I think). I iterated 10,000 or 100,000 times to see the difference. (I posted the result in this list)

    The result is almost the same and should not be worried much about performance, but function without reference was faster than with reference.

    i.e. function($data) vs. function(&$data) function($data) was a little faster.

    This is my guess (I'm not reading source code, so correct me if I'm wrong). With reference, PHP need to additional work to make it as reference, since there is &. While without reference, PHP only need to add symbol and increment reference count for the variable. I guess the additional work to make reference (&) makes function(&$date) a little slower.

    Anyway, I think it worth to know that Pass by value can make execution slower in most languages, but not in PHP4. This is really good feature, because programmer can only use pass by reference when they want change function parameter and return the change to caller. It makes a little easier to read PHP4 script.

    Regards,

    --
    Yasuo Ohgaki
    

    ----- Original Message ----- From: "Neil Kimber" <neil.kimberflytxt.com> To: "Yasuo Ohgaki" <yohgakihotmail.com>; <php-generallists.php.net> Sent: Friday, March 30, 2001 6:51 PM Subject: RE: [PHP] Passing by reference deprecated?

    > I'm surprised. I would have thought that it would have been the other way > around. Passing by reference should have similar implications to reference > counting as used the Zend engine. It means that physical memory does not > have to be allocated to passed variables (thereby saving resources in > physical memory and time used in allocating and copying memory). > > In fact, because the Zend engine uses reference counting it will in effect > use pass by reference for all parameters. In the case of a parameter passed > as 'non-reference' it will only be allocated its own memory at a time that > the parameter value is changed within the function. You can see a detailed > explanation of how reference counting works here: > > http://www.zend.com/zend/art/ref-count.php > > I am not familiar with the parser source, so these are purely my thoughts on > my understanding of the parser behaviour. I'd be interested to hear of other > peoples views. > > > -----Original Message----- > From: Yasuo Ohgaki [mailto:yohgakihotmail.com] > Sent: 30 March 2001 10:08 > To: php-generallists.php.net > Subject: Re: [PHP] Passing by reference deprecated? > > > FYI > > Unless you need to modify and return modified contents of variables, pass by > reference makes script execution a little slower under PHP4. > > -- > Yasuo Ohgaki > > > ""Neil Kimber"" <neil.kimberflytxt.com> wrote in message > news:OAEEKIKEIHKOPGHNDHJJIEJACOAA.neil.kimberflytxt.com... > > Pass by reference itself is not deprecated, just call-time > > pass-by-reference. > > I believe this means your calling line of code being prevented from > > specifying that it should be invoked as pass-by-reference. > > > > So, > > > > > > function NormalPassByRefence(&$prmValue) > > { > > $prmValue ++; > > } > > > > $numValue=1; > > NormalPassByRefence($numValue); // This will still work > > // $numValue =2 at this point > > > > > > function CallTimePassByRefence($prmValue) > > { > > $prmValue ++; > > } > > > > $numValue=1; > > CallTimePassByRefence(&$numValue); // This will no longer work - it's > been > > deprecated > > // $numValue =1 at this point > > > > > > > > > > -----Original Message----- > > From: CC Zona [mailto:cczonanospam.invalid] > > Sent: 30 March 2001 04:40 > > To: php-generallists.php.net > > Subject: [PHP] Passing by reference deprecated? > > > > > > set_value(&$variable,$value) > > { > > $variable=value; > > } > > > > "Warning: Call-time pass-by-reference has been deprecated - argument > passed > > by value; If you would like to pass it by reference, modify the > declaration > > of [runtime function name](). If you would like to enable call-time > > pass-by-reference, you can set allow_call_time_pass_reference to true in > > your INI file. However, future versions may not support this any longer. " > > > > When did passing by reference get deprecated? The documentation at > > <http://php.net/manual/en/language.references.pass.php> doesn't suggest > > what to do instead--in fact, it uses an example like the syntax above. So > > my next question is: would using a return value or declaring a global be > > the (only) other options? > > > > TIA > > > > -- > > CC > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > >

    attached mail follows:


    hi

    i have a table named "refer" I wanna duplicate a table name "refer2" so that i can mess around with it.

    Thanks.

    attached mail follows:


    In article <9a3fme$4hg$1toye.p.sourceforge.net>, webmastercelebritieszones.com ("McShen") wrote:

    > i have a table named "refer" > I wanna duplicate a table name "refer2" so that i can mess around with it.

    Have you checked the manual for your DBMS? Something like "create table refer2 select * from refer" should work with MySQL (assuming that were your DBMS).

    -- 
    CC
    

    attached mail follows:


    Sorry for the newbie level questions, but I am having more weird install problems. Its just been so long since I did all this installing crap I guess I forgot a couple of things......

    I have recompiled Apache and PHP according to the instructions in the INSTALL doc, but when I run it now the document shows the source. What did I forget?

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    > -----Original Message----- > From: jondestiney.com [mailto:jondestiney.com]On Behalf Of Jon Jacob > Sent: Friday, March 30, 2001 9:05 PM > To: php-generallists.php.net > Subject: [PHP] More questions about installing..... > > > Sorry for the newbie level questions, but I am having more weird install > problems. Its just been so long since I did all this installing crap I > guess I forgot a couple of things...... > > I have recompiled Apache and PHP according to the instructions in the > INSTALL doc, but when I run it now the document shows the source. What > did I forget?

    You forgot to set that particular file extension in your httpd.conf to be parsed as PHP...

    Here's mine: AddType application/x-httpd-php .php4 .php3 .phtml .php .inc

    Greg

    attached mail follows:


    Greg Donald wrote:

    > > -----Original Message----- > > From: jondestiney.com [mailto:jondestiney.com]On Behalf Of Jon Jacob > > Sent: Friday, March 30, 2001 9:05 PM > > To: php-generallists.php.net > > Subject: [PHP] More questions about installing..... > > > > > > Sorry for the newbie level questions, but I am having more weird install > > problems. Its just been so long since I did all this installing crap I > > guess I forgot a couple of things...... > > > > I have recompiled Apache and PHP according to the instructions in the > > INSTALL doc, but when I run it now the document shows the source. What > > did I forget? > > You forgot to set that particular file extension in your httpd.conf to be > parsed as PHP... > > Here's mine: > AddType application/x-httpd-php .php4 .php3 .phtml .php .inc > > Greg

    Ah, but there my friend is the rub. I did put that in.

    .....And, all the conditions for the modules are there and specifically the module for php4 is present and the conditional is there. I tried putting the line above in the wide open (outside a conditional) but that made narry a difference.

    Thanks though : )

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    > Ah, but there my friend is the rub. I did put that in. > > .....And, all the conditions for the modules are there and > specifically the > module for php4 is present and the conditional is there. I tried > putting the > line above in the wide open (outside a conditional) but that made narry a > difference.

    Is the module loading?

    do a httpd -l

    ------------------------------------------------------------------------ destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common internet addict, 3. lover of late 80's heavy metal music, 4. Activist for the terminally un-elite; see also - cool guy, des, mr. php...

    It's 4:00am, your web site is still up, why are you? http://phplinks.org/ http://destiney.com/ ------------------------------------------------------------------------

    attached mail follows:


    Greg Donald wrote:

    > > Ah, but there my friend is the rub. I did put that in. > > > > .....And, all the conditions for the modules are there and > > specifically the > > module for php4 is present and the conditional is there. I tried > > putting the > > line above in the wide open (outside a conditional) but that made narry a > > difference. > > Is the module loading? > > do a httpd -l > > ------------------------------------------------------------------------ > destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common > internet addict, 3. lover of late 80's heavy metal music, 4. Activist > for the terminally un-elite; see also - cool guy, des, mr. php... > > It's 4:00am, your web site is still up, why are you? > http://phplinks.org/ http://destiney.com/ > ------------------------------------------------------------------------

    Yes.

    Results of httpd -l

    Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_setenvif.c mod_php4.c suexec: disabled; invalid wrapper /www/bin/suexec

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    Greg Donald wrote:

    > Got me... I can't think of much else. Sorry... > > ------------------------------------------------------------------------ > destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common > internet addict, 3. lover of late 80's heavy metal music, 4. Activist > for the terminally un-elite; see also - cool guy, des, mr. php... > > It's 4:00am, your web site is still up, why are you? > http://phplinks.org/ http://destiney.com/ > ------------------------------------------------------------------------ > > > -----Original Message----- > > From: jondestiney.com [mailto:jondestiney.com]On Behalf Of Jon Jacob > > Sent: Friday, March 30, 2001 9:22 PM > > To: Greg Donald > > Cc: php-generallists.php.net > > Subject: Re: [PHP] More questions about installing..... > > > > > > Greg Donald wrote: > > > > > > Ah, but there my friend is the rub. I did put that in. > > > > > > > > .....And, all the conditions for the modules are there and > > > > specifically the > > > > module for php4 is present and the conditional is there. I tried > > > > putting the > > > > line above in the wide open (outside a conditional) but that > > made narry a > > > > difference. > > > > > > Is the module loading? > > > > > > do a httpd -l > > > > > > ------------------------------------------------------------------------ > > > destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common > > > internet addict, 3. lover of late 80's heavy metal music, 4. Activist > > > for the terminally un-elite; see also - cool guy, des, mr. php... > > > > > > It's 4:00am, your web site is still up, why are you? > > > http://phplinks.org/ http://destiney.com/ > > > ------------------------------------------------------------------------ > > > > Yes. > > > > Results of httpd -l > > > > Compiled-in modules: > > http_core.c > > mod_env.c > > mod_log_config.c > > mod_mime.c > > mod_negotiation.c > > mod_status.c > > mod_include.c > > mod_autoindex.c > > mod_dir.c > > mod_cgi.c > > mod_asis.c > > mod_imap.c > > mod_actions.c > > mod_userdir.c > > mod_alias.c > > mod_access.c > > mod_auth.c > > mod_setenvif.c > > mod_php4.c > > suexec: disabled; invalid wrapper /www/bin/suexec > > > > > > > > _________________________________________________________ > > Do You Yahoo!? > > Get your free yahoo.com address at http://mail.yahoo.com > >

    Appreciate the try.

    This worked (albeit without the Oracle support) before I recompile it so it is not the httpd.conf file. I believe it is the way I compiled Apache, but I did it according to instructions.

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    Dear PHPers. I have tried to get the "Here Document" functionality to work, all to no avail.

    I am writing the following code: $body = <<<EOQ ....Lots of HTML stuff here Lines and Lines and lines of it.

    .... all the way to EOQ;

    I get a parse error on the first line where I declare the variable. I have tried it in several different ways, such as $body= <<<EOQ

    But I get parser errors every time.

    My PHP version is 4.0.2

    Anyone know when Here Documents were first implemented in PHP (version number)? Do I need to set GPC or magic-quotes to a certain value at runtime for this to work?

    I could not find "here document" even MENTIONED on the entire php site. Nor could I find it in the mailing list archives. I did find out about it at the Zend tutorial on strings, and have seen it in a script at px.sklar.

    Kristofer

    -- 
    ______________________________________
    

    Kristofer Widholm Web Pharmacy webpharmacybrokenhill.net 191 Grand Street, Brooklyn NY 11211 718.599.4893 ______________________________________

    attached mail follows:


    http://www.php.net/manual/html/language.types.string.html#AEN2504

    what you wrote looks correct...just make sure you have no trailing whitespace on the $body = <<<EOQ line (hit return right after the q) same with EOQ; it has to be on a line by itself...

    best of luck jack

    Kristofer Widholm wrote: > > Dear PHPers. I have tried to get the "Here Document" functionality to > work, all to no avail. > > I am writing the following code: > $body = <<<EOQ > ....Lots of HTML stuff here > Lines and Lines and lines of it. > > .... > all the way to > EOQ; > > I get a parse error on the first line where I declare the variable. I > have tried it in several different ways, such as > $body= > <<<EOQ > > But I get parser errors every time. > > My PHP version is 4.0.2 > > Anyone know when Here Documents were first implemented in PHP > (version number)? Do I need to set GPC or magic-quotes to a certain > value at runtime for this to work? > > I could not find "here document" even MENTIONED on the entire php > site. Nor could I find it in the mailing list archives. I did find > out about it at the Zend tutorial on strings, and have seen it in a > script at px.sklar. > > Kristofer > -- > ______________________________________ > > Kristofer Widholm > Web Pharmacy > webpharmacybrokenhill.net > 191 Grand Street, Brooklyn NY 11211 > 718.599.4893 > ______________________________________ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Here's what you wrote, 01.03.30:

    >http://www.php.net/manual/html/language.types.string.html#AEN2504 > >what you wrote looks correct...just make sure you have no trailing >whitespace on the >$body = <<<EOQ line (hit return right after the q) >same with EOQ; it has to be on a line by itself... > >best of luck >jack

    Silly me, I kept searching php.net and AIMS for "here document", and found nothing. I should have been looking for "here doc".

    Also, none of the documentation mentions the fact that there can be no white space after the first identifier. It is only specified for the closing identifier. I did have a trailing white space after the opening identifier. Removing it solved the problem.

    Thanks for your help.

    -- 
    ______________________________________
    

    Kristofer Widholm Web Pharmacy webpharmacybrokenhill.net 191 Grand Street, Brooklyn NY 11211 718.599.4893 ______________________________________

    attached mail follows:


    I've got a logic problem that I just can't think through. I'm hoping that you can help me find a better way to do this. I need a function that will iterate through $HTTP_POST_VARS looking for variable names with a predefined suffix ($example_post). Then I want to save the value of this var in a variable named $example. The code that I already have successfully does the iteration and selection of vars. What I can't do is make the new var ($example) accessible to the rest of the script. How should I do this?

    <PRE> function do_each($passed_array) { global ${$tmp_var_name};

    if (substr($passed_array[0],-5) == "_post") { $tmp_var_name = substr($passed_array[0],0,-5); ${$tmp_var_name} = $passed_array[1]; return(${$tmp_var_name}); } }

    function conv_vars($input) {

    global ${$tmp_var_name};

    if (IsSet($input)) { while ($each_array = each($input)) { if (is_array($each_array[1])) // if nested array conv_vars($each_array[1]); // pass to self else $new_var_value = do_each($each_array); } } }

    conv_vars($HTTP_POST_VARS);

    </PRE>

    Thanks in advance for the help. I learn so much from this list! dm

    attached mail follows:


    I found interesting link

    http://www.deskcode.com/phpcompiler/

    PHPCompiler v0.0.2 Beta

    PHPCompiler is an Overlay Manager i.e. A program that converts your PHP Scripts to Windows EXEcutable files that can be ran on any windows platform which has the necessary runtime DLL's. PHPCompiler works on the original PHP Parser and tacks the source of your scripts at the end of a custom coded loader. Its fairly easy to use and when used in conjunction with PHP-GTK(URL) can be used to create true GUI Applications.

    --
    Yasuo Ohgaki
    

    ""Marian Vasile"" <marianinvestments.ro> wrote in message news:9a1cr4$5fr$1toye.p.sourceforge.net... > I need a method to compile my php files to give them to a customer. > > The main problem is that this customer have an account on a shared hosting > service and (I think) he can't install a compiler or something new on that > server. > > Is it possible to encrypt my files ? > > Plz HELP ASAP > > Yours, > Marian > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >