OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general-digest-help_at_lists.php.net
Date: Wed Jan 29 2003 - 16:15:51 CST

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

    php-general Digest 29 Jan 2003 22:15:51 -0000 Issue 1852

    Topics (messages 133474 through 133556):

    test
            133474 by: Sol
            133493 by: Maxim Maletsky
            133495 by: Vladimir Galkov
            133497 by: Ernest E Vogelsinger

    Accessing $php_errmsg give an error ...
            133475 by: Jean-Christian Imbeault
            133476 by: Jean-Christian Imbeault
            133478 by: Ernest E Vogelsinger

    Re: Last error: how to get?
            133477 by: Jean-Christian Imbeault

    Re: using custom "button" instead of standard "submit" form element
            133479 by: 1LT John W. Holmes

    Re: Remembering which option in a SELECT tag the user had chosen
            133480 by: 1LT John W. Holmes
            133483 by: ng
            133530 by: Webapprentice
            133532 by: 1LT John W. Holmes

    Re: php and sql problem with mysql_query and insert
            133481 by: 1LT John W. Holmes
            133482 by: Bryan Brannigan
            133492 by: Maxim Maletsky

    domxml memberfunction not dom compliant??
            133484 by: Řyvind Vestavik

    hopefully easy
            133485 by: Didier McGillis
            133486 by: 1LT John W. Holmes
            133496 by: Steven Balthazor
            133498 by: Didier McGillis

    Re: Advice on uploaded files
            133487 by: Vladimir Galkov
            133490 by: Maxim Maletsky
            133523 by: Ernest E Vogelsinger

    Re: best way to save form data on user side
            133488 by: Maxim Maletsky

    Re: register_globals
            133489 by: Maxim Maletsky

    Re: ayuda help
            133491 by: Maxim Maletsky

    using NETpbm in PHP script.
            133494 by: Marco Alting

    Multiple Emails
            133499 by: 1LT John W. Holmes
            133500 by: Bryan Brannigan
            133502 by: 1LT John W. Holmes
            133520 by: Ernest E Vogelsinger
            133525 by: Davy Obdam
            133528 by: David T-G

    Re: Found a PHP bug!!!!!!!!!
            133501 by: Chris Shiflett

    A way to break up the string????
            133503 by: Scott Fletcher
            133506 by: Jon Haworth
            133510 by: Scott Fletcher
            133512 by: Chris Hayes
            133513 by: R'twick Niceorgaw
            133514 by: Adam Voigt
            133516 by: Scott Fletcher
            133518 by: Řyvind Vestavik
            133556 by: David Freeman

    Re: content type header for downloading files
            133504 by: Chris Shiflett

    MySQL Madness
            133505 by: Gibbs, Liam - SXIA
            133507 by: Bryan Brannigan
            133511 by: Rick Emery
            133517 by: Mike Vanecek
            133533 by: Sunfire
            133536 by: Adam Voigt
            133553 by: Sunfire

    new
            133508 by: Ysrael Guzmán
            133521 by: Ernest E Vogelsinger
            133527 by: Maxim Maletsky

    Warning: Failed opening
            133509 by: Ysrael Guzmán
            133519 by: Rick Emery

    Installation & Configuration Question
            133515 by: Mike At Spy

    audio file upload and php versions
            133522 by: Kendal

    PHP Crashing on iPlanet 6sp4 Enterprise, Solaris 8, PHP 4.3.0
            133524 by: Dilts, John
            133529 by: Maxim Maletsky

    fsockopen(); Connection closed, when an endless loop triggers maxexecutiontime before fclose()?
            133526 by: jochen schultz

    Lots of Variables
            133531 by: César Aracena
            133539 by: Ben

    Tutorial needed
            133534 by: Alberto Brea
            133550 by: salamander

    Problem with Date (2003-03-30)
            133535 by: Gareth Mulholland
            133538 by: Johnson, Kirk
            133540 by: Dale Schell

    Thank you!!!
            133537 by: Sabina Alejandr Schneider

    Email being blocked
            133541 by: Ben
            133549 by: Lowell Allen

    PLEASEEE HEEEELP! CAN'T WRITE ON A FILE
            133542 by: phplam

    GNU Readline 4 Win32
            133543 by: OjMyStEr
            133544 by: White Wolf

    chat rooms
            133545 by: Edward Peloke
            133546 by: 1LT John W. Holmes
            133547 by: V Dub
            133548 by: Chris Hayes

    HMAC funtion other than mhash()
            133551 by: speedphreak

    Re: Using custom "button" form element instead of standard "submit"?
            133552 by: Don Read

    Form Variables not getting passed || Apache, MySql, Win 2k Setup
            133554 by: CF High
            133555 by: Leif K-Brooks

    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:


    test

    attached mail follows:


    worked

    --
    Maxim Maletsky
    maximphp.net
    

    "Sol" <fein4ugmx.de> wrote... :

    > test > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    > worked

    will be a flame I feel ;-)

    attached mail follows:


    At 11:13 29.01.2003, Sol spoke out and said: --------------------[snip]-------------------- >test --------------------[snip]--------------------

    testback please provide detailed information how you received this mail so the it can be shared with the list :)

    -- 
       >O Ernest E. Vogelsinger 
       (\) ICQ #13394035 
        ^ http://www.vogelsinger.at/
    

    attached mail follows:


    I am trying to access the last error message using the superglobal $php_errmsg. But trying to acess that var gives a "not defined" error ...

    Running this script gives me:

    <?php ini_set("track_errors", true); error_reporting (E_ALL);

    $a = $php_errmsg; die; ?>

    Notice: Undefined variable: php_errmsg in err.php on line 5

    What am I doing wrong?

    Thanks,

    Jc

    attached mail follows:


    My mistake, spelling sold be php_error,sg.

    Jc

    attached mail follows:


    At 11:28 29.01.2003, Jean-Christian Imbeault said: --------------------[snip]-------------------- >I am trying to access the last error message using the superglobal >$php_errmsg. But trying to acess that var gives a "not defined" error ... > >Running this script gives me: > ><?php >ini_set("track_errors", true); >error_reporting (E_ALL); > >$a = $php_errmsg; >die; >?> > >Notice: Undefined variable: php_errmsg in err.php on line 5 --------------------[snip]--------------------

    $php_errmsg is NOT a "superglobal" it's simply global so you need to declare it within a function.

    $php_errormsg is not set by default (warning prone) and will be overwritten immediately by the next error or warning. What you should do is something like this:

    global $php_errormsg; $php_errormsg = null; run_your_script(); $err = $php_errormsg; if ($err) ...

    hth,

    -- 
       >O     Ernest E. Vogelsinger
       (\)    ICQ #13394035
        ^     http://www.vogelsinger.at/
    

    attached mail follows:


    Found it, if track_errors is set then the last error is in $php_errormsg. However be careful as the variable is initially not set and doing a if ($php_errormsg != "") will resultin an error.

    Jc

    attached mail follows:


    > <input type="image" name="parent" value="foo" src="icon.gif" />

    Note that when submitted, this will make a variable $parent_x and $parent_y with register_globals ON and $_POST['parent_x'] and $_POST['parent_y'] with it off (or $_GET or $_REQUEST, whatever you use).

    ---John Holmes...

    attached mail follows:


    > Hi, > I have a SELECT on a web form. > > <select name="TimeChoice"> > <option value="Friday August 22, 04:00 PM - 06:00 PM">Friday August 22, 04:00 PM - 06:00 PM</option> > <option value="Friday August 22, 06:00 PM - 08:00 PM">Friday August 22, 06:00 PM - 08:00 PM</option> > <option value="Friday August 22, 08:00 PM - 10:00 PM">Friday August 22, 08:00 PM - 10:00 PM</option> > <option value="Friday August 22, 10:00 PM - 12:00 AM">Friday August 22, 10:00 PM - 12:00 AM</option> > <option value="Saturday August 23, 12:00 AM - 02:00 AM">Saturday August 23, 12:00 AM - 02:00 AM</option> > <option value="Saturday August 23, 12:00 PM - 02:00 PM">Saturday August 23, 12:00 PM - 02:00 PM</option> > <option value="Saturday August 23, 02:00 PM - 04:00 PM">Saturday August 23, 02:00 PM - 04:00 PM</option> > <option value="Saturday August 23, 04:00 PM - 06:00 PM">Saturday August 23, 04:00 PM - 06:00 PM</option> > <option value="Saturday August 23, 06:00 PM - 08:00 PM">Saturday August 23, 06:00 PM - 08:00 PM</option> > <option value="Saturday August 23, 08:00 PM - 10:00 PM">Saturday August 23, 08:00 PM - 10:00 PM</option> > <option value="Saturday August 23, 10:00 PM - 12:00 AM">Saturday August 23, 10:00 PM - 12:00 AM</option> > <option value="Sunday August 24, 12:00 AM - 02:00 AM">Sunday August 24, 12:00 AM - 02:00 AM</option> > <option value="Sunday August 24, 12:00 PM - 02:00 PM">Sunday August 24, 12:00 PM - 02:00 PM</option> > <option value="Sunday August 24, 02:00 PM - 04:00 PM">Sunday August 24, 02:00 PM - 04:00 PM</option> > </select> > > Only one option may be chosen > > When I submit this form, there could be errors. When I have errors, I > wish to reprint the form with the user's values remembered. In the > reprinted SELECT tag, one of the OPTION tags will now have a SELECTED > attribute. Is there any elegant way to insert the SELECTED attribute on > the right option?

    Unless you come up with a nice function to create this box for you, then the only way is to go in on each line, in each <option> tag and check $_POST['TimeChoice'] (or $_GET, $_REQUEST, whatever...) to see if it equals the current value.

    <option value="Friday August 22, 04:00 PM - 06:00 PM"<? if($_POST['TimeChoice']=="Friday August 22, 04:00 PM - 06:00 PM") { echo " SELECTED"; }?>>Friday August 22, 04:00 PM - 06:00 PM</option>

    ---John Holmes...

    attached mail follows:


    hi

    smarty ( and pear ? ) provide some interresant function http://smarty.php.net/manual/en/language.function.html.options.php

    on my own scripts i have somthing like : <?php /** * Boolean function. * * Compare first element with second and return the third. * If the return argument is an array, first element of the array is TRUE, and second FALSE. * * param string $a First element. * param string $b Second element. * param mixed $return Mixed return input. */ // if my function is so long, it's cause i use it for lot of // other comparaisons like bool(md5($_POST['passwd']),$encrypted_passwd) or die; // it should be more performant without some if-then-else function bool($a,$b,$return=FALSE){ if ( ($return===FALSE) || ($return===0) ) $r=array(FALSE,TRUE); elseif ( ($return===TRUE) || ($return===1) )$r=array('0','1'); elseif ($return=='s') $r=array(NULL,' selected'); elseif (($return) && (!is_array($return))) $r=array(NULL,$return); elseif (is_array($return)) $r=$return; else trigger_error ("Wrong parameter for bool()", E_USER_WARNING); if ($a==$b) return $r[1]; else return $r[0]; } ?> exemple : <select name=foo> <option value=a<?=bool($_POST['foo'],'a','s');?>>a</option> <option value=b<?=bool($_POST['foo'],'b','s');?>>b</option> <option value=c<?=bool($_POST['foo'],'c','s');?>>c</option> </select> or : <select name=foo> <?php foreach($a_select as $value) { printf("<option value=\"%1\$s\"%2\$s>%1\$s</option>\n",$value,bool($_POST['foo'],$value,'s')); } ?>

    ( sorry for the long code )

    attached mail follows:


    Hi John, I was thinking of inserting a check on each option, but I thought there had to be a different way. I've received ideas of storing the option values in an array and creating a function to generate that dropdown by grabbing values out of the array, so I want to go with that because that is more elegant, which what I was after.

    Thanks!

    --Stephen

    >Unless you come up with a nice function to create this box for you, then the >only way is to go in on each line, in each <option> tag and check >$_POST['TimeChoice'] (or $_GET, $_REQUEST, whatever...) to see if it equals >the current value. > ><option value="Friday August 22, 04:00 PM - 06:00 PM"<? >if($_POST['TimeChoice']=="Friday August 22, 04:00 PM - 06:00 PM") { echo " >SELECTED"; }?>>Friday August 22, 04:00 PM - 06:00 PM</option> > >---John Holmes... > > > >

    attached mail follows:


    > I was thinking of inserting a check on each option, but I thought there > had to be a different way. > I've received ideas of storing the option values in an array and > creating a function to generate that dropdown by grabbing values out of > the array, so I want to go with that because that is more elegant, which > what I was after.

    Yes, certainly that's a better method. You'll still be doing the same thing, though, basically. You'll still do a comparison on every <option> you create and if it matches, then insert the SELECTED text. It will just be neater because it's all in a nice loop inside of a function.

    Here are two functions I find useful. One is to make a <SELECT> with various options from a global $_CONF array. The other is used to add a new <option> to the <SELECT> (so you can add options when sometimes needed, without modifying the $_CONF array).

    Usage:

    $_CONF['day'] = array('Monday','Tuesday','Wednesday'); $select = conf_select('day','Tuesday'); echo $select; $new_select = add_option($select,'Any'); echo $new_select; //$select and $new_select will contain the //HTML to create the drop down select boxes

    Code:

    //creates a html select drop down box from a //$_CONF array matching the passed key //if $make_array == 1, then an [] will be appended //onto the select name so that the results are an array //if $make_multi is set to something greater than zero, //the select will be made MULTIPLE and the SIZE will //be set to the value of $make_multi. //If $name is passed, that value will be used as the NAME //of the select, instead of the "key" of the $_CONF array

    function conf_select($conf_key, $selected = "", $make_array=0, $make_multi=0, $name="") { global $_CONF; $retval = "";

    if(isset($_CONF[$conf_key])) { if(strlen($name) == 0) { $name = $conf_key; }

    $retval .= "<select name='" . $name;

    if($make_array == 1) { $retval .= "[]"; } $retval .= "' class='text_box'";

    if($make_multi > 0) { $retval .= " multiple size='$make_multi'>\n"; } else { $retval .= " size='1'>\n"; }

    foreach($_CONF[$conf_key] as $value) { $retval .= "<option value='" . $value . "'"; if(strcasecmp($value,$selected)==0) { $retval .= " selected"; } $retval .= ">" . $value . "</option>\n"; }

    $retval .= "</select>\n"; } else { $retval = "Invalid Conf Key"; }

    return $retval; }

    //Adds in an <option> to the <select> box //in the $select_text

    function add_option($select_text, $option) { $retval = preg_replace("/>/",">\n<option value=\"$option\">$option</option>\n",$select_text,1); return $retval; }

    ---John W. Holmes...

    PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

    attached mail follows:


    > im having a little problem with mysql_query("insert into members > ('$company', '$name1', '$name2', '$address1', '$address2', ''$ac1', '$ext2', > '$num1', '$ac2', '$ext2', '$num2', '$city', '$state', '$zip', '$desc', > '$flags')"); > > for some reason those variables are empty by the time they get into the > table...

    Where are those variables coming from then? If the data in the table is empty, then these variables are empty. They can't get lost along the way or anything...

    ---John Holmes...

    attached mail follows:


    Have you tried echo'ing out the variable before and after the mysql_query?

    > -----Original Message----- > From: 1LT John W. Holmes [mailto:holmes072000charter.net] > Sent: Wednesday, January 29, 2003 6:20 AM > To: Sunfire; php-generallists.php.net > Subject: Re: [PHP] php and sql problem with mysql_query and insert > > > > im having a little problem with mysql_query("insert into members > > ('$company', '$name1', '$name2', '$address1', '$address2', ''$ac1', > '$ext2', > > '$num1', '$ac2', '$ext2', '$num2', '$city', '$state', > '$zip', '$desc', > > '$flags')"); > > > > for some reason those variables are empty by the time they > get into the > > table... > > Where are those variables coming from then? If the data in > the table is > empty, then these variables are empty. They can't get lost > along the way or > anything... > > ---John Holmes... > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Guess what?

    add this on top of the file:

    error_reporting(E_ALL);

    this will probably tell you these variables are unset :) Why? Register global... wrong logic... etc...

    What php 4 is exactly installed there?

    --
    Maxim Maletsky
    maximphp.net
    

    "Sunfire" <rusty_81msn.com> wrote... :

    > hi ... > > im having a little problem with mysql_query("insert into members > ('$company', '$name1', '$name2', '$address1', '$address2', ''$ac1', '$ext2', > '$num1', '$ac2', '$ext2', '$num2', '$city', '$state', '$zip', '$desc', > '$flags')"); > > for some reason those variables are empty by the time they get into the > table... > im running mysql 3.2.3.x, php 4 used as module in apache, windows me and > apache 1.3.4xxxx the variables come from a form and then posted to a > comfirmation page where all the contents of the variables are printed in a > table before user would click the continue link at the bottum of the > page... after that the link would call a file called addtolist.php which > would add the var list to a table and return either an error message or a > success message.. i havent yet found how to have a php script load a new web > page other than include() or require() and dont know if that is making my > problem or just what it is... i will include the test file called > addtolist.php below...: > <?php > mysql_db_query("wata", "insert into members VALUES('$company', '$name1', > '$name2', '$address1', '$address2', '$city', '$state', '$zip', '$ac1', > '$ext1', '$num1', '$ac2', '$ext2', '$num2', '$desc', '$flags')"); > echo "\n"; > echo mysql_error(); > > echo <<<ENDOF_BLOCK > $post['name1'] > your entry was added!!!! > > go back to the main menu by clicking <a href="main.htm">here</a>. > ENDOF_BLOCK; > ?> > tnx for the help > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I might be wrong here but, here it goes:

    I'm trying to make a recursive function that traverses a dom tree. (The purpuse is eventually to insert it into a relational database using the "edge table approach")

    When doing so I make extensive use of "array DomNode->child_nodes ( void)" The returned array contains nodes of type 1(element nodes) and 3(text nodes) but not attribute nodes, allthough the elements i check has attributes.

    Is this dom compliant behavior? Shouldn't attribute nodes be returned by DomNode->child_nodes() as well as they are also nodes in the dom tree??

    Below is some code to illustrate what i do...

    Vennlig hilsen Řyvind

    function addElements($element, $source, $conn){ if ($element->has_child_nodes()){ $element_name = $element->tagname; echo "current element: $element_name<br>"; echo "current element has child nodes<br>"; $children = $element->child_nodes(); //faulty behavior?? foreach($children as $child){ $childname = $child->tagname; $childtype = $child->node_type(); echo "childtype is $childtype<br>"; echo "childname $childname<br>"; addElements($child, $source, $conn); } }else{ //process the current node } }

    attached mail follows:


    I need to parse an HTML file for certain information. Like the text between <title></title>.

    So if the html was ...

    <html> <head> <title>The page</title> </head>

    <body>

    Lots of code .................

    </body> </html>

    I would just like the "The page" text.

    _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

    attached mail follows:


    > I need to parse an HTML file for certain information. Like the text between > <title></title>. > > So if the html was ... > > <html> > <head> > <title>The page</title> > </head> > > <body> > > Lots of code ................. > > </body> > </html> > > I would just like the "The page" text.

    preg_match("!<title>(.*)</title>!si",$html,$match);

    echo $match[1];

    That will account for <title> vs <TITLE> and also if <title> and </title> are on separate lines. You may have to add a U modifier if there is a chance </title> would be somewhere else in the text, although I don't know why it would be...

    ---John Holmes...

    attached mail follows:


    I have some code out of my own library which kind of does this; you probably need to play with it to do exactly what you want:

    preg_match_all("|<{$tag}[\s]*?>(.*?)</{$tag}[\s]*?>|si",$text,$matches); print_r($matches);

    Where: $tag is the tag you are looking for $text is the text string you are searching through $matches are the results of the search

    Cheers, Steven Balthazor

    -----Original Message----- From: Didier McGillis [mailto:codesmokerhotmail.com] Sent: Wednesday, January 29, 2003 6:24 AM To: php-generallists.php.net Subject: [PHP] hopefully easy

    I need to parse an HTML file for certain information. Like the text between

    <title></title>.

    So if the html was ...

    <html> <head> <title>The page</title> </head>

    <body>

    Lots of code .................

    </body> </html>

    I would just like the "The page" text.

    _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    cool thanks

    >From: "1LT John W. Holmes" <holmes072000charter.net> >Reply-To: "1LT John W. Holmes" <holmes072000charter.net> >To: "Didier McGillis" <codesmokerhotmail.com>, <php-generallists.php.net> >Subject: Re: [PHP] hopefully easy >Date: Wed, 29 Jan 2003 08:58:50 -0500 > > > I need to parse an HTML file for certain information. Like the text >between > > <title></title>. > > > > So if the html was ... > > > > <html> > > <head> > > <title>The page</title> > > </head> > > > > <body> > > > > Lots of code ................. > > > > </body> > > </html> > > > > I would just like the "The page" text. > >preg_match("!<title>(.*)</title>!si",$html,$match); > >echo $match[1]; > >That will account for <title> vs <TITLE> and also if <title> and </title> >are on separate lines. You may have to add a U modifier if there is a >chance ></title> would be somewhere else in the text, although I don't know why it >would be... > >---John Holmes... > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

    attached mail follows:


    Me too. I add tracks to DB only and store images as independent files. My experiments with storing images in DB shows large memory use wich slow down other processes (especialy if I need to choose several images from DB).

    But if pictures unnumerous and small (smaler 30-40kb) my advice - insert them in DB.

    attached mail follows:


    Two problems for filesystem:

    1. You cannot store over a tot number of images on some systems. Thus, storing them in DB will be headechless. Unless, you know that there will be at most some hundred pics or so.

    2. Storing them in filesystem gives more trouble as you need to make sure it is - writable, permissions won't change, things won't get corrupted, it's writable by you and but not by other user etc

    I'd say that DB is a better way, although altogether it would get it a little slower, but not by too much. DB will be quite large.

    --
    Maxim Maletsky
    maximphp.net
    

    Manuel Ochoa <manuelochoa-usa.com> wrote... :

    > > I writting a php program for a small insurance company and they want to receive uploaded digital photos. > > Should I store the photos in a mysql database or in a directory on the hard drive? > > If you have experience with this any advice would be appreciated.

    attached mail follows:


    At 15:54 29.01.2003, Vladimir Galkov spoke out and said: --------------------[snip]-------------------- > Me too. I add tracks to DB only and store images as independent files. My >experiments with storing images in DB shows large memory use wich slow down >other processes (especialy if I need to choose several images from DB). > > But if pictures unnumerous and small (smaler 30-40kb) my advice - insert >them in DB. --------------------[snip]--------------------

    Humm. I tend to have everything that's needed for reproduction in the DB - that means as well images, docs, etc, everything that gets uploaded.

    However there's a HUGE performance penalty for this, so I duplicate binaries to the filesystem. My classes are set up to try to open the file, and if that doesn't exist they gather it from the DB, cache them to the expected location, and continue serving.

    This method is used throughout our scripts, not only for binaries but also for all other cached items. It guarantees consistency when moving or restoring the system, and allows to simply clear all cache files without disrupting application functionality.

    Well, it gets slower for some time while rebuilding the cache...

    My 2c :-)

    -- 
       >O Ernest E. Vogelsinger 
       (\) ICQ #13394035 
        ^ http://www.vogelsinger.at/
    

    attached mail follows:


    Isn't it simplier to just do like when you purchase something? You also need a prove then that you have paid and are expecting the merchandise to be shipped. That is simply solved with mailing a copy plus a registration number for future reference.

    Should be more than enough.

    --
    Maxim Maletsky
    maximphp.net
    

    Petre Agenbag <internetvsa.co.za> wrote... :

    > Hi > I have a rather annoying problem regarding forms. > I have built an app that allows the users to fill in a rather large form > (much like a claim form) and then have the data pumped into a mysql db. > The problem is: the users want to be able to "save" their forms on their > systems as a) backup/proof that they have filled it in and b) for their > records for future use and c) the hope is that it would also allow for a > reliable method to complete the form off-line and then submit it when > online again. > > So, I'm not sure what the best way is to tackle this situation. My gutt > says it would need some kind of client stand alone app, but I wouldn't > want to go there unless I am proven beyond reasonable doubt that it is > the only way. > > The users are mostly in computer limbo, and if they had their way, they > would want to use "Word or Excel" to complete the forms, save it to > their hard drive and "click to send it away"... > > Help!, Please?! > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    three solutions:

    1. turn register_globals off for compatibility purposes via .htaccess file in the script's directory

    2. create a auto_prepend file with the following: extract($_GET), this should do the trick

    3. rewrite the whole code to make any user-input (form) variable to be $_REQUEST or $_GET/$_POST respectively

    --
    Maxim Maletsky
    maximphp.net
    

    "Kiswa" <Kiswatelia.com> wrote... :

    > I know its stupid but i´ve been writing a site for a register_globals = on > enviroment > now i need to convert all the code to an off setting > > the page is built by sending a whole lot off vars to diferent pages. > as you can see below the hyperlink sends the id var to the same page and > then echos the code. > can anyone help humpty dumpty? > > > > > <font size="2"><a href="left.php?id=1" target="_self">Finansiering</a><BR> > <? > If($id==1){ > echo "<a href=info/leas.htm target=\"mainFrame\"><font > color=\"#00CCCC\">Leasing</font></a><BR> > <a href=info/avb.htm target=\"mainFrame\"><font color=\"#00CCCC\">Räntefri > avbet.</font></a><BR> > <a href=info/stul.htm target=\"mainFrame\"><font > color=\"#00CCCC\">Studentlĺn</font></a><BR>"; > }; > ?> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    you used a wrong password

    --
    Maxim Maletsky
    maximphp.net
    

    Rot Alvarez <ralvarezexploraiquique.cl> wrote... :

    > > Tengo este herros y no se de q esWarning: MySQL Connection Failed: Access denied for user: 'fullweblocalhost' (Using password: YES) in /home/sites/site22/web/45/connect_database.php on line 8 > Error in connecting to MySQL. > > > > _____________________________________________________________ > Registra gratis tu cuenta email en http://www.exploraiquique.cl > > _____________________________________________________________ > Select your own custom email address for FREE! Get youyourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Does anyone have experience in how to use NETpbm functions in a PHP script on a server that is in Safe Mode? I want to resize images as they are uploaded. I'm almost there, but I get a safe mode restriction error, which tells me about a security conflict between the script-user-ID and then image-user-ID.

    attached mail follows:


    Is anyone else getting multiple emails from this list? I'm about to jump on people for asking the same question 3 or 4 times, but maybe it's just me getting copies of the same message.

    ---John Holmes...

    attached mail follows:


    are all your email duplicated? if people are replying to a message you sent you are probably getting one copy from them and one from the list.

    > -----Original Message----- > From: 1LT John W. Holmes [mailto:holmes072000charter.net] > Sent: Wednesday, January 29, 2003 9:31 AM > To: php-generallists.php.net > Subject: [PHP] Multiple Emails > > > Is anyone else getting multiple emails from this list? I'm > about to jump on > people for asking the same question 3 or 4 times, but maybe > it's just me > getting copies of the same message. > > ---John Holmes... > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    > are all your email duplicated? if people are replying to a message you sent > you are probably getting one copy from them and one from the list.

    No, it's not that. I'm talking about just regular questions that are send only to the list. Hours later I will receive another copy of the message for some reason. Maybe it's my ISP.

    ---John Holmes...

    attached mail follows:


    At 15:47 29.01.2003, 1LT John W. Holmes spoke out and said: --------------------[snip]-------------------- >> are all your email duplicated? if people are replying to a message you >sent >> you are probably getting one copy from them and one from the list. > >No, it's not that. I'm talking about just regular questions that are send >only to the list. Hours later I will receive another copy of the message for >some reason. Maybe it's my ISP. --------------------[snip]--------------------

    You should be able to tell by looking at the headers - if they have the same message-ID, they've been duplicated somewhere; if they are different, maybe they originate by a "reply to all" - in that case the message date should be identical. If the sender's date is defferent, then go ahead and jump on them ;-)

    You me also get some clue by parsing the "Received" headers. MTAs usually add something like "received for", which corresponds to the SMTP envelope RCPT address, not to the message's MIME "To" or "Cc" entries.

    -- 
       >O Ernest E. Vogelsinger 
       (\) ICQ #13394035 
        ^ http://www.vogelsinger.at/
    

    attached mail follows:


    Hi John,

    Same thing here, sometimes i think.... mmmm havent i read this before??..

    Best regards,

    Davy Obdam

    1LT John W. Holmes wrote:

    >Is anyone else getting multiple emails from this list? I'm about to jump on >people for asking the same question 3 or 4 times, but maybe it's just me >getting copies of the same message. > >---John Holmes... > > > >

    -- 
    --------------------------------------------------------------------
    Davy Obdam - Obdam webdesign©
    mailto:infodavyobdam.com   web: www.davyobdam.com
    --------------------------------------------------------------------
    

    attached mail follows:


    John, et al --

    ...and then 1LT John W. Holmes said... % % Is anyone else getting multiple emails from this list? I'm about to jump on % people for asking the same question 3 or 4 times, but maybe it's just me % getting copies of the same message.

    Check the Message-ID: to see if it's really the same; occasionally it is.

    Check the message length to see if it's the same as a previous one but freshly injected; often it is.

    Check the sender to see if it's the "same" message from two different accounts; sometimes it is.

    % % ---John Holmes...

    HTH & HAND

    :-D

    -- 
    David T-G                      * There is too much animal courage in 
    (play) davidtgjustpickone.org * society and not sufficient moral courage.
    (work) davidtgworkjustpickone.org  -- Mary Baker Eddy, "Science and Health"
    http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD)

    iD8DBQE+OAXLGb7uCXufRwARAmwWAJ9EaKi7MDh1Up9IASMqCmowdjcuqQCgzaee 5OlR8SMpO5wSqPoC4U3pank= =YQX0 -----END PGP SIGNATURE-----

    attached mail follows:


    --- Alexander Skwar <ASkwaremail-server.info> wrote: > So sprach 1LT John W. Holmes am 2003-01-27 um 15:49:33 > -0500 : > > Actually, "08" is equal to 8 in PHP. PHP will convert > > the string to an > > No, that's not true: > > if ("08" == 8){ echo "equal"; } > if ("08" === 8){ echo "more equal"; } > > This will only print "equal" and not "more equal".

    Good thing he didn't say they were more equal, right?

    Chris

    attached mail follows:


    Just curious, is there a PHP function that will break up the string for us?

    Here's the example

    --clip-- //Original $name = "Jennifer B Cuff";

    //Whatever is to be end result of the original $first_name = "Jennifer"; $middle_name = "B"; $last_name = "Cuff"; --clip--

    It is a mind challenging game to seperate the data from the whitespace and break them up. I wrote a lengthy script to do it for me but it's not perfect. I welcome someone with a fresh mind to do that for me. My next nightmare is to break up the address into 1) street number, 2) street name, 3) street tty, 4) city, 5) state, 6) zip while I have to interrupt it the script to put in the "N/A" in street number, street name and street tty if there is something like "PO Box 1600" or "Apt #23"... It is a sucker that the credit bureau, Experian doesn't keep things any simplier. I like Equifax better.

    You up to the challenge??

    attached mail follows:


    Hi Scott,

    > Just curious, is there a PHP function that will break up the > string for us?

    http://php.net/explode

    Cheers Jon

    attached mail follows:


    Wow!! A lot easier. I think I can do the counting to find out if which go which. For example, "Jennifer B Cuff" as oppose to "Jennifer Cuff". Say, I find 3 words instead of 2 then do something to it. If 2 then do something to it. Etc. I do realize that it is possible for there to be a logic error, like "Cuff" which can't be tell as first name or last name if I don't get the data like "Jennifer Cuff".

    Thanks!!! You are the best newsgroup to talk to!!!! :-)

    "Jon Haworth" <jhaworthwitanjardine.co.uk> wrote in message news:67DF9B67CEFAD4119E4200D0B720FA3F0241EC3BBOOTROS... > Hi Scott, > > > Just curious, is there a PHP function that will break up the > > string for us? > > http://php.net/explode > > > Cheers > Jon

    attached mail follows:


    At 15:52 29-1-03, you wrote: >Just curious, is there a PHP function that will break up the string for us? > >Here's the example > >--clip-- >//Original >$name = "Jennifer B Cuff"; > >//Whatever is to be end result of the original >$first_name = "Jennifer"; >$middle_name = "B"; >$last_name = "Cuff"; >--clip-- > >It is a mind challenging game to seperate the data from the whitespace and >break them up. I wrote a lengthy script to do it for me but it's not >perfect. I welcome someone with a fresh mind to do that for me. the easiest for the programmer is to * add a space after every dot with str_replace() * then remove double dots with same * explode() the string to an array * first array element is firstname * last array element is lastname * if there is something inbetween it's probably all middle names (allow for several middle names for catholic dutch people that tend to have names such as Wilhemus Antonius Johannes Maria den Braber) Curse those people with double back names, like 'den Braber' here. Or spaced first names.

    A little more difficult would be to write a regular expression to split the name. I suggest a google search for ' "regular expressions" firstname, lastname '. This is bound to be something more ppl ran into.

    > My next >nightmare is to break up the address into 1) street number, 2) street name, >3) street tty, 4) city, 5) state, 6) zip while I have to interrupt it the >script to put in the "N/A" in street number, street name and street tty if >there is something like "PO Box 1600" or "Apt #23"... It is a sucker that >the credit bureau, Experian doesn't keep things any simplier. I like >Equifax better.

    Same idea, more testing.

    attached mail follows:


    how about

    $name_array = explode(" ",$name); $first_name = $name_array[0]; $last_name = $name_array[count($name_array) - 1]; unset($name_array[0]); unset ($name_array[count($name_array)]); $middle_name = implode(" " ,$name_array);

    -R'twick

    attached mail follows:


    Don't forget, if you just want to look for word break's (spaces), instead of exploding the data then doing a count, you could just:

    $wordcount = (substr_count($name," ")+1);

    On Wed, 2003-01-29 at 10:03, Scott Fletcher wrote:

    Wow!! A lot easier. I think I can do the counting to find out if which go which. For example, "Jennifer B Cuff" as oppose to "Jennifer Cuff". Say, I find 3 words instead of 2 then do something to it. If 2 then do something to it. Etc. I do realize that it is possible for there to be a logic error, like "Cuff" which can't be tell as first name or last name if I don't get the data like "Jennifer Cuff". Thanks!!! You are the best newsgroup to talk to!!!! :-) "Jon Haworth" <jhaworthwitanjardine.co.uk> wrote in message news:67DF9B67CEFAD4119E4200D0B720FA3F0241EC3BBOOTROS... > Hi Scott, > > > Just curious, is there a PHP function that will break up the > > string for us? > > http://php.net/explode > > > Cheers > Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    Adam Voigt (adamcryptocomm.com)
    The Cryptocomm Group
    My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)

    iD8DBQA+N+zdF9k9BmZXCWYRAm8HAJ49rWXydBMHreDroZ6z1oU8wKpVTACeKFPL yEv6VjOs3VJ5Fq6XsL5SyFkKi -----END PGP SIGNATURE-----

    attached mail follows:


    > * if there is something inbetween it's probably all middle names (allow for > several middle names for catholic dutch people that tend to have names such > as Wilhemus Antonius Johannes Maria den Braber) > Curse those people with double back names, like 'den Braber' here. Or > spaced first names.

    This is what I'm afraid of...... :-)

    It would be easier to force Experian to comply with the programming standard or something like first name into one section, last name into another section, etc..... Well, all business care about is $$$$, I'm so thankful for open source......

    attached mail follows:


    check out the explode function

    vennlig hilsen Řyvind

    On Wed, 29 Jan 2003, Scott Fletcher wrote:

    > Just curious, is there a PHP function that will break up the string for us? > > Here's the example > > --clip-- > //Original > $name = "Jennifer B Cuff"; > > //Whatever is to be end result of the original > $first_name = "Jennifer"; > $middle_name = "B"; > $last_name = "Cuff"; > --clip-- > > It is a mind challenging game to seperate the data from the whitespace and > break them up. I wrote a lengthy script to do it for me but it's not > perfect. I welcome someone with a fresh mind to do that for me. My next > nightmare is to break up the address into 1) street number, 2) street name, > 3) street tty, 4) city, 5) state, 6) zip while I have to interrupt it the > script to put in the "N/A" in street number, street name and street tty if > there is something like "PO Box 1600" or "Apt #23"... It is a sucker that > the credit bureau, Experian doesn't keep things any simplier. I like > Equifax better. > > You up to the challenge?? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    G'day Scott

    > Just curious, is there a PHP function that will break up the > string for us?

    I'm not specifically having a go at you but more observing that some people use this list as a first line of question rather than doing some work themselves.

    Assuming that I didn't already know what function provides this capability I could do the following:

    1. Go to the online manual at http://www.php.net/manual/

    2. Since my problem deals with strings I would then go to the string functions page of the function reference section of the manual.

    3. I would then look through the various functions listed here, each of which includes a short description of what the function does.

    4. I would notice that within the first dozen entries there's a function called explode with a description of "Split a string by string".

    5. I would guess that this explode function might be fairly close to what I'm looking for and load it's page.

    6. I would glance at some of the user contributed notes and see examples of using explode and even some pitfalls to be aware of in it's use.

    At this point, my question is answered and I've managed to find out things in the process. If I've been paying attention I've probably gained a small appreciation of a few other string related functions that I didn't know about and filed it away for future use too.

    Just a thought...

    CYA, Dave

    attached mail follows:


    --- Dara Dowd <daradowdcampus.ie> wrote: > I have the following headers in download.php which forces > a download dialog box to be opened when a user clicks on > a desired file: > > header("Content-type: application/octet"); > header("Content-Length: $filelength"); > header("Content-Disposition: attachment; > filename=".basename($fname).";"); > > This works fine with IE, but Mozilla adds a '.php' > extension to the filename if i choose the save option, > and asks me to choose which application to use if I want > to open the file.

    What is the value of $fname? If you are trying to tell it the name of your script, then that is why Mozilla names it so. The filename directive should be the filename you want assigned to whatever you are sending the browser.

    Also, I think you mean to say application/octet-stream, but I don't feel like looking it up. I suggest double-checking that value.

    Chris

    attached mail follows:


    First off, when executing this command:

    $connection = mysql_connect("localhost", "root", "");

    I get this error msg:

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'rootlocalhost' (Using password: NO) in /home/superpage/public_html/index.php on line 49

    I've gone and read some information on the Internet (understanding almost nothing from the technical stuff--I'm a MySQL/server admin newbie), but I gathered some information.

    Now, a lot of what I read pertains to MySQL and not running it with PHP, but what I did gather from my own gruntwork file-searching and stuff on the Web was that I changed php.ini so that mysql.default_user = root and mysql.default_password = my password. Not a smart idea to run MySQL as root, but I'm trying to make headway. I restarted Apache. That didn't work. I didn't touch mysql.default_port, .default_host, or .default_socket (don't know if I should; didn't find anything that said I should), but I'm really stuck on this. Any other information on MySQL pertained strictly to MySQL and not PHP, and when I included PHP in my search criteria, it just came up with a bunch of pages that had PHP as an extension or a directory name. Searching the PHP-dev archives seems to bring up two search results which are the same conversation, and only really mention it in passing from what I understand. Any clues?

    I can access MySQL through the command ./mysql -u root -p mysql, but obviously that doesn't help when I'm supposed to access it through PHP. I've executed commands there fine.

    Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 for pc-linux (i686).

    attached mail follows:


    put your password in the mysql_connect. mysql_connect("localhost", "root", "yourpassword");

    or create a new user in mysql that has no password and minimal permissions.

    > -----Original Message----- > From: Gibbs, Liam - SXIA [mailto:Liam.Gibbsdfait-maeci.gc.ca] > Sent: Wednesday, January 29, 2003 9:46 AM > To: 'php-generallists.php.net' > Subject: [PHP] MySQL Madness > > > First off, when executing this command: > > $connection = mysql_connect("localhost", "root", ""); > > I get this error msg: > > Warning: mysql_connect() [function.mysql-connect]: Access > denied for user: > 'rootlocalhost' (Using password: NO) in > /home/superpage/public_html/index.php on line 49 > > I've gone and read some information on the Internet > (understanding almost > nothing from the technical stuff--I'm a MySQL/server admin > newbie), but I > gathered some information. > > Now, a lot of what I read pertains to MySQL and not running > it with PHP, but > what I did gather from my own gruntwork file-searching and > stuff on the Web > was that I changed php.ini so that mysql.default_user = root and > mysql.default_password = my password. Not a smart idea to run > MySQL as root, > but I'm trying to make headway. I restarted Apache. That > didn't work. I > didn't touch mysql.default_port, .default_host, or > .default_socket (don't > know if I should; didn't find anything that said I should), > but I'm really > stuck on this. Any other information on MySQL pertained > strictly to MySQL > and not PHP, and when I included PHP in my search criteria, > it just came up > with a bunch of pages that had PHP as an extension or a > directory name. > Searching the PHP-dev archives seems to bring up two search > results which > are the same conversation, and only really mention it in > passing from what I > understand. Any clues? > > I can access MySQL through the command ./mysql -u root -p mysql, but > obviously that doesn't help when I'm supposed to access it > through PHP. I've > executed commands there fine. > > Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 > Distrib 3.23.54 > for pc-linux (i686). > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    If you're using root, then you must use the root password in mysql_connect().

    ----- Original Message ----- From: "Gibbs, Liam - SXIA" <Liam.Gibbsdfait-maeci.gc.ca> To: <php-generallists.php.net> Sent: Wednesday, January 29, 2003 8:45 AM Subject: [PHP] MySQL Madness

    First off, when executing this command:

    $connection = mysql_connect("localhost", "root", "");

    I get this error msg:

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'rootlocalhost' (Using password: NO) in /home/superpage/public_html/index.php on line 49

    I've gone and read some information on the Internet (understanding almost nothing from the technical stuff--I'm a MySQL/server admin newbie), but I gathered some information.

    Now, a lot of what I read pertains to MySQL and not running it with PHP, but what I did gather from my own gruntwork file-searching and stuff on the Web was that I changed php.ini so that mysql.default_user = root and mysql.default_password = my password. Not a smart idea to run MySQL as root, but I'm trying to make headway. I restarted Apache. That didn't work. I didn't touch mysql.default_port, .default_host, or .default_socket (don't know if I should; didn't find anything that said I should), but I'm really stuck on this. Any other information on MySQL pertained strictly to MySQL and not PHP, and when I included PHP in my search criteria, it just came up with a bunch of pages that had PHP as an extension or a directory name. Searching the PHP-dev archives seems to bring up two search results which are the same conversation, and only really mention it in passing from what I understand. Any clues?

    I can access MySQL through the command ./mysql -u root -p mysql, but obviously that doesn't help when I'm supposed to access it through PHP. I've executed commands there fine.

    Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 for pc-linux (i686).

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    If MySQL is configured on your system correctly, you need a password in your script. I'm curious, though, why you're accessing it as root? Usually I create a user account in mysql and grant only the priviledges needed for that account. It may be a mute point, but if a bug were to crop up and your script has root access to mysql, all sorts of crap can take place.

    Have fun, Mike

    Gibbs, Liam - SXIA wrote:

    >First off, when executing this command: > >$connection = mysql_connect("localhost", "root", ""); > >I get this error msg: > >Warning: mysql_connect() [function.mysql-connect]: Access denied for user: >'rootlocalhost' (Using password: NO) in >/home/superpage/public_html/index.php on line 49 > >

    attached mail follows:


    hi.. i came across the same problem before and it was well lets say i probably dont have any hair left (from pulling it out) hehe.. anyways you need to go into the grant tables and look to see what is set up for users.. most likely you dont have a rootlocalhost user because as far as i understand "localhost" as far as mysql is concerned doesnt exist.. no its not a good idea to run mysql as root but in testing on local computers is fine. try this if you have to default install try this set of code in your php file:

    <?php m$connect=mysql_connect("[your ip address]", ", "root", "") or die("the server is down or doesn't exist"); ...other code here now... ?>

    note when you put your domain name or ip address in the connect function dont put the brackets there... try that and see what happens

    ----- Original Message ----- From: "Gibbs, Liam - SXIA" <Liam.Gibbsdfait-maeci.gc.ca> To: <php-generallists.php.net> Sent: Wednesday, January 29, 2003 9:45 AM Subject: [PHP] MySQL Madness

    > First off, when executing this command: > > $connection = mysql_connect("localhost", "root", ""); > > I get this error msg: > > Warning: mysql_connect() [function.mysql-connect]: Access denied for user: > 'rootlocalhost' (Using password: NO) in > /home/superpage/public_html/index.php on line 49 > > I've gone and read some information on the Internet (understanding almost > nothing from the technical stuff--I'm a MySQL/server admin newbie), but I > gathered some information. > > Now, a lot of what I read pertains to MySQL and not running it with PHP, but > what I did gather from my own gruntwork file-searching and stuff on the Web > was that I changed php.ini so that mysql.default_user = root and > mysql.default_password = my password. Not a smart idea to run MySQL as root, > but I'm trying to make headway. I restarted Apache. That didn't work. I > didn't touch mysql.default_port, .default_host, or .default_socket (don't > know if I should; didn't find anything that said I should), but I'm really > stuck on this. Any other information on MySQL pertained strictly to MySQL > and not PHP, and when I included PHP in my search criteria, it just came up > with a bunch of pages that had PHP as an extension or a directory name. > Searching the PHP-dev archives seems to bring up two search results which > are the same conversation, and only really mention it in passing from what I > understand. Any clues? > > I can access MySQL through the command ./mysql -u root -p mysql, but > obviously that doesn't help when I'm supposed to access it through PHP. I've > executed commands there fine. > > Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 > for pc-linux (i686). > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
    

    attached mail follows:


    MySQL infact perfectly understands what localhost is, example:

    GRANT ALL PRIVILEGES ON dbname.* TO boblocalhost IDENTIFIED BY 'password';

    The above will work fine, and aslong as you connect in your PHP with the username "bob", and host "localhost" with pass "password" you'll be fine.

    On Wed, 2003-01-29 at 12:29, Sunfire wrote:

    hi.. i came across the same problem before and it was well lets say i probably dont have any hair left (from pulling it out) hehe.. anyways you need to go into the grant tables and look to see what is set up for users.. most likely you dont have a rootlocalhost user because as far as i understand "localhost" as far as mysql is concerned doesnt exist.. no its not a good idea to run mysql as root but in testing on local computers is fine. try this if you have to default install try this set of code in your php file: <?php m$connect=mysql_connect("[your ip address]", ", "root", "") or die("the server is down or doesn't exist"); ...other code here now... ?> note when you put your domain name or ip address in the connect function dont put the brackets there... try that and see what happens ----- Original Message ----- From: "Gibbs, Liam - SXIA" <Liam.Gibbsdfait-maeci.gc.ca> To: <php-generallists.php.net> Sent: Wednesday, January 29, 2003 9:45 AM Subject: [PHP] MySQL Madness > First off, when executing this command: > > $connection = mysql_connect("localhost", "root", ""); > > I get this error msg: > > Warning: mysql_connect() [function.mysql-connect]: Access denied for user: > 'rootlocalhost' (Using password: NO) in > /home/superpage/public_html/index.php on line 49 > > I've gone and read some information on the Internet (understanding almost > nothing from the technical stuff--I'm a MySQL/server admin newbie), but I > gathered some information. > > Now, a lot of what I read pertains to MySQL and not running it with PHP, but > what I did gather from my own gruntwork file-searching and stuff on the Web > was that I changed php.ini so that mysql.default_user = root and > mysql.default_password = my password. Not a smart idea to run MySQL as root, > but I'm trying to make headway. I restarted Apache. That didn't work. I > didn't touch mysql.default_port, .default_host, or .default_socket (don't > know if I should; didn't find anything that said I should), but I'm really > stuck on this. Any other information on MySQL pertained strictly to MySQL > and not PHP, and when I included PHP in my search criteria, it just came up > with a bunch of pages that had PHP as an extension or a directory name. > Searching the PHP-dev archives seems to bring up two search results which > are the same conversation, and only really mention it in passing from what I > understand. Any clues? > > I can access MySQL through the command ./mysql -u root -p mysql, but > obviously that doesn't help when I'm supposed to access it through PHP. I've > executed commands there fine. > > Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 > for pc-linux (i686). > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    Adam Voigt (adamcryptocomm.com)
    The Cryptocomm Group
    My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)

    iD8DBQA+OBbSF9k9BmZXCWYRAu1kAJ9DXfr11+8PsodB3s5M6U7MnAndvwCghXBS U2INvxvXBMksv/zUOPDISY8bK -----END PGP SIGNATURE-----

    attached mail follows:


    ok sorry to repeat everything already said ----- Original Message ----- From: Adam Voigt To: Sunfire Cc: Gibbs, Liam - SXIA ; php-generallists.php.net Sent: Wednesday, January 29, 2003 1:00 PM Subject: Re: [PHP] MySQL Madness

    MySQL infact perfectly understands what localhost is, example:

    GRANT ALL PRIVILEGES ON dbname.* TO boblocalhost IDENTIFIED BY 'password';

    The above will work fine, and aslong as you connect in your PHP with the username "bob", and host "localhost" with pass "password" you'll be fine.

    On Wed, 2003-01-29 at 12:29, Sunfire wrote: hi.. i came across the same problem before and it was well lets say i probably dont have any hair left (from pulling it out) hehe.. anyways you need to go into the grant tables and look to see what is set up for users.. most likely you dont have a rootlocalhost user because as far as i understand "localhost" as far as mysql is concerned doesnt exist.. no its not a good idea to run mysql as root but in testing on local computers is fine. try this if you have to default install try this set of code in your php file:

    <?php m$connect=mysql_connect("[your ip address]", ", "root", "") or die("the server is down or doesn't exist"); ...other code here now... ?>

    note when you put your domain name or ip address in the connect function dont put the brackets there... try that and see what happens

    ----- Original Message ----- From: "Gibbs, Liam - SXIA" <Liam.Gibbsdfait-maeci.gc.ca> To: <php-generallists.php.net> Sent: Wednesday, January 29, 2003 9:45 AM Subject: [PHP] MySQL Madness

    > First off, when executing this command: > > $connection = mysql_connect("localhost", "root", ""); > > I get this error msg: > > Warning: mysql_connect() [function.mysql-connect]: Access denied for user: > 'rootlocalhost' (Using password: NO) in > /home/superpage/public_html/index.php on line 49 > > I've gone and read some information on the Internet (understanding almost > nothing from the technical stuff--I'm a MySQL/server admin newbie), but I > gathered some information. > > Now, a lot of what I read pertains to MySQL and not running it with PHP, but > what I did gather from my own gruntwork file-searching and stuff on the Web > was that I changed php.ini so that mysql.default_user = root and > mysql.default_password = my password. Not a smart idea to run MySQL as root, > but I'm trying to make headway. I restarted Apache. That didn't work. I > didn't touch mysql.default_port, .default_host, or .default_socket (don't > know if I should; didn't find anything that said I should), but I'm really > stuck on this. Any other information on MySQL pertained strictly to MySQL > and not PHP, and when I included PHP in my search criteria, it just came up > with a bunch of pages that had PHP as an extension or a directory name. > Searching the PHP-dev archives seems to bring up two search results which > are the same conversation, and only really mention it in passing from what I > understand. Any clues? > > I can access MySQL through the command ./mysql -u root -p mysql, but > obviously that doesn't help when I'm supposed to access it through PHP. I've > executed commands there fine. > > Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 > for pc-linux (i686). > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    Adam Voigt (adamcryptocomm.com)
    The Cryptocomm Group
    My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 
    

    --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003

    attached mail follows:


    Warning: Failed opening 'cliente.php' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0

    attached mail follows:


    At 15:51 29.01.2003, Ysrael Guzmán spoke out and said: --------------------[snip]-------------------- >Warning: Failed opening 'cliente.php' for inclusion >(include_path='.;c:\php4\pear') in Unknown on line 0 --------------------[snip]--------------------

    and?

    -- 
       >O Ernest E. Vogelsinger 
       (\) ICQ #13394035 
        ^ http://www.vogelsinger.at/
    

    attached mail follows:


    and the question is ....

    --
    Maxim Maletsky
    maximphp.net
    

    Ysrael Guzmán <yguzmanlayconsa.com.pe> wrote... :

    > Warning: Failed opening 'cliente.php' for inclusion > (include_path='.;c:\php4\pear') in Unknown on line 0 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    This is my problem? Warning: Failed opening 'index.php' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0 Any IDEA? Thanks

    attached mail follows:


    index.php is not in your include path; that is, not in working directory nor c:\hp4\pear. Where is it? ----- Original Message ----- From: "Ysrael Guzmán" <yguzmanlayconsa.com.pe> To: <php-generallists.php.net> Sent: Wednesday, January 29, 2003 8:54 AM Subject: [PHP] Warning: Failed opening

    This is my problem?

    Warning: Failed opening 'index.php' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0

    Any IDEA?

    Thanks

    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    Has anyone ever had an issue where PHP, for whatever reason, stopped .htaccess files from working?

    Thanks,

    -Mike

    attached mail follows:


    Hi,

    I put together a simple file upload example that functions on my site; however, a user recently pointed out that it was not working in their PHP environment. The problem was that the uploaded files were not showing up in their "uploads" directory. I believe the user had file/directory read/write access set correctly.

    Could someone point out what is the platform or version specific feature that may be the problem.

    The example is on-line here: http://www.freedomaudio.com/examples/recorder102/index.html

    The PHP source is as follows:

    <?php global $_FILES, $file, $fileID, $refresh_page; $audioFileDirectory='uploads/';

    if ($fileID != "" && $refresh_page == "1") { echo " "; } else if ($fileID != "" && $file != "" && $refresh_page == "") { if(is_uploaded_file($file)) { $success = move_uploaded_file($file,$audioFileDirectory.$fileID.".ogg"); } else{ echo "<SCRIPT>alert('Eeek! Save Failed')</SCRIPT>"; } } else { $now=time(); $self=$_SERVER["PHP_SELF"]; $sendCommand="sendRecording('$self')";

    echo " 1) Select 'Record' 2) Input your audio* 3) Select Send *Make sure you have your system's mic or line-in enabled. "; }

    ?>

    Thanks!!! Kendal kendal freedomaudio.com

    attached mail follows:


    I get this error after php executes a script a few times. This doesn't seem to reproduce under any certain conditions, typically within a few hits though.

    Warning: Unknown(/local/home/cxadmin/content/Sites/Site01/DocumentRoot/phpinfo.php): failed to create stream: Too many open files in Unknown on line 0

    Warning: Unknown(): Failed opening '/local/home/cxadmin/content/Sites/Site01/DocumentRoot/phpinfo.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

    MEASURES ALREADY TAKEN: recompile of the php module ('./configure' '--without-mysql' '--with-nsapi=/local/Netscape/iplanet/www6.0sp4' '--enable-track-vars' '--enable-libgcc' ) Upped the Hard File Descriptor to 7554 explicitly set include path, session.save path, and safe_mode ENVIRONMENT: We have this running with out a hitch on two other boxes, under the same environment setup, with the exception of there are two instances of iPlanet running on the box that keeps crashing. CODE: // Logic To Decide Which Image To Include $DESIGN; if ($SEL == 1) { $DESIGN="design_1.jpg"; } else if ($SEL == 2) { $DESIGN="design_2.jpg"; } else if ($SEL == 3) { $DESIGN="design_3.jpg"; } else if ($SEL == 4) { $DESIGN="design_4.jpg"; } else if ($SEL == 5 ) { $DESIGN="design_5.jpg"; } else { $DESIGN="design_6.jpg"; }

    //Email Headers $headers .= "From: ".$FNAME."<".$FEML.">\n"; $headers .= "X-Sender: <".$FEML.">\n"; $headers .= "X-Mailer: <".$FNAME.">\n"; $headers .= "Return-Path: <".$FEML.">\n"; $headers .= "Content-Type: text/html"; // Display Header Content $Message ="<TABLE WIDTH=548 Height=466 BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor=#990000>\n"; $Message .="<tr colspan=3 valign=middle>\n"; ...Other $Message Code Ommitted to save space

    //Mail function (variables are passed from the from on the previous page) Globals are set to on mail($TEML, $TNAME.", You Have An AE-card From ".$FNAME, $Message, $headers);

    Anyone run into anything even remotely similar? All help will be appreciated.

    John Web Developer diltsjae.com

    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened. - Douglas Adams

    attached mail follows:


    why don't you check the bug database at bugs.php.net and investigate whether there is anything similar to this? If not, test well, combine your information together (specs, code, system, trace/logs etc) and submit it as a bug. Unless, this is not a bug :)

    --
    Maxim Maletsky
    maximphp.net
    

    "Dilts, John" <DiltsJAE.com> wrote... :

    > I get this error after php executes a script a few times. This doesn't seem > to reproduce under any certain conditions, typically within a few hits > though. > > Warning: > Unknown(/local/home/cxadmin/content/Sites/Site01/DocumentRoot/phpinfo.php): > failed to create stream: Too many open files in Unknown on line 0 > > Warning: Unknown(): Failed opening > '/local/home/cxadmin/content/Sites/Site01/DocumentRoot/phpinfo.php' for > inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0 > > MEASURES ALREADY TAKEN: > recompile of the php module ('./configure' '--without-mysql' > '--with-nsapi=/local/Netscape/iplanet/www6.0sp4' '--enable-track-vars' > '--enable-libgcc' ) > Upped the Hard File Descriptor to 7554 > explicitly set include path, session.save path, and safe_mode > ENVIRONMENT: > We have this running with out a hitch on two other boxes, under the same > environment setup, with the exception of there are two instances of iPlanet > running on the box that keeps crashing. > CODE: > // Logic To Decide Which Image To Include > $DESIGN; > if ($SEL == 1) { > $DESIGN="design_1.jpg"; > } > else if ($SEL == 2) { > $DESIGN="design_2.jpg"; > } > else if ($SEL == 3) { > $DESIGN="design_3.jpg"; > } > else if ($SEL == 4) { > $DESIGN="design_4.jpg"; > } > else if ($SEL == 5 ) { > $DESIGN="design_5.jpg"; > } > else { > $DESIGN="design_6.jpg"; > } > > //Email Headers > $headers .= "From: ".$FNAME."<".$FEML.">\n"; > $headers .= "X-Sender: <".$FEML.">\n"; > $headers .= "X-Mailer: <".$FNAME.">\n"; > $headers .= "Return-Path: <".$FEML.">\n"; > $headers .= "Content-Type: text/html"; > // Display Header Content > $Message ="<TABLE WIDTH=548 Height=466 BORDER=0 CELLPADDING=0 CELLSPACING=0 > bgcolor=#990000>\n"; > $Message .="<tr colspan=3 valign=middle>\n"; > ...Other $Message Code Ommitted to save space > > //Mail function (variables are passed from the from on the previous page) > Globals are set to on > mail($TEML, $TNAME.", You Have An AE-card From ".$FNAME, $Message, > $headers); > > Anyone run into anything even remotely similar? All help will be > appreciated. > > John > Web Developer > diltsjae.com > > There is a theory which states that if ever anybody discovers exactly what > the Universe is for and why it is here, it will instantly disappear and be > replaced by something even more bizarre and inexplicable. There is another > theory which states that this has already happened. - Douglas Adams > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hi,

    i used the function fsockopen() in a script and produced an endless loop with an output of error messages, when i tried to evaluate the returnvalues of a request.

    What happens to the open socketconnection now? What happens to the loop, does it stop after 30 seconds time_limit or does the server possibly have another timelimitation, cause of the output and flush() used inside the loop?

    tia,

    Jochen Schultz

    attached mail follows:


    Hi all,

    I'm about to make a site and I need all the help I can to get started. This can be a long e-mail so please be patient and read all of it :-)

    I will create an "intelligent" PHP script that will guide the visitors through several questions, which will lead to different options, depending on their answers, but also with the possibility to start based on different options.

    To make myself clear, this is a "fly fishing how-when-where-what guide" that a very experienced fisherman of my Country wants to setup in order to give free advises to no-so-expert fishermen, so he needs to know HOW do they want to go fishing (what kind of fly they use), WHEN they will go (which month of the season), WHERE will they go (assuming they have predefined destination) and most important of all WHAT do they want to fish when they go there.

    When all this questions are answered by the visitor, the script should automatically present a general solution telling IF they will catch THAT piece THERE in that MOMENT of the season and using THAT fly. He also will receive a brief description on how he or she should fish that area and which hours are best for those conditions.

    One more thing to have in mind, is the availability of the visitor so he must be able (at the beginning of the script) to decide if he or she wants to make their decisions based upon WHEN, WHAT, HOW or WHERE.

    Has anyone ever made such a complex script or program? I don't realize how to start and how to face this one... not even the DB (which will be MySQL)...

    Any help will be very much appreciated,

    --------------------- Cesar Aracena listsicaam.com.ar www.icaam.com.ar Cel: +54.299.635-6688 Tel: +54.299.477-4532 Fax: +54.299.477-7773 Cipolletti, Rio Negro R8324BEG Argentina

    ----------------------------------------- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar

    attached mail follows:


    Cesar, the first thing you need to work out is a data structure. Start with your database design. I would envisage something along the lines of :

    TABLE : Questions FIELDS : question_id, question_text

    TABLE : AnswerOptions FIELDS : answer_id, question_id, answer_text

    TABLE: QALink FIELDS: answer_id, question_id

    TABLE: UserAnswers FIELDS: user_id, answer_id

    Store you questions in 'Questions'. Store you answers (the options for each question, e.g. 'Yes', 'No'..etc..) in 'AnswerOptions', linking them up with the question_id field.

    Then link the options on to the next set of questions with the 'QALink' table.

    Store each answer in 'UserAnswers', where user_id uniquely identifies the user, a record for each answer option selected.

    You'll then need to do something with the set of answers produced by each user. Some sort of matrix.

    Once you've set this up, you should be able to start building the site around it.

    Good luck,

    Ben

    "César aracena" <listsicaam.com.ar> wrote in message news:1027.200.70.121.36.1043859069.squirrelwww.icaam.com.ar... > Hi all, > > I'm about to make a site and I need all the help I can to get started. > This can be a long e-mail so please be patient and read all of it :-) > > I will create an "intelligent" PHP script that will guide the visitors > through several questions, which will lead to different options, depending > on their answers, but also with the possibility to start based on > different options. > > To make myself clear, this is a "fly fishing how-when-where-what guide" > that a very experienced fisherman of my Country wants to setup in order to > give free advises to no-so-expert fishermen, so he needs to know HOW do > they want to go fishing (what kind of fly they use), WHEN they will go > (which month of the season), WHERE will they go (assuming they have > predefined destination) and most important of all WHAT do they want to > fish when they go there. > > When all this questions are answered by the visitor, the script should > automatically present a general solution telling IF they will catch THAT > piece THERE in that MOMENT of the season and using THAT fly. He also will > receive a brief description on how he or she should fish that area and > which hours are best for those conditions. > > One more thing to have in mind, is the availability of the visitor so he > must be able (at the beginning of the script) to decide if he or she wants > to make their decisions based upon WHEN, WHAT, HOW or WHERE. > > Has anyone ever made such a complex script or program? I don't realize how > to start and how to face this one... not even the DB (which will be > MySQL)... > > Any help will be very much appreciated, > > --------------------- > Cesar Aracena > listsicaam.com.ar > www.icaam.com.ar > Cel: +54.299.635-6688 > Tel: +54.299.477-4532 > Fax: +54.299.477-7773 > Cipolletti, Rio Negro > R8324BEG > Argentina > > > ----------------------------------------- > Soluciones profesionales en > Internet y Comunicaciones > http://www.icaam.com.ar > >

    attached mail follows:


    Does anybody know of an online tutorial explaining how to access ODBC databases with PHP? Thanks Alberto

    attached mail follows:


    Hi Alberto,

    There are HOWTO's on this at www.iodbc.org

    Best regards, Andrew Hill

    On Wednesday, January 29, 2003, at 12:53 PM, Alberto Brea wrote:

    > Does anybody know of an online tutorial explaining how to access ODBC > databases with PHP? > Thanks > Alberto

    attached mail follows:


    I'm having problems with mktime and Midnight on 30th March 2003.

    The code I'm using is:

    echo mktime(0,0,1,'03','29','2003'); echo mktime(0,0,1,'03','30','2003'); echo mktime(0,0,1,'03','31','2003');

    but the result is:

    1048896001 -3661 1049065201

    Therefore date is giving me 31 Dec 1969. Is this a problem with UNIX or PHP?

    Thanks Gareth

    attached mail follows:


    > -----Original Message----- > From: Gareth Mulholland [mailto:phpeden-interactive.com] > > I'm having problems with mktime and Midnight on 30th March 2003. > > The code I'm using is: > > echo mktime(0,0,1,'03','29','2003'); > echo mktime(0,0,1,'03','30','2003'); > echo mktime(0,0,1,'03','31','2003'); > > but the result is: > > 1048896001 > -3661 > 1049065201

    I ran your exact code and got this:

    1048921201 1049007601 1049094001

    Kirk

    attached mail follows:


    All parameters whould be integers. Unquote them and use intval to strip the leading zeros.

    On 1/29/03 11:51, "Gareth Mulholland" <phpeden-interactive.com> wrote:

    > I'm having problems with mktime and Midnight on 30th March 2003. > > The code I'm using is: > > echo mktime(0,0,1,'03','29','2003'); > echo mktime(0,0,1,'03','30','2003'); > echo mktime(0,0,1,'03','31','2003'); > > but the result is: > > 1048896001 > -3661 > 1049065201 > > Therefore date is giving me 31 Dec 1969. Is this a problem with UNIX or PHP? > > Thanks > Gareth > > > >

    attached mail follows:


    Hello to everybody!!! this time I'm writing to you to thank you all for the help you have iven to me this last days. I'm very satisffied with this language and with the group of persons that are working here. Thank you once more for your time and help! :-)

    Sabina Alejandra Schneider sabinaschneidertutopia.com

    _________________________________________________________________

    Tutopia - Acceso a Internet rápido, fácil y a los mejores precios. http://www.tutopia.com

    attached mail follows:


    Hi, I have a very frustrating problem that I hope someone can give me an answer to.

    I'm trying to send out emails from a script, using the mail() function. This works, but only for email addresses that are in the same domain as the website !

    So, if the website domain that the script is running within is www.mysite.com, then

    testmysite.com is fine testsomeothersite.com will not go

    The script is running on a Cobalt RaQ, Linux machine, with sendmail.

    Accessing sendmail from perl CGI presents no such difficulties, so I assume its not a sendmail / firewall / OS problem.

    I have also tried talking to sendmail directly, from PHP, rather than using the mail() function, and have found that the same problem occurrs.

    Could it be something in PHP.INI ?

    Please help !

    Thanks,

    Ben Peters

    attached mail follows:


    > From: "Ben" <wdesignpetromedia.co.uk> > [snip] > > I'm trying to send out emails from a script, using the mail() function. This > works, but only for email addresses that are in the same domain as the > website ! > > So, if the website domain that the script is running within is > www.mysite.com, then > > testmysite.com is fine > testsomeothersite.com will not go > > The script is running on a Cobalt RaQ, Linux machine, with sendmail. > > Accessing sendmail from perl CGI presents no such difficulties, so I assume > its not a sendmail / firewall / OS problem. > > I have also tried talking to sendmail directly, from PHP, rather than using > the mail() function, and have found that the same problem occurrs. > > Could it be something in PHP.INI ? >

    The value of sendmail_from can affect the return path header and cause receiving systems to block as spam. There's a user contributed note in the manual: <http://www.php.net/manual/en/ref.mail.php>

    --
    Lowell Allen
    

    attached mail follows:


    Hello ! I'm in a mess. Please help me. Every time I tried to write with fwrite or fputs in a file, I get an error on windows nt sp6 , ie6 from "Doc. Watson" saying that Apache.exe makes an application access error . Filesystem functions: is_readable, is_writable,fopen,fclose are ok . I can create, find and open the file. versions: PHP 4.2.3, APACHE 1.3 httpd.conf : Alias /test/ "C:/Apache/htdocs/test/"

    <Directory "C:/Apache/htdocs/test"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> ---------- example1: // start buffering the output ob_start(); $filename = "c:\\apache\\htdocs\\test\files\\mifile.txt"; // output format - either "www" or "file" $output = "file"; // print some output print "Welcome to the Matrix, Neo"; // now decide what to do with the buffered output if ($output == "www") { // either print the contents of the buffer... ob_end_flush(); } else { // ... or write it to a file $data = ob_get_contents(); chmod ($filename, 0777); $fp = fopen ($filename, "wb"); //ERROR IS HERE fwrite($fp, $data); fclose($fp); ob_end_clean(); }

    example 2: //I've tried each of the following 5 $filename assignments. //$filename = "c:\\apache\\htdocs\\mcm\\mifile.txt"; //$filename = "/mifile.txt"; //$filename = "mifile.txt"; //$filename = "c:\\tmp\\mifile.txt"; $filename = "c:\\apache\\htdocs\\test\files\\mifile.txt"; $somecontent = "Add this to the file\n"; $fp = fopen($filename,"wb"); // Write $somecontent to our opened file. //ERROR IS HERE if (!fwrite($fp, $somecontent)) { print "Cannot write to file ($filename)"; exit; } fclose($fp);

    Thanks a lot in adv phplam

    attached mail follows:


    Hi, Is there any way I can get the 'GNU Readline' libruary on my Windows 2000 installation of PHP4? As far as I can see its only available for *NIX OSs and BSD. Is is available on win32?

    Josh

    attached mail follows:


    "Ojmyster" wrote: > Hi, > Is there any way I can get the 'GNU Readline' libruary on my Windows 2000 > installation of PHP4? As far as I can see its only available for *NIX OSs > and BSD. Is is available on win32?

    http://ftp.unicamp.br/pub/gnu-win32/release/readline/

    3rd hit on Google...

    WW

    attached mail follows:


    Does anyone have any suggestions for a good small FREe chat room to add to a family site? A friend here at work is hosting a site from home and is looking to add a chat room. Some of his site is php so if it is php based, that would be great. We even talked today about creating our own.

    Thanks, Eddie

    attached mail follows:


    > Does anyone have any suggestions for a good small FREe chat room to add to a > family site? A friend here at work is hosting a site from home and is > looking to add a chat room. Some of his site is php so if it is php based, > that would be great. We even talked today about creating our own.

    Just Google for "PHP chat"

    There are some good ones out there already.

    ---John Holmes...

    attached mail follows:


    Go to Hotscripts.com>PHP>ScriptsandPrograms>Groupware and download PhProjekt - chat and a whole lot more

    Could be too much, I dunno!

    VW

    Quoting Edward Peloke <epelokeechoman.com>:

    ### Does anyone have any suggestions for a good small FREe chat room to add to ### a ### family site? A friend here at work is hosting a site from home and is ### looking to add a chat room. Some of his site is php so if it is php ### based, ### that would be great. We even talked today about creating our own. ### ### Thanks, ### Eddie ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ###

    -- 
    Richard Whitney
    Transcend Development
    Producing the next phase of your internet presence.
    rwxend.net
    http://xend.net
    602-971-2791
    

    attached mail follows:


    At 20:33 29-1-03, you wrote: >Does anyone have any suggestions for a good small FREe chat room to add to a >family site? A friend here at work is hosting a site from home and is >looking to add a chat room. Some of his site is php so if it is php based, >that would be great. We even talked today about creating our own. When you write your own, have a look in the book 'Web application development with PHP 4.0' by Tobias Ratschiller & Till Gerken. Chapter 3 analyses the development of projects and takes a IRC chat application as an example. New Riders Publishing.

    attached mail follows:


    Ok. I know I can use the mhash() function, but my service provider doesn't have it enabled. I'm attempting to write an HMAC function for MD5. I have a good understanding of the process, but seeing as I'm a coding newb there are a couple things that are stumping me. If you need more info on what HMAC is here ya go. http://www.faqs.org/rfcs/rfc2104.html

    Here's my code. Again, don't laugh... This is the first function I've ever attempted to write.

    PHP:------------------------------------------------------------------------ ------

    <? function hmac_md5($key, $data) { $l = '16'; $b = '64';

    if (strlen($key) > $b) $key = md5($key);

    while (strlen($key) < $b) { $key = $key."0"; //echo $key; //echo "<br>"; //echo strlen($key)."<br>"; }

    for ($i='0'; $i<='64'; $i++) { //echo $i."<br>"; $ipad = $ipad.'0x36'; $opad = $opad.'0x5c'; //echo $ipad."<br>"; //echo $opad."<br>"; //echo "<br>"; }

    $ipad = $key ^ $ipad; $opad = $key ^ $opad;

    //echo $ipad."<br>"; //echo $opad."<br>";

    $result = md5($opad.(md5($ipad.$data))); echo $result; } ?>

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

    --
    

    Ignore the echo statements. I was trying to use those to help me test. Anyway. I'm sure where I'm messing up is the values for opad and ipad. If someone could help me clear those up, I would greatly appreciate it. Thanks a ton. Oh yeah, I had orginally intended to add a $hash variable to the function so you could specify the hash type. That way it will work with the different hash types that the mhash() function supports.

    attached mail follows:


    On 27-Jan-2003 Durwood Gafford wrote: > I can't figure out how to tell which button was pressed by a user when i'm > using a "button" instead of a standard "submit" form element. > > This works: > > <input type="submit" name="parent" value="foo"> > $parent will equal "foo" > > This doesn't work: > > <button type="submit" name="parent" value="foo"><img > src="icon.gif"></button> > $parent will equal "<img src="icon.gif"> NOT "foo" > > How do I get the value of "foo" to be returned in $parent and still use a > graphical icon instead of a standard submit button? >

    <input TYPE=IMAGE NAME="parent" VALUE="foo" SRC="icon.gif">

    Regards,

    -- 
    Don Read                                       dreadtexas.net
    -- "Beer is proof that God loves us and wants us to be happy."
    

    attached mail follows:


    Hey all.

    This driving me nuts:

    I've got Apache, MySql, and Windows 2000 running on my local machine. In order to get passed php variables evaluated, whether via a url query string, or through a form post, I have to use this syntax:

    $_REQUEST[$my_passed_variable]

    I have no such problem with our hosting company servers; i.e. I can access query_string and form posted variables as $my_passed_variable.

    What is going on here? Is there something in php.ini that needs to be adjusted?

    Any help whatsoever here is much appreciated,

    --Noah

    --
    

    attached mail follows:


    RTFM! Your problem is register_globals.

    CF High wrote:

    >Hey all. > >This driving me nuts: > > I've got Apache, MySql, and Windows 2000 running on my local machine. >In order to get passed php variables evaluated, whether via a url query >string, or through a form post, I have to use this syntax: > >$_REQUEST[$my_passed_variable] > >I have no such problem with our hosting company servers; i.e. I can access >query_string and form posted variables as $my_passed_variable. > >What is going on here? Is there something in php.ini that needs to be >adjusted? > >Any help whatsoever here is much appreciated, > >--Noah > >-- > > > > > >

    -- 
    The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.