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: Mon Mar 19 2001 - 09:25:03 CST

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

    php-general Digest 19 Mar 2001 15:25:03 -0000 Issue 576

    Topics (messages 44479 through 44566):

    Re: just wondering ....
            44479 by: Peter Houchin

    Re: Tables with scroll in HTML?
            44480 by: Adi Wibowo

    Re: TraceRoute
            44481 by: David Smith
            44552 by: David G.

    headers_sent
            44482 by: Clayton Dukes
            44483 by: Jack Dempsey
            44484 by: Clayton Dukes
            44485 by: Jack Dempsey

    Re: metabase docs and DB abstraction
            44486 by: Manuel Lemos

    first three characters
            44487 by: Rahul Bhide
            44489 by: Jack Dempsey
            44490 by: Ankur Verma

    Re: dynamically change a variable name
            44488 by: Mark Maggelet
            44524 by: Tim Ward
            44542 by: Gary

    Re: Sessions and CHECKBOXES :(
            44491 by: Yasuo Ohgaki

    Seg Fault with fopen
            44492 by: Matt Friedman

    PHP and XSLT, anyone working with these?
            44493 by: Bryan Willett
            44494 by: Bryan Willett

    unable to fine /htdocs on my linux machine :(
            44495 by: Nilesh Parmar
            44497 by: David Robley
            44501 by: Harshdeep S Jawanda
            44502 by: Paul O'Neil

    values from text boxes
            44496 by: Dennis Gearon

    Re: Problems with multiple query
            44498 by: Luca Lazzeroni

    cf to php
            44499 by: chris herring
            44500 by: Jack Dempsey
            44510 by: chris herring
            44514 by: Yoshi Melrose
            44541 by: Joe Sheble (Wizaerd)

    oracle insert won't work
            44503 by: Rudolf Frint

    Re: PHP HOWTO
            44504 by: Yasuo Ohgaki

    Re: Can you recommend an ISP with the following?
            44505 by: Matt Williams
            44544 by: Joe Sheble (Wizaerd)

    PHP - include / require
            44506 by: Surfer!

    PHPLIB and Auth
            44507 by: Steve Haemelinck
            44511 by: Steve Haemelinck
            44521 by: Steve Haemelinck

    MS SQL databse connecting
            44508 by: Costas
            44516 by: Yoshi Melrose
            44551 by: Mark Roedel
            44557 by: Michael Kimsal
            44560 by: Yoshi Melrose

    PHP & Apache
            44509 by: Patrick
            44515 by: Yoshi Melrose
            44539 by: Patrick

    use strict alternative
            44512 by: Costas
            44527 by: Stewart Taylor
            44531 by: Christian Reiniger

    php under Oracle Web server pleaaaaaaaaaase!
            44513 by: kaab kaoutar
            44517 by: Frank Joerdens
            44522 by: kaab kaoutar
            44523 by: techzeus.pacific.net.sg

    Re: Can PHP for Oracle randomly access rows in a result set?
            44518 by: Thies C. Arntzen
            44519 by: Neil Kimber

    Re: Radio Button Returns (Pleasre Read)
            44520 by: Carsten Gehling

    Re: Privilege system of Mysql...
            44525 by: David Bouw
            44526 by: Sven Huster
            44529 by: Jeff Armstrong

    Automatic documentation: call for help with C++
            44528 by: Geoff Caplan
            44553 by: Harshdeep S Jawanda

    php4 with imap support
            44530 by: Torsten Curdt

    PHP - MySQL special character -> mysql problem?
            44532 by: Alain

    site root variable (for Generic Unix and Windows)
            44533 by: ben.2.edwards.bt.com
            44534 by: Matt Williams
            44536 by: Jeff
            44540 by: Matt Williams

    Re: how do i get a variable type? - not that simple
            44535 by: Ide, Jim

    Query - Grouping Results
            44537 by: Jordan Elver
            44543 by: Jeff Armstrong
            44550 by: Jordan Elver
            44559 by: Jordan Elver
            44564 by: Jeff Armstrong

    Re: PHP & MYSQL BOOKS
            44538 by: Luke Welling

    Dynamic generation of text files?
            44545 by: Dan Costello
            44555 by: Michael Kimsal

    Checking if a web, a url really exists ?
            44546 by: Steve Haemelinck
            44549 by: Daniel Svensson, Coretrek

    how to use php and xsl to transform xml to html?
            44547 by: Sandeep Hundal

    Problems with Linux PHP
            44548 by: Liam Gibbs

    Why not 'file_exists()' for URLs?
            44554 by: David G.

    Re: Running script on remote server
            44556 by: Jason Stechschulte

    Re: Invalid or Valid because the same.
            44558 by: Jason Stechschulte

    Re: Repost URGENT: Can't see picture!!!!!!!!
            44561 by: Jason Stechschulte

    Re: Editing Variables from another script.
            44562 by: Jason Stechschulte

    Re: pulldown population not getting the last value
            44563 by: Jason Stechschulte

    Re: FAQ
            44565 by: Robert V. Zwink

    ODD phpAds question
            44566 by: Matt \"TrollBoy\" Wiseman

    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:


    <snip>

    On Mon, 19 Mar 2001 01:34, Peter Houchin wrote:
    > What am going to try & do is get it so mail() returns true then run
    > this script else do this
    >
    > Peter

    Like most functions in PHP, mail() returns a value - boolean according to
    the manual. So you could do something like

    $mail = mail(values);
    if ($mail){
     do this
    }
    else {
     error
    }

    But as has been pointed out above, a return of TRUE only means that
    mail() has handed the data off to something else, which something else
    may or may not succeed in sending the message.

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    

    Thanks every one for your help :)

    Peter

    attached mail follows:


    On Mon, 19 Mar 2001, Jose Antonio wrote: > I have tryed to make several frames, but, if a put the submit button in a > diferent frame, how can i know wich are the selected rows of the form in the > other frame?

    I use IFRAME (for more flexibility than FRAME) and session's variables to store variables between frames. Of course, table's frame must have some routine to store/update session variable when it clicked or changed.

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

    attached mail follows:


    This would be because his email shows twdoptushome.com.au-nospam. Hint the -nospam at the end. I don't know why people do this and then ask for help because when someone offers the help the email bounces...

    David Smith

    -----Original Message----- From: Henrik Hansen [mailto:hhmailserver.dk] Sent: Sunday, March 18, 2001 5:18 PM To: Kath Cc: Mick; Henrik Hansen; php-generallists.php.net Subject: Re: [PHP] TraceRoute

    "Kath" <kathkathweb.net> wrote:

    > I tried emailing him 5 times with this, but I could never get through :| > > I even found the script for him and tried to send it to him :| > > - Kath

    heh i got an error too, lets just hope he read the group :)

    --
    Henrik Hansen
    

    -- 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 reason is to keep you email address from being collected by Usenet trolling robots. In that case, however, you should mention (via signature or otherwise) in the body of the message what word to remove to get a valid address.

    Since this newsfeed is fairly inconspicuous it is likely not a problem here.

    -david

    ""David Smith"" <webmasterindywebdesign.com> wrote in message news:MABBLAPKMKCPAFPFGAJKEEGKCMAA.webmasterindywebdesign.com... > > This would be because his email shows twdoptushome.com.au-nospam. Hint > the -nospam at the end. I don't know why people do this and then ask for > help because when someone offers the help the email bounces... > > David Smith > > -----Original Message----- > From: Henrik Hansen [mailto:hhmailserver.dk] > Sent: Sunday, March 18, 2001 5:18 PM > To: Kath > Cc: Mick; Henrik Hansen; php-generallists.php.net > Subject: Re: [PHP] TraceRoute > > > "Kath" <kathkathweb.net> wrote: > > > I tried emailing him 5 times with this, but I could never get through :| > > > > I even found the script for him and tried to send it to him :| > > > > - Kath > > heh i got an error too, lets just hope he read the group :) > > -- > Henrik Hansen > > > -- > 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:


    What's the proper syntax for headers_sent?

    I tried: if(!isset(headers_sent)) { include("header.php"); }

    But I get: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/www/websites/pw/cisco/config/index.htm on line 3

    Clayton Dukes CCNA, CCDA, CCDP, CCNP Internetwork Solutions Engineer Internetwork Management Engineer Thrupoint, Inc. Tampa, FL (c) 904.477.7825 (h) 904.292.1881

    attached mail follows:


    don't you need the () after headers_sent? if(!isset(headers_sent()){include("header.php");} haven't tried it but i'd think that would work

    jack -----Original Message----- From: Clayton Dukes [mailto:cdukescdukes.com] Sent: Sunday, March 18, 2001 11:38 PM To: php-generallists.php.net Subject: [PHP] headers_sent

    What's the proper syntax for headers_sent?

    I tried: if(!isset(headers_sent)) { include("header.php"); }

    But I get: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/www/websites/pw/cisco/config/index.htm on line 3

    Clayton Dukes CCNA, CCDA, CCDP, CCNP Internetwork Solutions Engineer Internetwork Management Engineer Thrupoint, Inc. Tampa, FL (c) 904.477.7825 (h) 904.292.1881

    attached mail follows:


    Thanks :-)

    ----- Original Message ----- From: "Jack Dempsey" <dempsejngeorgetown.edu> To: <php-generallists.php.net>; "Clayton Dukes" <cdukescdukes.com> Sent: Monday, March 19, 2001 12:08 AM Subject: RE: [PHP] headers_sent

    > don't you need the () after headers_sent? > if(!isset(headers_sent()){include("header.php");} > haven't tried it but i'd think that would work > > jack > -----Original Message----- > From: Clayton Dukes [mailto:cdukescdukes.com] > Sent: Sunday, March 18, 2001 11:38 PM > To: php-generallists.php.net > Subject: [PHP] headers_sent > > > What's the proper syntax for headers_sent? > > I tried: > if(!isset(headers_sent)) { include("header.php"); } > > But I get: > Parse error: parse error, expecting `T_VARIABLE' or `'$'' in > /home/www/websites/pw/cisco/config/index.htm on line 3 > > > > > Clayton Dukes > CCNA, CCDA, CCDP, CCNP > Internetwork Solutions Engineer > Internetwork Management Engineer > Thrupoint, Inc. > Tampa, FL > (c) 904.477.7825 > (h) 904.292.1881 >

    attached mail follows:


    [this is his reply]

    -----Original Message----- From: Clayton Dukes [mailto:cdukescdukes.com] Sent: Monday, March 19, 2001 12:08 AM To: Jack Dempsey; php-generallists.php.net Subject: Re: [PHP] headers_sent

    Thanks :-)

    ----- Original Message ----- From: "Jack Dempsey" <dempsejngeorgetown.edu> To: <php-generallists.php.net>; "Clayton Dukes" <cdukescdukes.com> Sent: Monday, March 19, 2001 12:08 AM Subject: RE: [PHP] headers_sent

    > don't you need the () after headers_sent? > if(!isset(headers_sent()){include("header.php");} > haven't tried it but i'd think that would work > > jack > -----Original Message----- > From: Clayton Dukes [mailto:cdukescdukes.com] > Sent: Sunday, March 18, 2001 11:38 PM > To: php-generallists.php.net > Subject: [PHP] headers_sent > > > What's the proper syntax for headers_sent? > > I tried: > if(!isset(headers_sent)) { include("header.php"); } > > But I get: > Parse error: parse error, expecting `T_VARIABLE' or `'$'' in > /home/www/websites/pw/cisco/config/index.htm on line 3 > > > > > Clayton Dukes > CCNA, CCDA, CCDP, CCNP > Internetwork Solutions Engineer > Internetwork Management Engineer > Thrupoint, Inc. > Tampa, FL > (c) 904.477.7825 > (h) 904.292.1881 >

    attached mail follows:


    Hello Dean,

    On 17-Mar-01 02:24:54, you wrote:

    >Anyone have opinions on which DB abstraction layer is best for what >situation? Is there an article somewhere that compares the various DB >abstraction layers?

    I guess I am too suspicious too tell, but I can tell you a few advantages or features of Metabase that other DB abstraction layers do not have or are now following the design:

    - Database schema definition in XML that Metabase manager installs or updates in any of the supported databases. Good for migrations just in case you need them in the future.

    - Large set of base datatypes that Metabase assures that will work portably across databases: integer, text, date, time, timestamp, floating point, fixed point and boolean.

    - Selecting just a range of rows of a SELECT query, like MySQL LIMIT, but works with ALL supported databases.

    - Auto-incremented integer sequences.

    - Transaction support for databases that can handle them.

    - etc...

    >(Cross-post:)

    >Anyone know where I can find documentation or samples for metabase?

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

    Look in the documentation directory of the list of files. There is a metabase.html which the whole reference manual and the tutorial.html .

    Regards, Manuel Lemos

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

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

    attached mail follows:


    Gurus, How do I extract the first n characters out of a word . I have this-

    $Word = attention

    I want -

    $Word_3 = att $Word_4 = atte $Word_5 = atten this is only extracting first three/four/five characters .

    What is the right function to use here ??

    thx in advance. ~Rahul

    attached mail follows:


    <?PHP $Word = "attention"; $Word_3 = substr("$Word",0,3); //$Word_3 is 'att' $Word_4 = substr("$Word",0,4); //Word_4 is 'atte' ?>

    etc......you can use dynamic variables to extract the nth character from your word..

    jack

    -----Original Message----- From: Rahul Hari Bhide [mailto:rabhideptc.com] Sent: Monday, March 19, 2001 1:02 AM To: php-generallists.php.net Subject: [PHP] first three characters

    Gurus, How do I extract the first n characters out of a word . I have this-

    $Word = attention

    I want -

    $Word_3 = att $Word_4 = atte $Word_5 = atten this is only extracting first three/four/five characters .

    What is the right function to use here ??

    thx in advance. ~Rahul

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


    try using the function substr()

    $Word = attention

    $Word_3 = substr ($Word, 0,3) $Word_3 = substr ($Word, 0,4)

    and so on

    hope that helps regards

    Ankur Verma HCL technologies Noida India

    -----Original Message----- From: Rahul Hari Bhide [mailto:rabhideptc.com] Sent: Monday, March 19, 2001 11:32 AM To: php-generallists.php.net Subject: [PHP] first three characters

    Gurus, How do I extract the first n characters out of a word . I have this-

    $Word = attention

    I want -

    $Word_3 = att $Word_4 = atte $Word_5 = atten this is only extracting first three/four/five characters .

    What is the right function to use here ??

    thx in advance. ~Rahul

    -- 
    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 Sun, 18 Mar 2001 20:36:15 -0500, Gary (kcookemediaone.net) wrote: >Is there a way to dynamically change a variable name? For example: >I want to change the variable name $DWG to >$DWG1 >$DWG2 >$DWG3 >with a for loop. Is there a way to do this?

    you could try:

    for($i=1;$i<=3;$i++){ ${"DWG".$i}=$DWG; }

    or it might make more sense to use an array.

    attached mail follows:


    What do you mean? Do you want to change the variable to $dwg1 then $dwg2 then $dwg3 or what? A variable is a place for holding information. If you want the same data under a different name then create a new variable equal to the old variable then unset the original.

    $dwg[0] = $dwg; unset($dwg); for ($i = 1; $i < $max; $i++) { $dwg[$i] = $dwg[$i - 1]; ... }

    Tim Ward Senior Systems Engineer

    Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html

    > -----Original Message----- > From: Gary [mailto:kcookemediaone.net] > Sent: 19 March 2001 01:36 > To: php-generallists.php.net > Subject: dynamically change a variable name > > > Is there a way to dynamically change a variable name? For example: > I want to change the variable name $DWG to > $DWG1 > $DWG2 > $DWG3 > with a for loop. Is there a way to do this? > > Thanks, Gary > > >

    attached mail follows:


    Thanks!

    "Mark Maggelet" <maggeletmminternet.com> wrote in message news:200103190607.WAA08105medusa.mminternet.com... On Sun, 18 Mar 2001 20:36:15 -0500, Gary (kcookemediaone.net) wrote: >Is there a way to dynamically change a variable name? For example: >I want to change the variable name $DWG to >$DWG1 >$DWG2 >$DWG3 >with a for loop. Is there a way to do this?

    you could try:

    for($i=1;$i<=3;$i++){ ${"DWG".$i}=$DWG; }

    or it might make more sense to use an array.

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


    Although, you ask not to refer to PHP manual, there is a function you probably would like to learn. (I guess you haven't read about array functions, right?)

    http://www.php.net/manual/en/function.array-merge.php

    This should be what you are looking for. (Don't over write, but merge arrays. I guess this is what you need) Take your time to read array functions, you might find other functions that is useful.

    Regards,

    --
    Yasuo Ohgaki
    

    ----- Original Message ----- From: ""karakedi"" <eyilmaz76ultratv.net> Newsgroups: php.general Sent: Saturday, March 17, 2001 10:07 AM Subject: [PHP] Sessions and CHECKBOXES :(

    > i ve 20 film names stored at database, and i want to show them in > alphebetical order. And i want to show 10 of them at each page. Nothing is > wrong here. At the end of each film name there is a CHECKBOX, here is the > code: > > $count = 0; > while ($row = mysql_fetch_array($result)){ > > echo "<tr>"; > > echo "<td valign=middle align=left>" ; // getting film names here > echo $row['film'] ; > echo "</td>" ; > > > $sepet = $row['tur'] ; // putting checkboxes here > $sepet2 = $row['film']; > $sepetsonuc = $sepet. " " .$sepet2 ; > echo "<input type=checkbox name=\"siparis[]\" value=\"$sepetsonuc\">" ; > > echo "</td></tr>" ; > $count++; > } > > > its good till here. everything is working... now since there are two pages i > want to register checkbox variables which are CHECKED with > "session_register "so that i can use them at the second page. without that > my code simply cant remember the checked ones at the previous pages. > > Can someone help me to register these checkbox values into sessions ? > PLS dont refer me to php.net manual/sessions :( > > i spent my last two days working on this so really need help :( any help is > HIGHLY APPRECIATED!!! > thx in adv. > > > > > -- > 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 a function I'm trying to use to execute a php and then read the html. I've tried the actual hostname instead of localhost but that's not working either.

    It's causing a segmentation fault. I'm running linux apache php 4.0.4

    Any thoughts?

    function get_web_page_desc($filename) { $uri = 'http://localhost'.get_web_page_uri($filename);

    $fp = fopen($uri, 'r'); $contents = fread($fp, 360000 );

    // do stuff with contents....

    return strip_tags($para); }

    attached mail follows:


    I know that the XSLT functionality in PHP is experimental but is anyone doing any work with these?

    I've written some basic extensions to PHPLIB for XSLT and I am curious if anyone has some more advanced research they can share.

    The code that I have will return a dataset, format into XML, and then transform it using an XSLT stylesheet (template).

    Usage:

    $db = new DB_Sql_Xml; $db->query("select * from foo"); $db->get_transform("xslt_file.xslt", $db->get_xml());

    I also have add XSLT parameter functionality working. While I have this code integrated into PHPLIB it could also function as a stand alone tranform class. I took some code from a phpbuilder article on this subject and improved it.

    You can see the class here:

    www.merchantempirs.net/db_xsl.inc

    So has anyone else done much with PHP and XSLT?

    attached mail follows:


    the correct link to see my PHP/XSLT code is:

    http://www.merchantempires.net/db_xsl.inc

    attached mail follows:


    Hi! I am trying to install php on my Redhat Linux 7.0 box and following all instructions correctly, but i am unable to locate the directory /htdocs in my machine I tried all tricks and trials but of no use .Can anyone tell me what to do now!! my httpd.conf file is in /etc/httpd/conf/ ..Apache is working fine as it is loading the test page with http://localhost I installed php4 rpm . waiting eagerly for a solution thanking you all in advance bye

    Nilesh Parmar

    attached mail follows:


    On Mon, 19 Mar 2001 05:53, Nilesh Parmar wrote: > Hi! > I am trying to install php on my Redhat Linux 7.0 box and > following all instructions correctly, but i am unable to locate the > directory /htdocs in my machine I tried all tricks and trials but of no > use .Can anyone tell me what to do now!! my httpd.conf file is in > /etc/httpd/conf/ ..Apache is working fine as it is loading the test > page with http://localhost I installed php4 rpm . > waiting eagerly for a solution > thanking you all in advance > bye > > Nilesh Parmar

    This is rather an Apache question, but. It will depend on how you configured Apache as to where or even whether you will find the htdocs directory. For clues, check your httpd.conf file and look under ServerRoot and DocumentRoot.

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

    attached mail follows:


    Hi,

    Nilesh Parmar wrote:

    > i am unable to locate the directory /htdocs in my machine

    The default location for the htdocs directory is: <apache-install-directory>/htdocs.

    --
    Regards,
    Harshdeep Singh Jawanda.
    

    attached mail follows:


    I had problems getting Apache, PHP and MySQL to work using the RPM's on Redhat 7.0. I ended up deleting all of them and installed manually using the tar's. ----- Original Message ----- From: "David Robley" <huntsmanwww.nisu.flinders.edu.au> To: <php-generallists.php.net> Sent: Sunday, March 18, 2001 11:32 PM Subject: Re: [PHP] unable to fine /htdocs on my linux machine :(

    > On Mon, 19 Mar 2001 05:53, Nilesh Parmar wrote: > > Hi! > > I am trying to install php on my Redhat Linux 7.0 box and > > following all instructions correctly, but i am unable to locate the > > directory /htdocs in my machine I tried all tricks and trials but of no > > use .Can anyone tell me what to do now!! my httpd.conf file is in > > /etc/httpd/conf/ ..Apache is working fine as it is loading the test > > page with http://localhost I installed php4 rpm . > > waiting eagerly for a solution > > thanking you all in advance > > bye > > > > Nilesh Parmar > > This is rather an Apache question, but. It will depend on how you > configured Apache as to where or even whether you will find the htdocs > directory. For clues, check your httpd.conf file and look under > ServerRoot and DocumentRoot. > > -- > David Robley | WEBMASTER & Mail List Admin > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > AusEinet | http://auseinet.flinders.edu.au/ > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > -- > 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:


    do I have to cast values from text boxes into ints? If so, it's wierd, because I have taken the values from text inputs before and just put them into insert string statements for mysql. It turned them into ints just fine.

    I use the following code to MAKE a table of input boxes on the screen, and the exact same thing to READ it after submission.

    the value $$vent_flow_identifier comes back with the entered value, but as a string.

    and example of the names of the INPUT boxes out and comes back is: Vent1MinFlow Vent1MaxFlow Vent2FixedFlow The '1' and the 'xxxFlow' are from columns in a set of tables.

    <code> //$room_vent_values are a two colomn result in an array of length2 arrays //for the vents in a room, numbered 1..vents_in_the_room //functions of vents are supply, return, exhaust //A supply vent has a MaxFlow, and a MinFlow, Returns and Exhausts have a Fixed Flow //Those allowable flows are in $allowed_ventflowtype_values, indexed by the //Vent functionID

    while ( list( $this_vent_num, $this_vent_functionID) = each( $room_vent_values )){ $alt_bgcolor=""; if ( $this_vent_num % 2 ) $alt_bgcolor = "bgcolor=\"#E69B9F\""; // causes alternating colors in odd/even vent numbers echo("<br>\n"); reset( $allowed_ventflowtype_values ); while ( $vent_function_flow_array = each( $allowed_ventflowtype_values )){ $flow_type_vent_functionID = $vent_function_flow_array[1][0]; $flow_type = $vent_function_flow_array[1][1]; if ( $this_vent_functionID == $flow_type_vent_functionID ){ $vent_function_name = $vent_function_values[$this_vent_functionID]; $vent_flow_identifier = "Vent" . $this_vent_num . $flow_type; //start of row for output table, only the <input ...> is entered by user // the rest is from a database retrieval and fill in. $flow_entry_table .= " <tr $alt_bgcolor>\n"; $flow_entry_table .= " <td align=\"center\">&nbsp;$this_vent_num&nbsp;</td>\n"; $flow_entry_table .= " <td align=\"center\">&nbsp;$vent_function_name&nbsp;</td>\n"; $flow_entry_table .= " <td align=\"center\">&nbsp;$flow_type&nbsp;</td>\n"; $flow_entry_table .= " <td align=\"center\">&nbsp;<INPUT type=\"text\" name =\"$vent_flow_identifier\" size=\"5\">&nbsp;</td>\n"; $flow_entry_table .= " </tr>\n"; } } } </end_code>

    The form that this makes, and later tests the results of looks like: <html out>------------ <form name="Entry" action="FlowReadingsEntryTable.php" method="POST"> <INPUT type="hidden" name="FlowDataSubmitted" value="1"> <!--name of event submission of this table results in--> <INPUT type="hidden" name="PurvineRoomID" value="1"> <!--relevant room passed through from prevouos form--> <INPUT type="submit" value="Send This Puppy"> <table BORDER="0" CELLSPACING="0" COLS="4" width="100" BGCOLOR="#FF5c5c"> <tr><!-- THIS ROW sets column widths --> <td WIDTH="85" height="0"></td> <td WIDTH="85" height="0"></td> <td WIDTH="85" height="0"></td> <td WIDTH="85" height="0"></td> </tr> <!-- Heading Row --> <tr> <td colspan="4" align="center" nowrap><b><b>Enter Flow For Each Vent<br>And Appropriate Flow Type<br>Date will be The Current Date/Time</b><br>&nbsp;</td> </tr> <tr> <td align="left" colspan="4">PurvineRoom<br>Designation&nbsp;</td> </tr> <tr> <td align="left" colspan="4"> <b>101</b><br>&nbsp; </td> </tr> <tr valign"bottom"> <td align="center">&nbsp;Vent<br>Num&nbsp;</td> <td align="center">&nbsp;Vent<br>Function&nbsp;</td> <td align="center">&nbsp;Flow<br>Type&nbsp;</td> <td align="center">&nbsp;Flow<br>Value&nbsp;</td> </tr> <tr bgcolor="#E69B9F"> <td align="center">&nbsp;1&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MinFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent1MinFlow" size="5">&nbsp;</td> </tr> <tr bgcolor="#E69B9F"> <td align="center">&nbsp;1&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MaxFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent1MaxFlow" size="5">&nbsp;</td> </tr> <tr > <td align="center">&nbsp;2&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MinFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent2MinFlow" size="5">&nbsp;</td> </tr> <tr > <td align="center">&nbsp;2&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MaxFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent2MaxFlow" size="5">&nbsp;</td> </tr> <tr bgcolor="#E69B9F"> <td align="center">&nbsp;3&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MinFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent3MinFlow" size="5">&nbsp;</td> </tr> <tr bgcolor="#E69B9F"> <td align="center">&nbsp;3&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MaxFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent3MaxFlow" size="5">&nbsp;</td> </tr> <tr > <td align="center">&nbsp;4&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MinFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent4MinFlow" size="5">&nbsp;</td> </tr> <tr > <td align="center">&nbsp;4&nbsp;</td> <td align="center">&nbsp;Supply&nbsp;</td> <td align="center">&nbsp;MaxFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent4MaxFlow" size="5">&nbsp;</td> </tr> <tr bgcolor="#E69B9F"> <td align="center">&nbsp;5&nbsp;</td> <td align="center">&nbsp;Return&nbsp;</td> <td align="center">&nbsp;FixedFlow&nbsp;</td> <td align="center">&nbsp;<INPUT type="text" name ="Vent5FixedFlow" size="5">&nbsp;</td> </tr>

    </table> </form> </html out>-----------

    -- 
    ________________________________________________________________
    Sites by friends of mine: http://www.myhiddentreasures.com/
    ________________________________________________________________
    WARNING personal propaganda signature
    TAKE WHAT YOU LIKE AND LEAVE THE REST
    

    SINCE OUR GOVERNMENT WON'T PRESERVE OUR CLIMATE, IT'S UP TO US! Imagine ** yourself ** and your kids now an endangered species <1>Inflate automobile tires to near maximum in summer, -2psi in winter <2>add insulation to house and hot water heater, and refrigerator, <3>combine trips in cars, make less of them <4>buy cars, sports vehicles and recreational vehicles with good if not best mileage <4>put awnings over windows is summer, remove in winter. <5> add solar hot water heating. <6>Push for energy recycling clothes dryers <7> walk more, play outside with your kids! <8> let your grass grow to 3-4 inches, chokes weeds, saves water and energy, keeps house cooler <9> Put WHITE or REFLECTIVE materials on roofs to send energy back into space. <10> Vote for burial of logging slash onsite in logging areas for better watersheds and less burned vegetation. <11> compost your leaves and grass, bury in flower beds, lawns, gardens, or give away. <12> VOTE for energy and CO2 ratings on ALL products and foods. KNOW how much damage your purchases do to the climate. <13> Give your kids less stuff and more of you. <14> recycle everything you can <15> limit your children to an average 1 per adult between all your marriages. (Only REPLACE yourself, not expand the population)

    attached mail follows:


    Thanks; in fact I've tryed the second solution and it works for me; but I can't understand why the script stop working during the upgrade of system. The most strange thing is that, after a deeper investigation on the code, I've found the PHP engine does something like closing the connection after the second pg_exec command. In fact, by using persistent connections I've partially corrected the problem and the codes doesn't complain about using an invalid (but not null) connection descriptor; but it stills be unable to get results from successive queries, also if result index are valid ! This sounds very strange for me.

    Thank you for your help !

    Luca Lazzeroni

    "Nuno Silva" <nuno_silvawebsolut.net> ha scritto nel messaggio news:3AB4ED18.80603websolut.net... > Hello, > > if the second query loops inside a _for_ statement and needs values from > the first query you have two options: > > 1. save all the results from query one to some array and then loop > inside the array within the _for_ statement executing new sql; > 2. open two separate connections to the database and work with the two. > like this: > $conn1 = pg_connect(...); > $conn2 = pg_connect(...); > ... > qry1 = pg_exec($conn1, $sql1); > ... > for ($i=.....) { > ... > $qry2 = pg_exec($conn2, $sql2); > ... > } > > Hope this helps, > Nuno Silva > > > Luca Lazzeroni wrote: > > > Hi, > > I've recently migrated a system with PHP 4.0.3pl1 and PostgreSQL 7.0.2 - > > RedHat Linux 5.1 (yes 5) to a new one with PHP 4.0.4pl1 - PostgreSQL 7.0.2 - > > RedHat Linux 7.0. > > > > All my database applications work fine except one which does strange things: > > this is a piece of code: > > > > ----8<------- CUT ---- > > > > $conn = pg_connect("dbname=aaaa user=yyyyy password=xxxxxx"); > > > > $sql = "select * from table_a where condition_a"; > > $qry1 = pg_exec ($conn,$sql); > > > > $obj1 = pg_fetchobject($qry1,0); > > > > // Until here everything works fine > > > > $sql2 = "select * from table_b where condition_b=".$obj1->value_a; > > $qry2 = pg_exec ($conn,$sql2); > > > > ----8<------- CUT ---- > > > > The second query is nested in a for-loop running for every object in the > > first query; for performance reason I need to maintain the two queries > > independent. > > > > After executing (correctly) the first one, the system starts doing strange > > things with the second one: > > > > Warning: Unable to jump to row 0 on PostgreSQL result index 23 in cerca.php3 > > on line 467 > > > > and it fails to read data. > > The strange thing is that the system does the same things for EVERY database > > where I must use two consecutive queries ! > > > > Is there anyone who can help me ? > > > > Thanks in advance > > > > Luca Lazzeroni > > > -- > 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:


    is there a php equivalent for this little tidbit from a friend's cf script? here it is:

    <cfif NOT ISDEFINED("url.page")>

    attached mail follows:


    What exactly does that do chris? If you're trying to check and see if there's a file on the server, then you could do something with readdir, is_file, etc...if you want to post what that actually tests for then i might be able to help more

    jack

    -----Original Message----- From: chris herring [mailto:chrisherringsubdimension.com] Sent: Monday, March 19, 2001 3:00 AM To: php-generallists.php.net Subject: [PHP] cf to php

    is there a php equivalent for this little tidbit from a friend's cf script? here it is:

    <cfif NOT ISDEFINED("url.page")>

    attached mail follows:


    <cfoutput> <cfif NOT ISDEFINED("url.page")> <cfinclude template="main.cfm"> <cfelseif url.page IS "rants"> <cfinclude template="rants.cfm"> <cfelseif url.page IS "columns"> <cfinclude template="columns.cfm"> <cfelseif url.page IS "staff"> <cfinclude template="staff.cfm"> <cfelseif url.page IS "links"> <cfinclude template="links.cfm"> <cfelseif url.page IS "about"> <cfinclude template="about.cfm"> <cfelseif url.page IS "movies"> <cfinclude template="movies.cfm"> <cfelseif url.page IS "music"> <cfinclude template="music.cfm"> <cfelse> <cfinclude template="main.cfm"> </cfif> </cfoutput> ----- Original Message ----- From: "Jack Dempsey" <dempsejngeorgetown.edu> To: <php-generallists.php.net>; "chris herring" <chrisherringsubdimension.com> Sent: Monday, March 19, 2001 2:09 AM Subject: RE: [PHP] cf to php

    > What exactly does that do chris? > If you're trying to check and see if there's a file on the server, then you > could do something with readdir, is_file, etc...if you want to post what > that actually tests for then i might be able to help more > > jack > > -----Original Message----- > From: chris herring [mailto:chrisherringsubdimension.com] > Sent: Monday, March 19, 2001 3:00 AM > To: php-generallists.php.net > Subject: [PHP] cf to php > > > is there a php equivalent for this little tidbit from a friend's cf script? > here it is: > > <cfif NOT ISDEFINED("url.page")> > > > -- > 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:


    Chris,

    all you need to check that is:

    <?php

    if (!$page) { ... do your stuff ... } ?>

    that should do it, as long as the url var exists it'll work. =)

    Yoshi

    ----- Original Message ----- > > > > is there a php equivalent for this little tidbit from a friend's cf > script? > > here it is: > > > > <cfif NOT ISDEFINED("url.page")>

    attached mail follows:


    the PHP equivalent is isset()

    if( !isset( $url_Page ))

    At 03:09 AM 3/19/01 -0500, Jack Dempsey wrote: >What exactly does that do chris? >If you're trying to check and see if there's a file on the server, then you >could do something with readdir, is_file, etc...if you want to post what >that actually tests for then i might be able to help more > >jack > >-----Original Message----- >From: chris herring [mailto:chrisherringsubdimension.com] >Sent: Monday, March 19, 2001 3:00 AM >To: php-generallists.php.net >Subject: [PHP] cf to php > > >is there a php equivalent for this little tidbit from a friend's cf script? >here it is: > ><cfif NOT ISDEFINED("url.page")> > > >-- >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'm getting $FF from another PHP-Page and then I want to insert the Values into my Database like this

    $handle = ora_logon("iusrtest","kiwi1"); $cursor1 = ora_open($handle); $query = "insert into internet_tmp select rv_ret($FF),$FF,$sesid,(sysdate+0.0021) from dual"; ora_parse($cursor1,$query) or die; ora_exec($cursor1); ora_close($cursor1);

    tring this on sql-plus works fine what do I do wrong??

    oh yea error msg is like this Warning: Ora_Parse failed (ORA-00923: FROM keyword not found where expected -- while processing OCI function OPARSE) in test2.php on line 40

    line40 is parse line

    attached mail follows:


    I just found this link and thought it might be useful for many PHP users. (Especially, new PHP users, tutorials, etc, but it is also useful for long time PHP users. Many of useful links in it.)

    http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html

    This HOWTO is updated 17 Feb 2001. Covers PHP4 and Windows. It's not only Linux users, but also for Windows users.

    --
    Yasuo Ohgaki
    

    attached mail follows:


    > *PHP4 > *MySQL > *Telnet access > *Decent Support > *Preferably a Cobalt server (or one with a VERY good Web-based > administrator, most other types of Web administrators I've seen have > been clunky and a PITA) > *Pretty Cheap

    www.blueboxwebhosting.com

    especially good for support

    M

    attached mail follows:


    I've found http://www.jtlnet.com to be very good and especially responsive...

    At 09:09 AM 3/19/01 +0000, Matt Williams wrote:

    > > *PHP4 > > *MySQL > > *Telnet access > > *Decent Support > > *Preferably a Cobalt server (or one with a VERY good Web-based > > administrator, most other types of Web administrators I've seen have > > been clunky and a PITA) > > *Pretty Cheap > >www.blueboxwebhosting.com > >especially good for support > >M > >-- >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 was wanting a set of pages generated by individual PHP scripts to each

    use one PHP script to generate the navigation links. However I'm not winning - a suitable example would be much appreciated.

    attached mail follows:


    Hi Guys,

    I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working.

    What happens:

    If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again".

    First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong ????

    <?php

    class TIMEKEEPER_AUTH extends Auth{

    /* Declare variables */ var $classname="TIMEKEEPER_AUTH"; var $magic="TIMEKEEPER_MAGIC"; var $lifetime=15; //Maximum 15 minutes idle time !!! var $database_class = "TIMEKEEPER_DB"; var $database_table = "auth_user";

    function auth_loginform() { global $sess;

    include("loginform.ihtml"); }

    function auth_validatelogin() { global $username, $password;

    if(isset($username)) { $this->auth["uname"]=$username; }

    $uid = false;

    $this->db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this->database_table, addslashes($username), addslashes($password)));

    while($this->db->next_record()) { $uid = $this->db->f("user_id"); $this->auth["perm"] = $this->db->f("perms"); } return $uid; } }

    /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db->query("select count(*) as count from auth_user"); $db->Next_Record(); $count = $db->f("count"); //count gives 2 which is correct SO OK

    $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db->Next_Record(); $uid = $db->f("user_id"); //uid gives ... which is correct SO OK ---> The must be something wrong with my loginform it does not submit the right values WHY ????

    ?>

    attached mail follows:


    Can it be that my Apache server is not well configured? I think you have to allow methods like GET and POST ?

    -----Original Message----- From: Steve Haemelinck [mailto:steve.haemelinckpandora.be] Sent: maandag 19 maart 2001 10:26 To: PHP Mailing Listl (E-mail) Subject: [PHP] PHPLIB and Auth

    Hi Guys,

    I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working.

    What happens:

    If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again".

    First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong ????

    <?php

    class TIMEKEEPER_AUTH extends Auth{

    /* Declare variables */ var $classname="TIMEKEEPER_AUTH"; var $magic="TIMEKEEPER_MAGIC"; var $lifetime=15; //Maximum 15 minutes idle time !!! var $database_class = "TIMEKEEPER_DB"; var $database_table = "auth_user";

    function auth_loginform() { global $sess;

    include("loginform.ihtml"); }

    function auth_validatelogin() { global $username, $password;

    if(isset($username)) { $this->auth["uname"]=$username; }

    $uid = false;

    $this->db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this->database_table, addslashes($username), addslashes($password)));

    while($this->db->next_record()) { $uid = $this->db->f("user_id"); $this->auth["perm"] = $this->db->f("perms"); } return $uid; } }

    /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db->query("select count(*) as count from auth_user"); $db->Next_Record(); $count = $db->f("count"); //count gives 2 which is correct SO OK

    $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db->Next_Record(); $uid = $db->f("user_id"); //uid gives ... which is correct SO OK ---> The must be something wrong with my loginform it does not submit the right values WHY ????

    ?>

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


    -----Original Message----- From: Steve Haemelinck [mailto:steve.haemelinckpandora.be] Sent: maandag 19 maart 2001 11:52 To: 'Steve Haemelinck' Subject: RE: [PHP] PHPLIB and Auth

    It has certainly got something to do with my config. I just tried a simple form with POST And it gave the following ERROR: Parse error: parse error, expecting 'T_STRING' or 'T_VARIABLE' or 'T_NUM_STRING' What does this mean? -----Original Message----- From: Steve Haemelinck [mailto:steve.haemelinckpandora.be] Sent: maandag 19 maart 2001 10:26 To: PHP Mailing Listl (E-mail) Subject: [PHP] PHPLIB and Auth

    Hi Guys,

    I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong ???? <?php class TIMEKEEPER_AUTH extends Auth{ /* Declare variables */ var $classname="TIMEKEEPER_AUTH"; var $magic="TIMEKEEPER_MAGIC"; var $lifetime; //Maximum 15 minutes idle time !!! var $database_class = "TIMEKEEPER_DB"; var $database_table = "auth_user"; function auth_loginform() { global $sess; include("loginform.ihtml"); }

    function auth_validatelogin() { global $username, $password; if(isset($username)) { $this->auth["uname"]=$username; }

    $uid = false; $this->db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this->database_table, addslashes($username), addslashes($password))); while($this->db->next_record()) { $uid = $this->db->f("user_id"); $this->auth["perm"] = $this->db->f("perms"); } return $uid; } }

    /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db->query("select count(*) as count from auth_user"); $db->Next_Record(); $count = $db->f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db->Next_Record(); $uid = $db->f("user_id"); //uid gives ... which is correct SO OK ---> The must be something wrong with my loginform it does not submit the right values WHY ????

    ?>

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


    What PHP funstions should i use to connect to a MS SQL database.

    can i use the mysql or the odbc commands ?

    attached mail follows:


    Costas,

    Depends on whether or not you're using a windows server or linux server. I've found that it's much easier to use MSSQL from a windows server since you can use the mssql_connect commands. for some reason or another (probably lack of configuration knowledge in linux) i've had problems running the mssql_connect commands. I'd recommend using odbc for linux, and mssql for windows. just my experience.

    btw, i'm assuming you mean mssql, not mysql. ;p

    Yoshi

    ----- Original Message ----- From: "Costas" <costasothermedia.com> Subject: [PHP] MS SQL databse connecting

    > What PHP funstions should i use to connect to a MS SQL database. > > can i use the mysql or the odbc commands ?

    attached mail follows:


    > -----Original Message----- > From: Yoshi Melrose [mailto:webmastervalidus.com] > Sent: Monday, March 19, 2001 4:38 AM > To: php-generallists.php.net > Subject: Re: [PHP] MS SQL databse connecting > > > Depends on whether or not you're using a windows server or > linux server. I've found that it's much easier to use MSSQL > from a windows server since you can use the mssql_connect > commands. for some reason or another (probably lack of > configuration knowledge in linux) i've had problems running the > mssql_connect commands. I'd recommend using odbc for linux, > and mssql for windows. just my experience.

    Just for the record (and for the mailing list archives, on the off chance that somebody besides me uses them occasionally)...

    I've successfully enabled the mssql* commands in PHP on FreeBSD (presumably this would work under Linux just as well) by installing the FreeTDS libraries (available from freetds.org), and then configuring PHP "--with-sybase"

    ---
    Mark Roedel (roedelmletu.edu)  ||  "There cannot be a crisis next week.
    Systems Programmer / WebMaster  ||   My schedule is already full."
         LeTourneau University      ||                    -- Henry Kissinger
    

    attached mail follows:


    Am I the only one who can not find any free ODBC drivers for Linux? I see countless references to ODBC driver managers, but no ODBC drivers themselves - not free ones anyway.

    I'll have to second the other poster's comments re: FreeTDS. It works fine, and we're looking at using SQLRelay in conjunction, to give us connection pooling benefits too. We're fortunate to count the FreeTDS author as a (mostly!) regular member of our area PHP user group, and his contribution to this area (unix to ms/sybase database talking) can't be understated. :)

    Yoshi Melrose wrote:

    > Costas, > > Depends on whether or not you're using a windows server or linux server. > I've found that it's much easier to use MSSQL from a windows server since > you can use the mssql_connect commands. for some reason or another (probably > lack of configuration knowledge in linux) i've had problems running the > mssql_connect commands. I'd recommend using odbc for linux, and mssql for > windows. just my experience. > > btw, i'm assuming you mean mssql, not mysql. ;p > > Yoshi

    attached mail follows:


    have you tried out http://freshmeat.net ? do a search for odbc, you'll find a few. :)

    ----- Original Message ----- From: "Michael Kimsal" <michaeltapinternet.com> To: <php-generallists.php.net> Sent: Monday, March 19, 2001 9:01 AM Subject: Re: [PHP] MS SQL databse connecting

    > Am I the only one who can not find any free ODBC drivers for Linux? > I see countless references to ODBC driver managers, but no ODBC drivers > themselves - not free ones anyway. > > I'll have to second the other poster's comments re: FreeTDS. It works fine, > and we're looking at using SQLRelay in conjunction, to give us connection > pooling benefits too. We're fortunate to count the FreeTDS author as a > (mostly!) regular member of our area PHP user group, and his > contribution to this area (unix to ms/sybase database talking) can't > be understated. :)

    attached mail follows:


    Ok I had this working once and again it is eluding me on win98 I have added....

    ScriptAlias /php/ "d:/php/"

    AddType application/x-httpd-php .php .phtml

    Action application/x-httpd-php "/php/php.exe"

    but PHP still will not work I have got Perl working and had PHP working but I neglected to save the httpd.conf and now I am lost again

    Thanks for the help Pat

    attached mail follows:


    Patrick,

    Here's how i have my httpd.conf in 2000. make sure you put in the reference to the isapi dll:

    LoadModule php4_module c:/php/sapi/php4apache.dll

    Load the module and it should work fine.

    ----- Original Message ----- From: "Patrick" <patrickolsonqwest.net> To: <php-generallists.php.net> Sent: Monday, March 19, 2001 3:13 AM Subject: [PHP] PHP & Apache

    > Ok I had this working once and again it is eluding me on win98 I have > added.... > > ScriptAlias /php/ "d:/php/" > > AddType application/x-httpd-php .php .phtml > > Action application/x-httpd-php "/php/php.exe" > > but PHP still will not work > I have got Perl working and had PHP working but I neglected to save > the httpd.conf and now I am lost again > > Thanks for the help > 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 > >

    attached mail follows:


    OK it worked Thanks for the pointers Yoshi

    ----- Original Message ----- From: "Yoshi Melrose" <webmastervalidus.com> To: <php-generallists.php.net> Sent: Monday, March 19, 2001 4:34 AM Subject: Re: [PHP] PHP & Apache

    > Patrick, > > Here's how i have my httpd.conf in 2000. make sure you put in the reference > to the isapi dll: > > LoadModule php4_module c:/php/sapi/php4apache.dll > > Load the module and it should work fine. > > ----- Original Message ----- > From: "Patrick" <patrickolsonqwest.net> > To: <php-generallists.php.net> > Sent: Monday, March 19, 2001 3:13 AM > Subject: [PHP] PHP & Apache > > > > Ok I had this working once and again it is eluding me on win98 I have > > added.... > > > > ScriptAlias /php/ "d:/php/" > > > > AddType application/x-httpd-php .php .phtml > > > > Action application/x-httpd-php "/php/php.exe" > > > > but PHP still will not work > > I have got Perl working and had PHP working but I neglected to save > > the httpd.conf and now I am lost again > > > > Thanks for the help > > 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 > > > > > > > -- > 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:


    Is there a PHP alternative to Perls use strict command.

    For anyone who doesnt know Perl, use strict forces local declaration of variables

    thanks

    attached mail follows:


    php variables are local by default.

    -----Original Message----- From: Costas [mailto:costasothermedia.com] Sent: 19 March 2001 10:27 To: php-generallists.php.net Subject: [PHP] use strict alternative

    Is there a PHP alternative to Perls use strict command.

    For anyone who doesnt know Perl, use strict forces local declaration of variables

    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:


    On Monday 19 March 2001 12:53, you wrote: > php variables are local by default.

    point missed :)

    "use strict" forces you to declare variables before you use them. AFAIK there's no such thing in PHP (unfortunately).

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    Hello

    Is it possible to work with php under an oracle server ? If yes can u point me to some manuals and articles Thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

    attached mail follows:


    On Mon, Mar 19, 2001 at 10:27:19AM -0000, kaab kaoutar wrote: > Hello > > Is it possible to work with php under an oracle server ? > If yes can u point me to some manuals and articles

    AFAIK, the Oracle Web server is not Open Source; hence it would be difficult to support it directly. You can always use the CGI or servlet options though. All the stuff for other web servers besides Apache is in the source tree under:

    /usr/src/php-4.0.4/sapi/

    Regards, Frank

    attached mail follows:


    HI! DO U MEAN I SHOULD GIVE UP USING PHP under oracle web server ? i used to work on php under PWS and apache! However i've made a project with ASP under IIS but the client changed his mind and wanted to put it in his oracle web server ! i thought of using php translation from asp ! or at last as long as i master php code it again ! any idea pleaaaaaaaaaaaaaase! Thanks

    >From: Frank Joerdens <frankjoerdens.de> >To: kaab kaoutar <kaab_khotmail.com> >CC: php-generallists.php.net >Subject: Re: [PHP] php under Oracle Web server pleaaaaaaaaaase! >Date: Mon, 19 Mar 2001 11:41:42 +0100 > >On Mon, Mar 19, 2001 at 10:27:19AM -0000, kaab kaoutar wrote: > > Hello > > > > Is it possible to work with php under an oracle server ? > > If yes can u point me to some manuals and articles > >AFAIK, the Oracle Web server is not Open Source; hence it would be >difficult to support it directly. You can always use the CGI or servlet >options though. All the stuff for other web servers besides Apache is in >the source tree under: > >/usr/src/php-4.0.4/sapi/ > >Regards, Frank > >-- >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 >

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

    attached mail follows:


    You can still use PHP with Oracle Webserver, www.php.net is the best resource I found so far :)

    ----- Original Message ----- From: "kaab kaoutar" <kaab_khotmail.com> To: <frankjoerdens.de> Cc: <php-generallists.php.net> Sent: Monday, March 19, 2001 6:56 PM Subject: Re: [PHP] php under Oracle Web server pleaaaaaaaaaase!

    > HI! > DO U MEAN I SHOULD GIVE UP USING PHP under oracle web server ? > i used to work on php under PWS and apache! > However i've made a project with ASP under IIS but the client changed his > mind and wanted to put it in his oracle web server ! > i thought of using php translation from asp ! or at last as long as i master > php code it again ! > any idea pleaaaaaaaaaaaaaase! > Thanks > > > >From: Frank Joerdens <frankjoerdens.de> > >To: kaab kaoutar <kaab_khotmail.com> > >CC: php-generallists.php.net > >Subject: Re: [PHP] php under Oracle Web server pleaaaaaaaaaase! > >Date: Mon, 19 Mar 2001 11:41:42 +0100 > > > >On Mon, Mar 19, 2001 at 10:27:19AM -0000, kaab kaoutar wrote: > > > Hello > > > > > > Is it possible to work with php under an oracle server ? > > > If yes can u point me to some manuals and articles > > > >AFAIK, the Oracle Web server is not Open Source; hence it would be > >difficult to support it directly. You can always use the CGI or servlet > >options though. All the stuff for other web servers besides Apache is in > >the source tree under: > > > >/usr/src/php-4.0.4/sapi/ > > > >Regards, Frank > > > >-- > >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 > > > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: 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 Mon, Mar 19, 2001 at 01:19:44PM +1030, Andrew Halliday wrote: > Can PHP for Oracle randomly access rows in a result set? > > I have read documentation for both Oracle functions (ora_*) and Oracle 8 > functions (OCI_*) but cant seem to find a way to randomly access rows in a > result set like you can with PostgreSQL or MySQL ... whats the story here?! > Are we FORCED to access the result set sequentially with an Oracle database? > Is that a restriction of the DB or PHP?

    that's an oracle restriction.

    tc

    attached mail follows:


    The OCIFetchStatement() function returns a resultset to PHP that is actually a multi-dimensional array. You can randomly access this array however you like.

    -----Original Message----- From: Thies C. Arntzen [mailto:thiesthieso.net] Sent: 19 March 2001 10:43 To: Andrew Halliday Cc: php-generallists.php.net; php-dblists.php.net Subject: Re: [PHP] Can PHP for Oracle randomly access rows in a result set?

    On Mon, Mar 19, 2001 at 01:19:44PM +1030, Andrew Halliday wrote: > Can PHP for Oracle randomly access rows in a result set? > > I have read documentation for both Oracle functions (ora_*) and Oracle 8 > functions (OCI_*) but cant seem to find a way to randomly access rows in a > result set like you can with PostgreSQL or MySQL ... whats the story here?! > Are we FORCED to access the result set sequentially with an Oracle database? > Is that a restriction of the DB or PHP?

    that's an oracle restriction.

    tc

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


    From: "Fred" <fredaybsl.net> Sent: Saturday, March 17, 2001 12:22 AM

    > this is the html source generated: > <input type ="radio" name="pageid" value"index">

    The error is in: value"index"

    This should be: value="index"

    - Carsten

    attached mail follows:


    Hi Sven,

    Yes, I just started playing with the GRANT syntax.. Only problem is that they first define a user with everything on 'N'

    And then they define a table in the DB with everything on Y... Problem is that you have to do this for all DB's which you want to allow. This means that newly created DB's should later be added..

    This is though very secure, but I am wondering if there is a way to: allow EVERYTHING but the following in stead of allow NOTHING but the following....

    Bye Bye David

    > have you tried the GRANT syntax? > maybe this helps > take a look at the grant tables afterwards > > regards > > Am 11:48 19.03.2001 schrieben Sie: > >Hi there.. > > > >I am not understanding something how the mysql priviege system works: > > > >I want to do the following: > > > >Give a user access to all tables in an database (also tables which will be > >added in the future) except a > >few private tables like the mysql table itself > > > >This is the way I thought it should be done: > > > >Add a user: '%','username','password','Y',Y','Y','Y','Y','Y','N','N' etc// > >Then add the following to table db > > > >'%',mysql','username','N',N','N','N','N','N','N','N' etc// > > > >Run the Flush privileges command and try it.. > > > >This doesn't work! Or I am missing something.. > >When I think logically, I can maybe understand that the DB looks at the > >user table and sees that the uses has access to do everything and doesn't > >look further at de db table.. > > > >Is this correct? What is then the solution to do what I described above.. > > > >I looked at the manual, but I can't seem to figure out in what order the > >tables are checked.. > >Does it stop looking further when he finds permission to do something or > >does it stop at the first 'N'... > > > > > >PS: I am not planning to use the above example, but it will help me > >understand how the privilege system works.. > > Sven Huster > Senior Unix System Administrator > *BSD, Linux, Solaris > >

    attached mail follows:


    David,

    i think, you can do GRANT SELECT,INSERT ON <table> TO testtesthost.x identified by "password" to allow only SELECTS/INSERTS on the table or just SELECTS with GRANT SELECT ON ...

    or did i get you wrong?

    Am 12:27 19.03.2001 schrieb David Bouw: >*This message was transferred with a trial version of CommuniGate(tm) Pro* >Hi Sven, > >Yes, I just started playing with the GRANT syntax.. >Only problem is that they first define a user with everything on 'N' > >And then they define a table in the DB with everything on Y... >Problem is that you have to do this for all DB's which you want to allow. >This means that newly created DB's should later be added.. > >This is though very secure, but I am wondering if there is a way to: allow >EVERYTHING but the following in stead of allow NOTHING but the following.... > >Bye Bye >David > > > > > have you tried the GRANT syntax? > > maybe this helps > > take a look at the grant tables afterwards > > > > regards > > > > Am 11:48 19.03.2001 schrieben Sie: > > >Hi there.. > > > > > >I am not understanding something how the mysql priviege system works: > > > > > >I want to do the following: > > > > > >Give a user access to all tables in an database (also tables which will >be > > >added in the future) except a > > >few private tables like the mysql table itself > > > > > >This is the way I thought it should be done: > > > > > >Add a user: '%','username','password','Y',Y','Y','Y','Y','Y','N','N' >etc// > > >Then add the following to table db > > > > > >'%',mysql','username','N',N','N','N','N','N','N','N' etc// > > > > > >Run the Flush privileges command and try it.. > > > > > >This doesn't work! Or I am missing something.. > > >When I think logically, I can maybe understand that the DB looks at the > > >user table and sees that the uses has access to do everything and doesn't > > >look further at de db table.. > > > > > >Is this correct? What is then the solution to do what I described above.. > > > > > >I looked at the manual, but I can't seem to figure out in what order the > > >tables are checked.. > > >Does it stop looking further when he finds permission to do something or > > >does it stop at the first 'N'... > > > > > > > > >PS: I am not planning to use the above example, but it will help me > > >understand how the privilege system works.. > > > > Sven Huster > > Senior Unix System Administrator > > *BSD, Linux, Solaris > > > >

    Sven Huster Senior Unix System Administrator *BSD, Linux, Solaris

    attached mail follows:


    The easiest way to do this is to use phpMyAdmin.

    Go to the mysql database on your server Insert a record into the table called 'user'

    * enter appropriate value for host (localhost or %) * fill in user name * when entering password, select the PASSWORD function from the pulldown and enter the plaintext initial password * give them the rights you want (Y=yes, N=no) * save the record in the database

    Go back to the main server page (Home in phpMyAdmin) Clock on Reload Server

    The rights granted in the mysql.user table are global to the server - i.e. they apply to all current and future databases.

    Regards Jeff

    -----Original Message----- From: David Bouw [mailto:maillistmubo.nl] Sent: Monday, March 19, 2001 11:28 AM To: Sven Huster Cc: php-generallists.php.net Subject: [PHP] Re: Privilege system of Mysql...

    Hi Sven,

    Yes, I just started playing with the GRANT syntax.. Only problem is that they first define a user with everything on 'N'

    And then they define a table in the DB with everything on Y... Problem is that you have to do this for all DB's which you want to allow. This means that newly created DB's should later be added..

    This is though very secure, but I am wondering if there is a way to: allow EVERYTHING but the following in stead of allow NOTHING but the following....

    Bye Bye David

    > have you tried the GRANT syntax? > maybe this helps > take a look at the grant tables afterwards > > regards > > Am 11:48 19.03.2001 schrieben Sie: > >Hi there.. > > > >I am not understanding something how the mysql priviege system works: > > > >I want to do the following: > > > >Give a user access to all tables in an database (also tables which will be > >added in the future) except a > >few private tables like the mysql table itself > > > >This is the way I thought it should be done: > > > >Add a user: '%','username','password','Y',Y','Y','Y','Y','Y','N','N' etc// > >Then add the following to table db > > > >'%',mysql','username','N',N','N','N','N','N','N','N' etc// > > > >Run the Flush privileges command and try it.. > > > >This doesn't work! Or I am missing something.. > >When I think logically, I can maybe understand that the DB looks at the > >user table and sees that the uses has access to do everything and doesn't > >look further at de db table.. > > > >Is this correct? What is then the solution to do what I described above.. > > > >I looked at the manual, but I can't seem to figure out in what order the > >tables are checked.. > >Does it stop looking further when he finds permission to do something or > >does it stop at the first 'N'... > > > > > >PS: I am not planning to use the above example, but it will help me > >understand how the privilege system works.. > > Sven Huster > Senior Unix System Administrator > *BSD, Linux, Solaris > >

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

    A possible new approach to generating automatic documentation from source code - but it will require someone with good C++ skills to evaluate it...

    One of the weaknesses of PHP is that it lacks a built-in Javadoc style system for generating automatic documentation in HTML and other formats direct from the source code. On larger projects, this could obviously save very substantial amounts of time.

    There are a number of approaches to solving this for PHP - either clones of Javadoc written in PHP, or an interface to Javadoc itself. See the article and comments at:

    http://www.phpbuilder.com/columns/stefano20000824.php3

    The problem is, to my eye at least, that the Javadoc style of markup is intrusive and reduces the readability of the code. And the php imlementations are still incomplete with pretty basic feature sets.

    A possible alternative: the programmers at CERN (the guys who invented the WWW) have a free, high-end data processing framework called ROOT, and this includes a documentatation generation component. You can find it at:

    http://root.cern.ch/root/

    With the documentation specific stuff at:

    http://root.cern.ch/root/Documentation.html

    There are binaries for most platforms, and the source code is there too.

    This is seriously cool software, but the interface is in C++. I suspect that using this tool anyone with C++ skills could quickly develop a leading edge documentation engine for PHP that would more than match the alternatives in PERL and Java (it generates very impressive diagrams of class trees, for a start).

    A full featured, native documentation engine would surely help to establish PHP as a serious corporate tool (anyone at Zend interested??) and would be a great utility for any larger project.

    Unfortunately, I am merely a PHP hacker with no background in C. If anyone with C++ skills is interested, it would be great if they could check out the potential of ROOT at Cern, and report back to the list. If it looks promising, and someone was prepared to take it on, perhaps we could have a discussion about the markup format that should be employed. Ideally, the interface would allow the user to select from a range of markup styles, rather than impose a style on all users...

    Any takers?

    Geoff Caplan Caplan Associates 33 Pytchley House Brown's Green Birmingham B20 1DN United Kingdom

    Voice: (+44) 0121-515 1154 mailto:geoffproductivity.co.uk

    attached mail follows:


    Hi,

    To quickly get to the gist of it...

    Geoff Caplan wrote:

    > Any takers?

    I am definitely interested.

    The problem is: I am unlikely to be able to find sufficient time. Therefore, (unfortunately,) I can only be counted upon as a second or third rung helper, if at all :-(.

    I'll try and have a look at ROOT and evaluate its suitability.

    Great posting!

    --
    Regards,
    Harshdeep Singh Jawanda.
    

    attached mail follows:


    After enabling imap support for php4 it

    --with-imap=/root/install/php/lib_imap/imap-2000c

    php4 still compiles fine. But Apache does not start anymore.

    Cannot load /usr/lib/apache/libphp4.so into server: undefined symbol: pam_end

    So I checked the the libs:

    worf:~/install/php # ldconfig -v|grep pam libpamc.so.0 -> libpamc.so.0.72 libpam_misc.so.0 -> libpam_misc.so.0.72 libpam.so.0 -> libpam.so.0.72 worf:~/install/php #

    Looks fine to me.

    Then I checked the compiled binary:

    worf:~/install/php # ldd /usr/lib/apache/libphp4.so libc-client.so => /usr/lib/libc-client.so (0x401cb000) libdl.so.2 => /lib/libdl.so.2 (0x4027b000) libz.so.1 => /lib/libz.so.1 (0x4027e000) libinsck.so => /opt/sybase/lib/libinsck.so (0x4028d000) libsybtcl.so => /opt/sybase/lib/libsybtcl.so (0x40290000) libintl.so => /opt/sybase/lib/libintl.so (0x402a1000) libcomn.so => /opt/sybase/lib/libcomn.so (0x402a9000) libct.so => /opt/sybase/lib/libct.so (0x402e8000) libcs.so => /opt/sybase/lib/libcs.so (0x40332000) libmm.so.11 => /usr/lib/libmm.so.11 (0x4033d000) libpdf.so.1 => /usr/lib/libpdf.so.1 (0x40342000) libtiff.so.3 => /usr/lib/libtiff.so.3 (0x4036c000) libpng.so.2 => /usr/lib/libpng.so.2 (0x403af000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x403da000) libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 (0x403f9000) libmcal.so => /usr/lib/libmcal.so (0x40428000) libldap.so.1 => /usr/lib/libldap.so.1 (0x4043b000) liblber.so.1 => /usr/lib/liblber.so.1 (0x40450000) libttf.so.2 => /usr/lib/libttf.so.2 (0x40455000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4047d000) libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40560000) libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4056f000) libcurl.so.0 => /usr/lib/libcurl.so.0 (0x40576000) libresolv.so.2 => /lib/libresolv.so.2 (0x40591000) libm.so.6 => /lib/libm.so.6 (0x405a3000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x405c1000) libnsl.so.1 => /lib/libnsl.so.1 (0x405ef000) libc.so.6 => /lib/libc.so.6 (0x40605000) libssl.so.0 => /usr/lib/libssl.so.0 (0x40718000) libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x40745000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000) worf:~/install/php #

    Looks fine as well.

    I found something on the net that there should be a libpam entry... Sorry, don't understand why... Can anyone help and tell me what is wrong?

    --
    Torsten
    

    attached mail follows:


    Hello, I am wrining a script that insert students in a database: name, email,.... the data retrive (from text-file) and storing (into database) works fine, but when I want to check if a student is already in the database, I look for the email address, and

    when I use: $check_email = mysql_query("SELECT student_id FROM pdc_student WHERE student_email=\"".$student_email."\"", $con); $number = mysql_numrows($check_email); if ($number == 0) { .......

    OR $check_email = mysql_query("SELECT student_id from pdc_student where 1 and student_email like \"$student_email\"", $con); $number = mysql_numrows($check_email); if ($number == 0) { ........

    it works fine EXCEPT if the email address contains "_" for example, if I try to add a student with email: name_testtry.fi, it won't be able to find if the email exists already in the db, it will just add that student even if the email exists already.

    And this "_" is allowed for email address... :(

    Anybody encounters that problem and could help me to solve it? Thanks,

    -Alain-

    attached mail follows:


    I am developing a PHP site under windows which is going to be deployed eventually on Unix (indeed when life gets less hectic will also be developed under Unix but that's another story).

    Anyway the header.html (included at top of every page) has links in it. However depending where the page is which is including header.html the links (from a relative point of view) will be different. For example for the index.php (which is in site root) the catalogue page is simply referred to as cat.html but from admin.html (which is in the admin directory under site root) ../cat.html would be required.

    A way to get round this problem seems to be to have a variable with the site root in it (i.e. $siteroot = "c:/pages/") however this is causing me a real headache. using

    echo "<a href=\"" . $siteroot "/cat.php">Catalogue</a>

    renders href to c:/pages/cat.php but then the browser tries to download the page as a file. I have also tried

    $siteroot = "http://green/

    (green being the domain) but this douse not work either.

    I would really like the solution to this to be platform independent.

    Ta in Advance, ben

    --
    ben.2.edwardsbt.com (benwork until end March)
    benvideonetwork.org (benhome)
    

    attached mail follows:


    you could make your links absolute ie..

    /cat.html

    so if you're in http://green/admin/admin.html

    you would link to

    http://green/cats.html

    HTH

    M > I am developing a PHP site under windows which is going to be deployed > eventually on Unix (indeed when life gets less hectic will also > be developed > under Unix but that's another story). > > Anyway the header.html (included at top of every page) has links in it. > However depending where the page is which is including > header.html the links > (from a relative point of view) will be different. For example for the > index.php (which is in site root) the catalogue page is simply referred to > as cat.html but from admin.html (which is in the admin directory > under site > root) ../cat.html would be required. > > A way to get round this problem seems to be to have a variable > with the site > root in it (i.e. $siteroot = "c:/pages/") however this is causing > me a real > headache. using > > echo "<a href=\"" . $siteroot "/cat.php">Catalogue</a> > > renders href to c:/pages/cat.php but then the browser tries to > download the > page as a file. I have also tried > > $siteroot = "http://green/ > > (green being the domain) but this douse not work either. > > I would really like the solution to this to be platform independent. > > Ta in Advance, > ben > -- > ben.2.edwardsbt.com (benwork until end March) > benvideonetwork.org (benhome) > > > -- > 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:


    Agreed - use absolute paths - but DONT include the protocol://server Best is: <A HREF=/admin/mypage> Not so good is: <A HREF=/admin/mypage.php> <A HREF=/admin/mypage.html> Don't do this <A HREF=http://www.mine.com/admin/mypage> ^^^^^^^^^^^^^^^^^^^ You don't want your dev site linking to unreleased pages in production etc.

    I wanted relative, but after probs with web design tools, php and having loads of sites to maintain I eventually had to bite the bullet and now use absolute paths for all links. There are too many gotchas balancing a tree of relative links.

    Note that w3, recommend NOT include the file type in the link. Let the server choose it for you: e.g. <A HREF=/admin/mypage> is better than than <A HREF=/admin/mypage.php> <A HREF=/admin/mypage.html> etc.

    A nice side effect is that you can start with static holding .html pages and transparently substitute them, a page at a time to smarter .php as you get the coding done.

    Of course, you need a decent web server...

    Regards Jeff

    -----Original Message----- From: Matt Williams [mailto:mattyewlands.com] Sent: Monday, March 19, 2001 1:23 PM To: ben.2.edwardsbt.com; php-generallists.php.net Subject: RE: [PHP] site root variable (for Generic Unix and Windows)

    you could make your links absolute ie..

    /cat.html

    so if you're in http://green/admin/admin.html

    you would link to

    http://green/cats.html

    HTH

    M > I am developing a PHP site under windows which is going to be deployed > eventually on Unix (indeed when life gets less hectic will also > be developed > under Unix but that's another story). > > Anyway the header.html (included at top of every page) has links in it. > However depending where the page is which is including > header.html the links > (from a relative point of view) will be different. For example for the > index.php (which is in site root) the catalogue page is simply referred to > as cat.html but from admin.html (which is in the admin directory > under site > root) ../cat.html would be required. > > A way to get round this problem seems to be to have a variable > with the site > root in it (i.e. $siteroot = "c:/pages/") however this is causing > me a real > headache. using > > echo "<a href=\"" . $siteroot "/cat.php">Catalogue</a> > > renders href to c:/pages/cat.php but then the browser tries to > download the > page as a file. I have also tried > > $siteroot = "http://green/ > > (green being the domain) but this douse not work either. > > I would really like the solution to this to be platform independent. > > Ta in Advance, > ben > -- > ben.2.edwardsbt.com (benwork until end March) > benvideonetwork.org (benhome) > > > -- > 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:


    > Agreed - use absolute paths - but DONT include the protocol://server Sorry, I didn't mean it to sound like I meant include the above

    M

    attached mail follows:


    These are the functions I use to determine if a string value is a valid integer, real, date, etc. Hope this helps.

    ps - please let me know if you find any errors. thanx.

    <?php

    function IsValidBoolean($p) { if ( isset($p) ) { if ((strtolower($p) == "true") or (strtolower($p) == "false")) return TRUE; } return FALSE; }

    function IsValidMemo($p) {

    // If $p contains any characters other than printable ascii, // or \r or \n, return FALSE.

    if (trim($p) == "") return TRUE; if ( ereg("[^\r\n\x20-\x7E]", $p) ) return FALSE; return TRUE; }

    function IsValidString($p) {

    // If $p contains any characters other than printable ascii, // return FALSE.

    if (trim($p) == "") return TRUE; if ( ereg("[^\x20-\x7E]", $p) ) return FALSE; return TRUE; }

    function IsValidInteger($p) {

    // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of 1 or more digits, optionally preceded by a minus sign

    if ( isset($p) ) return ereg("^\-?[0-9]+$",$p); return FALSE; }

    function IsValidReal($p) {

    // return TRUE if: // 1. $p is not equal to "" // 2. $p begins with optional minus sign, followed by 1 or more digits, followed by a decimal point, // followed by 1 or more digits // 3. $p can be optionally preceded by a minus sign

    if ( isset($p) ) return ereg("^\-?[0-9]+\.[0-9]+$",$p); return FALSE; }

    function IsLeapYear($y) { if ( (($y % 4) == 0) && (($y % 100) != 0) || (($y % 400) == 0)) return TRUE; return FALSE; }

    function IsValidDate($p) {

    // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of 4 digits followed by minus sign, followed by 2 digits, followed by // minus sign, followed by 2 digits // example 1995-02-03

    if ( ! isset($p) ) return FALSE; if ( ! ereg("^([0-9]{4})\-([0-9]{2})\-([0-9]{2})$",$p) ) return FALSE;

    $t = explode("-",$p); if ( count($t) != 3 ) return FALSE; $y = $t[0]; $m = $t[1]; $d = $t[2];

    return IsValidDate2($y,$m,$d); }

    function IsValidDate2($y,$m,$d) {

    if ( ($m < 1) or ($m > 12) ) return FALSE; if ( ($d < 1) or ($d > 31) ) return FALSE;

    // 30 days has sept, apr, jun, and nov (all the rest have 31 [except for feb]) // 9 4 6 11

    if ( ($m == 4) or ($m == 6) or ($m == 9) or ($m == 11) ) { if ($d > 30) return FALSE; } elseif ($m == 2) { if ( IsLeapYear($y) ) { if ( $d > 29 ) return FALSE; } else { if ( $d > 28 ) return FALSE; } } return TRUE; }

    function IsValidTime($p) {

    // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of 2 digits in the range 00 to 23, // followed by a colon, // followed by 2 digits in the range 00 to 59, // followed by a colon, // followed by 2 digits in the range 00 to 59. // example 14:45:02

    if ( ! isset($p) ) return FALSE; if ( ! ereg("^([0-9]{2})\:([0-9]{2})\:([0-9]{2})$",$p) ) return FALSE;

    $t = explode(":",$p); if ( count($t) != 3 ) return FALSE; $h = $t[0]; $m = $t[1]; $s = $t[2];

    return IsValidTime2($h,$m,$s); }

    function IsValidTime2($h,$m,$s) {

    if ( ($h < 0) or ($h > 23) ) return FALSE; if ( ($m < 0) or ($m > 59) ) return FALSE; if ( ($s < 0) or ($s > 59) ) return FALSE;

    return TRUE; }

    function IsValidDateTime($p) {

    // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of a valid date (validated by IsValidDate() above) // followed by a space // followed by a valid time (validated by IsValidTime() above) // example: 1998-04-21 22:01:34

    if ( ! isset($p) ) return FALSE;

    $temp = explode(" ",$p); if ( count($temp) != 2 ) return FALSE; $d = $temp[0]; $t = $temp[1]; if ( ! IsValidDate($d) ) return FALSE; if ( ! IsValidTime($t) ) return FALSE;

    return TRUE; }

    function IsValidTimeStamp($p) {

    // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of a datetime in YYYYMMDDHHMMSS format // example: 19980421220134

    if ( ! isset($p) ) return FALSE; if ( ! ereg("^([0-9]{14})$",$p) ) return FALSE;

    $y = substr($p,0,4); $m = substr($p,4,2); $d = substr($p,6,2); $h = substr($p,8,2); $min = substr($p,10,2); $s = substr($p,12,2);

    if ( ! IsValidDate2($y,$m,$d) ) return FALSE; if ( ! IsValidTime2($h,$min,$s) ) return FALSE;

    return TRUE; }

    function TestVF($type,$fn,$v,$p) {

    // TestVF = TestValidationFunction

    // example 1: TestVF("integer","IsValidInteger",TRUE,"15"); // ok, 15 is a valid integer, so print nothing // example 2: TestVF("integer","IsValidInteger",FALSE,"15"); // error, 15 *is* a valid integer, so print error // example 3: TestVF("integer","IsValidInteger",FALSE,"abc"); // ok, "abc" is NOT a valid integer, so print nothing // example 4: TestVF("integer","IsValidInteger",TRUE,"abc"); // error, "abc" is NOT a valid integer, so print error

    $IsValid = $fn($p); if ( $v ) { if ( $IsValid ) return; echo "error, is NOT a valid $type: " . $p . "<BR>\n"; } else { if ( ! $IsValid ) return; echo "error, *is* a valid $type: " . $p . "<BR>\n"; } }

    function TestDatesNumbers() {

    echo "The test is sucessful if nothing else gets printed below this.<BR>\n";

    // x1F = cc // x20 = space // x21 = ! // ... // x7D = } // x7E = ~ // x7F = cc

    TestVF("string","IsValidString",TRUE, ""); TestVF("string","IsValidString",TRUE, "asdfasdf"); TestVF("string","IsValidString",FALSE, "asdf\nasdf"); // contains \n TestVF("string","IsValidString",FALSE, "abcd" . chr(0) . "asdf"); // contains chr(0) TestVF("string","IsValidString",FALSE, "abcd\x1Fasdf"); // contains cc TestVF("string","IsValidString",TRUE, "abcd asdf"); TestVF("string","IsValidString",TRUE, "abcd~asdf"); TestVF("string","IsValidString",FALSE, "abcd\x7Fasdf"); // contains cc

    TestVF("memo","IsValidMemo",TRUE, ""); TestVF("memo","IsValidMemo",TRUE, "asdfasdf"); TestVF("memo","IsValidMemo",TRUE, "asdf\nasdf"); TestVF("memo","IsValidMemo",TRUE, "asdf\rasdf"); TestVF("memo","IsValidMemo",TRUE, "asdf\r\nnasdf"); TestVF("memo","IsValidMemo",FALSE, "abcd" . chr(0) . "asdf"); // contains chr(0) TestVF("memo","IsValidMemo",FALSE, "abcd\x1Fasdf"); // contains cc TestVF("memo","IsValidMemo",TRUE, "abcd asdf"); TestVF("memo","IsValidMemo",TRUE, "abcd~asdf"); TestVF("memo","IsValidMemo",FALSE, "abcd\x7Fasdf"); // contains cc

    // digits / 0-9 :

    TestVF("integer","IsValidInteger",FALSE, ""); // blank TestVF("integer","IsValidInteger",TRUE, "0"); TestVF("integer","IsValidInteger",FALSE, " 0"); // leading space not allowed TestVF("integer","IsValidInteger",FALSE, "+0"); // plus sign not allowed TestVF("integer","IsValidInteger",TRUE, "-0"); TestVF("integer","IsValidInteger",FALSE, "0+"); // trailing plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "0-"); // trailing minus sign not allowed TestVF("integer","IsValidInteger",TRUE, "1"); TestVF("integer","IsValidInteger",FALSE, "+1"); // plus sign not allowed TestVF("integer","IsValidInteger",TRUE, "-1"); TestVF("integer","IsValidInteger",FALSE, "1+"); // trailing plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "1-"); // trailing minus sign not allowed TestVF("integer","IsValidInteger",TRUE, "11"); TestVF("integer","IsValidInteger",FALSE, "+11"); // plus sign not allowed TestVF("integer","IsValidInteger",TRUE, "-11"); TestVF("integer","IsValidInteger",FALSE, "11+"); // trailing plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "11-"); // trailing minus sign not allowed TestVF("integer","IsValidInteger",FALSE, "+-1"); // plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "-+1"); // plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "1+-"); // plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "1-+"); // plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "1+1"); // plus sign not allowed TestVF("integer","IsValidInteger",FALSE, "1-1"); // minus sign must be leftmost character TestVF("integer","IsValidInteger",FALSE, "1o1"); // o not allowed TestVF("integer","IsValidInteger",TRUE, "243095230982340982360923460972362356236"); TestVF("integer","IsValidInteger",TRUE, "-243095230982340982360923460972362356236"); TestVF("integer","IsValidInteger",FALSE, " -243095230982340982360923460972362356236"); // leading space not allowed TestVF("integer","IsValidInteger",FALSE, "3214532.43"); // decimal point not allowed in an integer TestVF("integer","IsValidInteger",FALSE, "/32"); // contains / TestVF("integer","IsValidInteger",TRUE, "0"); TestVF("integer","IsValidInteger",TRUE, "9"); TestVF("integer","IsValidInteger",FALSE, ":"); // contains :

    TestVF("real","IsValidReal",FALSE, ""); // blank TestVF("real","IsValidReal",FALSE, "0"); // no decimal point TestVF("real","IsValidReal",FALSE, "1"); // no decimal point TestVF("real","IsValidReal",TRUE, "1.1"); TestVF("real","IsValidReal",FALSE, "1."); // no digit to the right of decimal point TestVF("real","IsValidReal",FALSE, ".1"); // no digit to the left of decimal point TestVF("real","IsValidReal",FALSE, "-1"); // no decimal point TestVF("real","IsValidReal",TRUE, "-1.1"); TestVF("real","IsValidReal",FALSE, " -1.1"); // leading space not allowed

    TestVF("date","IsValidDate",FALSE, ""); // blank TestVF("date","IsValidDate",TRUE, "2000-05-24"); TestVF("date","IsValidDate",FALSE, "sdghsdh"); // contains alpha characters TestVF("date","IsValidDate",FALSE, "4/5/98"); // contains slashes TestVF("date","IsValidDate",FALSE, "2000-9-7"); // not YYYY-MM-DD format TestVF("date","IsValidDate",TRUE, "2000-09-07"); TestVF("date","IsValidDate",FALSE, "2000-09-31"); // 30 days has september TestVF("date","IsValidDate",FALSE, "2000-09-00"); // day must be 01 thru 31 TestVF("date","IsValidDate",FALSE, "2000-19-07"); // month must be 01 thru 12 TestVF("date","IsValidDate",FALSE, "2000-00-00"); // non-valid month and day TestVF("date","IsValidDate",FALSE, "2000-01-32"); // day must be 01 thru 31 TestVF("date","IsValidDate",TRUE, "2000-02-28"); TestVF("date","IsValidDate",TRUE, "2000-02-29"); TestVF("date","IsValidDate",FALSE, "2000-02-30"); // days in feb must be 01 thru 29 TestVF("date","IsValidDate",TRUE, "1999-02-28"); TestVF("date","IsValidDate",FALSE, "1999-02-29"); // 1999 was not a leap year TestVF("date","IsValidDate",FALSE, "1999-02-30"); // days in feb must be 01 thru 29

    TestVF("time","IsValidTime",FALSE, ""); // blank TestVF("time","IsValidTime",TRUE, "20:05:24"); TestVF("time","IsValidTime",FALSE, "sdghsdh"); // contains alpha characters TestVF("time","IsValidTime",FALSE, "4/5/98"); // contains slashes TestVF("time","IsValidTime",FALSE, "20:9:7"); // not HH:MM:SS format TestVF("time","IsValidTime",TRUE, "20:09:07"); TestVF("time","IsValidTime",FALSE, "24:09:07"); // hour must be 00 thru 23 TestVF("time","IsValidTime",FALSE, "20:60:07"); // minute must be 00 thru 59 TestVF("time","IsValidTime",FALSE, "20:07:60"); // second must be 00 thru 59

    TestVF("datetime","IsValidDateTime",FALSE, ""); // blank TestVF("datetime","IsValidDateTime",TRUE, "2000-06-06 20:05:24"); TestVF("datetime","IsValidDateTime",FALSE, "2000-06-06 20:05:24"); // 2 spaces between date and time TestVF("datetime","IsValidDateTime",FALSE, "2000-06-0620:05:24"); // 0 spaces between date and time TestVF("datetime","IsValidDateTime",FALSE, "2000-06-6 20:05:24"); // non-valid date format TestVF("datetime","IsValidDateTime",FALSE, "2000-06-06 20:5:24"); // non-valid time format TestVF("datetime","IsValidDateTime",FALSE, "2000-06-06"); // time missing TestVF("datetime","IsValidDateTime",FALSE, "20:05:24"); // date missing TestVF("datetime","IsValidDateTime",FALSE, "20:05:24 2000-06-06"); // date and time order reversed

    TestVF("timestamp","IsValidTimeStamp",FALSE, ""); // blank TestVF("timestamp","IsValidTimeStamp",TRUE, "20000606200524"); TestVF("timestamp","IsValidTimeStamp",FALSE, "2000066200524"); // non-valid date format TestVF("timestamp","IsValidTimeStamp",FALSE, "2000060620524"); // non-valid time format TestVF("timestamp","IsValidTimeStamp",FALSE, "20000606"); // time missing TestVF("timestamp","IsValidTimeStamp",FALSE, "200524"); // date missing TestVF("timestamp","IsValidTimeStamp",FALSE, "20052420000606"); // date and time order reversed

    TestVF("boolean","IsValidBoolean",FALSE, ""); // blank TestVF("boolean","IsValidBoolean",TRUE, "true"); TestVF("boolean","IsValidBoolean",TRUE, "false"); TestVF("boolean","IsValidBoolean",TRUE, "TRUE"); TestVF("boolean","IsValidBoolean",TRUE, "FALSE"); TestVF("boolean","IsValidBoolean",FALSE, "t"); // must be 'true' or 'false' TestVF("boolean","IsValidBoolean",FALSE, "f"); // ditto TestVF("boolean","IsValidBoolean",FALSE, "0"); // ditto TestVF("boolean","IsValidBoolean",FALSE, "1"); // ditto

    // uncomment the next 2 to test TestVF() // TestVF("boolean","IsValidBoolean",TRUE, "1"); // ditto // TestVF("boolean","IsValidBoolean",FALSE, "true"); // ditto

    echo "done testing.\n"; }

    TestDatesNumbers();

    ?>

    -----Original Message----- From: phpman [mailto:infographicon.nu] Sent: Sunday, March 18, 2001 1:44 PM To: php-generallists.php.net Subject: [PHP] how do i get a variable type? - not that simple

    No guys. that doesn't work. Take this code for example...

    $a="3"; echo(gettype($a));

    this returns string i need to find it as an integer or real or float for the sql. which by the way is MySQL.

    thank you for responding, but I already know that gettype and all the other is_* don't work for this.

    ""phpman"" <infographicon.nu> wrote in message news:99132e$ol8$1toye.p.sourceforge.net... > hello all, > > let's say i have this: > $a="varone=hello world|vartwo=2.44|varthree=100|"; > > now i do this: > > $b=explode('|',$a); > $z=count($b); > for ($x=0;$x<$z;$x++) { > $tmp=explode('=',$b[$x]); > .... > > and i want to find out if $tmp[1] is a string or an integer (that's really > all I need to determine so i can put > together an SQL statement that puts single quotes around strings and none > around integers). Obviously > i won't know at design time all of the variables and their values. Thank > you. > > -dave > > > > -- > 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've got a table like:

    id user_id ip time 1 2 127.0.0.1 20010316105018

    Etc, etc.

    I do a join on the this table and the users table to get the coresponding username to user_id like this:

    SELECT users.name AS name, user_logins.ip AS ip, UNIX_TIMESTAMP(user_logins.time) AS time FROM users, user_logins WHERE user_logins.user_id = users.id ORDER BY time ASC

    How can I display the results grouped by username?

    So, I want to be able to display:

    Logins for John

    Thursday 10th Friday 12th Monday 23rd

    Logins for Bob

    Monday 1st Tuesday 2nd Saturday 31st

    Thanks for any help,

    Jord

    attached mail follows:


    how about something like select distinct name, date_format(time, "%W %D %M %Y") as login from users, user_logins where user_logins.user_id = users.id order by name,time

    -----Original Message----- From: Jordan Elver [mailto:jjelverworldsites.net] Sent: Monday, March 19, 2001 1:43 PM To: PHP Database Mailing List; PHP General Mailing List Subject: [PHP] Query - Grouping Results

    Hi, I've got a table like:

    id user_id ip time 1 2 127.0.0.1 20010316105018

    Etc, etc.

    I do a join on the this table and the users table to get the coresponding username to user_id like this:

    SELECT users.name AS name, user_logins.ip AS ip, UNIX_TIMESTAMP(user_logins.time) AS time FROM users, user_logins WHERE user_logins.user_id = users.id ORDER BY time ASC

    How can I display the results grouped by username?

    So, I want to be able to display:

    Logins for John

    Thursday 10th Friday 12th Monday 23rd

    Logins for Bob

    Monday 1st Tuesday 2nd Saturday 31st

    Thanks for any help,

    Jord

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


    Doesn't seem to work, how would I print that out with PHP?

    On Monday 19 March 2001 13:52, you wrote: > how about something like > select distinct > name, > date_format(time, "%W %D %M %Y") as login > from > users, user_logins > where > user_logins.user_id = users.id > order by name,time > > > -----Original Message----- > From: Jordan Elver [mailto:jjelverworldsites.net] > Sent: Monday, March 19, 2001 1:43 PM > To: PHP Database Mailing List; PHP General Mailing List > Subject: [PHP] Query - Grouping Results > > > Hi, > I've got a table like: > > id user_id ip time > 1 2 127.0.0.1 20010316105018 > > Etc, etc. > > I do a join on the this table and the users table to get the coresponding > username to user_id like this: > > SELECT users.name AS name, user_logins.ip AS ip, > UNIX_TIMESTAMP(user_logins.time) AS time FROM users, user_logins WHERE > user_logins.user_id = users.id ORDER BY time ASC > > How can I display the results grouped by username? > > So, I want to be able to display: > > Logins for John > > Thursday 10th > Friday 12th > Monday 23rd > > Logins for Bob > > Monday 1st > Tuesday 2nd > Saturday 31st > > Thanks for any help, > > Jord

    attached mail follows:


    Sorry, the query works fine, but how do I print it out to the browser so that it looks like:

    John Dates go here

    Bob Dates go here

    Gill Dates go here

    I hope that's clear,

    Thanks,

    Jord

    On Monday 19 March 2001 14:44, you wrote: > works fine for me. > what error do you get. > > > -----Original Message----- > From: Jordan Elver [mailto:jjelverworldsites.net] > Sent: Monday, March 19, 2001 2:39 PM > To: Jeff Armstrong > Cc: PHP Database Mailing List; PHP General Mailing List > Subject: Re: [PHP] Query - Grouping Results > > > Doesn't seem to work, how would I print that out with PHP? > > On Monday 19 March 2001 13:52, you wrote: > > how about something like > > select distinct > > name, > > date_format(time, "%W %D %M %Y") as login > > from > > users, user_logins > > where > > user_logins.user_id = users.id > > order by name,time > > > > > > -----Original Message----- > > From: Jordan Elver [mailto:jjelverworldsites.net] > > Sent: Monday, March 19, 2001 1:43 PM > > To: PHP Database Mailing List; PHP General Mailing List > > Subject: [PHP] Query - Grouping Results > > > > > > Hi, > > I've got a table like: > > > > id user_id ip time > > 1 2 127.0.0.1 20010316105018 > > > > Etc, etc. > > > > I do a join on the this table and the users table to get the coresponding > > username to user_id like this: > > > > SELECT users.name AS name, user_logins.ip AS ip, > > UNIX_TIMESTAMP(user_logins.time) AS time FROM users, user_logins WHERE > > user_logins.user_id = users.id ORDER BY time ASC > > > > How can I display the results grouped by username? > > > > So, I want to be able to display: > > > > Logins for John > > > > Thursday 10th > > Friday 12th > > Monday 23rd > > > > Logins for Bob > > > > Monday 1st > > Tuesday 2nd > > Saturday 31st > > > > Thanks for any help, > > > > Jord

    attached mail follows:


    The php below illustrates how to print database results from mySQL in PHP. Apologies for the long post.

    You should be able to extrapolate from here - ie this is generic, you will want to keep track of the usernames and only print them when they change. Dont forget to print the last one if you do this. (Jackson Structured Programming fans - all together now...)

    Regards Jeff ----------------------------------------------------------- <?php

    # Set these up with the right values $host = 'localhost'; $user = 'me'; $password = 'mine'; $database = 'thedb'; $sql = 'select * from sometable';

    # Connect to the database $dbh = mysql_pconnect($host,$user,$password); if (!$dbh) { echo "Unable to connect to database"; exit; }

    # Run the query on the db $sth = mysql_db_query($database,$sql,$dbh); if (!$sth) { echo "DB Error:($database) $sql<BR>\n", mysql_error($dbh); exit; }

    # Check how may items came back $rows = mysql_num_rows( $sth ); if ( !$rows ) { echo "DB No rows returned<BR>($database) $sql<BR>\n"; exit; }

    echo "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0>\n", " <TR><TD>Database&nbsp;</TD><TD>$database</TD></TR>\n", " <TR><TD>Statement&nbsp;</TD><TD>$sql</TD></TR>\n", " <TR><TD>Records&nbsp;</TD><TD>$rows</TD></TR>\n", "<TABLE>\n\n";

    # print the results in an HTML table echo "<TABLE BORDER=1 CELLPADDING=1 CELLSPACING=0>\n"; $row_count=0; while ( $rec = mysql_fetch_array( $sth, MYSQL_ASSOC ) ) {

    # Print a header row, first time only if(!$row_count) { echo "<TR>\n"; foreach ($rec as $column => $value) { echo " <TH>$column&nbsp;</TH>\n"; } echo "</TR>\n"; }

    # print the results echo "<TR>\n"; foreach ($rec as $column => $value) { echo " <TD>$value&nbsp;</TD>\n"; } echo "</TR>\n";

    $row_count++; }

    echo "</TABLE>\n\n";

    ?>

    -----Original Message----- From: Jordan Elver [mailto:jjelverworldsites.net] Sent: Monday, March 19, 2001 3:03 PM To: Jeff Armstrong Cc: PHP Database Mailing List; PHP General Mailing List Subject: Re: [PHP] Query - Grouping Results

    Sorry, the query works fine, but how do I print it out to the browser so that it looks like:

    John Dates go here

    Bob Dates go here

    Gill Dates go here

    I hope that's clear,

    Thanks,

    Jord

    On Monday 19 March 2001 14:44, you wrote: > works fine for me. > what error do you get. > > > -----Original Message----- > From: Jordan Elver [mailto:jjelverworldsites.net] > Sent: Monday, March 19, 2001 2:39 PM > To: Jeff Armstrong > Cc: PHP Database Mailing List; PHP General Mailing List > Subject: Re: [PHP] Query - Grouping Results > > > Doesn't seem to work, how would I print that out with PHP? > > On Monday 19 March 2001 13:52, you wrote: > > how about something like > > select distinct > > name, > > date_format(time, "%W %D %M %Y") as login > > from > > users, user_logins > > where > > user_logins.user_id = users.id > > order by name,time > > > > > > -----Original Message----- > > From: Jordan Elver [mailto:jjelverworldsites.net] > > Sent: Monday, March 19, 2001 1:43 PM > > To: PHP Database Mailing List; PHP General Mailing List > > Subject: [PHP] Query - Grouping Results > > > > > > Hi, > > I've got a table like: > > > > id user_id ip time > > 1 2 127.0.0.1 20010316105018 > > > > Etc, etc. > > > > I do a join on the this table and the users table to get the coresponding > > username to user_id like this: > > > > SELECT users.name AS name, user_logins.ip AS ip, > > UNIX_TIMESTAMP(user_logins.time) AS time FROM users, user_logins WHERE > > user_logins.user_id = users.id ORDER BY time ASC > > > > How can I display the results grouped by username? > > > > So, I want to be able to display: > > > > Logins for John > > > > Thursday 10th > > Friday 12th > > Monday 23rd > > > > Logins for Bob > > > > Monday 1st > > Tuesday 2nd > > Saturday 31st > > > > Thanks for any help, > > > > Jord

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


    ""YoBro"" <nospambrochures.co.nz> wrote: > Does anybody know any good books & websites to recommend for PHP & MySql > together. I am looking to advance my knowledge and would really appreciate a > helpful tip. > > Really looking for a book that explains all the advanced features of PHP4 > and MySql as a compliment.

    I can't give you an unbiased opinion on whether it is good or not, but you might like to look at "PHP and MySQL Web Development" by Luke Welling and Laura Thomson.

    Here is a link to it on Amazon. http://www.amazon.com/exec/obidos/ASIN/0672317842 although you can probably get it cheaper elsewhere.

    It will be published in 10 days.

    Cheers,

    Luke Welling

    attached mail follows:


    Hi,

    I'm trying to get my site to generate text files with a certain extension and MIME-type from a database, "on the fly".

    Specifically, I would like to build something that can create vCards, that is, text files of a particular format with the extension *.vcf, mime-type text/x-vcard, _at the time that the user clicks the link to download the file_.

    Currently, the only way I have of doing this is prebuilding all the vcf files when the page is built, then deleting them when the user goes somewhere else -- pretty inefficient. I'd really like to have, e.g. a bunch of links that look like this:

    <a href="/scripts/GenericCard.vcf?uid=UniqueUserKey">Click here for John Doe's vCard</a>

    ...so that when the user clicks the link, their contact manager (Outlook, or whatever) fires up on their machine and displays the freshly-generated vCard.

    I have, of course, thought of modifying the httpd.conf to have apache parse files with a .vcf extension through the php interpreter -- I think that this would be a very bad idea. ;-)

    So, is this too much to hope for?

    TIA

    --Dan

    attached mail follows:


    <a href="/scripts/GenericCard.php?uid=UniqueUserKey">Click here for John Doe's vCard</a>

    GenericCard.php would have something like...

    // // build $text from $uid passed in // header("Content-type: x/y"); header("Content-Disposition: attachment; filename=$filename" ); print $text; exit();

    "x/y" would be something like text/html or application/vnd.excel or something like that. Whatever the defined MIME header for Vcards is, put that after the content-type. $filename would be the name of the file you want to call this - something.vcf I'd expect.

    We do this with Excel files all the time - sending down tab-delimited text, and putting an excel application header on the file.

    Dan Costello wrote:

    > Hi, > > I'm trying to get my site to generate text files with a certain extension > and MIME-type from a database, "on the fly". > > Specifically, I would like to build something that can create vCards, that > is, text files of a particular format with the extension *.vcf, mime-type > text/x-vcard, _at the time that the user clicks the link to download the > file_. > > Currently, the only way I have of doing this is prebuilding all the vcf > files when the page is built, then deleting them when the user goes > somewhere else -- pretty inefficient. I'd really like to have, e.g. a bunch > of links that look like this: > > <a href="/scripts/GenericCard.vcf?uid=UniqueUserKey">Click here for John > Doe's vCard</a> > > ...so that when the user clicks the link, their contact manager (Outlook, or > whatever) fires up on their machine and displays the freshly-generated > vCard. > > I have, of course, thought of modifying the httpd.conf to have apache parse > files with a .vcf extension through the php interpreter -- I think that this > would be a very bad idea. ;-) > > So, is this too much to hope for?

    attached mail follows:


    Anybody got an idea on how to check if a url really exists ?

    attached mail follows:


    This should work:

    $url = http://www.php.net; if ($fp = fopen ($url, "r")) { /* DO THE STUFF */ }

    Of course the entire web page can be retrieved through the created file pointer.

    /Daniel

    -----Opprinnelig melding----- Fra: Steve Haemelinck [mailto:steve.haemelinckpandora.be] Sendt: 19. mars 2001 15:27 Til: PHP Mailing Listl (E-mail) Emne: [PHP] Checking if a web, a url really exists ?

    Anybody got an idea on how to check if a url really exists ?

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


    ihi all,

    i was reading somewhere on how ASP uses microsoft's xml engine to transform xml documents which have accompanying xsl stylesheets.

    basically what i would like to do is write an xml document, write an accompanying xsl sheet, and then run a php script on the web so that an html file is produced from my xml file, which i can point to?

    does that make sense? can that be done??

    thanks!

    /sunny

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

    attached mail follows:


    I'm having a couple of problems while porting some software from Lynx OS to Linux. Here they are:

    1. The encryption method seems to be different. Does anyone know the salt to use in the crypt() function in Linux?

    2. Also, I seem to not be able to popen() in Linux. I get a file pointer which is blank. Does anybody know why?

    Thanks in advance,

    Liam

    attached mail follows:


    Since fopen/fread/fclose all work with standard URLs, why not allow file_exists() to work with URLs as well? What is the procedure to make such a request?

    And yes, I know how to work around it for now; quite simple even for a newbie such as myself...not to mention that a similar question was recently posted and answered.

    Thanks, david

    --
    In a Norwegian cocktail lounge:  Ladies are requested not to have
    children in the bar.
    

    attached mail follows:


    On Sat, Mar 17, 2001 at 05:27:55PM +1300, Patrick Dunford wrote: > The example in the Help shows opening a file at http://www.php.net/ with > fopen(). Are they accessing the source code of the script, or the HTML code > that is output by the PHP server when it runs the PHP script that it loads > from that location?

    They are only accessing the HTML code that the PHP program outputs. kA

    > What I want to be able to do is, to get around the problem that the server > that I am running my site on does not have database, I want to run the > database on another server elsewhere on the Web. I want to be able to, by > fopen() -ing the page via its URL, to be passing some variables to the > script, have the remote PHP server run the script and pass back to me the > output as a file, which I can then load into my web page and display.

    I have done something similar once when dealing with an IMAP server. The website did not have IMAP support compiled in, but the IMAP server did have PHP installed with IMAP support. Rather than adding support to the webserver, I was forced to do some scripting on the remote IMAP server. I just did includes and sent the variables the remote script needed.

    <?php include("http://www.remoteimapserver.com/remote.php?neededvariable=neededvalue"); ?>

    Anything the remote.php file outputs will be output into the HTML of the calling program. Anyone accessing the website has no idea that the page they are viewing is coming from 2 different servers.

    -- 
    Jason Stechschulte
    jpstechunoh.edu
    --
    signal(i, SIG_DFL); /* crunch, crunch, crunch */
                 -- Larry Wall in doarg.c from the perl source code
    

    attached mail follows:


    On Sat, Mar 17, 2001 at 02:35:25PM +0800, techzeuspacific.net.sg wrote: > I have attached a php file together with this email.

    I believe your attachment was stripped somewhere along the line. We will definitely have to see code to help you figure out what is going wrong. Could you at least include a snippet in your message?

    -- 
    Jason Stechschulte
    jpstechunoh.edu
    --
    What about WRITING it first and rationalizing it afterwords?  :-)
                 -- Larry Wall in <8162jpl-devvax.JPL.NASA.GOV>
    

    attached mail follows:


    On Sat, Mar 17, 2001 at 01:16:16AM -0700, Mike Yuen wrote: > > Hi, this is a repost and nothing i've tried is working. Basically, I > allow people to upload pictures and they all go to the proper > directories but I can't see the picture. I can see the pictures great > on my windows server but no one else can see it. Obviously the path to > the images is screwed but I can't figure it out. The $picdir i've tried > are: > $picdir = "./userpics"; > $picdir = "c:/phpweb/userpics/" > $picdir = "/userpics"; > $picdir = "../userpics"; > All of the above don't work. I'll post my code below:

    The directory is probably not viewable from the web. Try putting the folder somewhere in the web tree.

    -- 
    Jason Stechschulte
    jpstechunoh.edu
    --
    No, that'd be silly.
                 -- Larry Wall in <199710221710.KAA24242wall.org>
    

    attached mail follows:


    On Sun, Mar 18, 2001 at 01:06:34PM +0800, techzeuspacific.net.sg wrote:

    > I'm trying to create a form whereby I can edit the variables with just the form. > > It will be something like a form for me to change the database details(username,server,password) in a .inc I'm using. > > Is there anyway for me to pass information into another file's variable and have it saved in there? > > If anyone have seen Newspro (CGI) before, when you edit some parts in a form, the information will be saved. How can it be done in PHP?

    There is probably a hundred or more ways this can be done. For me to be able to give you specifics, you will have to be more specific with what you are doing and what you have tried.

    -- 
    Jason Stechschulte
    jpstechunoh.edu
    --
    Well, I think Perl should run faster than C.  :-)
                 -- Larry Wall in <199801200306.TAA11638wall.org>
    

    attached mail follows:


    On Sun, Mar 18, 2001 at 05:38:36PM -0800, Tom Beidler wrote: > I'm trying to create a pulldown menu with distinct names from the found set. > For some reason I never get the last name. Here's my code; > > $contact_query = "SELECT DISTINCT name FROM request" > . " WHERE id <= '5' OR demo_id = '$demo_id'" > . " ORDER BY name"; > $contact_result = mysql_query ($contact_query) > or die ("Cannot build contact"); > > while ($contact_row = mysql_fetch_array ($contact_result)) > { > $name = $contact_row["name"]; > $option_contact .= "<OPTION value=\"$name\">$name</OPTION>\n"; > } > > What gives?

    I have not seen anything wrong with this portion of code. Have you tried echoing $contact_row["name"] inside the loop to make sure this is the portion of your code that is broken?

    -- 
    Jason Stechschulte
    jpstechunoh.edu
    --
    All language designers are arrogant.  Goes with the territory... :-)
                 -- Larry Wall in <1991Jul13.010945.19157netlabs.com
    

    attached mail follows:


    There is a well maintained site whose purpose is to answer/archive frequently asked questions:

    http://php.faqts.com

    Robert Zwink

    -----Original Message----- From: Rick St Jean [mailto:rstjeaninternet.look.ca] Sent: Thursday, March 15, 2001 12:05 PM To: php-generallists.php.net Subject: [PHP] FAQ

    It is there a list of most frequently asked questions? It seems that people ask the same questions, again and again, they do not READ THE MANUAL. Yes I have asked 2 stupid questions, but I really did search and I am reading my manuals, the PHP and the book that I bought.

    Also I would like to know if there would be a demand for an experienced mailing list? I am just frustrated by the same 3 questions that pop up about once a day. The rest of the posts are great.

    Rick ########################################################## # Rick St Jean, # rstjeaninternet.look.ca # President of Design Shark, # http://www.designshark.com/ # Quick Contact: http://www.designshark.com/messaging.ihtml # Tel: 905-684-2952 ##########################################################

    --
    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 never got the groups thing to work on phpAds, actually I have never even seen anything for it in the options of the admin screen. So what I have done is created a customer with mutliple banners. I host free banners for other websites in my genre and host thier banners under that customer name.. as such I want to give out code for the other sites to run the banners as well.. the customer name I've given it is "cthulhu" here's the code I've tried so far: <a href="http://www.shoggoth.net/phpAds/click.php3?n=cthulhu"> <img width = "468" height="60" src="http://www.shoggoth.net/phpAds/phpads.php3?n=cthulhu">

    If you see a makeawish foundation or VA banner then its not showing the cthulhu banner.. anyway anyone know of to do what I'm asking with phpads?

    Matt "Trollboy" Wiseman www.shoggoth.net/trollboy/trollboy.jpg Trollboyshoggoth.net "I wish the world had one throat!!" -Al Bundy