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: Wed Feb 14 2001 - 02:47:09 CST

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

    php-general Digest 14 Feb 2001 08:47:09 -0000 Issue 511

    Topics (messages 39486 through 39600):

    empty form field => pgsql NULL gracefully how?
            39486 by: Britton

    Newbie -- tutorial exercises reveal too much -- pdf download not "saveable"
            39487 by: Info
            39546 by: David Robley

    php and xml
            39488 by: Jan Grafström
            39496 by: Chris Lee
            39502 by: Nathan Cassano

    converting a date to a string format
            39489 by: Don
            39490 by: Egon Schmid (.vacation)
            39493 by: Chris Lee
            39497 by: Philip Olson
            39532 by: Jared Howard

    Using a variable in a variable
            39491 by: Brandon Orther
            39492 by: John Huggins
            39494 by: Chris Lee
            39495 by: Sam Masiello
            39503 by: Alexander Wagner
            39558 by: Maxim Maletsky

    Piping/parsing Apache logs though PHP?
            39498 by: Michael McGlothlin
            39500 by: Kurth Bemis
            39501 by: Thor M. Steindorsson
            39504 by: Balak, Frank

    Re: Would Like to know
            39499 by: Chris Lee
            39508 by: Sam Leibowitz
            39557 by: Maxim Maletsky

    Re: parse speed vs require speed
            39505 by: Chris Lee
            39555 by: Maxim Maletsky

    Re: Your Opinion?! PHP4 coding style - Comment and Splitting source code
            39506 by: Sam Leibowitz
            39509 by: Mark Maggelet

    XML parsing problems..
            39507 by: Michael McGlothlin

    INSERT into MSSQL Server
            39510 by: Conover, Ryan
            39511 by: Peter Houchin
            39513 by: Michael McGlothlin

    installing MySQL with PHP4.0.3pl1
            39512 by: Paulson, Joseph V. \"Jay\"

    Re: [PHP-DB] installing MySQL with PHP4.0.3pl1
            39514 by: Thor M. Steindorsson
            39516 by: Darryl Friesen

    Re: SELECT statement
            39515 by: Peter Houchin
            39517 by: Michael McGlothlin

    Re:LOCK TABLES x COMMIT/ROLLBACK
            39518 by: Phil Daintree
            39548 by: Christian Dechery

    URGENT! Regarding file writing
            39519 by: whatever
            39521 by: Michael McGlothlin
            39523 by: whatever
            39525 by: Michael McGlothlin

    could anyone please help me with this date coding?
            39520 by: Charles Mulford
            39540 by: David Robley

    Upload form
            39522 by: Brandon Orther
            39538 by: jason cox
            39541 by: Brandon Orther
            39559 by: Maxim Maletsky

    file upload temp file is and isn't there
            39524 by: Aaron D. Turner
            39528 by: Michael McGlothlin
            39531 by: Aaron D. Turner
            39539 by: jason cox
            39543 by: Aaron D. Turner
            39574 by: Aaron D. Turner

    Still can't talk to the Oracle
            39526 by: Kristofer Widholm

    session encode
            39527 by: Peter Houchin
            39529 by: Michael McGlothlin
            39536 by: Peter Houchin

    Re: Here you have, ;o)
            39530 by: Josh G

    Going backwards with sessions.
            39533 by: Doug Budny
            39534 by: Michael McGlothlin
            39535 by: Chris Lee
            39537 by: Chris Lee
            39545 by: Doug Budny

    Re: GD library
            39542 by: David Robley
            39544 by: Michael McGlothlin

    Re: [PHP-WIN] INSERT into MSSQL Server
            39547 by: Frank M. Kromann

    mysql_error() not really helping
            39549 by: Christian Dechery
            39561 by: scottrus.ipass.net
            39569 by: David Robley
            39573 by: David Robley

    Fast Template woes
            39550 by: Joseph H Blythe

    Re: rename?
            39551 by: Maxim Maletsky

    PHP 4 on RedHat 7
            39552 by: Mike Tuller
            39560 by: scottrus.ipass.net
            39578 by: Michael Stearne
            39581 by: scottrus.ipass.net

    Re: hidden form field.
            39553 by: Maxim Maletsky

    Re: Include
            39554 by: Maxim Maletsky
            39582 by: Ankur Verma

    Re: ereg_replace
            39556 by: Maxim Maletsky

    Re: Bad Practices
            39562 by: Mark Charette
            39599 by: Rick Hodger

    Short tags - proper name?
            39563 by: Toby Butzon

    Random String of n Length
            39564 by: Jonathan Sharp
            39566 by: Randall Blaine Goguen

    Re: passthru environment variables
            39565 by: Rich Puchalsky

    is the list still up?
            39567 by: LDL Enterprise
            39568 by: LDL Enterprise
            39571 by: Toby Butzon

    ezmlm response (fwd)
            39570 by: John Monfort

    Line Break
            39572 by: Deependra B. Tandukar
            39575 by: David Robley
            39576 by: John Monfort

    re:linebreak
            39577 by: Deependra B. Tandukar
            39584 by: Steve Werby

    Re: Any image drawing tutorials anywhere?
            39579 by: Ankur Verma

    Re: Cookies
            39580 by: Ankur Verma

    mail not sending to multiple address
            39583 by: Peter Houchin

    about session
            39585 by: JW
            39586 by: Maxim Maletsky
            39588 by: Ankur Verma
            39592 by: JW
            39593 by: JW
            39597 by: Maxim Maletsky

    Installation on win32
            39587 by: Sean Kennedy
            39591 by: Julie Meloni
            39595 by: Maxim Maletsky

    SOAP
            39589 by: Christopher Cheng
            39590 by: Christopher Cheng

    Re:[PHP] Installation on win32
            39594 by: Sean Kennedy
            39598 by: Maxim Maletsky

    Want alumini software
            39596 by: Ripal Kadakia

    strange behavior of mysql & php
            39600 by: Altaf Shaikh

    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:


    Having nice simple things like

    INSERT INTO testtab2
                    VALUES ( upper('$symbol'), '$two_liner', '$href',
                             '$full_desc', '$submitter_name',
                             '$submitter_email', CURRENT_TIMESTAMP )

    I hate to muck them up with a bunch of tests for empty vars, which then
    need to be replaced with NULL and have the single quotes ommited, etc. if
    there is some more graceful way?

    Britton Kerin
    __
    GNU GPL: "The Source will be with you... always."

    attached mail follows:


    Hi,

    I don't have adequate space to have PHP and MySQL on my local machine. Yes, need a new and better box. So, used my net site for some exercises. That is not satisfactory because I must reveal password and such in plain text to execute a php/mysql script.

    Maybe only a resource poor newbie could have this problem -- means I need to have some hurry up instruction on getting those secret words hidden -- or I should not continue with exercises and tutor. There is nothing on my site or in my database that is sensitive in any way -- but don't want to find it all gone or altered.

    Also, I can download some manuals, but I cannot save the .pdf variety or find the temp file to save it. Any suggestion? I'm on WIN95 with a Toshiba Laptop and do have the adobe acrobat reader and MS Office.

    Is there a tutorial on this "include" subject that I can find and use? I'm on digest mode so please CC or direct to me.

    Thanks,

    Lonnie C. Dugan
    http://www.eprofitsys.com/

    attached mail follows:


    On Wed, 14 Feb 2001 07:20, Info wrote:
    > Hi,
    >
    > I don't have adequate space to have PHP and MySQL on my local machine.
    > Yes, need a new and better box. So, used my net site for some
    > exercises. That is not satisfactory because I must reveal password and
    > such in plain text to execute a php/mysql script.
    >
    > Maybe only a resource poor newbie could have this problem -- means I
    > need to have some hurry up instruction on getting those secret words
    > hidden -- or I should not continue with exercises and tutor. There is
    > nothing on my site or in my database that is sensitive in any way --
    > but don't want to find it all gone or altered.
    >
    > Also, I can download some manuals, but I cannot save the .pdf variety
    > or find the temp file to save it. Any suggestion? I'm on WIN95 with a
    > Toshiba Laptop and do have the adobe acrobat reader and MS Office.
    >
    > Is there a tutorial on this "include" subject that I can find and use?
    > I'm on digest mode so please CC or direct to me.
    >

    There's not much to it - the docs are failry explanatory. Just remeber
    that when you include or require a file, the contents of that file are
    'placed' in the current file at the location of the function call. If
    there is PHP syntax in the included file, it must have PHP start/finish
    tags (<?php ?>) around it for the PHP to be run.

    You can include a file from pretty much anywhere, including especially
    outsite your webserver document root. So for some security, put your
    passwords etc outside the web root. Also, see the php.ini file if you
    have access to it for how to define a search path for include files.

    As for downloading the manuals, try right clicking and choosing the 'Save
    Link as' function - or however it's called under Exploder.

    -- 
    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! I have this php: $message = ereg_replace("\r","", $message); $message = "<med>$message</med><nam>$name</nam><adr>$adress</adr><tel>$tele</tel>"; $fp = fopen (basename($PHP_SELF) . ".comment", "a"); fwrite ($fp, $message); fclose ($fp); There must be something wrong in first line beacause the value of message is not writed. I also want the output to contain a <customer nr ?>in beginning.

    Thanks for any help Jan Grafstrom

    attached mail follows:


    <?php

    fwrite(fopen("$PHP_SELF.xml", 'w'), "<message>testing testing</message>"); ?>

    works for me on my linux box. have you checked your permisions ?

    --
    

    Chris Lee Mediawaveonline.com

    em. leemediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    ""Jan Grafström"" <jan.grafstromswipnet.se> wrote in message news:96c6t7$52l$1toye.p.sourceforge.net... > Hi! > I have this php: > $message = ereg_replace("\r","", $message); > $message = > "<med>$message</med><nam>$name</nam><adr>$adress</adr><tel>$tele</tel>"; > $fp = fopen (basename($PHP_SELF) . ".comment", "a"); > fwrite ($fp, $message); > fclose ($fp); > There must be something wrong in first line beacause the value of message is > not writed. > I also want the output to contain a <customer nr ?>in beginning. > > Thanks for any help > Jan Grafstrom > > > > -- > 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:


    Steve, Did you take a look at the raw data returned by the fsockopen file pointer. There may be some http headers that are tripping up the xml parser.

    -----Original Message----- From: Steve Haemelinck [mailto:steve.haemelinckpandora.be] Sent: Tuesday, February 13, 2001 12:07 PM To: PHP Mailing Listl (E-mail) Subject: [PHP] XML Parsing through Proxy

    Hi Anybody got an idea?

    I am sitting behind a proxy and I want to able to parse an XML. So I have to use fsockopen() to get through my firewall and get the page. So far, everything goes wel, but I am not able to parse the file, because I think it is not in XML format if I use "GET http://.... " Does anyone has an idea how I can solve this?

    My code so far (bits and pieces of anywhere :) )

    Steve

    <?php

    ######################################################### # Parse XML through Proxy # #########################################################

    // Define Variables

    # Proxy Settings $proxy_ip="proxy.server.be"; $proxy_port=8080;

    # XML Mapping $map_array = array( "NASDAQAMEX-DOT-COM" => "HEADER_TAG", "ISSUE-NAME" => "STOCK_NAME", "LAST-SALE-PRICE" => "LAST_SALE", "PREVIOUS-CLOSE-PRICE" => "PREVIOUS_SALE", "NET-CHANGE-PRICE" => "CHANGE", "NET-CHANGE-PCT" => "CHANGE_PCT", "TODAYS-HIGH-PRICE" => "TODAYS_HIGH", "TODAYS-LOW-PRICE" => "TODAYS_LOW", );

    # XML File to Parse $xmlFile_Location="http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&sy mbol=NETA";

    // Functions

    # StartElement Of Parser function startElement($parser, $name, $attrs=''){ global $map_array, $temp, $current_tag;

    $current_tag = $name; if ($format = $map_array[$name]){ switch($name){ case 'NASDAQAMEX-DOT-COM': //echo $HTTP_GET_VARS['ticker']; break; default: break; } } }

    # EndElement Of Parser function endElement($parser, $name, $attrs=''){ global $map_array, $temp, $current_tag;

    if ($format = $map_array[$name]){ switch($name){ case 'NASDAQAMEX-DOT-COM': return_page($temp); $temp = ''; break; default: break; } } }

    # Process the Data between XML-Tags function characterData($parser, $data){ global $current_tag, $temp, $catID;

    switch($current_tag){ case 'ISSUE-NAME': $temp['STOCK_NAME'] = $data; $current_tag = ''; break; case 'LAST-SALE-PRICE': $temp['LAST_SALE'] = $data; $current_tag = ''; break; default: break; } }

    # Create the XML Parser and set options $type="UTF-8"; $xml_parser = xml_parser_create($type); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_set_element_handler($xml_parser, 'startElement','endElement'); xml_set_character_data_handler($xml_parser, 'characterData');

    /* Open a connection through Proxy with Nasdaq and start parsing */ $sockPointer = fsockopen($proxy_ip,$proxy_port, $errNo, $errStr,30); //Connect to Proxy

    if( !$sockPointer ){ echo "$errStr Proxy not Available \n\n"; exit(); } else{ fputs($sockPointer,"GET $xmlFile_Location/ <?xml version=\"1.0\" ?>\n\n"); while (!feof($sockPointer)){ $Data = fgets($sockPointer, 100000); $tag= "<?xml version=\"1.0\" ?>\n\n"; if( eregi("xml version",$Data) ){ $Parse=1; } if($Parse==1){ if (!($Data = utf8_encode($Data))){ echo 'ERROR'."\n"; } if (!xml_parse($xml_parser, $Data, feof($sockPointer))){ die(sprintf( "XML error: %s at line %d\n\n", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } } } fclose($sockPointer); }

    xml_parser_free($xml_parser);

    ?>

    attached mail follows:


    Does someone have a snippet of code that retrieves today's date, subtracts 14 days and converts the result to a string in the form "YYYYMMDD"?

    If possible, please reply to my email.

    Thanks, Don

    attached mail follows:


    Don wrote: > > Does someone have a snippet of code that retrieves today's date, > subtracts 14 days and converts the result to a string in the form > "YYYYMMDD"?

    See http://php.net/mktime and http://php.net/date

    -Egon

    -- 
    SIX Offene Systeme GmbH       ˇ        Stuttgart  -  Berlin 
    Sielminger Straße 63   ˇ    D-70771 Leinfelden-Echterdingen
    Fon +49 711 9909164 ˇ Fax +49 711 9909199 http://www.six.de
    Besuchen Sie uns auf der CeBIT 2001,  Halle 6,  Stand F62/4
    

    attached mail follows:


    $date = getdate(); $date['mday'] -= 14;

    $date = getdate(mktime($date['hours'], $date['minutes'], $date['seconds'], $date['mon'], $date['mday'], $date['year'])); echo $date['year']; echo $date['mon']; echo $date['mday'];

    --
    

    Chris Lee Mediawaveonline.com

    em. leemediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    "Don" <donlclcan.com> wrote in message news:3A899FC1.9FDBA362lclcan.com... > Does someone have a snippet of code that retrieves today's date, > subtracts 14 days and converts the result to a string in the form > "YYYYMMDD"? > > If possible, please reply to my email. > > Thanks, > Don > > > -- > 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 something like :

    function pastDate($days,$format='Ymd') { $secs = ( $days * 86400 );

    return date( $format,time()-$secs ); }

    print pastDate(14);

    Regards,

    Philip Olson http://www.cornado.com/

    On Tue, 13 Feb 2001, Don wrote:

    > Does someone have a snippet of code that retrieves today's date, > subtracts 14 days and converts the result to a string in the form > "YYYYMMDD"? > > If possible, please reply to my email. > > Thanks, > Don > > > -- > 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:


    date("Ymd", mktime(0,0,0,date("d"),date("m")-14,date("Y")));

    At 03:57 PM 2/13/01 -0500, Don wrote: >Does someone have a snippet of code that retrieves today's date, >subtracts 14 days and converts the result to a string in the form >"YYYYMMDD"? > >If possible, please reply to my email. > >Thanks, >Don > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hello,

    Is there a way to use a variable in the middle of a variable?

    ## START EXAMPLE ##

    <?

    $test1text = ""; $test2text = ""; $test3text = "";

    $count = 3;

    $i = 0; do{

    $test$itext = "$i";

    }while($i < $count);

    ?>

    ## END EXAMPLE ##

    $test($i)text = "$i"; ^^----------------------I want this variable to get bigger while the loop is going but I can't figure out how to make the $test#text variable to read it correctly.

    I hope someone can understand what I am saying.

    Thank you,

    -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandonwebintellects.com 800-994-6364 www.webintellects.com --------------------------------------------

    attached mail follows:


    Have a look at the $$ syntax as opposed to just $.

    > -----Original Message----- > From: Brandon Orther [mailto:brandonwebintellects.com] > Sent: Tuesday, February 13, 2001 4:07 PM > To: PHP User Group > Subject: [PHP] Using a variable in a variable > > > Hello, > > Is there a way to use a variable in the middle of a variable? > > ## START EXAMPLE ## > > <? > > $test1text = ""; > $test2text = ""; > $test3text = ""; > > $count = 3; > > $i = 0; > do{ > > $test$itext = "$i"; > > }while($i < $count); > > ?> > > ## END EXAMPLE ## > > > $test($i)text = "$i"; > ^^----------------------I want this variable to get bigger while the > loop is going but I can't figure out how to make the $test#text > variable to > read it correctly. > > I hope someone can understand what I am saying. > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandonwebintellects.com > 800-994-6364 > www.webintellects.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:


    <?php

    $test1text = 'chris'; $test2text = 'ryan'; $test3text = 'lee';

    $count = 3;

    $tmp = "test". $count ."text";

    echo $$tmp; ?>

    your better using arrays if you can though.

    --
    

    Chris Lee Mediawaveonline.com

    em. leemediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    ""Brandon Orther"" <brandonwebintellects.com> wrote in message news:CKEMJEADMOCEHPHJKLPACENACGAA.brandonwebintellects.com... > Hello, > > Is there a way to use a variable in the middle of a variable? > > ## START EXAMPLE ## > > <? > > $test1text = ""; > $test2text = ""; > $test3text = ""; > > $count = 3; > > $i = 0; > do{ > > $test$itext = "$i"; > > }while($i < $count); > > ?> > > ## END EXAMPLE ## > > > $test($i)text = "$i"; > ^^----------------------I want this variable to get bigger while the > loop is going but I can't figure out how to make the $test#text variable to > read it correctly. > > I hope someone can understand what I am saying. > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandonwebintellects.com > 800-994-6364 > www.webintellects.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:


    Why not just use an array?

    $testtext[1] = "value1" ; $testtext[2] = "value2" ; etc..

    -- 
    Sam Masiello
    Systems Analyst
    Chek.Com
    (716) 853-1362 x289
    smasiellochekinc.com
    

    On 2001.02.13 16:06:54 -0500 Brandon Orther wrote: > Hello, > > Is there a way to use a variable in the middle of a variable? > > ## START EXAMPLE ## > > <? > > $test1text = ""; > $test2text = ""; > $test3text = ""; > > $count = 3; > > $i = 0; > do{ > > $test$itext = "$i"; > > }while($i < $count); > > ?> > > ## END EXAMPLE ## > > > $test($i)text = "$i"; > ^^----------------------I want this variable to get bigger while > the > loop is going but I can't figure out how to make the $test#text variable > to > read it correctly. > > I hope someone can understand what I am saying. > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandonwebintellects.com > 800-994-6364 > www.webintellects.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:


    Brandon Orther wrote: > $test($i)text = "$i"; > ^^----------------------I want this variable to get bigger

    Try this: $test{$i}text = $i;

    (I'm not sure if this actually works)

    or

    $varname = 'test'.$i.'text'; $$varname = $i;

    regards Wagner

    -- 
    Three may keep a secret, if two of them are dead.
    

    attached mail follows:


    Often people try to do that ... but I also know that, array variables were invented exactly for doing this kind of jobs.

    Try to implement Arrays more often.. www.php.net/array

    Cheers, Maxim Maletsky

    -----Original Message----- From: Brandon Orther [mailto:brandonwebintellects.com] Sent: Wednesday, February 14, 2001 6:07 AM To: PHP User Group Subject: [PHP] Using a variable in a variable

    Hello,

    Is there a way to use a variable in the middle of a variable?

    ## START EXAMPLE ##

    <?

    $test1text = ""; $test2text = ""; $test3text = "";

    $count = 3;

    $i = 0; do{

    $test$itext = "$i";

    }while($i < $count);

    ?>

    ## END EXAMPLE ##

    $test($i)text = "$i"; ^^----------------------I want this variable to get bigger while the loop is going but I can't figure out how to make the $test#text variable to read it correctly.

    I hope someone can understand what I am saying.

    Thank you,

    -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandonwebintellects.com 800-994-6364 www.webintellects.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:


    I'd like to pipe and parse my Apache logs through PHP into a MySQL db. Is there a way to do this automaticlly for each entry and would that cause a major performance loss to the web server? If not does anyone know the best way to parse the server log? I'd like to do somerthing like move the server log to a temp file, Restart Apache so the logs will keep being written, and parse the log and save it's values in a database but this has the obvious problem of what happens to PHP when Apache is restarted in the manner the Apache logs specify. Any suggestions? Thanks.

    attached mail follows:


    At 04:17 PM 2/13/2001, Michael McGlothlin wrote:

    can i ask why you're doing this - it seems like a waste of resources to me.

    ~kurth

    >I'd like to pipe and parse my Apache logs through PHP into a MySQL db. Is >there a way to do this automaticlly for each entry and would that cause a >major performance loss to the web server? If not does anyone know the best >way to parse the server log? I'd like to do somerthing like move the >server log to a temp file, Restart Apache so the logs will keep being >written, and parse the log and save it's values in a database but this has >the obvious problem of what happens to PHP when Apache is restarted in the >manner the Apache logs specify. Any suggestions? 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:


    try this script:

    http://www.wokzilla.com/usage/usage.php3

    -----Original Message----- From: Michael McGlothlin [mailto:mmcglothlinmail.travel-italy.com] Sent: Tuesday, February 13, 2001 1:17 PM To: php-generallists.php.net Subject: [PHP] Piping/parsing Apache logs though PHP?

    I'd like to pipe and parse my Apache logs through PHP into a MySQL db. Is there a way to do this automaticlly for each entry and would that cause a major performance loss to the web server? If not does anyone know the best way to parse the server log? I'd like to do somerthing like move the server log to a temp file, Restart Apache so the logs will keep being written, and parse the log and save it's values in a database but this has the obvious problem of what happens to PHP when Apache is restarted in the manner the Apache logs specify. Any suggestions? Thanks.

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

    attached mail follows:


    I don't know if this will do it for you, but try mod_log_mysql. This module logs all request to tables of your definition. It doesn't do the error log though.

    Frank ------------------------------ Franklin J. Balak Jr. Quality Assurance Data Analyst Brown Printing Company Waseca Division Waseca, MN. 56093 Voice: 507-835-0253 Fax: 507-835-0293 ------------------------------

    -----Original Message----- From: Michael McGlothlin [mailto:mmcglothlinmail.travel-italy.com] Sent: Tuesday, February 13, 2001 15:17 To: php-generallists.php.net Subject: [PHP] Piping/parsing Apache logs though PHP?

    I'd like to pipe and parse my Apache logs through PHP into a MySQL db. Is there a way to do this automaticlly for each entry and would that cause a major performance loss to the web server? If not does anyone know the best way to parse the server log? I'd like to do somerthing like move the server log to a temp file, Restart Apache so the logs will keep being written, and parse the log and save it's values in a database but this has the obvious problem of what happens to PHP when Apache is restarted in the manner the Apache logs specify. Any suggestions? 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:


    <?php

    fwrite(fopen("/tmp/somefile.txt", 'a'), $HTTP_USER_AGENT);

    ?>

    --
    

    Chris Lee Mediawaveonline.com

    em. leemediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    ""Barry Fawthrop"" <barryttienterprises.org> wrote in message news:00ad01c095fc$d6865940$bdad2041tampabay.rr.com... Can PHP direct the output to a file eg send the HTTP_USER_AGENT information to a file ??

    Barry

    attached mail follows:


    > Can PHP direct the output to a file > eg send the HTTP_USER_AGENT information to a file ??

    Sure. Read the documentation for fopen(), flock(), and fwrite(). Then fwrite() out $HTTP_SERVER_VARS["HTTP_USER_AGENT"].

    Sam

    attached mail follows:


    If you run it from command line then yes. If you instead doing it from your browser then this is where it will be sent.

    You could use a $variable .= 'staff' system, so before an echo $variable you can also precreate a file.

    Cheers, Maxim Maletsky

    -----Original Message----- From: Barry Fawthrop [mailto:barryttienterprises.org] Sent: Wednesday, February 14, 2001 5:38 AM To: php-generallists.php.net Subject: [PHP] Would Like to know

    Can PHP direct the output to a file eg send the HTTP_USER_AGENT information to a file ??

    Barry

    attached mail follows:


    Accoring to Microsofts book 'Rapid Development' (dont knock it, excellent book) says the average human can not keep track of more then 500 lines of code at once, I beleive it. I break my code up into sections smaller then 500 lines, keeps the code better. load time because files are distributed is minimal. Everything comes down to cost, the little it would cost to add more ram/cpu to compinsate for this *minor* overhead would be 100x cheaper then extra time spent in development due to huge files being confusing...

    --
    

    Chris Lee Mediawaveonline.com

    em. leemediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    "Soma Interesting" <dfuncttelus.net> wrote in message news:5.0.2.1.0.20010213120555.00ad8f20pop.telus.net... > > I'm wondering if I should organize the functions for my project into a > single large file and have only one include/require, or break the code out > into separate function library files and use a number of includes/requires. > > With a single large function library I'm guessing PHP would parse this > every time a page is called. So I could loose some overhead by separating > my database functions into one file, my administration functions into > another, my presentation functions into another, etc... then only including > the function pages necessary - likely cutting the amount of code being > parsed in half for any given page. > > But then I begin wondering about the speed of making a require() to each of > these files. maybe three to five requires per page. > > Lastly, what about caching or compiling the function libraries so they're > not being parsed each time? > > Any advice on this? > > > - - - - - - - > - - - - > WARNING: Some experts believe that use of any keyboard may cause > serious injury. Consult Users Guide. > dfuncttelus.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:


    My advise to you is to care about the portability of software rather then it's speed. include() and require() are not too painful, not too slow. You can easily have 10 of them and by that your page will be slower by only few dozens of milliseconds. However doing so you could reuse some parts of your code having your software more dynamic.

    Cheers, Maxim Maletsky

    -----Original Message----- From: Soma Interesting [mailto:dfuncttelus.net] Sent: Wednesday, February 14, 2001 5:16 AM To: php-generallists.php.net Subject: [PHP] parse speed vs require speed

    I'm wondering if I should organize the functions for my project into a single large file and have only one include/require, or break the code out into separate function library files and use a number of includes/requires.

    With a single large function library I'm guessing PHP would parse this every time a page is called. So I could loose some overhead by separating my database functions into one file, my administration functions into another, my presentation functions into another, etc... then only including the function pages necessary - likely cutting the amount of code being parsed in half for any given page.

    But then I begin wondering about the speed of making a require() to each of these files. maybe three to five requires per page.

    Lastly, what about caching or compiling the function libraries so they're not being parsed each time?

    Any advice on this?

    - - - - - - - - - - - WARNING: Some experts believe that use of any keyboard may cause serious injury. Consult Users Guide. dfuncttelus.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:


    My personal opinions:

    The effect of comments in code parsing speed is negligable. Never hesitate to put in a comment because you think it's going to slow down the procedure. If your speed requirements were that down to the wire, you should have gone with a compiled app anyway. Or a faster server. Or anything other than not putting in comments.

    That said, it's rare that I've written 2 lines of comments for every 1 line of code, and I tend to be fairly rigorous (on good days, anyway) about commenting completely. You may want to consider putting some of those comments in seperate design documentation.

    Finally, I tend to break up my source code into several files, usually around the class definitions (I like object orientation). I usually wind up with one file for the database interface, a few files containing class definitions corresponding to the business logic, and an included fragment for each block of HTML which needs to interact heavily with the PHP (for example, pre-populated form fields). This is purely for ease-of-maintenance.

    Where you can, you should replace calls to include() with calls to require(), because require() is a bit faster. The catch is that you can't place require() calls in conditional blocks, so:

    if ($something) include($foo); // this is okay if ($something) require($bar); // this is not.

    Hope this helps, Sam

    > -----Original Message----- > From: Yasuo Ohgaki [mailto:yohgakihotmail.com] > Sent: Tuesday, February 13, 2001 5:40 AM > To: php-generallists.php.net > Subject: Your Opinion?! PHP4 coding style - Comment and Splitting > source code > > > Hello all. > > I'm running PHP4 as Apache module under Linux. I would like to know good > script coding style. > > I should not write long comments in code or not? With Zend Cache, comments > should not matter. How about w/o Zend Cache? If I want to write long > comments, should I get Zend Cache? Or can I ignore the overheads? For > example, 50KB of comments for 25KB code - total 75KB script size. (Not > considering disk access/load overhead. I would like to know PHP4's > overheads) > > Whether I should split source code so that PHP4 can parse/compile > as little > code as possible or not. What is the best coding style you suggest? For > example, 200KB script containing all > code vs. split into several source files and load 100KB on average when it > executed. > > What is your opinion? > > Thanks in advance. > > -- > Yasuo Ohgaki > >

    attached mail follows:


    On Tue, 13 Feb 2001 16:48:10 -0500, Sam Leibowitz (sleibowitzbtcwcu.org) wrote: >My personal opinions: > >The effect of comments in code parsing speed is negligable. Never >hesitate >to put in a comment because you think it's going to slow down the >procedure. >If your speed requirements were that down to the wire, you should >have gone >with a compiled app anyway. Or a faster server. Or anything other >than not >putting in comments. > >That said, it's rare that I've written 2 lines of comments for every >1 line >of code, and I tend to be fairly rigorous (on good days, anyway) >about >commenting completely. You may want to consider putting some of >those >comments in seperate design documentation. > >Finally, I tend to break up my source code into several files, >usually >around the class definitions (I like object orientation). I usually >wind up >with one file for the database interface, a few files containing >class >definitions corresponding to the business logic, and an included >fragment >for each block of HTML which needs to interact heavily with the PHP >(for >example, pre-populated form fields). This is purely for >ease-of-maintenance. > >Where you can, you should replace calls to include() with calls to >require(), because require() is a bit faster. The catch is that you >can't >place require() calls in conditional blocks, so: > > if ($something) include($foo); // this is okay > if ($something) require($bar); // this is not.

    if ($something) { include($foo); } // this is okay if ($something) include($foo); // this is not.

    attached mail follows:


    I didn't see any responses to this the other day when I asked so this time I'll include source.. just cutting and pasting so hopefully nothing gets clobbered..

    When I parse this lil bit of raw data it parses properly. You can trace it and see that it opens and closes the tags properly and that it writes the $this->dom variable properly in the parsers close_tag () function. However when you return the $this->dom value afterwards the variables previous value is returned rather than the current value. Any ideas what I am doing wrong? Thanks.

    <? //index file

    include_once ( 'common.inc' ); // does all my settings and includes.. in this case includes the below classes

    $raw = "<HTML><HEAD><TITLE>Howdy!</TITLE></HEAD>"; $raw .= "<BODY BGCOLOR='RED'>My dog is cute. My cat is cute.</BODY></HTML>";

    $xml_parser = new xml_parser; $document = $xml_parser->parse ( $raw );

    print "<PRE>"; print_r ( $document ); print "</PRE>";

    ?>

    <? // classes file..

    class xml_parser { var $encoding; var $parser;

    function xml_parser ( $encoding = 'ISO-8859-1' ) { $this->encoding = $encoding;

    if ( $this->parser = xml_parser_create () ) { xml_set_object ( $this->parser, $this ); xml_set_element_handler ( $this->parser, "tag_open", "tag_close" ); xml_set_character_data_handler ( $this->parser, "cdata"); } }

    function parse ( $data ) { xml_parse ( $this->parser, $data ); }

    function tag_open ( $parser, $tag, $attributes ) { foreach ( $attributes as $key => $value ) { $attrib_str .= ", $key=$value"; }

    print "<UL>\n"; print "<LI>Open: $tag$attrib_str</LI>\n"; }

    function cdata ( $parser, $cdata ) { print "<LI>Data: $cdata</LI>\n"; }

    function tag_close ( $parser, $tag ) { print "<LI>Close: $tag</LI>\n"; print "</UL>\n"; } }

    class xml_parser { var $encoding; var $parser; var $opened_tags = array (); var $dom;

    function xml_parser ( $encoding = 'ISO-8859-1' ) { $this->encoding = $encoding;

    $this->create (); $this->configure (); }

    function create () { $this->parser = xml_parser_create ( $this->encoding ); }

    function configure () { xml_set_object ( $this->parser, $this ); xml_set_element_handler ( $this->parser, "open_tag", "close_tag" ); xml_set_character_data_handler ( $this->parser, "cdata" ); }

    function parse ( $data ) { xml_parse ( $this->parser, $data );

    return $this->dom; }

    function open_tag ( $parser, $tag_type, $attributes ) { $tag = new xml_tag ( $tag_type, $attributes ); $this->opened_tags[] = $tag; }

    function close_tag ( $parser, $tag_type ) { $tag = array_pop ( $this->opened_tags ); $mother_tag = array_pop ( $this->opened_tags );

    if ( $mother_tag ) { $mother_tag->add_tag ( $tag ); $this->opened_tags[] = $mother_tag; } elseif ( $tag ) { $this->dom = $tag;

    function cdata ( $parser, $cdata ) { $this->open_tag ( $parser, 'cdata', $cdata ); $this->close_tag ( $parser, 'cdata' ); } }

    class xml_tag { var $tag; var $arguments; var $contents = array ();

    function xml_tag ( $tag, $arguments = array() ) { // Name of the tag. $this->tag = $tag;

    // Array of argument/value pairs. $this->arguments = $arguments; }

    function add_tag ( $tag ) { $this->contents[] = $tag; } }

    ?>

    attached mail follows:


    I trying to insert some data into a MSSQL Server 7.0 database from Php. Some of the data has various characters ', > . How can I tell SQL Server to treat these characters as part of the input.

    Ryan Conover

    attached mail follows:


    in mysql i'd treat them as a char or varchar i would assume it would be the same in MSSQL

    -----Original Message----- From: Conover, Ryan [mailto:Rconoveramericanbridge.net] Sent: Wednesday, February 14, 2001 9:32 AM To: php-generallists.php.net; php-windowslists.php.net Subject: [PHP] INSERT into MSSQL Server

    I trying to insert some data into a MSSQL Server 7.0 database from Php. Some of the data has various characters ', > . How can I tell SQL Server to treat these characters as part of the input.

    Ryan Conover

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


    Have you tried addslashes () on the input lines before the insert?

    Conover, Ryan wrote:

    > I trying to insert some data into a MSSQL Server 7.0 database from Php. Some > of the data has various characters ', > . How can I tell SQL Server to > treat these characters as part of the input. > > Ryan Conover >

    attached mail follows:


    Hello everyone- I'm trying to get MySQL to work with php, however I'm running php on a WinNT box and I was wondering if I needed to install MySQL in a specific location on the hard drive? The reason I as is that when I try to connect to a database I create in MySQL in php it doesn't find any database. I'm totally lost on this and don't have a clue as what to do. Any help will be greatly appreciated. Regards, Jay

    attached mail follows:


    a rule of thumb with windows boxes: always install software in the default location :)

    in this case that would be c:\mysql

    cheers, Thor.

    -----Original Message----- From: Paulson, Joseph V. "Jay" [mailto:jay.paulsonviatel.com] Sent: Tuesday, February 13, 2001 2:19 PM To: PHP-DB-LIST; php-generallists.php.net Subject: [PHP-DB] installing MySQL with PHP4.0.3pl1

    Hello everyone- I'm trying to get MySQL to work with php, however I'm running php on a WinNT box and I was wondering if I needed to install MySQL in a specific location on the hard drive? The reason I as is that when I try to connect to a database I create in MySQL in php it doesn't find any database. I'm totally lost on this and don't have a clue as what to do. Any help will be greatly appreciated. Regards, Jay

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

    attached mail follows:


    > I'm trying to get MySQL to work with php, however I'm running php on a WinNT > box and I was wondering if I needed to install MySQL in a specific location > on the hard drive? The reason I as is that when I try to connect to a > database I create in MySQL in php it doesn't find any database. I'm totally > lost on this and don't have a clue as what to do. Any help will be greatly > appreciated.

    If you pick a directory other than the default, I think you need to create a file called my.cnf in the root of C: indicating where mysql is. Mine looks like this:

    [mysqld] basedir = e:/mysql/

    I needed to do this before mysqld would even start.

    - Darryl

    ---------------------------------------------------------------------- Darryl Friesen, B.Sc., Programmer/Analyst Darryl.Friesenusask.ca Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan ---------------------------------------------------------------------- "Go not to the Elves for counsel, for they will say both no and yes"

    attached mail follows:


    I've tried this but mysql_error() doesn't give me any errors, i tried my sql line at the command line with success here is my code if some one could have a look at it and give some suggestions as to how i can get the email ...

    Thanks again

    Peter

    <? session_start(); if ($REQUEST_METHOD=='POST') { header('Expires: ' . gmdate("D, d M Y H:i:s", time()+1000) . ' GMT'); header('Cache-Control: Private'); } session_register('user'); session_register('pass'); session_register('email'); $session = session_id(); $userid = '$user';

    ?>

    <html> <head> <title>eRentals</title> </head>

    <body> <? // connect to data base $open = mysql_connect("localhost", "root", "password") or die ("<font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#006699\">Unable to connect to server.</font>"); mysql_select_db("rentdb") or die ("<font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#006699\">Unable to select database.</font>");

    // select id & email from table matching the user name and password inputted

    $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'"; $result = mysql_query($sql) or die (print mysql_error());

    // if unsuccessfull do this

    $num = mysql_numrows($result) or die ("

    <font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#006699\">You're not authorized to be here. If you feel you have recieved this<BR> message in error, please contact the <a href=\"mailto:peterhv.com\">webmaster</a></font>

    "); // if successful then do this if ($num == 1) {

    include "quote2.php"; //has a hidden field referencing the user & the email address .. user shows up but again email does not }

    ?>

    </body> </html> -----Original Message----- From: Philip Olson [mailto:philipcornado.com] Sent: Tuesday, February 13, 2001 4:59 PM To: Peter Houchin Cc: PHP MAIL GROUP Subject: RE: [PHP] SELECT statement

    A possible way to find out :

    $result = mysql_query($sql) or die(mysql_error());

    Does it say anything? mysql_error() is your friend, it can be printed anywhere within the script and will print the last mysql error. So perhaps :

    print mysql_error();

    Right before the query or ...

    Regards,

    Philip

    On Tue, 13 Feb 2001, Peter Houchin wrote:

    > > > > > ok I've changed my code to > > $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'"; > but still no joy can any one suggest why? > > (& Yes email is a field in the table) > > Peter > > > Hi, > > > > Can you have a SELECT statement (using mysql) that goes something like > > > > $sql="SELECT id && email FROM table WHERE user='$user' and pass='$pass'"; > > > -- > 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 or print mysql_error () rather than or die ( print mysql_error () )?

    Peter Houchin wrote:

    > I've tried this but mysql_error() doesn't give me any errors, i tried my sql > line at the command line with success here is my code if some one could have > a look at it and give some suggestions as to how i can get the email ... > > Thanks again > > Peter > > <? > session_start(); > if ($REQUEST_METHOD=='POST') > { > header('Expires: ' . gmdate("D, d M Y H:i:s", time()+1000) . ' GMT'); > header('Cache-Control: Private'); > } > session_register('user'); > session_register('pass'); > session_register('email'); > $session = session_id(); > $userid = '$user'; > > > ?> > > <html> > <head> > <title>eRentals</title> > </head> > > <body> > <? > // connect to data base > $open = mysql_connect("localhost", "root", "password") > or die ("<font face=\"Helvetica, sans-serif\" size=\"3\" > color=\"#006699\">Unable to connect to server.</font>"); > mysql_select_db("rentdb") > or die ("<font face=\"Helvetica, sans-serif\" size=\"3\" > color=\"#006699\">Unable to select database.</font>"); > > // select id & email from table matching the user name and password > inputted > > $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'"; > $result = mysql_query($sql) > or die (print mysql_error()); > > // if unsuccessfull do this > > $num = mysql_numrows($result) > or die (" > > <font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#006699\">You're > not authorized to be here. If you feel you have recieved this<BR> > message in error, please contact the <a > href=\"mailto:peterhv.com\">webmaster</a></font> > > "); > // if successful then do this > if ($num == 1) { > > > > include "quote2.php"; //has a hidden field referencing the user & the email > address .. user shows up but again email does not > } > > ?> > > > > </body> > </html> > -----Original Message----- > From: Philip Olson [mailto:philipcornado.com] > Sent: Tuesday, February 13, 2001 4:59 PM > To: Peter Houchin > Cc: PHP MAIL GROUP > Subject: RE: [PHP] SELECT statement > > > A possible way to find out : > > $result = mysql_query($sql) or die(mysql_error()); > > Does it say anything? mysql_error() is your friend, it can be printed > anywhere within the script and will print the last mysql error. So > perhaps : > > print mysql_error(); > > Right before the query or ... > > Regards, > > Philip > > On Tue, 13 Feb 2001, Peter Houchin wrote: > >> >> >> >> ok I've changed my code to >> >> $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'"; >> but still no joy can any one suggest why? >> >> (& Yes email is a field in the table) >> >> Peter >> >>> Hi, >>> >>> Can you have a SELECT statement (using mysql) that goes something like >>> >>> $sql="SELECT id && email FROM table WHERE user='$user' and >> > pass='$pass'"; > >> >> -- >> 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:


    This also troubles me i have read and read the docs on this. It seems that Lock tables prevents other threads interfering with your transaction your inserts will not be compromised by another thread deleting or updating data inconsistent with your SQL. The snag for me is that all obscure input from the user and every other eventuality has to be trapped prior to avoid sending dud SQL to MySQL, other wise the inserts/updates will fail. The TO DO list talks about atomic inserts/updates which would solve my problems ie they all happen or all do NOT happen. If MySQL can do this then I don't care about rollback. I would dearly like to use the fast tables rather than compromise speed using DBD tables but as I see it we are stuck with them or Postgres until the atomic updates code is completed.

    Be interested to know if anyone has got atomic updates sorted.

    Phil Daintree

    attached mail follows:


    At 11:51 14/2/2001 +1300, Phil Daintree wrote: >This also troubles me i have read and read the docs on this. It seems that >Lock tables >prevents other threads interfering with your transaction your inserts >will not be >compromised by another thread deleting or updating data inconsistent with >your SQL. The >snag for me is that all obscure input from the user and every other >eventuality has to be >trapped prior to avoid sending dud SQL to MySQL, other wise the >inserts/updates will fail. >The TO DO list talks about atomic inserts/updates which would solve my >problems ie they >all happen or all do NOT happen. If MySQL can do this then I don't care >about rollback. I >would dearly like to use the fast tables rather than compromise speed >using DBD tables but >as I see it we are stuck with them or Postgres until the atomic updates >code is completed. > >Be interested to know if anyone has got atomic updates sorted.

    tomorrow I'll try to compile BDB, in my Win9x... and get it to work... if it does REAL transaction than I can develop nicely with mysql... I'll let u know... ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer

    attached mail follows:


    Hi! I would like to know how to overwrite line in file which matches certain condition. Best thing i managed so far is to write line AFTER the line i wanted to overwrite under Linux. No such luck under Win2000 which refuses to write anything to a file but file date/time property has been changed.

    File is open using $fp=fopen("$file", "r+"); Writing is done using fputs or fwrite($fp, $data);

    In question is PHP standalone executable. Version i 4.0.3pl1(win2000) and 4.0.0(linux)

    Any suggestions are welcome.

    10x Nemanja

    NOTE: My email is incorrect. Please remove nospam part.

    attached mail follows:


    Did you try taking the line you wanted to change and doing a minus one to get the right line number? Not sure why windows won't change the file. I'm assuming you have the proper permissions to do what your trying to do?

    whatever wrote:

    > Hi! > I would like to know how to overwrite line in file which matches > certain condition. Best thing i managed so far is to write line AFTER > the line i wanted to overwrite under Linux. No such luck under Win2000 > which refuses to write anything to a file but file date/time property > has been changed. > > File is open using $fp=fopen("$file", "r+"); > Writing is done using fputs or fwrite($fp, $data); > > In question is PHP standalone executable. Version i 4.0.3pl1(win2000) > and 4.0.0(linux) > > Any suggestions are welcome. > > 10x > Nemanja > > NOTE: My email is incorrect. Please remove nospam part. > >

    attached mail follows:


    How to do that? I mean how to set file pointer to certain line? I've tried ftel() but it returns starnge number like 17534 decrementing it causes file-handle error Yes i do have adequate permissions to modify the file in question on Win2000

    10x in advance Nemanja NOTE: My email is incorrect. Please remove nospam part.

    On 13 Feb 2001 14:55:11 -0800, mmcglothlintravel-italy.com (Michael McGlothlin) wrote:

    >Did you try taking the line you wanted to change and doing a minus one >to get the right line number? Not sure why windows won't change the >file. I'm assuming you have the proper permissions to do what your >trying to do? >

    attached mail follows:


    Without knowing exactly what you're doing I'd say it's easiest to read the entire file into an array, modify the line you want, and write the file back out. Then you could easily modify any line you wanted. Otherwise check out fseek () in the PHP manual.

    whatever wrote:

    > How to do that? I mean how to set file pointer to certain line? > I've tried ftel() but it returns starnge number like 17534 > decrementing it causes file-handle error > Yes i do have adequate permissions to modify the file in question on > Win2000 > > 10x in advance > Nemanja > NOTE: My email is incorrect. Please remove nospam part. > > On 13 Feb 2001 14:55:11 -0800, mmcglothlintravel-italy.com (Michael > McGlothlin) wrote: > >> Did you try taking the line you wanted to change and doing a minus one >> to get the right line number? Not sure why windows won't change the >> file. I'm assuming you have the proper permissions to do what your >> trying to do? >>

    attached mail follows:


    Hi all! could anybody help me? I am fairly new to PHP and I inherited these scripts from someone who doesn't work with me anymore. They seem to puke on this portion while running them on win2k, latest php4 and mysql. On Linux platform they work as they are supposed to. thanks in advance!

    Charles Mulford

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

    $max_date = 90; $ini_date = 0; echo("\t<OPTION VALUE=\"NULL\"> </OPTION>\n"); do { $dis_date = date("D\. M\. d\, Y", strtotime ("+$ini_date day")); $val_date = date("Y-m-d", strtotime ("+$ini_date day")); echo("\t<OPTION VALUE=\"'$val_date'\">[$ini_date] $dis_date</OPTION>\n"); } while (++$ini_date <= $max_date);

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

    attached mail follows:


    On Wed, 14 Feb 2001 09:26, Charles Mulford wrote: > Hi all! could anybody help me? I am fairly new to PHP and I inherited > these scripts from someone who doesn't work with me anymore. They seem > to puke on this portion while running them on win2k, latest php4 and > mysql. On Linux platform they work as they are supposed to. > thanks in advance! > > Charles Mulford > > ------------------------- > > $max_date = 90; > $ini_date = 0; > echo("\t<OPTION VALUE=\"NULL\"> </OPTION>\n"); > do { > $dis_date = date("D\. M\. d\, Y", strtotime ("+$ini_date day")); > $val_date = date("Y-m-d", strtotime ("+$ini_date day")); > echo("\t<OPTION VALUE=\"'$val_date'\">[$ini_date] > $dis_date</OPTION>\n"); > } > while (++$ini_date <= $max_date); > > -------------------------

    Can you be a little more specific? Details of the error message and the line to which it refers might help diagnosis.

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


    Hello,

    This is off topic, but I have been working on it all day with php and can't seem to figure it out. Does anyone know how to give a file field in a form a default value? I am trying to have a script automatically fill in some upload fields on my form.

    Thank you,

    -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandonwebintellects.com 800-994-6364 www.webintellects.com --------------------------------------------

    attached mail follows:


    Brandon,

    You can set a default value for a form field by doing something like the following:

    <code> <input type="text" name="field1" value="<? echo $var1; ?>"> </code>

    Hope that helps,

    Jason

    --- Brandon Orther <brandonwebintellects.com> wrote: > Hello, > > This is off topic, but I have been working on it all > day with php and can't > seem to figure it out. Does anyone know how to give > a file field in a form a > default value? I am trying to have a script > automatically fill in some > upload fields on my form. > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandonwebintellects.com > 800-994-6364 > www.webintellects.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 >

    __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

    attached mail follows:


    I am trying to do that with a file input not a text box. So if anyone has done this with a file input box please e-mail me!

    -----Original Message----- From: jason cox [mailto:mr_jasoncoxyahoo.com] Sent: Tuesday, February 13, 2001 4:24 PM To: Brandon Orther Cc: php-generallists.php.net Subject: Re: [PHP] Upload form

    Brandon,

    You can set a default value for a form field by doing something like the following:

    <code> <input type="text" name="field1" value="<? echo $var1; ?>"> </code>

    Hope that helps,

    Jason

    --- Brandon Orther <brandonwebintellects.com> wrote: > Hello, > > This is off topic, but I have been working on it all > day with php and can't > seem to figure it out. Does anyone know how to give > a file field in a form a > default value? I am trying to have a script > automatically fill in some > upload fields on my form. > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandonwebintellects.com > 800-994-6364 > www.webintellects.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 >

    __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

    attached mail follows:


    You can't do it (at least not that I know)

    How will you make a default value not knowing the File System of a user's local machine?

    Try something different...

    Cheers, Maxim Maletsky

    -----Original Message----- From: Brandon Orther [mailto:brandonwebintellects.com] Sent: Wednesday, February 14, 2001 8:04 AM To: PHP User Group Subject: [PHP] Upload form

    Hello,

    This is off topic, but I have been working on it all day with php and can't seem to figure it out. Does anyone know how to give a file field in a form a default value? I am trying to have a script automatically fill in some upload fields on my form.

    Thank you,

    -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandonwebintellects.com 800-994-6364 www.webintellects.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:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    Solaris 7 Apache 1.3.14 PHP 4.0.4p1

    For the life of me I can't figure out what's going on. I have:

    <form enctype='multipart/form-data' action='/admin/upload.php' method='post'> <input type=hidden name=MAX_FILE_SIZE value=5000> <input type=hidden name=uploadingfile value=true> Choose File: <input name=userfile size=69 type=file><P> <input type=submit value='Send File'></form>

    and I can try to upload a file, but then the HTTP_POST_FILES hash doesn't get properly populated and no file is stored in the upload directory. Basically:

    HTTP_POST_FILES["userfile"] Array ( [name] =>1323.txt [type] =>text/plain [tmp_name] =>none [size] => 0 ) I've set my php.ini with: upload_tmp_dir = /tmp and nothing gets put in there (I've verified that the dir has world r/w w/ suid).

    Any ideas of how to debug this futher?

    - -- Aaron Turner <aturnerpobox.com|synfin.net|linuxkb.org> URI:www.synfin.net They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin

    pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6 All emails by me are PGP signed; a lack of a signature indicates a forgery. I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

    iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB =Jqdm -----END PGP SIGNATURE-----

    attached mail follows:


    A lil clip from Devedge.. you need a VALUE="" field along w/ a NAME="" maybe?

    This places an element on an HTML form that lets the user supply a file as input. When the form is submitted, the content of the specified file is sent to the server as the value portion of the name/value pair for this input element. Netscape Navigator displays a "Browse" button next to the file input element that lets users select a file from their system to use as the value of the file input element. *Navigator 2.0*

    If a a form contains a file input element, the value of the ENCTYPE attribute of the FORM tag should be |"multipart/form-data"|.

    Syntax |<INPUT TYPE="FILE" NAME="|/|name" |/| VALUE="|/|filename" |/|>|

    */ NAME=name/*

    specifies the name of the input element. This value is used as the name portion of the name/value pair for this element that is sent to the server when the form is submitted. The name is not displayed on the form.

    */ VALUE=filename/*

    specifies the initial value of the input element.

    |<FORM ENCTYPE="multipart/form-data" ACTION="/cgi-bin/example.cgi" METHOD="POST"> <P>File name: <INPUT TYPE="file"> </FORM>|

    Aaron D. Turner wrote:

    > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Solaris 7 > Apache 1.3.14 > PHP 4.0.4p1 > > For the life of me I can't figure out what's going on. I have: > > <form enctype='multipart/form-data' action='/admin/upload.php' method='post'> > <input type=hidden name=MAX_FILE_SIZE value=5000> > <input type=hidden name=uploadingfile value=true> > Choose File: <input name=userfile size=69 type=file><P> > <input type=submit value='Send File'></form> > > and I can try to upload a file, but then the HTTP_POST_FILES hash doesn't > get properly populated and no file is stored in the upload > directory. Basically: > > > HTTP_POST_FILES["userfile"] > Array > ( > [name] =>1323.txt > [type] =>text/plain > [tmp_name] =>none > [size] => 0 > ) > I've set my php.ini with: upload_tmp_dir = /tmp > and nothing gets put in there (I've verified that the dir has world r/w w/ > suid). > > Any ideas of how to debug this futher? > > - -- > Aaron Turner <aturnerpobox.com|synfin.net|linuxkb.org> URI:www.synfin.net > They that can give up essential liberty to obtain a little temporary safety > deserve neither liberty nor safety. -- Benjamin Franklin > > pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6 > All emails by me are PGP signed; a lack of a signature indicates a forgery. > I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.4 (GNU/Linux) > Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc > > iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI > YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB > =Jqdm > -----END PGP SIGNATURE----- > > >

    attached mail follows:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    On Tue, 13 Feb 2001, Michael McGlothlin wrote:

    > A lil clip from Devedge.. you need a VALUE="" field along w/ a NAME="" > maybe?

    A VALUE= isn't required for TYPE=file (and adding it didn't solve my problem). > This places an element on an HTML form that lets the user supply a file > as input. When the form is submitted, the content of the specified file > is sent to the server as the value portion of the name/value pair for > this input element. Netscape Navigator displays a "Browse" button next > to the file input element that lets users select a file from their > system to use as the value of the file input element. *Navigator 2.0*

    Yep, and if you look at the HTTP_POST_FILES hash you'll see that the browser/form properly sent the filename. The problem is with the temporary file that isn't created/stored. More specifically, HTTP_POST_FILES[userfile][tmp_name] is set to 'none' when it should be something like /tmp/abc123 and the size is 0.

    - -- Aaron Turner <aturnerpobox.com|synfin.net|linuxkb.org> URI:www.synfin.net They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin

    pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6 All emails by me are PGP signed; a lack of a signature indicates a forgery. I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

    iEYEARECAAYFAjqJyJEACgkQhweYF/hu2ua1gwCfU6P+ScZCxAKlOFqlAzcZLkX7 KoEAoJDPG7AvelXPlLusT3BME1EZQQX/ =is6w -----END PGP SIGNATURE-----

    attached mail follows:


    Aaron,

    Are you processing the file on the page you're "posting" to? Could you send your processing code so we can have a look? If you're still having problems, I can send you an example.

    Jason

    --- "Aaron D. Turner" <aturnerpobox.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Solaris 7 > Apache 1.3.14 > PHP 4.0.4p1 > > For the life of me I can't figure out what's going > on. I have: > > <form enctype='multipart/form-data' > action='/admin/upload.php' method='post'> > <input type=hidden name=MAX_FILE_SIZE > value=5000> > <input type=hidden name=uploadingfile > value=true> > Choose File: <input name=userfile size=69 > type=file><P> > <input type=submit value='Send File'></form> > > and I can try to upload a file, but then the > HTTP_POST_FILES hash doesn't > get properly populated and no file is stored in the > upload > directory. Basically: > > > HTTP_POST_FILES["userfile"] > Array > ( > [name] =>1323.txt > [type] =>text/plain > [tmp_name] =>none > [size] => 0 > ) > I've set my php.ini with: upload_tmp_dir = /tmp > and nothing gets put in there (I've verified that > the dir has world r/w w/ > suid). > > Any ideas of how to debug this futher? > > - -- > Aaron Turner > <aturnerpobox.com|synfin.net|linuxkb.org> > URI:www.synfin.net > They that can give up essential liberty to obtain a > little temporary safety > deserve neither liberty nor safety. -- Benjamin > Franklin > > pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 > 9A8F 8707 9817 F86E DAE6 > All emails by me are PGP signed; a lack of a > signature indicates a forgery. > I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 > 596E 60BF 451B 20E8 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.4 (GNU/Linux) > Comment: Public key at: > http://www.synfin.net/aturner/pgpkey.asc > > iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI > YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB > =Jqdm > -----END PGP SIGNATURE----- > > > > -- > 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 >

    __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

    attached mail follows:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    On Tue, 13 Feb 2001, jason cox wrote:

    > Aaron, > > Are you processing the file on the page you're > "posting" to?

    Yep. A little more info this time. Ok this makes no freaking sense to me:

    I can upload my /etc/passwd file - -rw-r--r-- 1 root root 998 Dec 9 01:44 /etc/passwd

    I can't upload other random files in my home directory which I own/have read access to. - -rw-rw-r-- 1 aturner aturner 84558 Jan 9 17:01 /home/aturner/1323.txt

    > Could you send your processing code so > we can have a look? If you're still having problems, > I can send you an example.

    Sure:

    <?PHP require "security.inc"; # checks user cookie to see if they have access include "connect.inc"; # connects to database

    function is_an_uploaded_file($filename) { if (! $tmp_file = get_cfg_var('upload_tmp_dir')) { $tmp_file = dirname(tempname('', '')); } $tmp_file .= '/' . basename($filename); # User might have trailing / in php.ini return (ereg_replace('/+', '/', $tmp_file) == $filename); }

    function abortupload($message) { echo "<H1 align=center>$message</H1>"; unlink ($HTTP_POST_FILES[userfile][tmp_name]); phpinfo(); echo "</BODY></HTML>"; exit; } ?>

    <HTML> <HEAD> <TITLE>Sunnyvale Staging Server</TITLE> </HEAD> <!-- Background white, links blue (unvisited), navy (visited), red (active) --> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#000080" ALINK="#FF0000" > <font size=-1>[ <a href="/">Main Index</a> ]</font>

    <?PHP if ($uploadingfile == "") { $line = "<form enctype='multipart/form-data' action='/admin/upload.php' method='post'> <input type=hidden name=MAX_FILE_SIZE value=5000> <input type=hidden name=uploadingfile value=true> Choose upload location: <select name=directory> <option name=Files>Files</option> <option name=Docs>Documentation</option> </select>\n<P>"; echo $line; echo "Link Description: <input type=text name=description size=80 value=''><P>\n"; echo "Detailed Description:<br><textarea wrap=soft name=info rows=5 cols=80></textarea><P>\n"; echo "<input type=hidden name=urltype value=file>"; echo "Active: <select name=active><option value=y>Yes</option><option value=n>No</option><option value=s>Submitted</option></select><P>\n";

    $result = mysql_query("SELECT * FROM groups"); $line = "<select name=urlgroup>"; while ($row = mysql_fetch_array($result)) { $line .= "<option value=$row[groupID]>$row[groupname] ($row[page])</option>"; } $line .= "</select><P>\n"; # echo "Group: $line"; echo "<input type=hidden name=urlgroup value=1>"; echo "Choose File: <input name=userfile size=69 type=file value=''><P>\n"; echo "<input type=submit value='Send File'></form>";

    } else {

    $location = ""; if ($HTTP_POST_VARS[directory] = "Files") { $location = "/usr/local/apache1.3.14/htdocs/Files"; } elseif ($HTTP_POST_VARS[directory] = "Docs") { $location = "/usr/local/apache1.3.14/htdocs/Docs"; } else { abortupload ("Error! Invalid Directory value: $HTTP_POST_VARS[directory]"); }

    if ($description == "") { abortupload("Error! Please provide a description for this document"); } elseif ($info == "") { abortupload("Error! Please provide information for this document"); }

    if ($uploadfile = is_an_uploaded_file($userfile)) { $uploadfile = $location . "/" . $HTTP_POST_FILES[userfile][name]; copy ($userfile, $uploadfile);

    $result = mysql_query("SELECT * FROM users WHERE LoginName = '$loginname' LIMIT 1"); $userrow = mysql_fetch_array($result);

    $url = "/" . $HTTP_POST_VARS[directory] . "/" . $HTTP_POST_FILES[userfile][name]; $mirror = 0; $result = mysql_query("SELECT * FROM urls WHERE url = '$url'"); if ($existing = mysql_fetch_array($result)) { if ($existing[owner] != $userrow[UserID]) { abortupload("Error: Your user ID doesn't have permission to modify this file."); } } else { $result = mysql_query("INSERT INTO urls (owner, urlgroup, url, urldesc, info, active, mirror, urltype) VALUES ('$userrow[UserID]', '$HTTP_POST_VARS[urlgroup]', '$url', '$HTTP_POST_VARS[description]', '$HTTP_POST_VARS[info]', '$HTTP_POST_VARS[active]', '$mirror', '$HTTP_POST_VARS[urltype]')"); echo "<H1 align=center>File upload complete!</H1>"; } } else { abortupload("Possible file upload attack: filename: " . $HTTP_POST_FILES["userfile"]["name"] . "."); }

    }

    ?> </body> </html> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

    iEYEARECAAYFAjqJ08sACgkQhweYF/hu2ubukACbBij1wtVYr1gTngdHsXgrKmOr ai8AnicSOVkP6OS1qiwfSQBBPqmL566k =kNOr -----END PGP SIGNATURE-----

    attached mail follows:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    Ah, figured out the problem. MAX_FILE_SIZE is in BYTES not Kilobytes. Any file >5K was killed.

    - -- Aaron Turner <aturnerpobox.com|synfin.net|linuxkb.org> URI:www.synfin.net They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin

    pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6 All emails by me are PGP signed; a lack of a signature indicates a forgery. I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

    iEYEARECAAYFAjqJ/gsACgkQhweYF/hu2ubzAACfRt9l+TvifIobJyOqs5UlvAA1 uS0AniXKKTuvazWZHCZeW5QZyXpHztnZ =Zpnk -----END PGP SIGNATURE-----

    attached mail follows:


    I'm setting up a back end production system for a television show, and have been given space on a development server with PHP 4 and Oracle support compiled in (but not the OCI libraries). The Oracle admin have given me my user name (let's say ora_user), a TNS name (tns_name), and a password (ora_pass).

    So I write code as follows...

    if ($conn=ora_logon("ora_usertns_name","ora_pass")) { echo "SUCCESS ! Connected to database\n"; } else { echo "Failed :-( Could not connect to database\n"; echo ora_errorcode($conn).": ".ora_error($conn)."<BR>"; }

    In response to this code, I get the following error: ORA-12154 "Supplied argument is not a valid Oracle-Connection/Cursor resource in ...."

    From reading php.net documentation on ora_logon, it seemed that maybe the ORACLE_HOME environment variable simply hadn't been set.

    I had the sys admins set it.

    And I still get the error.

    Any ideas from an experienced PHP/Oracle developer?

    Kristofer

    attached mail follows:


    With session incode do you have to have it on every page where you have a session_start() ?

    Peter

    attached mail follows:


    You don't need to use session_encode () in most situations. You can use sessions and they'll automaticlly encode your variables. Is that what you wondered?

    Peter Houchin wrote:

    > With session incode do you have to have it on every page where you have a > session_start() ? > > Peter >

    attached mail follows:


    Its sort of what i wondered.... when the session is started it makes a file in say c:/temp (in NT machine) what i wondered is how do you encode the information in there ... the info in the file is something like user|s:6:"username";pass|s:6:"password";email|s:6:"email address";

    and also i can't get a value for the email ... so the session_register('email') returns nothing ... do you have any ideas?

    -----Original Message----- From: Michael McGlothlin [mailto:mmcglothlintravel-italy.com] Sent: Wednesday, February 14, 2001 10:35 AM To: Peter Houchin Cc: PHP MAIL GROUP Subject: Re: [PHP] session encode

    You don't need to use session_encode () in most situations. You can use sessions and they'll automaticlly encode your variables. Is that what you wondered?

    Peter Houchin wrote:

    > With session incode do you have to have it on every page where you have a > session_start() ? > > Peter >

    attached mail follows:


    Definitely, I agree, but I think it would be better if WSH was simply patched, perhaps with a way to sign scripts, and non-expert users can't give them root permissions, and that scripts should not ever be able to send emails without a user confirmation, no matter what permissions they have. Perhaps do the same thing with trying to run a program or load a COM component.

    My .02 :)

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

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

    ----- Original Message ----- From: "Thor M. Steindorsson" <thornetwood.net> To: "Josh G" <joshgfunk007.com> Sent: Wednesday, February 14, 2001 10:15 AM Subject: RE: [PHP] Here you have, ;o)

    > I agree with the vbs part, unfortunately windows is set by default to hide > file extensions of known file types, meaning the person would only see the > .jpg extension and not the .vbs. Since most computer users are not as > computer savvy as we are, they don't know any better. > > As far as the WSH, I removed mine months ago, and have yet to find a program > or website that has a problem with it not being there. IMHO WSH is the > biggest security threat ever released by a big computer corporation, since > it essentially gives all scripts the same permissions the user has, and > since 98% of windows 9x users essentially have admin permissions on their > machines, the WSH basically gives admin access to anyone with a little bit > of VB knowledge and a mean streak. > I've created a couple of WSH scripts for clients, so I know how ridiculously > open this thing is. From an email it's possible to execute ANY program > installed on that machine, including all windows commands (even Format C: is > possible). > > Again, I agree with most of your vbs point (I am a sysadmin and we filtered > out .jpg.vbs attachments months ago (along with a ton of other > attachements), so none of our customers were affected), but unfortunately > the problem is primarily two fold: > > 1. People open attachments without knowing what they are. > 2. Windows Scripting Host is a major security breach. > > Of course, this is just my opinion...

    attached mail follows:


    I'm having a strange problem with sessions, it appears that they are not propagating to the next page. When I run the login page the sess vars get registered, the session_id() get's set, and the cookie sessId get's set. However when I go to the order page in a subdirectory only the cookie sessId comes over correctly. It will not set the session_id(). The only thing that prints as expected is the cookie var and $sessionId.

    I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 . enable_track_vars is enabled and so is register_globals. Am I doing something wrong or is Sessions broken in pl1?

    <?php // login page

    srand((double)microtime()*1000000); $sessionId = md5(uniqid(rand())); session_id($sessionId); session_start(); setcookie("sessId", $sessionId);

    session_register('clientid'); session_register('clientname'); session_register('rnum');

    ?>

    <?php

    // order page

    $sessionId = $HTTP_COOKIE_VARS['sessId'];

    session_id($sesssionId); session_start();

    //global $clientname; //global $clientid;

    echo ('<br>Client ID :' . $clientid); echo ('<br>Rnumber :' . $rnum); echo ('<br>SessCli Name :' . $HTTP_SESSION_VARS['clientname']);

    echo ('<br>Session_Id() :' . session_id()); echo ('<br>Session_name() :' . session_name()); echo ('<br>sessId :' . $HTTP_COOKIE_VARS['sessId']);

    ?>

    attached mail follows:


    I think you might need to session_register () the variables on each page you want to use them, not just once per session.

    Doug Budny wrote:

    > I'm having a strange problem with sessions, it appears that they are > not propagating to the next page. When I run the login page the sess > vars get registered, the session_id() get's set, and the cookie sessId > get's set. However when I go to the order page in a subdirectory only > the cookie sessId comes over correctly. It will not set the > session_id(). The only thing that prints as expected is the cookie > var and $sessionId. > > I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 . enable_track_vars is > enabled and so is register_globals. Am I doing something wrong or is > Sessions broken in pl1? > > <?php > > // login page > > srand((double)microtime()*1000000); > $sessionId = md5(uniqid(rand())); > session_id($sessionId); > session_start(); > setcookie("sessId", $sessionId); > > session_register('clientid'); > session_register('clientname'); > session_register('rnum'); > > ?> > > > <?php > > // order page > > $sessionId = $HTTP_COOKIE_VARS['sessId']; > > session_id($sesssionId); > session_start(); > > > //global $clientname; > //global $clientid; > > echo ('<br>Client ID :' . $clientid); > echo ('<br>Rnumber :' . $rnum); > echo ('<br>SessCli Name :' . $HTTP_SESSION_VARS['clientname']); > > echo ('<br>Session_Id() :' . session_id()); > echo ('<br>Session_name() :' . session_name()); > echo ('<br>sessId :' . $HTTP_COOKIE_VARS['sessId']); > > ?> > >

    attached mail follows:


    mine is alot simpler and works fine, try this.

    <?php session_start();

    if (!isset($HTTP_SESSION_VARS['SessionID'])) { $SessionID = mtime(); session_register('SessionID'); } ?>

    --
    

    Chris Lee Mediawaveonline.com

    em. leemediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    "Doug Budny" <dbudnydiligence.com> wrote in message news:5.0.0.25.2.20010212111352.00a91e48mail.diligence.com... > I'm having a strange problem with sessions, it appears that they are not > propagating to the next page. When I run the login page the sess vars get > registered, the session_id() get's set, and the cookie sessId get's > set. However when I go to the order page in a subdirectory only the cookie > sessId comes over correctly. It will not set the session_id(). The only > thing that prints as expected is the cookie var and $sessionId. > > I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 . enable_track_vars is > enabled and so is register_globals. Am I doing something wrong or is > Sessions broken in pl1? > > <?php > > // login page > > srand((double)microtime()*1000000); > $sessionId = md5(uniqid(rand())); > session_id($sessionId); > session_start(); > setcookie("sessId", $sessionId); > > session_register('clientid'); > session_register('clientname'); > session_register('rnum'); > > ?> > > > <?php > > // order page > > $sessionId = $HTTP_COOKIE_VARS['sessId']; > > session_id($sesssionId); > session_start(); > > > //global $clientname; > //global $clientid; > > echo ('<br>Client ID :' . $clientid); > echo ('<br>Rnumber :' . $rnum); > echo ('<br>SessCli Name :' . $HTTP_SESSION_VARS['clientname']); > > echo ('<br>Session_Id() :' . session_id()); > echo ('<br>Session_name() :' . session_name()); > echo ('<br>sessId :' . $HTTP_COOKIE_VARS['sessId']); > > ?> > > > -- > 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 dont have to call session_register() on every page, should have to, just call session_start() thats it.

    --
    

    Chris Lee Mediawaveonline.com

    em. leemediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    "Michael McGlothlin" <mmcglothlintravel-italy.com> wrote in message news:3A89CDA8.4010402travel-italy.com... > I think you might need to session_register () the variables on each page > you want to use them, not just once per session. > > Doug Budny wrote: > > > I'm having a strange problem with sessions, it appears that they are > > not propagating to the next page. When I run the login page the sess > > vars get registered, the session_id() get's set, and the cookie sessId > > get's set. However when I go to the order page in a subdirectory only > > the cookie sessId comes over correctly. It will not set the > > session_id(). The only thing that prints as expected is the cookie > > var and $sessionId. > > > > I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 . enable_track_vars is > > enabled and so is register_globals. Am I doing something wrong or is > > Sessions broken in pl1? > > > > <?php > > > > // login page > > > > srand((double)microtime()*1000000); > > $sessionId = md5(uniqid(rand())); > > session_id($sessionId); > > session_start(); > > setcookie("sessId", $sessionId); > > > > session_register('clientid'); > > session_register('clientname'); > > session_register('rnum'); > > > > ?> > > > > > > <?php > > > > // order page > > > > $sessionId = $HTTP_COOKIE_VARS['sessId']; > > > > session_id($sesssionId); > > session_start(); > > > > > > //global $clientname; > > //global $clientid; > > > > echo ('<br>Client ID :' . $clientid); > > echo ('<br>Rnumber :' . $rnum); > > echo ('<br>SessCli Name :' . $HTTP_SESSION_VARS['clientname']); > > > > echo ('<br>Session_Id() :' . session_id()); > > echo ('<br>Session_name() :' . session_name()); > > echo ('<br>sessId :' . $HTTP_COOKIE_VARS['sessId']); > > > > ?> > > > > > > > > -- > 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:


    Basically I'm trying to get 3 session vars on a page in a sub directory, clientid, clientname and rnum. I do a session_start() at the beginning of every page, I also do a session_id($HTTP_COOKIE_VARS['sessId']) on each page, with the sessid being the same. But when I do "echo session_id()" on the second page after setting it and starting the session, it comes back blank, as thought the session was being destroyed or just not starting.

    I've tried registering the variable on the second page, and it still doesn't work

    At 2/13/2001 04:20 PM, you wrote: >mine is alot simpler and works fine, try this. > ><?php > session_start(); > > if (!isset($HTTP_SESSION_VARS['SessionID'])) > { > $SessionID = mtime(); > session_register('SessionID'); > } >?> > > >-- > > >Chris Lee >Mediawaveonline.com > >em. leemediawaveonline.com > >ph. 250.377.1095 >ph. 250.376.2690 >fx. 250.554.1120 > > >"Doug Budny" <dbudnydiligence.com> wrote in message >news:5.0.0.25.2.20010212111352.00a91e48mail.diligence.com... > > I'm having a strange problem with sessions, it appears that they are not > > propagating to the next page. When I run the login page the sess vars get > > registered, the session_id() get's set, and the cookie sessId get's > > set. However when I go to the order page in a subdirectory only the >cookie > > sessId comes over correctly. It will not set the session_id(). The only > > thing that prints as expected is the cookie var and $sessionId. > > > > I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 . enable_track_vars is > > enabled and so is register_globals. Am I doing something wrong or is > > Sessions broken in pl1? > > > > <?php > > > > // login page > > > > srand((double)microtime()*1000000); > > $sessionId = md5(uniqid(rand())); > > session_id($sessionId); > > session_start(); > > setcookie("sessId", $sessionId); > > > > session_register('clientid'); > > session_register('clientname'); > > session_register('rnum'); > > > > ?> > > > > > > <?php > > > > // order page > > > > $sessionId = $HTTP_COOKIE_VARS['sessId']; > > > > session_id($sesssionId); > > session_start(); > > > > > > //global $clientname; > > //global $clientid; > > > > echo ('<br>Client ID :' . $clientid); > > echo ('<br>Rnumber :' . $rnum); > > echo ('<br>SessCli Name :' . $HTTP_SESSION_VARS['clientname']); > > > > echo ('<br>Session_Id() :' . session_id()); > > echo ('<br>Session_name() :' . session_name()); > > echo ('<br>sessId :' . $HTTP_COOKIE_VARS['sessId']); > > > > ?> > > > > > > -- > > 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

    ----
    Atheism is a non-prophet organization.
    

    attached mail follows:


    On Wed, 14 Feb 2001 00:23, Rahul Hari Bhide wrote: > Hi , > I am configuring php with the --with-gd option . > My libgd.a is sitting in /usr/local/lib and other header files in > /usr/local/include . > > ./configure --with-gd=/usr/local/lib gives me the following error : > > checking whether to include GD support... configure: error: Unable to > find libgd.(a|so) anywhere under /usr/local/lib > > though the file is very much existant. > > Any ideas what is wrong??? > > ~Rahul

    Try ./configure --with-gd=/usr/local

    Then configure will look in lib under that path for the libraries and include for the include files.

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


    Have you tried Apache Toolbox? If building under Unix w/ Apache as your web server it can be a great time saver and if your running into problems you can look how it builds something and see how to make it work so you'll know later. You can find it easily from Freshmeat.net.

    David Robley wrote:

    > On Wed, 14 Feb 2001 00:23, Rahul Hari Bhide wrote: > >> Hi , >> I am configuring php with the --with-gd option . >> My libgd.a is sitting in /usr/local/lib and other header files in >> /usr/local/include . >> >> ./configure --with-gd=/usr/local/lib gives me the following error : >> >> checking whether to include GD support... configure: error: Unable to >> find libgd.(a|so) anywhere under /usr/local/lib >> >> though the file is very much existant. >> >> Any ideas what is wrong??? >> >> ~Rahul > > > Try ./configure --with-gd=/usr/local > > Then configure will look in lib under that path for the libraries and > include for the include files. >

    attached mail follows:


    It is only the ' charactor there has a "problem" you have to excape any special character before inserting.

    the text Joe's should be inserted like this"

    INSERT INTO table1 (int_field, char_field) VALUES (1, 'Joe''s')

    A single quote is escaped by an extra single quote.

    - Frank

    >I trying to insert some data into a MSSQL Server 7.0 database from Php. Some >of the data has various characters ', > . How can I tell SQL Server to >treat these characters as part of the input. > >Ryan Conover > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-windows-unsubscribelists.php.net >For additional commands, e-mail: php-windows-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net > > >

    attached mail follows:


    I'm having a little trouble here developing and running queries.

    I spent some time developing in ASP, and whenever there was something wrong with a query, the script halted, and the error message - from ODBC, tye sql syntax error - was printed along with the line of code.

    In PHP that's not how it goes, it doesn't tell me when theres an error with a mysql_query unless I place a call to mysql_error() after each executed query right?

    That's exactly what I'm doing, but again, it doesn't do all I want, cuz it doesn't tell me the line of code, and I don't know where is the error, unless I start printing everything on error handling. ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer

    attached mail follows:


    Christian -

    You need to be checking the return values of the mysql_*() functions. Make sure you're not calling them with a mysql_*() as that will disable error reporting.

    Perhaps you should give us some examples of what's failing and how?

    Also, if the server isn't yours the server admin may have turnd down the level of error reporting in php so errors never even show up. See http://www.php.net/manual/en/configuration.php and look at display_errors and error_reporting then check your server settings with phpinfo().

    -- Scott

    On Tue, Feb 13, 2001 at 11:31:09PM -0300, Christian Dechery wrote: > I'm having a little trouble here developing and running queries. > > I spent some time developing in ASP, and whenever there was something wrong > with a query, the script halted, and the error message - from ODBC, tye sql > syntax error - was printed along with the line of code. > > In PHP that's not how it goes, it doesn't tell me when theres an error with > a mysql_query unless I place a call to mysql_error() after each executed > query right? > > That's exactly what I'm doing, but again, it doesn't do all I want, cuz it > doesn't tell me the line of code, and I don't know where is the error, > unless I start printing everything on error handling. > ____________________________ > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer > > > -- > 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

    -- 
     Scott
    

    attached mail follows:


    On Wed, 14 Feb 2001 13:01, Christian Dechery wrote: > I'm having a little trouble here developing and running queries. > > I spent some time developing in ASP, and whenever there was something > wrong with a query, the script halted, and the error message - from > ODBC, tye sql syntax error - was printed along with the line of code. > > In PHP that's not how it goes, it doesn't tell me when theres an error > with a mysql_query unless I place a call to mysql_error() after each > executed query right? > > That's exactly what I'm doing, but again, it doesn't do all I want, cuz > it doesn't tell me the line of code, and I don't know where is the > error, unless I start printing everything on error handling.

    There is a PHP constant __LINE__ which you may find useful.

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


    On Wed, 14 Feb 2001 13:01, Christian Dechery wrote: > I'm having a little trouble here developing and running queries. > > I spent some time developing in ASP, and whenever there was something > wrong with a query, the script halted, and the error message - from > ODBC, tye sql syntax error - was printed along with the line of code. > > In PHP that's not how it goes, it doesn't tell me when theres an error > with a mysql_query unless I place a call to mysql_error() after each > executed query right? > > That's exactly what I'm doing, but again, it doesn't do all I want, cuz > it doesn't tell me the line of code, and I don't know where is the > error, unless I start printing everything on error handling.

    There is a PHP constant __LINE__ which you may find useful.

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


    Hey all,

    I got a rather strange probelm with fast template, I won't go into great detail unless someone has had a simular experience while using define_dynamic. Basically I have written a site which totally uses Fast Templates and some sections use define_dynamic which work perfectly, my problem is I have just added a new section which refuses to acknowledge the:

    <!-- BEGIN DYNAMIC BLOCK: handle_name --> <!-- END DYNAMIC BLOCK: handle_name -->

    tags (they appear in the final output) I have read all the documentation and am really sure that I have done this correctly, even checked the other pages which *are* working, no matter what I do this refuses to work, has anyone else run into a simular problem?

    Any help would be mutch appreciated, I am really stuck on this.

    Regards,

    Joseph

    attached mail follows:


    I think you can rename it by using a full path. Have you tried it yet?

    Cheers, Maxim Maletsky

    -----Original Message----- From: Miguel Loureiro [mailto:m.loureirodistrim2.pt] Sent: Wednesday, February 14, 2001 12:02 AM To: php-gen Subject: [PHP] rename?

    Hi , having a hierarchy of directories, like A\b\d, A\c, I would like to move directory A\b\d to A\c\d , to (try) to get it I test something like rename(d,".. / c/d"), but I get " Warning: Rename failed (No such file or directory) in ", it's necessary create the directory first, I mean , Mkdir(second_d) ? but the command its RENAME... or there are other, better , ways to do what I want. Consider that the directory d have lots of things (files and directories...). T.Y Best Regards Miguel Loureiro <m.loureirodistrim2.pt >

    attached mail follows:


    I'm at a loss for this one. I can't seem to get PHP 4 on RedHat 7. I can get the rpm to install and work, but if I try to configure myself, it never works. Everything says to configure with apxs, but there is no apxs. What is strange though is if I look at how the rpm configures PHP, it configures it with apxs and it works!

    I want to configure PHP with PDF support, so I can't just use the rpms. If anyone has any suggestions, let me know. That is other that trying to configure apache manually. I've been down that road before, and don't want to do it again.

    Mike

    attached mail follows:


    Mike -

    You're not 100% specfic (or I'm not 100% clear) on what you've tried to do to fix this but here's a basic recipie which should work for you. (it has for me.)

    1) Get the current php src.rpm file from the Red Hat 7 errata and install it. 2) cd /usr/src/redhat/SPEC/ and edit the php.spec file. Fine the configure section and ensure that the proper --with option is enabled for PDF support. You may also want to rev the minor version of the RPM so you know it's yours vs the default Red Hat version. 3) Save the file and then run rpm -ba php.spec and sit back. When done you'll have several packages in /usr/src/redhat/RPMS/i386 waiting for you to install.

    You may find that after you do a rpm -ba php.spec that the build fails because several devel packages are not installed (ie openssl-devel, openldap-devel, etc). Make sure you have them installed before building.

    Good luck.

    -- Scott

    On Tue, Feb 13, 2001 at 07:47:03PM -0600, Mike Tuller wrote: > I'm at a loss for this one. I can't seem to get PHP 4 on RedHat 7. I can get > the rpm to install and work, but if I try to configure myself, it never > works. Everything says to configure with apxs, but there is no apxs. What is > strange though is if I look at how the rpm configures PHP, it configures it > with apxs and it works! > > I want to configure PHP with PDF support, so I can't just use the rpms. If > anyone has any suggestions, let me know. That is other that trying to > configure apache manually. I've been down that road before, and don't want > to do it again. > > Mike > > > -- > 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:


    That's crazy because I am doing the same exact thing right now (compile with PDF on RH 7 and having problems.)

    Anyway PDF and everything compiles fine on RH 6.2 but I have had some problems on 7.

    What I did is: Install mySQL Configure and install Apache (my configure looks like this): ./configure \ "--with-layout=Apache" \ "--prefix=/www" \ "--with-perl=/usr/bin/perl" \ "--enable-module=so" \ "$" Configure and install PdfLib (my configure looks like this): ./configure --enable-cxx --with-tiffauxlib=-ljpeg --with-tifflib --with-zlib --with-pnglib=no --enable-shared --enable-static --enable-shared-pdflib

    After that point I have been fooling around with the PHP configure. What works for me so far is:

    ./configure --with-mysql=/usr/local/mysql --with-apxs=/www/bin/apxs --with-sablot

    (I have installed Sablot XSLT lib)

    This compiles and installs fine.

    Then when I try to add the pdflib options, the make dies at:

    ./configure --with-mysql=/usr/local/mysql --with-apxs=/www/bin/apxs --with-sablot --with-zlib-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-tiff-dir=/usr/lib --with-pdflib

    ./configure --with-mysql=/usr/local/mysql --with-apxs=/www/bin/apxs --with-sablot --with-zlib-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-tiff-dir=/usr/lib --with-pdflib

    make[1]: Entering directory `/home/blaze/WebServerSources/php-4.0.4pl1' /bin/sh /home/blaze/WebServerSources/php-4.0.4pl1/libtool --silent --mode=link gcc -I. -I/home/blaze/WebServerSources/php-4.0.4pl1/ -I/home/blaze/WebServerSources/php-4.0.4pl1/main -I/home/blaze/WebServerSources/php-4.0.4pl1 -I/www/include -I/home/blaze/WebServerSources/php-4.0.4pl1/Zend -I/usr/local/mysql/include/mysql -I/usr/local/include -I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmltok -I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmlparse -I/home/blaze/WebServerSources/php-4.0.4pl1/TSRM -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2 -o libphp4.la -rpath /home/blaze/WebServerSources/php-4.0.4pl1/libs -avoid-version -L/usr/local/mysql/lib/mysql -L/usr/local/lib -R /usr/local/mysql/lib/mysql -R /usr/local/lib stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pdf/libpdf.la ext/posix/libposix.la ext/sablot/libsablot.la ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -ldl -lxmltok -lxmlparse -lsablot -lz -ljpeg -lpng -ltiff -lpdf -lmysqlclient -lresolv -lm -ldl -lcrypt -lnsl -lresolv /usr/bin/ld: cannot find -lxmltok collect2: ld returned 1 exit status make[1]: *** [libphp4.la] Error 1 make[1]: Leaving directory `/home/blaze/WebServerSources/php-4.0.4pl1' make: *** [all-recursive] Error 1

    It says it cannot find xmltok, but its installed in /usr/lib where everything else is.

    I don't know either. This worked no problem on 6.2. BTW I have the most recent version of GCC according to Redhat Up2Date

    Michael

    Mike Tuller wrote:

    > I'm at a loss for this one. I can't seem to get PHP 4 on RedHat 7. I can get > the rpm to install and work, but if I try to configure myself, it never > works. Everything says to configure with apxs, but there is no apxs. What is > strange though is if I look at how the rpm configures PHP, it configures it > with apxs and it works! > > I want to configure PHP with PDF support, so I can't just use the rpms. If > anyone has any suggestions, let me know. That is other that trying to > configure apache manually. I've been down that road before, and don't want > to do it again. > > Mike > > -- > 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:


    Mike -

    As root run /sbin/ldconfig -v > /tmp/libs.txt then check the /tmp/libs.txt file to ensure that xmltoc was actually found. If it's not and it is on your drive then verify the paths in /etc/ld.so.config and run /sbin/ldconfig -v again after making any changes.

    libxml != xmltok afaik.

    -- Scott

    On Tue, Feb 13, 2001 at 10:55:24PM -0500, Michael Stearne wrote: > That's crazy because I am doing the same exact thing right now (compile with > PDF on RH 7 and having problems.) > > Anyway PDF and everything compiles fine on RH 6.2 but I have had some problems > on 7.

    [snip]

    > Then when I try to add the pdflib options, the make dies at: > make[1]: Entering directory `/home/blaze/WebServerSources/php-4.0.4pl1' > /bin/sh /home/blaze/WebServerSources/php-4.0.4pl1/libtool --silent --mode=link > gcc -I. -I/home/blaze/WebServerSources/php-4.0.4pl1/ > -I/home/blaze/WebServerSources/php-4.0.4pl1/main > -I/home/blaze/WebServerSources/php-4.0.4pl1 -I/www/include > -I/home/blaze/WebServerSources/php-4.0.4pl1/Zend > -I/usr/local/mysql/include/mysql -I/usr/local/include > -I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmltok > -I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmlparse > -I/home/blaze/WebServerSources/php-4.0.4pl1/TSRM -DLINUX=22 -DUSE_HSREGEX > -DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2 -o libphp4.la -rpath > /home/blaze/WebServerSources/php-4.0.4pl1/libs -avoid-version > -L/usr/local/mysql/lib/mysql -L/usr/local/lib -R /usr/local/mysql/lib/mysql -R > /usr/local/lib stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la > regex/libregex.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pdf/libpdf.la > ext/posix/libposix.la ext/sablot/libsablot.la ext/session/libsession.la > ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -ldl > -lxmltok -lxmlparse -lsablot -lz -ljpeg -lpng -ltiff -lpdf -lmysqlclient > -lresolv -lm -ldl -lcrypt -lnsl -lresolv > /usr/bin/ld: cannot find -lxmltok > collect2: ld returned 1 exit status > make[1]: *** [libphp4.la] Error 1 > make[1]: Leaving directory `/home/blaze/WebServerSources/php-4.0.4pl1' > make: *** [all-recursive] Error 1 > > It says it cannot find xmltok, but its installed in /usr/lib where everything > else is.

    attached mail follows:


    I'll give you an example of it's use:

    You have a submission form where you need to confirm:

    you have a form on page 1:

    field 1... field 2... field 3...

    and submit button.. When people submit the data it goes to page 2 where a loop will take all that, create a hidden forms and will also list the data submitted as text so you can ask the user: "are you sure this info is correct?" If not they click back-button and if yes they continue clicking submit again and at that point all these hidden fields are going into your database.

    Hope it explains you a bit.

    Cheers, Maxim Maletsky

    -----Original Message----- From: Angerer, Chad [mailto:cangereribsys.com] Sent: Wednesday, February 14, 2001 12:15 AM To: 'php-generallists.php.net' Subject: [PHP] hidden form field.

    Hello list,

    Can someone please explain to me in simple terms. What the exact reason is for putting hidden form fields into an html document that uses PHP to connect to a mySQL db .. or any db for that matter. I have looked around and have not gotten a good clear answer?

    Thanks.

    Chad Angerer

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

    attached mail follows:


    You need to add a . (dot) to your include path in PHP.ini...

    Cheers, Maxim Maletsky

    -----Original Message----- From: Fabian Fabela [mailto:phpvacagorda.com] Sent: Wednesday, February 14, 2001 2:39 AM To: php-generallists.php.net Subject: [PHP] Include

    Hello,

    I have php 4.0.3pl1.

    I am trying to install phorum (phorum.org).

    In a php file (index.php in admin) there is the function include for a file (common.php), I get the following error.

    Warning: Failed opening 'common.php' for inclusion (include_path='/usr/share/php') in /home/web/vacagorda/jeans/htdocs/foro/administration/index.php on line 28

    Why I can't include that file without putting it in the /usr/shar/php diretory?

    Thank you

    Fabian Fabela fabianfabela.com.mx

    "La información transmitida en el presente mensaje tiene la intención de estar dirigida únicamente a la persona o entidad que se refiere y puede contener información privilegiada y/o confidencial. Cualquier, revisión, retransmisión, diseminación o cualquier uso impropio o relacionado con dicha información por persona alguna distinta a la que fue dirigido este mensaje queda estrictamente prohibido. Si Usted ha recibido este mensaje o sus anexos por error, favor de contactar al remitente y elimine el material de cualquier computadora."

    "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer."

    attached mail follows:


    you should try the setting for include_path in php.ini as

    include_path =" /usr/share/php:./"

    note the addition of './' in the include path.

    this would allow php to include the files in the current directory as well, which is the case I guess with the phorum scripts.

    regards

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Fabian Fabela" <phpvacagorda.com> To: <php-generallists.php.net> Sent: Tuesday, February 13, 2001 11:08 PM Subject: [PHP] Include

    Hello,

    I have php 4.0.3pl1.

    I am trying to install phorum (phorum.org).

    In a php file (index.php in admin) there is the function include for a file (common.php), I get the following error.

    Warning: Failed opening 'common.php' for inclusion (include_path='/usr/share/php') in /home/web/vacagorda/jeans/htdocs/foro/administration/index.php on line 28

    Why I can't include that file without putting it in the /usr/shar/php diretory?

    Thank you

    Fabian Fabela fabianfabela.com.mx

    "La información transmitida en el presente mensaje tiene la intención de estar dirigida únicamente a la persona o entidad que se refiere y puede contener información privilegiada y/o confidencial. Cualquier, revisión, retransmisión, diseminación o cualquier uso impropio o relacionado con dicha información por persona alguna distinta a la que fue dirigido este mensaje queda estrictamente prohibido. Si Usted ha recibido este mensaje o sus anexos por error, favor de contactar al remitente y elimine el material de cualquier computadora."

    "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer."

    attached mail follows:


    it replaces 'This' with 'That', some you tell to ereg what he should think 'This' is and what to replace it with.

    It does only one replacement at a time.

    Cheers, Maxim Maletsky

    -----Original Message----- From: Brian V Bonini [mailto:briangfx.cncdsl.com] Sent: Wednesday, February 14, 2001 5:31 AM To: PHP Lists Subject: [PHP] ereg_replace

    I know you can replace A or B or C with D but can you replace A with B and C with D exclusively with one call to ereg_replace or does this need to be done seperately?

    -Brian

    -- 
    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: "Philip Olson" <philipcornado.com> > They're very useful. Also, regarding SQL, don't do "SELECT * ..." all the > time as it's overkill if not all fields are being used.

    And, in fact, doing a "SELECT *" ends up precluding most optimizations within a query engine! Selecting only what you really need can give speedups in queries in the order of 3 orders of magnitude (where the query results can be satisfied via indices).

    Mark Charettesneezy.org Former (and still occasionally) Oracle performance guy. ----------- "When the unknown is thought to be unknowable, gaps in knowledge are too readily filled by fancy, so long as the fancy is consistent with faith." -- Sherwin B. Newland, M.D., "The Mysteries Within".

    attached mail follows:


    "Jeff Oien" <jeffwebdesigns1.com> wrote in message news:NDBBJKNCILKDCEGAJBAOAEADDDAA.jeffwebdesigns1.com... > Would people like to list bad practices and also point us > newbies to any articles online dealing with syntax, correct > use of single and double quotes etc.?

    People who create scripts that include a need for access to a SQL database, meaning you need to give it a username and password then making the damn configuration file be called something stupid like config.inc.

    When you are scripting, using anything with a .inc extension is just asking for trouble. If someone requests that file, it'll get passed straight to them. It's a .inc, which means that PHP does not know to parse it. Which means, that person can see your usernames and passwords. And because it's a public package, they're far more likely to know the path to said file.

    --
    Rick Hodger
    

    attached mail follows:


    Greetings,

    I was just wondering if there's a "proper" name for what I've been calling the "short equals tag" ( <?= ). I'm just curious to see if there's actually a name for it or (if not) if somebody has a more descriptive name for it.

    --Toby Butzon

    attached mail follows:


    I want to generate a random string of characters of n Length...what's the easiest way to do this?

    Thanks, -Jonathan

    attached mail follows:


    Generate a Random Password with PHP http://www.linuxguruz.org/z.php?id=305

    # Note: 1. You can add more charactors, numbers or lower case charactors # to '$possible_charactors' is you wish. # 2. You can change the string length, for example, # echo 'Random_Password(16);' for 16 charactors.

    ranmannbnet.nb.ca #PHP IRC EfNet #LinuxSupport IRC EfNet http://www.LinuxGuruz.org

    On Tue, 13 Feb 2001, Jonathan Sharp wrote:

    > I want to generate a random string of characters of n Length...what's the > easiest way to do this? > > Thanks, > -Jonathan > > > -- > 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, I finally found it. Someone else here recommended setenv -- it's actually putenv. putenv was *not* found through any search I could make on the PHP Web site involving the word environment and so on, I found it through Google. And it's apparently documented under "PHP Options and Information" where I wouldn't have thought to look for it for a thousand years.

    attached mail follows:


    _ __ _ | | | \ | | | |__ | |> || |__ |____||___/ |____|

    Larry L. webmasterldlenterprise.com www.ldlenterprise.com

    attached mail follows:


    I am having trouble getting this peice of code to only show 2 decimal places.

    echo $cart->cart_total($table, $scid) * .0625;

    The class returns 100.50 and the above code returns 6.28125

    Any help taking the 125 off would be appreciated. Thanks.

    _ __ _ | | | \ | | | |__ | |> || |__ |____||___/ |____|

    Larry L. webmasterldlenterprise.com www.ldlenterprise.com

    attached mail follows:


    Check out php.net/round and it's relatives

    --Toby

    LDL Enterprise wrote: > > I am having trouble getting this peice of code to only show 2 decimal > places. > > echo $cart->cart_total($table, $scid) * .0625; > > The class returns 100.50 and the above code returns 6.28125 > > Any help taking the 125 off would be appreciated. Thanks. > > _ __ _ > | | | \ | | > | |__ | |> || |__ > |____||___/ |____| > > Larry L. > webmasterldlenterprise.com > www.ldlenterprise.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:


    Hello everyone,

    I've just joined this list, so I thought I'll introduce myself. I won't bore you with the long life story, so here's the quick summary:

    -Electrical + Computer Engineering student -web development for 6+ years (started out with the VI editor) -HTML,C/C++,PERL,PHP,ASM,Jscripts,...I learn them as I need them... and forget them until I need them.

    My questions:

    I want to make an e-commerce like transaction with a remote file, similar to how a merchant account process a credit card. The concept is very similar.

    Basically, I have two servers in two different cities. I have a web interface on server A, and DB on server B. Server A is a membership site.

    If someone tries to access a members-feature from site A, then site A will contact site B, run a cgi script (which returns YES or NO), then proceed according to the answer from B.

    [It's not possible for the user to connect to site B, then transfer to site A]

    I want this to be invisible to the user, so I'm using

    $fp = fopen(http://.../file.cgi?var=value);

    to run the remote script.

    Now, if the remote script returns a value, like

    return ($va1, $var2);

    ================= How can I read these value, from site A? =================

    If the function was in the same file, then it would be no problem. For example, with

    $var1 = function_name();

    $var1 would contain any value returned by function_name().

    ===================== Does that same concept holds, if the files are different? ====================

    === How can I capture the returned value of the remote file?

    === Is there a better way to do this?

    Any and all suggestions are welcome. I would appreciate any help, comments, directions, that can provide.

    Thanks in advance.

    -John M. pepiedesigns

    attached mail follows:


    Greetings!

    I know "\n" gives the new line and "\t" gives the tab. Is there any other code for them because this is not working in the web server where I host my web pages?

    Looking froward to hearing from you.

    Regards, DT

    attached mail follows:


    On Wed, 14 Feb 2001 14:04, Deependra B. Tandukar wrote: > Greetings! > > I know "\n" gives the new line and "\t" gives the tab. Is there any > other code for them because this is not working in the web server where > I host my web pages? > > Looking froward to hearing from you. > > Regards, > DT

    When you say 'not working' , do you mean that you don't see a line break in your browser where the \n has been inserted?

    This is correct behaviour - \n, \t and multiple space characters are all treated as white space by browsers and rendered as a single space. If you want to insert a line break you need to use <BR>, and you can use a series of &nbsp; to mimic a tab. There are better ways of handling this using CSS.

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


    try \r

    "\r\n" is equivalent to you pressing the return key.

    __________John Monfort_________________ _+-----------------------------------+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___________________________________+-

    On Wed, 14 Feb 2001, Deependra B. Tandukar wrote:

    > Greetings! > > I know "\n" gives the new line and "\t" gives the tab. Is there any other > code for them because this is not working in the web server where I host my > web pages? > > Looking froward to hearing from you. > > Regards, > DT > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Thanks!

    I did with <br>. "\r\n" too is not giving a new line.

    DT

    attached mail follows:


    "Deependra B. Tandukar" <deepndraicimod.org.np> wrote: > I did with <br>. "\r\n" too is not giving a new line.

    Actually "\n" does create a newline. If you view the source code of the web page from the browser you'll see that it works. "\n" is not an HTML tag. It's not designed to create a newline in the HTML output sent to the browser. As you discovered, the <BR> tag will do that. Hope that is clear. "\n" is typically used in PHP code so that when one looks at the HTML code sent to the browser one doesn't have to look at lines of HTML code that contain hundreds upon hundreds of characters.

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

    attached mail follows:


    you might want to take a look at imagemagick

    http://www.wizards.dupont.com/cristy/ImageMagick.html

    regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Lucas Persona" <lpersonawidesoft.com.br> To: "Php (E-mail)" <php-generallists.php.net> Sent: Tuesday, February 13, 2001 7:25 PM Subject: Re: [PHP] Any image drawing tutorials anywhere?

    > Hello, > > I've seen this 'text images generators' but I would like to know where > I can find some explanation about image manipulation like merging/mixing > two or more images. > Something like, I have a background image and some small image elements > that will be somewher on that background image...for example, my > background image is a table and I have some images like a book, a pen, a > paper..and so on, and what I want to do is to create a final image where > sometimes it will show two books and three pens on the table...sometimes > it will be just a pen on the table... > Have you ever seen something like that and where I can find information > about that? > > Thanks, > Lucas Persona > lpersonawidesoft.com.br > > -- > 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:


    when the cookie is not set, the $HTTP_COOKIE_VARS will not have an index 'getdwgnum'

    maybe you should try it this way

    <?php

    $cook = mt_rand (5, 50000) ; if isset($HTTP_COOKIE_VARS["getdwgnum"]))

    $cookieinfo = $HTTP_COOKIE_VARS["getdwgnum"]; } if ($cookieinfo > "") { $str = "where Cook = $cookieinfo"; $cx=odbc_pconnect("doc","",""); } else setcookie ("getdwgnum", $cook,time()+28800);

    ?>

    this code is not checked by executing. but I guess this should be the reason.

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India.

    "Gary" <gcookeradionics.com> wrote in message news:96bo38$1j7$1toye.p.sourceforge.net... > I am getting the following error message from the code below. > > Warning: Undefined index: getdwgnum in d:\apache\htdocs/getdwgnum.php on > line 4 > > > <?php > > $cook = mt_rand (5, 50000) ; > $cookieinfo = $HTTP_COOKIE_VARS["getdwgnum"]; > if ($cookieinfo > "") > { > $str = "where Cook = $cookieinfo"; > $cx=odbc_pconnect("doc","",""); > } > else > setcookie ("getdwgnum", $cook,time()+28800); > > ?> > > > I want to look for a cookie and if it is not there I want to set one. Any > ideas? > > Thanks, Gary > > > > -- > 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:


    Can some one please have a look through this and give me a step in the right direction asto why my mail script won't cc or bcc. I've checked with the mail server admin and he said as far as the email server is concerned it supports multiple email address.. it will only send to the $address but not any other address..

    /* recipients */

    $address .= "$email" ;//note the comma

    // Subject

    $subject = "ABC Calculation Results";

    //Body of email

    $body = "Thank you $user,\n Your Rental Monthly Figures are as follows:\n \n 24 Months = $ $m2 \n 36 Months = $ $m3 \n 48 Months = $ $m4 \n Your Quartly Figures are: \n $ $q2 Over 24 Months \n $ $q3 Over 36 Months \n $ $q4 Over 48 Months\n \n\n\n\n Thank you again from VFSA-eRentals</font>";

    //Where the email is from

    $headers .= "From: ABC <webmasteracb.com.au>\n"; $headers .= "X-Sender: <webmasterabc.com.au>\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "X-Priority: 1\n"; // Urgent message! $headers .= "Return-Path: <webmasterabc.com.au>\n"; // Return path for errors

    /* If you want to send html mail, uncomment the following line */ //$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type

    $headers .= "cc:peterhabc.au\n"; // CC to $headers .= "bcc:mattrabc.com.au\n"; // BCCs to

    //send the email

    $mailsend = mail("$address", "$subject", "$body.", "$headers \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); print ("$mailsend"); ?>

    Thanks

    Peter

    attached mail follows:


    i want to know whether session is not work before the version php4? thx!

    attached mail follows:


    Sessions were introduces in PHP4. In PHP3 only PHPLIB could do this kind of job which wasn't a part of the package.

    Cheers, Maxim Maletsky

    -----Original Message----- From: JW [mailto:joyce.wongkts-group.com] Sent: Wednesday, February 14, 2001 3:34 PM To: php-generallists.php.net Subject: [PHP] about session

    i want to know whether session is not work before the version php4? thx!

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


    No!

    php sessions functions won't work before Version 4

    to implement sessions in versions of php before version 4, you could use phplib

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "JW" <joyce.wongkts-group.com> To: <php-generallists.php.net> Sent: Wednesday, February 14, 2001 12:04 PM Subject: [PHP] about session

    > i want to know whether session is not work before the version php4? > thx! > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    how can i update the php3 to php4 in linux? thx!

    attached mail follows:


    how can i update the php version 3 to version 4 in linux? whether should i update Apache and SSL too? thank you!

    attached mail follows:


    go to PHP.net/downloads.php download the newest version and install it.

    Follow all the instruction in install file VERY carefully so nothing funny happens.

    Cheers, Maxim Maletsky

    -----Original Message----- From: JW [mailto:joyce.wongkts-group.com] Sent: Wednesday, February 14, 2001 4:45 PM To: php-generallists.php.net Subject: [PHP] about session

    how can i update the php3 to php4 in linux? thx!

    -- 
    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, I am trying to install php4 on a win32 system as a module for apache. I have followed all the instructions for both apache and php. Now, when I load up a page, it is blank, and when I view the source, I see my php file. For example...

    <?php /*index.php*/ echo ('Hello'); ?>

    Now, when I load this in my browser, I see this as the source, but nothing displays on the page. Anybody recognize this? Can anybody point me in the right direction?

    Thank you in advance.

    Sean Kennedy

    attached mail follows:


    Make sure you do not have a hidden file extension of *.txt on the end of your script. If you don't, then the problem is in httpd.conf, or you didn't restart Apache after making changes to httpd.conf.

    Sounds silly, but that ol' hidden file extension thing gets people ALL the time. Swear.

    > Now, when I load this in my browser, I see this as the source, but nothing > displays on the page. Anybody recognize this? Can anybody point me in the > right direction?

    -- 
    +----------------------------------------+
    | Julie Meloni (juliethickbook.com)     |
    |                                        |
    | "PHP Essentials" and "PHP Fast & Easy" |
    |       http://www.thickbook.com         |
    +----------------------------------------+
    

    attached mail follows:


    add this into your httpd.conf file:

    ############## PHP 4.0.3pl1 #################### AddType application/x-httpd-php .php .phtml .php3 .html .inc AddType application/x-httpd-php-source .phps ############################################

    Cheers, Maxim Maletsky

    -----Original Message----- From: Sean Kennedy [mailto:klepto03pacbell.net] Sent: Wednesday, February 14, 2001 4:32 PM To: PHP Mailing List Subject: [PHP] Installation on win32

    Ok, I am trying to install php4 on a win32 system as a module for apache. I have followed all the instructions for both apache and php. Now, when I load up a page, it is blank, and when I view the source, I see my php file. For example...

    <?php /*index.php*/ echo ('Hello'); ?>

    Now, when I load this in my browser, I see this as the source, but nothing displays on the page. Anybody recognize this? Can anybody point me in the right direction?

    Thank you in advance.

    Sean Kennedy

    -- 
    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 any development of SOAP extension to PHP?

    attached mail follows:


    Is there any development of SOAP extension to PHP?

    attached mail follows:


    Nah, I have windows showing me the extentions, so that wouldn't be a problem. (Though I checked, cause you never know...)

    And I restart apache. Actually, I restarted my machine, no dice. This is driving me crazy. I have followed the instructions TO THE LETTER.

    Several Times I might add. I just can't get this to work. GAARRRRRRRG!

    Sorry, had to let that out...

    -Make sure you do not have a hidden file extension of *.txt on the end of -your script. If you don't, then the problem is in httpd.conf, or you -didn't restart Apache after making changes to httpd.conf.

    -Sounds silly, but that ol' hidden file extension thing gets people ALL -the time. Swear.

    attached mail follows:


    have you read my previouse post?

    I bet - That's the problem....

    Cheers, Maxim Maletsky

    -----Original Message----- From: Sean Kennedy [mailto:klepto03pacbell.net] Sent: Wednesday, February 14, 2001 5:02 PM To: PHP Mailing List Subject: [PHP] Re:[PHP] Installation on win32

    Nah, I have windows showing me the extentions, so that wouldn't be a problem. (Though I checked, cause you never know...)

    And I restart apache. Actually, I restarted my machine, no dice. This is driving me crazy. I have followed the instructions TO THE LETTER.

    Several Times I might add. I just can't get this to work. GAARRRRRRRG!

    Sorry, had to let that out...

    -Make sure you do not have a hidden file extension of *.txt on the end of -your script. If you don't, then the problem is in httpd.conf, or you -didn't restart Apache after making changes to httpd.conf.

    -Sounds silly, but that ol' hidden file extension thing gets people ALL -the time. Swear.

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


    Hey guys, where can i find php program for alumini.

    Ripal

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

    attached mail follows:


    Very strange thing happened today. I had a db and a website that was running fine and wanted to add another mysql db to the account, and when i did the site no longer connects to the mysql server. I did not change any passwords or anything else for that matter, simply added a database with a diff name and then poof. Any suggestions on how to figure out what's going on? I can get to the original db via phpmyadmin and the data is there. It just wont connect from the website to the server.

    What could be going on?

    Al