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: Thu Jul 04 2002 - 11:06:10 CDT

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

    php-general Digest 4 Jul 2002 16:06:10 -0000 Issue 1444

    Topics (messages 105352 through 105464):

    Re: Authentication
            105352 by: Miguel Cruz
            105355 by: Alberto Serra

    Re: Question about using XSLT_Process?
            105353 by: Chris Wesley

    Re: Simple Example of Passing on a file through a PHP script
            105354 by: Jason Wong
            105359 by: JJ Harrison
            105363 by: Terence Kearns

    Strange MySQL Query Problem
            105356 by: eat pasta type fasta
            105357 by: Jason Wong
            105370 by: Alberto Serra

    Re: Security: PHP: how to "harden" PHP scripts?
            105358 by: Jean-Christian Imbeault

    Re: Script Security: Best coding practices
            105360 by: Jean-Christian Imbeault
            105362 by: Peter James
            105364 by: Manuel Lemos
            105377 by: Jean-Christian Imbeault
            105383 by: SP
            105392 by: Jean-Christian Imbeault

    Appologies
            105361 by: Brandon

    Model View Controller (MVC) frameworks in PHP
            105365 by: Terence Kearns

    Re: mac ie and force download
            105366 by: Miguel Cruz

    Weird preg problem
            105367 by: SP
            105371 by: Miguel Cruz
            105380 by: SP
            105387 by: Tracker 1
            105397 by: SP

    fopen with external file
            105368 by: morka ++
            105375 by: Analysis & Solutions

    how to get calling method identity?
            105369 by: Alberto Serra

    Re: addslahes and magic quote woes
            105372 by: Miguel Cruz

    Java in PHP4
            105373 by: Idaham

    fsockopen question
            105374 by: Jose Arce
            105376 by: Martin Towell
            105379 by: Jose Arce
            105381 by: Martin Towell
            105385 by: Tracker 1
            105388 by: Jose Arce
            105390 by: Martin Towell

    Re: checking the path from which someone has arrived at a specific script
            105378 by: Miguel Cruz
            105382 by: Tracker 1

    Re: gc_probability: requests tallied per server or domain?
            105384 by: Miguel Cruz

    Re: PHP in South Africa
            105386 by: Rudolf Visagie

    Re: Handling of constants in strings
            105389 by: Miguel Cruz

    Using fsockopen
            105391 by: ER Lees
            105446 by: Remy Dufour

    Help!
            105393 by: John Lazos
            105394 by: Alberto Serra
            105396 by: Alberto Serra

    Thanx!!!
            105395 by: John Lazos

    How to pass unknown number of variables to a function?
            105398 by: Uwe Birkenhain
            105399 by: Jason Wong
            105400 by: Alberto Serra
            105408 by: Rudolf Visagie
            105414 by: Terence Kearns

    Nothing will execute after calling imagejpeg.
            105401 by: Victor Spång Arthursson
            105422 by: val petruchek

    extension problem
            105402 by: adelpfephp
            105444 by: adelpfephp
            105453 by: joakim.andersson.cybercom.se

    Picture Cache
            105403 by: Steve Vernon

    mysql/php how to retrieve the right column with 2 columns of the same name
            105404 by: Wilbert Enserink
            105407 by: Jason Wong
            105410 by: W. Enserink
            105413 by: Alberto Serra

    Re: Program executing in PHP. Please help (SOLVED)
            105405 by: Latex Master

    loop problem
            105406 by: Emmanuel FAIVRE

    Re: Need Help with $_SESSION.
            105409 by: Ford, Mike [LSS]

    Re: Does Location: headers constantly
            105411 by: Ford, Mike [LSS]
            105452 by: Analysis & Solutions

    Re: adding a variable to a variable name
            105412 by: Ford, Mike [LSS]

    HTML & Java script doubt..
            105415 by: Balaji Ankem
            105417 by: John Legg

    IIS unexpected error
            105416 by: news.per.connect.net.au

    Content-Length
            105418 by: Grant
            105424 by: Daniel Tryba

    Sort with PHP or SQL?
            105419 by: Patrick Teague
            105454 by: Analysis & Solutions

    PHP dBASE connectivity
            105420 by: labhras sammin

    AdRotator for PHP?
            105421 by: Patrick Teague
            105426 by: joakim.andersson.cybercom.se
            105428 by: Latex Master

    MySql_Error();
            105423 by: Skyhawk
            105456 by: Analysis & Solutions

    Re: [PHP-DB] PHP dBASE connectivity
            105425 by: Miles Thompson
            105441 by: labhras sammin

    Function imap_headers question.
            105427 by: Latex Master

    PHP 4.2.1 - Apache 2.0.36 - Win98SE
            105429 by: Erik Hegreberg

    Re: $this in an XML data handler ... in a class
            105430 by: Peter Clarke

    Button can't see form!
            105431 by: Mark Colvin
            105457 by: Analysis & Solutions
            105462 by: Marek Kilimajer
            105464 by: Analysis & Solutions

    Moving a file with 'rename'?
            105432 by: Tim Stoop
            105434 by: Latex Master
            105435 by: Marek Kilimajer
            105447 by: Tim Stoop
            105448 by: Tim Stoop
            105461 by: Marek Kilimajer

    Microsoft Access & PHP
            105433 by: Daniel J Owen-Mcgee
            105436 by: Latex Master

    Re: Other than substr
            105437 by: César Aracena

    How to trigger particular java script function?
            105438 by: Balaji Ankem

    User generated Web pages?
            105439 by: Anthony Rodriguez
            105442 by: Justin French

    Re: mySQL and phpMyAdmin
            105440 by: Marek Kilimajer

    eregi problems
            105443 by: dan radom
            105449 by: Justin French
            105451 by: dan radom
            105460 by: Marek Kilimajer

    mail atashments
            105445 by: adi

    Broken Cookies
            105450 by: Robert Wray

    Microsoft Access & PHP - Solved
            105455 by: Daniel J Owen-Mcgee

    Paradox Tables with PHP (Still the Same old Question)...
            105458 by: Kondwani Spike Mkandawire

    Problem uploading an image
            105459 by: Barajas, Arturo

    Re: Exim sendmail faults
            105463 by: Liam Gibbs

    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:


    On Thu, 4 Jul 2002, Alberto Serra wrote:
    >> As a caveat to Mr. Serra's suggestion, remember that there are *many*
    >> users who will go through an IP masquerading gateway or proxy, so
    >> their IP may fluctuate, even though they are actively browsing. For
    >> this reason, it is often necessary to tolerate some fluctuation in
    >> the IP address, perhaps only in the last octet though.
    >
    > Thanks, I guess I'll just do that. I was actually wondering how to leave
    > this barrier up without being nasty to normal users. That also solves
    > the dial-up problem, at least much of it, as callers will fluctuate
    > mostly on the last octet if they do reconnect through the same ISP,
    > right? Besides, IP masquerading gateways ARE a problem with the
    > suggestion I gave. And I guess this also explains why we are having so
    > much trouble in counting users (that is, IPs) whenever ADSL connection
    > come around. Any suggestion?

    I'd suggest ignoring IP altogether and focusing on other tactics. There
    are just too many pitfalls in trusting IPs and too much user annoyance
    possible from not trusting them.

    miguel

    attached mail follows:


    Miguel Cruz wrote:
    >
    > I'd suggest ignoring IP altogether and focusing on other tactics. There
    > are just too many pitfalls in trusting IPs and too much user annoyance
    > possible from not trusting them.

    Well, the way I made it admins get emailed each every time a user gets
    refused
    because of a bad IP, and they can decide to apply a control policy from
    0 to 4
    octets check. It seems fair to me: admins will be annoyed by emails just as
    much as users will be annoyed by their security policy. This should lead to
    some balance, in the long run :)

    Chances are most commercial sites will set the check IP rule to 0 but in
    case someone wants a strict check he can configure the system to do so.
    I guess this will fit everybody. And of course we do have all the other
    stuff, so even without IP checks the systems remain pretty secure.

    Thanks for helping
    Alberto
    Kiev

    -- 
    

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    You just need the XML and/or XSL as a string. xmldoc() is creating a DOM object, which xslt_process() can't use.

    In you example that does not work properly, change this:

    $xsl = xmldoc(implode("",file("test.xsl"))); $xml = xmldoc(implode("",file("test.xml")));

    to not use xmldoc(), like this:

    $xsl = implode("",file("test.xsl")); $xml = implode("",file("test.xml"));

    xslt_process() should be happy with the strings in the arguments array.

    g.luck, ~Chris /"\ \ / Microsoft Security Specialist: X The moron in Oxymoron. / \ http://www.thebackrow.net

    On Wed, 3 Jul 2002 john2.mccartyps.ge.com wrote:

    > Hello, > > I'm trying to use xslt_process with $arguments like in the third example in > the online documentation, but I'm not having any luck. I can run the same > .xml and .xsl using the simple examples, but I cannot when using the > $arguments example. I would really like to get this figured out, but I've > run into a brick wall and I can't seem to understand why it doesn't work. > > I've pasted my .xml, .xsl and .php files below. > > Thanks, > > John > > > > This does transform the xml and produce results: > ----------------------------------------------------------------------- > <?php > // Create an XSLT processor > $xh = xslt_create(); > xslt_set_base($xh, "file://D:/Inetpub/wwwroot/phpxml/"); > > // NEED TO FIGURE OUT HOW TO SPECIFY THE INPUT XML and XSL FILE LOCATIONS!!! > > // Process the XML > $result = xslt_process($xh, 'test.XML', 'test.xsl'); > if ($result){ > // print "SUCCESS, book.xml was transformed by book.xsl into > result.xml"; > // print "result.xml has the following contents\n<br/>\n"; > // print "<pre>\n"; > print $result; > // print "</pre>"; > } > else { > print "Sorry, failure!"; > print "<br/>"; > echo xslt_error($xh); > print "<br/>"; > echo xslt_errno($xh); > } > > xslt_free($xh); > ?> > ----------------------------------------------------------------------- > > > > This does not: > ----------------------------------------------------------------------- > <?php > echo "one"; > // Grab the XSL and XML files > $xsl = xmldoc(implode("",file("test.xsl"))); > $xml = xmldoc(implode("",file("test.xml"))); > > // Set up the Arguments thingy > $args = array( > '/_xml'=>$xml, > '/_xsl'=>$xsl > ); > > // Create an XSLT processor > $xh = xslt_create(); > > // Process the XML > $result = xslt_process($xh, 'arg:/_xsl', 'arg:/_xml', null, $args); > //$result = xslt_process($xh, 'files\book.XML', 'files\book.xsl', NULL, > $args); > > if ($result){ > // print "SUCCESS, book.xml was transformed by book.xsl into > result.xml"; > // print "result.xml has the following contents\n<br/>\n"; > print "<h2> Yes! </h2>\n"; > print "<pre>\n"; > print $result; > print "</pre>"; > } > else { > print "Sorry, failure!\n"; > print "<br/>\n"; > echo xslt_error($xh); > print "<br/>\n"; > echo xslt_errno($xh); > } > > xslt_free($xh); > ?> > ----------------------------------------------------------------------- > > The XML File: > ----------------------------------------------------------------------- > <?xml version="1.0" encoding="UTF-8"?> > > <book> > > <!-- Title of the book --> > <title>Professional Php Programming (Programmer to Programmer)</title> > > <!-- Authors of the book --> > <text>This book has been authored by:</text> > <authors> > <author number="1">Sascha Schumann</author> > <author number="2">Harish Rawat</author> > <author number="3">Jesus M. Castagnetto</author> > <author number="4">Deepak T. Veliath</author> > </authors> > > <!-- Image of the book --> > <text>A picture of the book's cover: </text> > > <picture>http://images.amazon.com/images/P/1861002963.01.MZZZZZZZ.jpg > re> > > <!-- Pricing info--> > <text>The pricing of the book is as follows:</text> > <prices> > <price>List price: $49.99</price> > <price>Our price: $39.99</price> > <price>You save: $10.00</price> > </prices> > > <!-- Other misc info--> > <text>Here is some sundry info about the book:</text> > <bookinfo> > <type>Paperback</type> > <amazonrank>6,337</amazonrank> > <pages>909</pages> > <publisher>Wrox Press</publisher> > <isbn>1861002963</isbn> > <size>2.00 x 9.16 x 7.30</size> > > <url>http://www.amazon.com/exec/obidos/ASIN/1861002963/o/qid=986194881/sr=8- > 1/ref=aps_sr_b_1_1/107-4263716-8514955</url> > </bookinfo> > > </book> > ----------------------------------------------------------------------- > > The XSL File: > ----------------------------------------------------------------------- > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format"> > > <xsl:template match="/"> > <html><body> > <xsl:apply-templates/> > </body></html> > </xsl:template> > > <!-- This is the title of the page --> > <xsl:template match="title"> > <b><u> > <xsl:value-of select="."/> > </u></b> > </xsl:template> > > <xsl:template match="text"> > <p/>&nbsp;<b> > <xsl:value-of select="."/> > </b><br/> > </xsl:template> > > <xsl:template match="authors"> > <table> > <xsl:apply-templates/> > </table><br/> > </xsl:template> > > <xsl:template match="author"> > <tr> > <td> > <xsl:value-of select="number"/>. > </td> > <td> > <xsl:value-of select="."/> > </td> > </tr> > </xsl:template> > > <xsl:template match="prices"> > <p/>&nbsp; <table> > <xsl:apply-templates/> > </table><p/>&nbsp; > </xsl:template> > > <xsl:template match="price"> > <tr> > <td> > <xsl:value-of select="."/> > </td> > </tr> > </xsl:template> > > <xsl:template match="bookinfo"> > <p/>&nbsp; > <xsl:apply-templates/> > <p/>&nbsp; > </xsl:template> > > <xsl:template match="bookinfo/*"> > <xsl:choose> > <xsl:when test="local-name(.)='type'"> > <b>Type:</b> > </xsl:when> > <xsl:when test="local-name(.)='amazonrank'"> > <b>Amazon rank:</b> > </xsl:when> > <xsl:when test="local-name(.)='pages'"> > <b>Number of pages:</b> > </xsl:when> > <xsl:when test="local-name(.)='publisher'"> > <b>Publisher:</b> > </xsl:when> > <xsl:when test="local-name(.)='isbn'"> > <b>ISBN #:</b> > </xsl:when> > <xsl:when test="local-name(.)='size'"> > <b>Dimensions in inches:</b> > </xsl:when> > <xsl:when test="local-name(.)='url'"> > <b>More info from this link:</b> > </xsl:when> > </xsl:choose> > <xsl:value-of select="."/> > <br/> > </xsl:template> > > </xsl:stylesheet> > ----------------------------------------------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    On Thursday 04 July 2002 10:46, JJ Harrison wrote:

    > I can output the file using readfile(). But the problem is that it appears > to output the data in it's raw form. How can I get it to open in the right > application?

    You _do_ want it to output the data in it's raw form. However it is your responsibility to output the correct headers beforehand so the browser knows what to do with the file. Search archives for "download" would/should bring up loads of articles on what form the headers should take.

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* the butane lighter causes the pincushioning */

    attached mail follows:


    It sort of works now.

    Here is my script so far:

    <? $file = strtolower($_GET['filename']); $file_split = explode(".", $file); // The number of dots is counted in case a file has two or more dots if($file_split[1] == 'pdf'){ header("Content-type: application/pdf"); } elseif($file_split[1] == 'xls') { header ("Content-type: application/msexcel"); } elseif($file_split[1] == 'zip') { header ("Content-type: application/zip"); } header ("Content-Disposition: attachment; filename=$file" );

    readfile($file);

    ?>

    The problem is that with excel files it asks me if I want to download twice. Also it opens in excel not IE. Sometimes PDFs open in IE sometimes the don't. What is wrong?

    Also would I be better of collecting my stats then using a header to re-direct to the right file(Rather than outputting it through a script)?

    --
    JJ Harrison
    webmastertececo.com
    www.tececo.com
    

    "Jason Wong" <php-generalgremlins.com.hk> wrote in message news:200207041225.34001.php-generalgremlins.com.hk... > On Thursday 04 July 2002 10:46, JJ Harrison wrote: > > > I can output the file using readfile(). But the problem is that it appears > > to output the data in it's raw form. How can I get it to open in the right > > application? > > You _do_ want it to output the data in it's raw form. However it is your > responsibility to output the correct headers beforehand so the browser knows > what to do with the file. Search archives for "download" would/should bring > up loads of articles on what form the headers should take. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > the butane lighter causes the pincushioning > */ >

    attached mail follows:


    I have had "inconsistency" issues when outputing diffrent content-types to IE. It seems to cache the type for a articular file somewhere and deleting temporary files in the usaer agent is no good. I have to shut-down all instances of IE then re-launch it for it to behave like it is supposed to _consistently_

    If I were you, I would just let IE make up it's mind about the file based on it's file extension (it seems to do this automatically based on it's OS settins which are tied into the browser's mime-types). Of course, people may not have excel installed so it won't know what to do with "Content-type: application/msexcel"

    If you're trying to exact control over the situation, you're begging for pain.

    On Thu, 4 Jul 2002 15:23:21 +1000, "JJ Harrison" <webmastertececo.com> said: > It sort of works now. > > Here is my script so far: > > <? > $file = strtolower($_GET['filename']); > $file_split = explode(".", $file); > // The number of dots is counted in case a file has two or more dots > if($file_split[1] == 'pdf'){ > header("Content-type: application/pdf"); > } elseif($file_split[1] == 'xls') { > header ("Content-type: application/msexcel"); > } elseif($file_split[1] == 'zip') { > header ("Content-type: application/zip"); > } > header ("Content-Disposition: attachment; filename=$file" ); > > readfile($file); > > ?> > > The problem is that with excel files it asks me if I want to download > twice. > Also it opens in excel not IE. Sometimes PDFs open in IE sometimes the > don't. What is wrong? > > Also would I be better of collecting my stats then using a header to > re-direct to the right file(Rather than outputting it through a > script)? > > > -- > JJ Harrison > webmastertececo.com > www.tececo.com > > > "Jason Wong" <php-generalgremlins.com.hk> wrote in message > news:200207041225.34001.php-generalgremlins.com.hk... > > On Thursday 04 July 2002 10:46, JJ Harrison wrote: > > > > > I can output the file using readfile(). But the problem is that it > appears > > > to output the data in it's raw form. How can I get it to open in the > right > > > application? > > > > You _do_ want it to output the data in it's raw form. However it is your > > responsibility to output the correct headers beforehand so the browser > knows > > what to do with the file. Search archives for "download" would/should > bring > > up loads of articles on what form the headers should take. > > > > -- > > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > > Open Source Software Systems Integrators > > * Web Design & Hosting * Internet & Intranet Applications Development * > > > > /* > > the butane lighter causes the pincushioning > > */ > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    [TK]

    attached mail follows:


    I already got some replies for this but it wasn't it, here is the problem:

    I have a simple form which queries the database based on 2 pop-up menu choices and keywords entered by the user, it passes on the variables as follows:

    pop-up1=choice1, pop-up2=choice2, textfield=user specified data

    the query is as follows

    $result = mysql_query("SELECT some_id, some_description, some_feature FROM '$pop-up1' WHERE some_description LIKE '%$texfield%' AND some_feature LIKE '%$pop-up2'");

    it tells me that column which equals to the $texfield does not exists, meaning that the query seems to be fed wrong? No idea here, $texfield and $pop-up2 are not requests for tables but matches in those tables

    a bit buffled I am, I've these queries before on larger web servers, this is the first time on my workstation and it does just that, simpler queries work fine...

    thanks in advance,

    R>

    ps. the form is guarded against empty entries ps2. RedHat 7.3, Mysql 3.23.51, Apache 1.3+ wik PHP 4.2.1 configured for MySQL

    attached mail follows:


    On Thursday 04 July 2002 12:32, eat pasta type fasta wrote:

    > $result = mysql_query("SELECT some_id, some_description, some_feature > FROM '$pop-up1' WHERE some_description LIKE '%$texfield%' AND > some_feature LIKE '%$pop-up2'");

    Again:

    echo $result;

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* On Thanksgiving Day all over America, families sit down to dinner at the same moment -- halftime. */

    attached mail follows:


    eat pasta type fasta wrote:

    > $result = mysql_query("SELECT some_id, some_description, some_feature > FROM '$pop-up1' WHERE some_description LIKE '%$texfield%' AND > some_feature LIKE '%$pop-up2'");

    have this query echoed to video and then cut it and paste it to mysql terminal. Most probably you'll find out that it's an uppercase/lowcase problem. Unlike Oracle Mysql IS case sensitive on tablenames and columnnames.

    Alberto Kiev

    -- 
    

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Justin French wrote:

    > This list really does work best (ie best results for you) if you come to us > with a specific problem, rather than something general.

    I totally agree. Sorry to have asked such a wide question but in this case it is a bit of a chicken-or-the-egg situation. To make your scripts secure you need to make sure they no insecure programming practices. But how do you find out what insecure programming practices are? You only find out after someone exploits it.

    If I knew that someone can use a PHP session to somehow run malicious scripts on my server than I would do a search on Google for "PHP session security advisory" or something like that and find out how to secure my scripts against this. But I'd have to know in the first place that such a security problem exists with sessions.

    I guess what I am looking for is a kind of "best practices for security" list for PHP programming. Do's and Don't, or a list of common pitfalls and how to avoid them.

    Can anyone point me to such a list or tutorial?

    Jc

    attached mail follows:


    I am trying to figure out what are some Bad Things (tm) when it comes to secure PHP programming and how to avoid them.

    I am looking for a kind of "best practices for security" list for PHP programming. Do's and Don't, or a list of common pitfalls and how to avoid them.

    Can anyone point me to such a list or tutorial?

    Jc

    attached mail follows:


    A suggestion would be to make sure that the variables you're receiving are coming from where you think they're coming from...

    For instance,

    $_SESSION['logged_in'] is also (generally) $logged_in but so is $_GET['logged_in']

    A smart user could fake it if they wanted to... check the $_SESSION or $_COOKIE or $_POST arrays when it's important, don't just check $logged_in...

    P.

    attached mail follows:


    Hello,

    On 07/04/2002 02:24 AM, Jean-Christian Imbeault wrote: > I am trying to figure out what are some Bad Things (tm) when it comes to > secure PHP programming and how to avoid them. > > I am looking for a kind of "best practices for security" list for PHP > programming. Do's and Don't, or a list of common pitfalls and how to > avoid them. > > Can anyone point me to such a list or tutorial?

    Check out http://www.phpadvisory.com/ .

    -- 
    

    Regards, Manuel Lemos

    attached mail follows:


    Manuel Lemos wrote:

    > > Check out http://www.phpadvisory.com/ .

    An ok site but only three articles, of which two are on security. One article is too general and the other too specific :)

    Jc

    attached mail follows:


    I thought it was a good site. I was reading up on the security bugs found and now I know what not to do.

    -----Original Message----- From: Jean-Christian Imbeault [mailto:jean_christianmyrealbox.com] Sent: July 4, 2002 2:41 AM To: php-generallists.php.net Subject: [PHP] Re: PHP: Script Security: Best coding practices

    Manuel Lemos wrote:

    > > Check out http://www.phpadvisory.com/ .

    An ok site but only three articles, of which two are on security. One article is too general and the other too specific :)

    Jc

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

    attached mail follows:


    Sp wrote:

    > I thought it was a good site. I was reading up on the security bugs found > and now I know what not to do.

    True. It's just too specific. In order for me to figure out what to do I need to read every advisory to see what it is about and how to prevent against that particular problem.

    If you have the time it is probably worth reading most of those advisories. But a general list of Do's and Don't would be more handy :)

    Jc

    attached mail follows:


    I've posted to this newsgroup a few times and some of you have replied back via email. Recently I had a virus on my machine that sent out a TON of email to people i've recieved email from - I just wanted to appologize if you recieved any of this spam. I now have updated Anti-Virus software so it shouldn't happen again!

    Thanks, Brandon

    attached mail follows:


    I've been developing an open source MVC framework in PHP and it's going OK. However, I wanted to find out about any other frameworks around the place that do a similar thing. I want to see how other people approach this design pattern.

    Here are my main aims: 1) standardise development patterns so it is easier to understand other people's code 2) standardise repository/library building so that applications scale features (modules) in an organised manner. 3) provide a central point of configuration to make porting and deploying applications to different environments less painful. 4) provide a standardised way of abstracting interface design from content generation. 5) provide a consistent approach to exception handling 6) provide a consistent approach to content delivery and make it easier to solve cross-platform user agent issues. 7) KISS (keep it simple stupid)

    and corresponding Objectives: 1a) enforce a 100% OO approach to application design using inheritence (implemented object factories). The modularisation of an application should be restricted to class definitions. So the only include() statements should be at the top of a class definition which includes other classes. 1b) promote the usage of PHPdoc and documentation in general 2) Establish a convention for the naming and storage of packages and class definitions so that someone can unzip a package into the tree and use it out-of-the-box (through the URL) 3) use one script as a single point of access which can control configuration settings. Instead of every script needing o include a particular configuration file, one file (with the configuration) will invoke and pass-through every script (class definition). 4) the MVC should assume output is in XML (content centric) and provide standard mechanisms for passing it on to display processors (such as XSLT processors). shuch mechanisms will include conventions for declaring and locating templates (XSL files). 5) utilise the custom error handling capabilities of PHP to raise and handle exceptions in an organised way. 6) <see point 4>. Also, the controller should help the developer make decisions on how to process the output based on user agents or other conditions. 7) the only thing a backend developer need worry about is returning XML output from her/his "external" method. The only thing a GUI developer need worry about is where to put their XSL templates.

    At the moment, I'm not considdering performance (shock, horror). Of utmost importance is make the life of a developer much easier in both short and long-term (when the codebase gets really big). Once the model has stabilised, I can tweak it without compromising the useablity for developers. The model may include provisions for a distributed implementation. It already has provisions for content caching (XML) and may be extended to include output caching (post XSLT). As it happens, the controller is actually written procedurally for reasons I won't go into at this point (this may change).

    Other offerings:

    I have checked out fusebox (FB) (which was initially designed for ColdFusion (CF) but is also available in PHP). It was interesting to see that FB was very similar, in the way methods (or "fuse actions") are called, to how I do it. However, I'm not a big fan of FB for PHP since I like to use an OO methodology. FB is good for CF though. http://www.fusebox.org/

    And I am about to check out Krysalis which looks to be quite comprehensive. http://www.interakt.ro/products/Krysalis/index.php

    Depending on my progress, I will be posting something on my website under the "projects" heading.

    here's a nice gentle introduction to MVC http://www.newarchitectmag.com/documents/s=2412/new1020217692284/index.html

    Once again, if anyone can point me to other existing examples, please point :)

    Credit where credit is due: I should mention that one of the things that inspired me in the first place was http://dcl.sourceforge.net/docs/developers/dcl_developer.html This is a very cool tool. I type of CRM I guess.

    attached mail follows:


    On Tue, 2 Jul 2002, Richard Lynch wrote: > If you can't do .htaccess, for whatever reason, second-best choice is: > > <A > HREF=download.php/filenameyouwant.doc?filename=filenameyouwant.doc>Download< > /A> > > Apache and PHP are gonna ignore the bogus /filenameyouwant.doc part, while > the browser stupidly believes that's what it surfed to, since it looks like > the "end" of the URL.

    Why not do

    <a href='download.php/filenameyouwant.doc'>download</a>

    and then in download.php, just set

    $filename = substr($_SERVER['PATH_INFO'], 1);

    ...?

    miguel

    attached mail follows:


    Hi I am trying to check if a word contains only capital letters. For some reason it's not working. The below example is checking the word "weird" to see if it's all capital letters but it's saying it's matches. I've tried checking for only lower case letters with "WEIRD" and it's not working there too. What am I doing wrong?

    $pattern = "A-Z"; $regexp = '/^['.$pattern.']*$/i'; if( preg_match($regexp, "weird") ) echo "matches"; else echo "does not match";

    attached mail follows:


    On Thu, 4 Jul 2002, SP wrote: > Hi I am trying to check if a word contains only capital letters. For > some reason it's not working. The below example is checking the word > "weird" to see if it's all capital letters but it's saying it's matches. > I've tried checking for only lower case letters with "WEIRD" and it's > not working there too. What am I doing wrong? > > > $pattern = "A-Z"; > $regexp = '/^['.$pattern.']*$/i'; > if( preg_match($regexp, "weird") ) > echo "matches"; > else > echo "does not match";

    Easiest approach:

    if ($str != strtoupper($str)) echo 'String contains lower-case letters.';

    Using preg:

    if (preg_match('/[a-z]/', $str)) echo 'String contains lower-case letters.';

    If you don't want any other characters to appear, ONLY capital letters (your question was a little ambiguous to me):

    if (preg_match('/[^A-Z]/', $str)) echo 'String contains something other than capital letters.';

    miguel

    attached mail follows:


    Thanks Miguel it works now!

    $str = "abcA"; if (preg_match('/^[a-z]*$/', $str)) echo "The string '$str' contains only lower-case letters.";

    -----Original Message----- From: Miguel Cruz [mailto:mncstoic.net] Sent: July 4, 2002 2:29 AM To: SP Cc: php-generallists.php.net Subject: Re: [PHP] Weird preg problem

    On Thu, 4 Jul 2002, SP wrote: > Hi I am trying to check if a word contains only capital letters. For > some reason it's not working. The below example is checking the word > "weird" to see if it's all capital letters but it's saying it's matches. > I've tried checking for only lower case letters with "WEIRD" and it's > not working there too. What am I doing wrong? > > > $pattern = "A-Z"; > $regexp = '/^['.$pattern.']*$/i'; > if( preg_match($regexp, "weird") ) > echo "matches"; > else > echo "does not match";

    Easiest approach:

    if ($str != strtoupper($str)) echo 'String contains lower-case letters.';

    Using preg:

    if (preg_match('/[a-z]/', $str)) echo 'String contains lower-case letters.';

    If you don't want any other characters to appear, ONLY capital letters (your question was a little ambiguous to me):

    if (preg_match('/[^A-Z]/', $str)) echo 'String contains something other than capital letters.';

    miguel

    attached mail follows:


    the /i means case insensitive, remove the i, and it will work as intended.

    --
    =======================================================================
    Michael J. Ryan  -  tracker1[*at*]theroughnecks.com
    Roughneck BBS: http://www.theroughnecks.net  telnet://theroughnecks.net
    =======================================================================
    Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email
    One program for aim/icq/yahoo/msn/irc  -  http://www.trillian.cc/
    

    "Sp" <internetraceryifan.net> wrote in message news:NDBBJHKAELJNNJMBMFHDGEIGDHAA.internetraceryifan.net... > Hi I am trying to check if a word contains only capital letters. For some > reason it's not working. The below example is checking the word "weird" to > see if it's all capital letters but it's saying it's matches. I've tried > checking for only lower case letters with "WEIRD" and it's not working there > too. What am I doing wrong? > > > $pattern = "A-Z"; > $regexp = '/^['.$pattern.']*$/i'; > if( preg_match($regexp, "weird") ) > echo "matches"; > else > echo "does not match"; > >

    attached mail follows:


    Ahhhh that's what that means. Thanks Tracker

    -----Original Message----- From: Tracker 1 [mailto:tracker1theroughnecks.net] Sent: July 4, 2002 3:00 AM To: php-generallists.php.net Subject: [PHP] Re: Weird preg problem

    the /i means case insensitive, remove the i, and it will work as intended.

    --
    =======================================================================
    Michael J. Ryan  -  tracker1[*at*]theroughnecks.com
    Roughneck BBS: http://www.theroughnecks.net  telnet://theroughnecks.net
    =======================================================================
    Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email
    One program for aim/icq/yahoo/msn/irc  -  http://www.trillian.cc/
    

    "Sp" <internetraceryifan.net> wrote in message news:NDBBJHKAELJNNJMBMFHDGEIGDHAA.internetraceryifan.net... > Hi I am trying to check if a word contains only capital letters. For some > reason it's not working. The below example is checking the word "weird" to > see if it's all capital letters but it's saying it's matches. I've tried > checking for only lower case letters with "WEIRD" and it's not working there > too. What am I doing wrong? > > > $pattern = "A-Z"; > $regexp = '/^['.$pattern.']*$/i'; > if( preg_match($regexp, "weird") ) > echo "matches"; > else > echo "does not match"; > >

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

    attached mail follows:


    i try to open the external file using fopen() function. I use the example from php.net: $filename = http://www.aaa.com/index.html; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); fclose ($fd);

    however I always get the error "stat failed for http://www.aaa.com/index.html (errno=2 - No such file or directory) " but this file really exists. what is the problem?

    attached mail follows:


    On Thu, Jul 04, 2002 at 08:04:59AM +0100, morka ++ wrote: > i try to open the external file using fopen() function. > I use the example from php.net: > $filename = http://www.aaa.com/index.html; > $fd = fopen ($filename, "r"); > $contents = fread ($fd, filesize ($filename));

    "This function will not work on remote files" -- http://www.php.net/manual/en/function.filesize.php

    Use $contents = file($filename);

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    Hi!

    I already made this question, but probably I kinda made it in obscure terms. Trying to get clearer.

    let's look at this:

    function utility() { }

    Class a { function some_method() { utility(); } }

    now, how can utility know that it's being called by a::some_method()? What I need is to build something that will output an error message like "error in a::some_method"

    get_class() will work only if I pass a reference every time I call utility, like

    utility(&$this)

    which is already not really what I want. And anyway this would not solve the problem of knowing which method was executed when the event occurred.

    Any idea?

    Alberto Kiev

    -- 
    

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    On Wed, 3 Jul 2002, Jean-Christian Imbeault wrote: > Erik Price wrote: >> Turn off magic_quotes and do addslashes() explicitly every time you do >> a database insert. Then make sure you always stripslash() data >> returned from a database query. >> >> magic_quotes is convenient for newbies, but after a while you'll find it >> only trips you up, as you've discovered. > > I totally agree.

    Chalk me up as another magic_quotes hater.

    Unless your code is very simplistic, you'll end up with far more stripslasheses than you would have had addslasheses. So it's a net waste of time, and leads to all sorts of irritating data corruption bugs that are a nuisance to track down.

    miguel

    attached mail follows:


    Hi, I'm really new to Java in PHP, and curious to this great features. Q: How do I convert the sample code below so that it can run within PHP?

    =============================================================== import com.my.sm.api.*; import com.my.sm.api.interfaces.*;

    public class my1 { public static void main(String args[]) { if (args.length != 3) { System.err.println("Usage : java my1 <server> <username> <password>"); return; }

    System.out.println("Starting Engine.."); String server = args[0]; String username = args[1]; String password = args[2]; ApiSession session = null;

    try { session = ApiSession.openSession(server, username, password); } catch (RuntimeException e) { System.out.println(e.getMessage()); return; }

    } }

    ===================================================== FYI, I'm using PHP 4.2.1 with Java extension and JDK1.3.

    Thanks.

    --idaham

    attached mail follows:


    Hi, i'm making a script to transfer all the zips from my old server to my new one, i mean, server to server. That's the easy part. The cuestion is:

    Can i open more than just one instance for fsockopen to retrieve more files in the same script, at the same time? i mean, not one by one (that will be slow), but 4 or 5 at the same time... some people think it's possible, some people don't...thx :D

    _________________________________________________________________ MSN. Más Útil cada Día. http://www.msn.es/intmap/

    attached mail follows:


    you can do more than one fsockopen(), but since php isn't multi-threaded - you'll still only be able to download one file at a time.

    -----Original Message----- From: Jose Arce [mailto:metallian_ccphotmail.com] Sent: Thursday, July 04, 2002 4:39 PM To: php-generallists.php.net Subject: [PHP] fsockopen question

    Hi, i'm making a script to transfer all the zips from my old server to my new one, i mean, server to server. That's the easy part. The cuestion is:

    Can i open more than just one instance for fsockopen to retrieve more files in the same script, at the same time? i mean, not one by one (that will be slow), but 4 or 5 at the same time... some people think it's possible, some people don't...thx :D

    _________________________________________________________________ MSN. Más Útil cada Día. http://www.msn.es/intmap/

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

    attached mail follows:


    So...i can do more than one fsockopen()...but is not multi-thread? i don't understand...i mean...if i can open more than one fsockopen...it is multithread, or in wich cases php open more than one fsockopen? thx :D

    >From: Martin Towell <martin.towellworld.net> >To: 'Jose Arce' <metallian_ccphotmail.com>, php-generallists.php.net >Subject: RE: [PHP] fsockopen question >Date: Thu, 4 Jul 2002 16:39:36 +1000 > >you can do more than one fsockopen(), but since php isn't multi-threaded - >you'll still only be able to download one file at a time. > >-----Original Message----- >From: Jose Arce [mailto:metallian_ccphotmail.com] >Sent: Thursday, July 04, 2002 4:39 PM >To: php-generallists.php.net >Subject: [PHP] fsockopen question > > >Hi, i'm making a script to transfer all the zips from my old server to my >new one, i mean, server to server. That's the easy part. The cuestion is: > >Can i open more than just one instance for fsockopen to retrieve more files >in the same script, at the same time? i mean, not one by one (that will be >slow), but 4 or 5 at the same time... >some people think it's possible, some people don't...thx :D > >_________________________________________________________________ >MSN. Más Útil cada Día. http://www.msn.es/intmap/ > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    _________________________________________________________________ MSN Fotos: la forma más fácil de compartir e imprimir fotos. http://photos.msn.es/support/worldwide.aspx

    attached mail follows:


    I mean, you can do

    <? // been a while, so syntax is prob. wrong :( $sock1 = fsockopen($host, 80); $sock2 = fsockopen($host, 80);

    fputs($sock1, "GET /file1.html HTTP/1.0\r\n\r\n"); fputs($sock2, "GET /file2.html HTTP/1.0\r\n\r\n");

    $content1 = fgets($sock1, 102400); $content2 = fgets($sock1, 102400);

    $fclose($sock1); $fclose($sock2); ?>

    each of the fgets()'s will be executed sequentially. But there's two sockets open...

    -----Original Message----- From: Jose Arce [mailto:metallian_ccphotmail.com] Sent: Thursday, July 04, 2002 4:48 PM To: martin.towellworld.net; php-generallists.php.net Subject: RE: [PHP] fsockopen question

    So...i can do more than one fsockopen()...but is not multi-thread? i don't understand...i mean...if i can open more than one fsockopen...it is multithread, or in wich cases php open more than one fsockopen? thx :D

    >From: Martin Towell <martin.towellworld.net> >To: 'Jose Arce' <metallian_ccphotmail.com>, php-generallists.php.net >Subject: RE: [PHP] fsockopen question >Date: Thu, 4 Jul 2002 16:39:36 +1000 > >you can do more than one fsockopen(), but since php isn't multi-threaded - >you'll still only be able to download one file at a time. > >-----Original Message----- >From: Jose Arce [mailto:metallian_ccphotmail.com] >Sent: Thursday, July 04, 2002 4:39 PM >To: php-generallists.php.net >Subject: [PHP] fsockopen question > > >Hi, i'm making a script to transfer all the zips from my old server to my >new one, i mean, server to server. That's the easy part. The cuestion is: > >Can i open more than just one instance for fsockopen to retrieve more files >in the same script, at the same time? i mean, not one by one (that will be >slow), but 4 or 5 at the same time... >some people think it's possible, some people don't...thx :D > >_________________________________________________________________ >MSN. Más Útil cada Día. http://www.msn.es/intmap/ > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    _________________________________________________________________ MSN Fotos: la forma más fácil de compartir e imprimir fotos. http://photos.msn.es/support/worldwide.aspx

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

    attached mail follows:


    you can do more than one fsockopen, which means you will have multiple sockets open, however, these are part of the same thread in the same process.. in other words, you can't do two things at once by default.. with php-gtk, you can maybe have multiple user events.. and not sure if you can emulate it..

    --
    =======================================================================
    Michael J. Ryan  -  tracker1[*at*]theroughnecks.com
    Roughneck BBS: http://www.theroughnecks.net  telnet://theroughnecks.net
    =======================================================================
    Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email
    One program for aim/icq/yahoo/msn/irc  -  http://www.trillian.cc/
    

    "Jose Arce" <metallian_ccphotmail.com> wrote in message news:F306yz8pKEoE6KqINGu0000564bhotmail.com... > So...i can do more than one fsockopen()...but is not multi-thread? i don't > understand...i mean...if i can open more than one fsockopen...it is > multithread, or in wich cases php open more than one fsockopen? > thx :D > > > >From: Martin Towell <martin.towellworld.net> > >To: 'Jose Arce' <metallian_ccphotmail.com>, php-generallists.php.net > >Subject: RE: [PHP] fsockopen question > >Date: Thu, 4 Jul 2002 16:39:36 +1000 > > > >you can do more than one fsockopen(), but since php isn't multi-threaded - > >you'll still only be able to download one file at a time. > > > >-----Original Message----- > >From: Jose Arce [mailto:metallian_ccphotmail.com] > >Sent: Thursday, July 04, 2002 4:39 PM > >To: php-generallists.php.net > >Subject: [PHP] fsockopen question > > > > > >Hi, i'm making a script to transfer all the zips from my old server to my > >new one, i mean, server to server. That's the easy part. The cuestion is: > > > >Can i open more than just one instance for fsockopen to retrieve more files > >in the same script, at the same time? i mean, not one by one (that will be > >slow), but 4 or 5 at the same time... > >some people think it's possible, some people don't...thx :D > > > >_________________________________________________________________ > >MSN. Más Útil cada Día. http://www.msn.es/intmap/ > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > _________________________________________________________________ > MSN Fotos: la forma más fácil de compartir e imprimir fotos. > http://photos.msn.es/support/worldwide.aspx >

    attached mail follows:


    now it's clear thx :D is not the same thing as: while ($i < 100) { $sock = fsockopen($host, 80); fputs($sock, "GET /file".$i".html HTTP/1.0\r\n\r\n"); } isn't?

    >From: Martin Towell <martin.towellworld.net> >To: 'Jose Arce' <metallian_ccphotmail.com>, php-generallists.php.net >Subject: RE: [PHP] fsockopen question >Date: Thu, 4 Jul 2002 16:49:59 +1000 > >I mean, you can do > ><? >// been a while, so syntax is prob. wrong :( >$sock1 = fsockopen($host, 80); >$sock2 = fsockopen($host, 80); > >fputs($sock1, "GET /file1.html HTTP/1.0\r\n\r\n"); >fputs($sock2, "GET /file2.html HTTP/1.0\r\n\r\n"); > >$content1 = fgets($sock1, 102400); >$content2 = fgets($sock1, 102400); > >$fclose($sock1); >$fclose($sock2); >?> > >each of the fgets()'s will be executed sequentially. But there's two >sockets >open... > > >-----Original Message----- >From: Jose Arce [mailto:metallian_ccphotmail.com] >Sent: Thursday, July 04, 2002 4:48 PM >To: martin.towellworld.net; php-generallists.php.net >Subject: RE: [PHP] fsockopen question > > >So...i can do more than one fsockopen()...but is not multi-thread? i don't >understand...i mean...if i can open more than one fsockopen...it is >multithread, or in wich cases php open more than one fsockopen? >thx :D > > > >From: Martin Towell <martin.towellworld.net> > >To: 'Jose Arce' <metallian_ccphotmail.com>, php-generallists.php.net > >Subject: RE: [PHP] fsockopen question > >Date: Thu, 4 Jul 2002 16:39:36 +1000 > > > >you can do more than one fsockopen(), but since php isn't multi-threaded >- > >you'll still only be able to download one file at a time. > > > >-----Original Message----- > >From: Jose Arce [mailto:metallian_ccphotmail.com] > >Sent: Thursday, July 04, 2002 4:39 PM > >To: php-generallists.php.net > >Subject: [PHP] fsockopen question > > > > > >Hi, i'm making a script to transfer all the zips from my old server to my > >new one, i mean, server to server. That's the easy part. The cuestion is: > > > >Can i open more than just one instance for fsockopen to retrieve more >files > >in the same script, at the same time? i mean, not one by one (that will >be > >slow), but 4 or 5 at the same time... > >some people think it's possible, some people don't...thx :D > > > >_________________________________________________________________ > >MSN. Más Útil cada Día. http://www.msn.es/intmap/ > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > >_________________________________________________________________ >MSN Fotos: la forma más fácil de compartir e imprimir fotos. >http://photos.msn.es/support/worldwide.aspx > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    _________________________________________________________________ Únase al mayor servicio mundial de correo electrónico: http://www.hotmail.com/es

    attached mail follows:


    That's still running sequentially

    -----Original Message----- From: Jose Arce [mailto:metallian_ccphotmail.com] Sent: Thursday, July 04, 2002 5:01 PM To: martin.towellworld.net; php-generallists.php.net Subject: RE: [PHP] fsockopen question

    now it's clear thx :D is not the same thing as: while ($i < 100) { $sock = fsockopen($host, 80); fputs($sock, "GET /file".$i".html HTTP/1.0\r\n\r\n"); } isn't?

    >From: Martin Towell <martin.towellworld.net> >To: 'Jose Arce' <metallian_ccphotmail.com>, php-generallists.php.net >Subject: RE: [PHP] fsockopen question >Date: Thu, 4 Jul 2002 16:49:59 +1000 > >I mean, you can do > ><? >// been a while, so syntax is prob. wrong :( >$sock1 = fsockopen($host, 80); >$sock2 = fsockopen($host, 80); > >fputs($sock1, "GET /file1.html HTTP/1.0\r\n\r\n"); >fputs($sock2, "GET /file2.html HTTP/1.0\r\n\r\n"); > >$content1 = fgets($sock1, 102400); >$content2 = fgets($sock1, 102400); > >$fclose($sock1); >$fclose($sock2); >?> > >each of the fgets()'s will be executed sequentially. But there's two >sockets >open... > > >-----Original Message----- >From: Jose Arce [mailto:metallian_ccphotmail.com] >Sent: Thursday, July 04, 2002 4:48 PM >To: martin.towellworld.net; php-generallists.php.net >Subject: RE: [PHP] fsockopen question > > >So...i can do more than one fsockopen()...but is not multi-thread? i don't >understand...i mean...if i can open more than one fsockopen...it is >multithread, or in wich cases php open more than one fsockopen? >thx :D > > > >From: Martin Towell <martin.towellworld.net> > >To: 'Jose Arce' <metallian_ccphotmail.com>, php-generallists.php.net > >Subject: RE: [PHP] fsockopen question > >Date: Thu, 4 Jul 2002 16:39:36 +1000 > > > >you can do more than one fsockopen(), but since php isn't multi-threaded >- > >you'll still only be able to download one file at a time. > > > >-----Original Message----- > >From: Jose Arce [mailto:metallian_ccphotmail.com] > >Sent: Thursday, July 04, 2002 4:39 PM > >To: php-generallists.php.net > >Subject: [PHP] fsockopen question > > > > > >Hi, i'm making a script to transfer all the zips from my old server to my > >new one, i mean, server to server. That's the easy part. The cuestion is: > > > >Can i open more than just one instance for fsockopen to retrieve more >files > >in the same script, at the same time? i mean, not one by one (that will >be > >slow), but 4 or 5 at the same time... > >some people think it's possible, some people don't...thx :D > > > >_________________________________________________________________ > >MSN. Más Útil cada Día. http://www.msn.es/intmap/ > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > >_________________________________________________________________ >MSN Fotos: la forma más fácil de compartir e imprimir fotos. >http://photos.msn.es/support/worldwide.aspx > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    _________________________________________________________________ Únase al mayor servicio mundial de correo electrónico: http://www.hotmail.com/es

    attached mail follows:


    On Fri, 28 Jun 2002, Kris Vose wrote: > Basically I want to check to see if a user has gone to PayPal.com and > paid for a product before I disseminate the username and password > through a script called thankyou.php. > > I tried using an if statement that checks the global variable > $HTTP_REFERER: > > if($GLOBALS['HTTP_REFERER'] == "https://www.paypal.com/cgi-bin/webscr?__track=_xclick-flow:p/xcl/pay/buy-confirm:_xclick-payment-confirm-submit") > { > > > //access code that disseminates usernames and passwords > > > } > > > Unfortunately...This is not working. I went to the php manual and it > basically stated that not all web sites will post the $HTTP_REFERER. I > believe that is what is happening in this case.

    Also, anyone can fake HTTP_REFERER to be anything they want, so it's a pretty lousy payment verification mechanism.

    miguel

    attached mail follows:


    "Miguel Cruz" <mncstoic.net> wrote in message... > > > > Unfortunately...This is not working. I went to the php manual and it > > basically stated that not all web sites will post the $HTTP_REFERER. I > > believe that is what is happening in this case. > > Also, anyone can fake HTTP_REFERER to be anything they want, so it's a > pretty lousy payment verification mechanism.

    Paypal offers the use of a direct response to a url you designate for verification.. send them to a thank you page, and maybe give them temp access.. there are directions on setting up verification with paypal in their payment manuals..

    --
    =======================================================================
    Michael J. Ryan  -  tracker1[*at*]theroughnecks.com
    Roughneck BBS: http://www.theroughnecks.net  telnet://theroughnecks.net
    =======================================================================
    Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email
    One program for aim/icq/yahoo/msn/irc  -  http://www.trillian.cc/
    

    attached mail follows:


    On Tue, 2 Jul 2002, Johnson, Kirk wrote: > Is the number of requests (used for garbage collection), tallied on a per > server basis, or on a per domain basis? What about in a load-balanced > environment?

    Pretty fair bet it's a per-server basis.

    miguel

    attached mail follows:


    Rudolf Visagie Principal Software Developer Digital Healthcare Solutions <mailto:rudolfdhsolutions.co.za> Tel: +27 11 2655484 Cell: 082 895 1598

    -----Original Message----- From: MindHunter [mailto:MindHuntermailbox.co.za] Sent: Wednesday, July 03, 2002 4:19 PM To: php-generallists.php.net Subject: [PHP] PHP in South Africa

    I am looking for PHP programmers in South Africa, specifically in the Gauteng area. Please mail me.

    Tx Bk

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

    attached mail follows:


    On Tue, 2 Jul 2002, Uwe Birkenhain wrote: > A question - since english is not my first language - what do you mean with > >It's not all that common to bury constants in strings > > Is something bad about it?

    I think so. It would slow parsing down to a crawl and create a host of ambiguities if every letter that ever appeared in a string had to be compared against the list of defined constants (after all, you might have a constant called 'a'). With normal variables, it only has to worry about it when there's a $ before it or {} around it, which is much simpler.

    miguel

    attached mail follows:


    Help

    I'm a newbie to indepth PHP.

    I want to issue an fsockopen command to pass a POST data set to a remote server script.

    I understand the pricipals behind fsockopen, but I cannot figure out the string I need to pass to POST the data - I will be emulating the output from a <Form> element.

    In addition, how do I detect a successful operation? before closing the socket?.

    Any help greatfully received.

    thks

    Richard

    attached mail follows:


    Take a look at this class. I think thats what you want !

    > Help > > I'm a newbie to indepth PHP. > > I want to issue an fsockopen command to pass a POST data set to a remote server script. > > I understand the pricipals behind fsockopen, but I cannot figure out the string I need to pass to POST the data - I will be emulating the output from a <Form> element. > > In addition, how do I detect a successful operation? before closing the socket?. > > Any help greatfully received. > > thks > > Richard

    attached mail follows:


    Hi, I installed apache with support of php as i found on the online manual at php.net. I created a simple php file named hello.php

    <html> <head> <title>PHP Test Page</title> </head> <body> <?php echo "Hello <p>"; ?> </body> </html>

    and i put the file in my htdocs directory i restarted apache and when i'm trying to access the page http://localhost/hello.php as a result i'm getting the contents of the file hello.,php which are: <html> <head> <title>PHP Test Page</title> </head> <body> <?php echo "Hello <p>"; ?> </body> </html>

    What is wrong is my apache able to display php pages?

    Thanx for your time!

    attached mail follows:


    John Lazos wrote:

    > and i put the file in my htdocs directory i restarted apache and when > i'm trying to access the page http://localhost/hello.php as a result i'm > getting the contents of the file hello.,php

    > What is wrong is my apache able to display php pages?

    Looks like Apache does not know about PHP :) in your /usr/local/apache/conf/httpd.conf file (or another path, if you have set another prefix while compiling the tarball) you seem to miss this:

    AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml AddType application/x-httpd-php .php3 AddType application/x-httpd-php-source .phps

    have fun :)) Alberto Kiev

    -- 
    

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    > John Lazos wrote: > >> and i put the file in my htdocs directory i restarted apache and when >> i'm trying to access the page http://localhost/hello.php as a result >> i'm getting the contents of the file hello.,php > > > >> What is wrong is my apache able to display php pages? > > > Looks like Apache does not know about PHP :) in your > /usr/local/apache/conf/httpd.conf file (or another path, if you have set > another prefix while compiling the tarball) you seem to miss this: > > AddType application/x-httpd-php .php > AddType application/x-httpd-php .phtml > AddType application/x-httpd-php .php3 > AddType application/x-httpd-php-source .phps >

    I almost forgot. Also check the module list. It should be something like this (but you might have much less modules installed then I do, anyway, just make sure that after deleting those you don't have the LoadModule and AddModule order do match with the example. Apache gets quite nervous if you give it some other module order)

    LoadModule agent_log_module libexec/mod_log_agent.so LoadModule referer_log_module libexec/mod_log_referer.so LoadModule mime_magic_module libexec/mod_mime_magic.so LoadModule status_module libexec/mod_status.so LoadModule info_module libexec/mod_info.so LoadModule speling_module libexec/mod_speling.so LoadModule rewrite_module libexec/mod_rewrite.so LoadModule proxy_module libexec/libproxy.so LoadModule expires_module libexec/mod_expires.so LoadModule usertrack_module libexec/mod_usertrack.so LoadModule unique_id_module libexec/mod_unique_id.so LoadModule php4_module libexec/libphp4.so <IfDefine SSL> LoadModule ssl_module libexec/libssl.so </IfDefine>

    # Reconstruction of the complete module list from all available modules # (static and shared ones) to achieve correct module execution order. # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO] ClearModuleList AddModule mod_env.c AddModule mod_log_config.c AddModule mod_log_agent.c AddModule mod_log_referer.c AddModule mod_mime_magic.c AddModule mod_mime.c AddModule mod_negotiation.c AddModule mod_status.c AddModule mod_info.c AddModule mod_include.c AddModule mod_autoindex.c AddModule mod_dir.c AddModule mod_cgi.c AddModule mod_asis.c AddModule mod_imap.c AddModule mod_actions.c AddModule mod_speling.c AddModule mod_userdir.c AddModule mod_alias.c AddModule mod_rewrite.c AddModule mod_access.c AddModule mod_auth.c AddModule mod_proxy.c AddModule mod_expires.c AddModule mod_usertrack.c AddModule mod_unique_id.c AddModule mod_so.c AddModule mod_setenvif.c <IfDefine SSL> AddModule mod_ssl.c </IfDefine> AddModule mod_php4.c

    -- 
    

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Thanx all for your help it worked..!!! :)

    attached mail follows:


    Hi everybody on this rainy morning!

    My problem: I give the user a form with a list of options with checkboxes. The list is long and not predictable - the values change always. I want to put the checked values (or all, that doesn't matter) in an array, to pass it to my function.

    How can I write those keys and values in an array?

    I suppose it will be best done with JS - but since I don't know JS ... Has anybody a ready solution?

    Thank's a lot!

    Uwe

    attached mail follows:


    On Thursday 04 July 2002 16:52, Uwe Birkenhain wrote: > Hi everybody on this rainy morning! > > My problem: > I give the user a form with a list of options with checkboxes. > The list is long and not predictable - the values change always. > I want to put the checked values (or all, that doesn't matter) in an array, > to pass it to my function. > > How can I write those keys and values in an array? > > I suppose it will be best done with JS - but since I don't know JS ... > Has anybody a ready solution?

    Search archives for "checkbox array"

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* For your penance, say five Hail Marys and one loud BLAH! */

    attached mail follows:


    Uwe Birkenhain wrote: > Hi everybody on this rainy morning!

    Rainy!? It's damn hot in Kiev :)

    > My problem: > I give the user a form with a list of options with checkboxes. > The list is long and not predictable - the values change always. > I want to put the checked values (or all, that doesn't matter) in an array, > to pass it to my function. > > How can I write those keys and values in an array? >

    Suppose you have a number of checkboxes. First, you name them sequentially (like "active_0,active_1 and so on) and you assign it your value. Then you process posted data like this. BEWARE! you need at least an array of hidden variables to know exactly how many checkboxes you must process. Then you just rebuild it the structure and pass it thru.

    # put the received input into an ordered structure ################################################## $count = 0; while ( isset($id[$count]) ) {

    # Build variable names; ####################### $w_active = "active_".$count;

    # get actual form values ######################## $active[$count] = $$w_active;

    $count++; }

    Hope it solves the problem. I've been using this for ages and it never gave me problems.

    Alberto Kiev

    -- 
    

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Hi Uwe,

    If you define the checkbox list as an array (OptionList[] in the example below), only the checked values will be returned as an array $OptionList when you post the form. You can then use this as an array or pass it as an array to a function in the script:

    <? $i = 0; while (isset($OptionList[$i])) { echo "You have chosen option ".$OptionList[$i]."<br>"; $i++; } ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>

    <body bgcolor="#FFFFFF" text="#000000"> <form name="form1" method="post" action="test.php"> <input type="checkbox" name="OptionList[]" value="something1">Option 1</input><br> <input type="checkbox" name="OptionList[]" value="something2">Option 2</input><br> <input type="checkbox" name="OptionList[]" value="something3">Option 3</input><br> <input type="submit" name="Submit" value="Test"> </form> </body> </html>

    Regards

    Rudolf Visagie Principal Software Developer Digital Healthcare Solutions

    -----Original Message----- From: Uwe Birkenhain [mailto:uwe.birkenhainberlin.de] Sent: Thursday, July 04, 2002 10:53 AM To: php-generallists.php.net Subject: [PHP] How to pass unknown number of variables to a function?

    Hi everybody on this rainy morning!

    My problem: I give the user a form with a list of options with checkboxes. The list is long and not predictable - the values change always. I want to put the checked values (or all, that doesn't matter) in an array, to pass it to my function.

    How can I write those keys and values in an array?

    I suppose it will be best done with JS - but since I don't know JS ... Has anybody a ready solution?

    Thank's a lot!

    Uwe

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

    attached mail follows:


    This is a nice easy one :)

    It couldn't be simpler.

    Just put empty square brackets (as used in arrays) in front of your checkbox name. The example below assumes you have PHP 4.1 or greater (which uses $_POST to contain form posted data) notice how name="ck[]"

    <html> <head> <title>Untitled</title> </head>

    <body> <?php if(count($_POST)) { foreach ($_POST["ck"] as $varval) { print("<div>".$varval."</div>"); } } ?>

    <form action="test.php" method="post">

    <input type="checkbox" name="ck[]" value="val1"><br> <input type="checkbox" name="ck[]" value="val2"><br> <input type="checkbox" name="ck[]" value="val3"><br> <input type="checkbox" name="ck[]" value="val4"><br> <input type="checkbox" name="ck[]" value="val5"><br> <input type="submit"> </form>

    </body> </html>

    in earlier versions of PHP, $_POST["ck"] would be equal to $ck (although, the former is safer)

    On Thu, 4 Jul 2002 10:52:37 +0200, "Uwe Birkenhain" <uwe.birkenhainberlin.de> said: > Hi everybody on this rainy morning! > > My problem: > I give the user a form with a list of options with checkboxes. > The list is long and not predictable - the values change always. > I want to put the checked values (or all, that doesn't matter) in an > array, > to pass it to my function. > > How can I write those keys and values in an array? > > I suppose it will be best done with JS - but since I don't know JS ... > Has anybody a ready solution? > > Thank's a lot! > > Uwe > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    [TK]

    attached mail follows:


    This thread has been up before, but there was never sent a reply to it, and I'm having the same problem…

    Anyone who knows what to do?

    Sincerely

    Victor

    > -----Original Message----- > From: Kris Johnson [mailto:krisjlegal-stock.com] > Sent: Saturday, June 01, 2002 11:11 PM > To: Leotta, Natalie (NCI/IMS) > Subject: Nothing will execute after calling imagejpeg. > > > Hello, My name is Kris Johnson. I 'm hoping you can give me some > direction > on a problem I am having. > > After calling imagejpeg nothing else will work. I have tried echoing > html, > echoing just a word in quotes, as well as a using a location header. I > do > not get any errors or warnings, but whatever command I use simply > doesn't > work. As a test I remarked imagejpeg out of the code and as soon as I > did > this the commands after worked fine. I tried changing the filetype to > png > but still get the same problem. > > Have a nice day > Kris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    > This thread has been up before, but there was never sent a reply to it, > and I'm having the same problem…

    Just idea.

    If you doesn't have GD installed and php error reporting turned off this situation is possible.

    In other words php simply dies because of undeclared function and doesn't report about error.

    Maybe this helps

    --
    Sincerely, val petruchek
    

    attached mail follows:


    hi I have an extension problem. i have wrote this exemple #include....... char* xx(){

    return "true";

    } it's a simple example. I have compiled it into .SO dynamic library. when I try to load it into PHP i get this message cannot include .....(may be not php extension). CAN YOU HELP ME PLEASE.

    attached mail follows:


    Hi all I am working with php on linux. I want to create dynamic library and use it in php. For example: I have to built this #include <iostream.h> char* aa(){ return "true"; }

    I succeed to compile this into a dynamic library x.so.

    When I try to call this from php I get

    Cannot load x.so. may be not a php library.

    Can you help me please.

    attached mail follows:


    You probably shoul start here: http://www.php.net/manual/en/zend.php

    /Joakim

    > -----Original Message----- > From: adelpfephp [mailto:adelpfephpyahoo.fr] > Sent: Thursday, July 04, 2002 4:34 PM > To: php-france; php-generallists.php.net > Subject: [PHP] extension problem > > > >

    attached mail follows:


    Hello, At the moment I have a PHP script which accesses a database, to get the data to return a picture. So the follwing url is actually a picture of type image/jpeg:

    getdata.php?id=6

    So I can use:

    <img src="getdata.php?id=6">

    Thats great and it works fine, but I feel that it does not cache the picture in the web browser? I don't know how the cache works but my friend says it asks the server for the data the file was generated and the size, so I suppose with this is dosent?

    Help!

    Thanks,

    Steve

    attached mail follows:


    Hi all,

    I have to tables A and B. They boyh have a column with the same name.

    Now, I wrote this MySQL statement performing a left join. This results in a data set with rows consisting of 2 columns of the same name, in which the date is stored when the record was last altered. This column is called "last_altered".

    Later on in my script I'm calling the value of this column with php. $query="select * from tblA LEFT JOIN ...."; $resultID=mysql_query($query); while ($result_row=mysql_fetch_array($resultID)) { echo "$result_row[column with the same name]"; }

    Well, this works without any php or mysql errors, but it is giving me the data back of that column wich I don't wanna have...It returns the "last_altered" date of tblB in stead of tblA. A solution might be te exclude the second column (the wrong one) from the select statement in the query. This is a MySQL adjustement. Anybody knows how this can be done??

    Maybe there are also PHP solutions which I don't know of...?

    thx

    Wilbert Enserink

    ------------------------- Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl infopdd.nl -------------------------

    attached mail follows:


    On Thursday 04 July 2002 17:23, Wilbert Enserink wrote: > Hi all, > > > I have to tables A and B. > They boyh have a column with the same name. > > Now, I wrote this MySQL statement performing a left join. > This results in a data set with rows consisting of 2 columns of the same > name, in which the date is stored when the record was last altered. This > column is called "last_altered". > > Later on in my script I'm calling the value of this column with php. > $query="select * from tblA LEFT JOIN ...."; > $resultID=mysql_query($query); > while ($result_row=mysql_fetch_array($resultID)) > { > echo "$result_row[column with the same name]"; > } > > Well, this works without any php or mysql errors, but it is giving me the > data back of that column wich I don't wanna have...It returns the > "last_altered" date of tblB in stead of tblA. A solution might be te > exclude the second column (the wrong one) from the select statement in the > query. This is a MySQL adjustement. Anybody knows how this can be done??

    Try to limit your select statement, instead of SELECT *, use

    SELECT colA, colB, tablA.samenamecolA, tablB.samenamecolA, etc

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* Love is the process of my leading you gently back to yourself. -- Saint Exupery */

    attached mail follows:


    thx Jason,

    now I understand the use of aliases in select queries. Good ID:-)

    Wilbert

    ----- Original Message ----- From: "Jason Wong" <php-generalgremlins.com.hk> To: <php-generallists.php.net> Sent: Thursday, July 04, 2002 11:38 AM Subject: Re: [PHP] mysql/php how to retrieve the right column with 2 columns of the same name

    > On Thursday 04 July 2002 17:23, Wilbert Enserink wrote: > > Hi all, > > > > > > I have to tables A and B. > > They boyh have a column with the same name. > > > > Now, I wrote this MySQL statement performing a left join. > > This results in a data set with rows consisting of 2 columns of the same > > name, in which the date is stored when the record was last altered. This > > column is called "last_altered". > > > > Later on in my script I'm calling the value of this column with php. > > $query="select * from tblA LEFT JOIN ...."; > > $resultID=mysql_query($query); > > while ($result_row=mysql_fetch_array($resultID)) > > { > > echo "$result_row[column with the same name]"; > > } > > > > Well, this works without any php or mysql errors, but it is giving me the > > data back of that column wich I don't wanna have...It returns the > > "last_altered" date of tblB in stead of tblA. A solution might be te > > exclude the second column (the wrong one) from the select statement in the > > query. This is a MySQL adjustement. Anybody knows how this can be done?? > > Try to limit your select statement, instead of SELECT *, use > > SELECT colA, > colB, > tablA.samenamecolA, > tablB.samenamecolA, etc > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Love is the process of my leading you gently back to yourself. > -- Saint Exupery > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    ------------------------- Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl infopdd.nl -------------------------

    attached mail follows:


    Wilbert Enserink wrote:

    > Later on in my script I'm calling the value of this column with php. > $query="select * from tblA LEFT JOIN ....";

    it's been said over and over :) NEVER EVER write a select * query...

    use syntax

    Select a.column1, a.column2, b.column1 from tbl1 as a, tbl2 as b where .....

    and you'll never get in trouble :))

    Alberto Kiev

    -- 
    

    -_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_--_=}{=_-

    LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

    attached mail follows:


    Hello Richard, PHP, Well I did a typo here. Sorry about it. At that moment i was really nuts, and needed a rest. Now I solved that problem, but only after UPDATING PHP from 4.0.6 to 4.2.1 And shell_exec worked. Exec didn't :( I'm going to investigate this question in the future.

    Thank's for the help. And as usual if anyone will need it. Here is a working script:

    <? echo "Test 2<br>"; $output = shell_exec('uudeview -i /bla/bla.txt -p /bla/bla/'); echo "<pre>"; echo ($kick_my_ass); echo "</pre>"; ?>

    Thursday, July 4, 2002, 12:48:13 AM, you wrote:

    >><? >>$output = shell_exec("uudeview -i /bla/bla.txt -p /bla/bla/"); >>echo "<pre>"; >>echo $kick_my_ass; >>echo "</pre>"; >>?> >> And I get nothing :(. Script like below:

    RL> Well, no...

    RL> Your data is in $output, and you are echo-ing out $kick_my_ass... Try echo RL> $output

    >><? >>$output = shell_exec("uudeview"); >>echo "<pre>"; >>echo $kick_my_ass; >>echo "</pre>"; >>?> >> Work fine outputting me command line parameters. >> >> What have I done wrong?

    RL> It's also possible that you just made a typo here, but the real code has the RL> right variables...

    RL> In that case, try this:

    RL> $command = "uudeview -i /bal/bal.txt -p /bla/la"; RL> exec($command, $results, $errorcode); RL> echo implode("<BR>\n", $results); RL> if ($errorcode){ RL> echo "OS Error: $errorcode. Use 'man errno' to look it up, but it's RL> probably path/permissions.<BR>\n"); RL> }

    RL> -- RL> Like Music? http://l-i-e.com/artists.htm

    -- 
    Best regards,
     Latex                            mailto:freemansubmission.org.ru
    

    attached mail follows:


    Hi All,

    I'm currently working with a friends that want to use irc protocol at his work cause there is only http proxy.

    so it is very easy, i found phpIRC and everything works fine...He is very happy....

    i've just seen that some process are always connected. this is really weird. so i started to watch that on details and it seems that the loop which dispatch messages don't stop when Apache client is away....

    Am i wrong ?

    To sum up, i have a PHP script that loop and send messages to client but when client go away script continue to run.

    did i see some ghost that does not exist ?

    Thanks for your answer

    Manu

    attached mail follows:


    > -----Original Message----- > From: Scott Fletcher [mailto:scottabcoa.com] > Sent: 03 July 2002 20:58 > > Still working on the script. Here what I found out so far. > Why does the > example #1 work and example #2 doesn't? > > Example #1 > > Page 1 > > $_SESSION[0] = "Zero"; > > $_SESSION[1] = "One";

    [snip]

    Actually, I'm amazed either of your examples work correctly, since numeric session variable names aren't supported (see bug report 17122 at http://bugs.php.net/bug.php?id=17122. As the $_SESSION indexes you use indeed have the potential to be actual variable names (if register_globals is turned on), they must themselves be valid PHP variable names.

    Cheers!

    Mike

    --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.fordlmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

    attached mail follows:


    > -----Original Message----- > From: Richard Lynch [mailto:richphpbootcamp.com] > Sent: 03 July 2002 21:17

    [...] > > It's a good idea to get in the habit of doing: > > header("Location: xxx"); > exit; > > There's no point in sending any more data after the Location: > header anyway,

    I can't let this go unchallenged -- what happens if you're sending this to a browser which *doesn't* honour the "Location: " header, but *is* capable of displaying any attached page content? The poor user will be left with a completely blank screen, and no hint of why. In fact, the HTTP/1.1 spec (RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616.html) even says:

    > Unless the request method was HEAD, the entity of the response > SHOULD contain a short hypertext note with a hyperlink to the > new URI(s).

    So at the very least you should do something like this:

    header("Location: xxx"); ?> <HTML> <HEAD> <TITLE>Moved to xxx</TITLE> </HEAD> <BODY> <P>This page has moved to <a href="xxx">xxx</a>. </BODY> </HTML> <?php exit;

    Cheers!

    Mike

    --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.fordlmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

    attached mail follows:


    On Thu, Jul 04, 2002 at 11:01:50AM +0100, Ford, Mike [LSS] wrote: > > I can't let this go unchallenged -- what happens if you're sending this to a > browser which *doesn't* honour the "Location: " header, but *is* capable of > displaying any attached page content? The poor user will be left with a > completely blank screen, and no hint of why. In fact, the HTTP/1.1 spec

    But, which browser is incapable of handling location headers?

    > (RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616.html) even says: > > > Unless the request method was HEAD, the entity of the response > > SHOULD contain a short hypertext note with a hyperlink to the > > new URI(s).

    Oddly, I don't find that text you excerpted on the URI you provided.

    But, the thing is, I'm under the impression that PHP (and/or Apache?) doesn't send anything else from your script once a Location header is sent. I just confirmed this with two different tests.

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    > -----Original Message----- > From: Tom Beidler [mailto:tomorbittechservices.com] > Sent: 03 July 2002 21:41 > > For the current issue I'm trying to unset some variables with > common names > and I would like to step through them with a loop. Here's > where I'm at to > give you an idea but the code doesn't work. > > for ($i = 2; $i <= 4; $i++) { > unset($level$iName); > unset($level$iUrl); > }

    [...]

    > I guess I could create a variable before the unset like so > > $unsetA = "level" . $i . "Name";

    This does the trick:

    unset(${"level${i}Name"});

    > but that seems cloogey.

    cloogey --> kludgy???

    Cheers!

    Mike

    --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.fordlmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

    attached mail follows:


    Hi friend,

    sorry for putting this question to php-list.

    Here I am getting the error as "Object doesn't support this property or method" in line number 22.

    ============================

    <html> <head> <script language="javascript"> function checkall() { var n=0,i=document.form1.OptionList.length;

    while(n<i) { document.form1.OptionList[n].checked=true; n=n+1; } } </script> </head>

    <body bgcolor="#FFFFFF" text="#000000"> <form name="form1" method="post" > <input type="checkbox" name="OptionList[]" value="something1">Option 1</input><br> <input type="checkbox" name="OptionList[]" value="something2">Option 2</input><br> <input type="checkbox" name="OptionList[]" value="something3">Option 3</input><br> <input type="checkbox" name="checkall" OnClick=checkall()> /////////This is error line

    </form> </body> </html>

    ==================================

    Thanks and Regards Balaji


    attached mail follows:


    Hi Balaji

    Have re-written the code now works.. two problems:

    1. checkall() appears to be a reserved function - have renamed function to checkitall

    2. You didn't need to put [] after OptionList in checkbox name

    <html> <head> <script language="javascript"> function checkitall() { var n=0,i=document.form1.OptionList.length; while(n<i) { document.form1.OptionList[n].checked=true; n=n+1; } } </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <form name="form1" method="post" > <input type="checkbox" name="OptionList" value="something1">Option 1</input><br> <input type="checkbox" name="OptionList" value="something2">Option 2</input><br> <input type="checkbox" name="OptionList" value="something3">Option 3</input><br> <input type="checkbox" name="checkall" OnClick="checkitall()"> /////////This is error line </form> </body> </html>

    Regards

    John

    ----- Original Message ----- From: "Balaji Ankem" <balaji.ankemwipro.com> To: <php-generallists.php.net> Sent: Thursday, July 04, 2002 12:04 PM Subject: [PHP] HTML & Java script doubt..

    > Hi friend, > > sorry for putting this question to php-list. > > Here I am getting the error as "Object doesn't support this property or > method" in line number 22. > > ============================ > > <html> > <head> > <script language="javascript"> > function checkall() > { > var n=0,i=document.form1.OptionList.length; > > while(n<i) > { > document.form1.OptionList[n].checked=true; > n=n+1; > } > } > </script> > </head> > > <body bgcolor="#FFFFFF" text="#000000"> > <form name="form1" method="post" > > <input type="checkbox" name="OptionList[]" > value="something1">Option 1</input><br> > <input type="checkbox" name="OptionList[]" > value="something2">Option 2</input><br> > <input type="checkbox" name="OptionList[]" > value="something3">Option 3</input><br> > <input type="checkbox" name="checkall" > OnClick=checkall()> /////////This is error line > > </form> > </body> > </html> > > ================================== > > Thanks and Regards > Balaji > >

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

    ----
    

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

    attached mail follows:


    I am setting up PHP on WinXP Pro with IIS 5.1.

    I tried to start the IIS server and I get an "Unexpected error 0x8ffe2740 occured." error. Anyone know how to resolve this problem?

    attached mail follows:


    Hi

    I am currently having problems with a custom written web-authentication-proxy. The proxy works fine with standard html pages but not with php pages. After doing a bit of digging I have found that the proxy does a HEAD request and checks the Content-Length to see if the page if valid.

    I have been able to use

    Header( "Content-Length: 100" )

    to fool the proxy into loading the php page.

    My question is how do I go about calculating the correct Content-Length for each and every php page on my site.

    I have done some digging and presume I need to do "Output buffering" and calculate the strlen of the response the php returns, but how do I reference the result of a php page to get a strlen from it??

    Any assistance would be welcome

    Thanks

    Grant

    attached mail follows:


    On Thu, Jul 04, 2002 at 01:24:04PM +0200, Grant wrote: > My question is how do I go about calculating the correct Content-Length for > each and every php page on my site. > > I have done some digging and presume I need to do "Output buffering" and > calculate the strlen of the response the php returns, but how do I reference > the result of a php page to get a strlen from it??

    You didn't dig far enough, since there is an example of exactly what you want on:

    http://www.php.net/manual/en/function.ob-get-length.php

    Isn't the online reference need? :)

    -- 
    

    Daniel Tryba

    attached mail follows:


    Hey,

    I'm working on a way to pull menus/pages from a database. Currently I have this working on 2 levels - Topic headers & actual page titles - & it prints it out fairly nice & doesn't take long to load. What I need to do is add a level between the 2, a sub-header.

    I'm running both the apache server & mysql server on the same linux box as the current load isn't very high. I'm wondering whether it would be better/easier to Load all the topic headers into an array, then any possible sub-headers into a 2nd array, then the pages into a 3rd array (or even into a multidimensional array?). Then go through the arrays & match the pages. Or would it be easier to write 1 huge SQL statement & have the SQL server run the whole query?

    Currently the menu looks like -

    <b>Win Programs</b> - Anti-Bot - Find Ascii - Game Pack <b>Online Projects</b> - Anti-Bot etc...

    I need something more like -

    <b>Win Programs</b> Utils - Anti-Bot - Find Ascii Games - Game Pack <b>Online Projects</b> - Anti-Bot etc...

    Patrick

    attached mail follows:


    Patrick:

    Grouping and sorting is something databases specialize in.

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    Hi I need to use PHP (ver 4 windows) to add a record to a dBase iv database.

    I can create, open, read and close a database but when I try to add a record I always get the following error: Warning: unexpected error in C:\php\phpstuff\addTest1.php on line 23

    Here is the code [shortened] that I use to create the database table, open the table, create the record and add the record- the database table has one field a 10 char string:

    $dbname = "test1.dbf"; $dbflag = 2; $def = array( array("name", "C", 10)); dbase_create($dbname, $def)); $db_num = dbase_open($dbname, $dbflag); $new_record['name'] = 'xxxxxxxxxx'; dbase_add_record ($db_num, $new_record);

    any help, advice or code samples would be very appreciated thanks Labhras

    attached mail follows:


    Hey,

    I'm wondering if anyone has found or ended up writing something similar to the MSWC AdRotator object in ASP, but for PHP? Or is there already a module on apache.org that I missed?

    Thanks for any help :)

    Patrick

    attached mail follows:


    I'm pretty sure you'll find what you are looking for here: http://www.hotscripts.com/PHP/Scripts_and_Programs/Ad_Management/

    /Joakim

    > -----Original Message----- > From: Patrick Teague [mailto:webdudeveslach.com] > Sent: Thursday, July 04, 2002 1:31 PM > To: PHP-General > Subject: [PHP] AdRotator for PHP? > > > Hey, > > I'm wondering if anyone has found or ended up writing > something similar to > the MSWC AdRotator object in ASP, but for PHP? Or is there > already a module > on apache.org that I missed? > > Thanks for any help :) > > Patrick > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hello Patrick, Try to look at hotscripts.com there are lots of scripts there. Personally i prefer to write ones by myself. Thursday, July 4, 2002, 3:31:20 PM, you wrote:

    PT> Hey,

    PT> I'm wondering if anyone has found or ended up writing something similar to PT> the MSWC AdRotator object in ASP, but for PHP? Or is there already a module PT> on apache.org that I missed?

    PT> Thanks for any help :)

    PT> Patrick

    -- 
    Best regards,
     Latex                            mailto:freemansubmission.org.ru
    

    attached mail follows:


    Please, How do I make to get all errors of MySql ?

    I'm making a function for translate all errors. Example:

    function TranslateErrors($err) { global $result; global $text; Switch ($err) { case 1045 : $text = "User or Password invalid"; Break; case 2005 : $text = "Host not exists"; Break; case 1049 : $text = "Database not exists"; Break; } result = $text; }

    Thanks

    attached mail follows:


    On Thu, Jul 04, 2002 at 08:48:26AM -0300, Skyhawk wrote: > Please, How do I make to get all errors of MySql ? > > I'm making a function for translate all errors. Example:

    Uh, why? PHP's mysql_error() does the job for you. http://www.php.net/manual/en/function.mysql-error.php

    If you're hell bent on your project, I don't know of a particular location to find a list of all MySQL errors. First try a _well_ _defined_ search on Google. Second, do a search on http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=mailing.database As a LAST RESORT, ask the MySQL mailing list.

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    1. Please don't cross post. 2. Which line is #23? 3. Have you tested to ensure that you have a valid handle? ($db_num) 4. Have you tried adding error code to see the result of dbase_create(), dbase_open() 5. I seem to remember reading in the docs, a long time ago (2 yr) that the dbase functions were not really reliable and were intended mostly to extract info for export to another database. I could not be 100% wrong on that, and I've not worked with the dbase functions in PHP.

    After this reply, please keep this focused on the php-db list.

    Regards - Miles Thompson

    At 12:14 PM 7/4/2002 +0100, labhras sammin wrote: >Hi I need to use PHP (ver 4 windows) to add a record to a dBase iv database. > >I can create, open, read and close a database but when I try to add a >record I always get the following error: >Warning: unexpected error in C:\php\phpstuff\addTest1.php on line 23 > >Here is the code [shortened] that I use to create the database table, open >the table, create the record and add the record- the database table has one >field a 10 char string: > >$dbname = "test1.dbf"; >$dbflag = 2; >$def = array( array("name", "C", 10)); >dbase_create($dbname, $def)); >$db_num = dbase_open($dbname, $dbflag); >$new_record['name'] = 'xxxxxxxxxx'; >dbase_add_record ($db_num, $new_record); > >any help, advice or code samples would be very appreciated >thanks >Labhras > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    thanks for your help I have tested that everything works, valid handles, returned method values, etc. Line 23 is the dbase_add_record line. Do you know of anywhere there may be an example thanks Labhras

    "Miles Thompson" <milesthompsonns.sympatico.ca> wrote in message news:5.0.2.1.0.20020704085616.02df1df0pop1.ns.sympatico.ca... > 1. Please don't cross post. > 2. Which line is #23? > 3. Have you tested to ensure that you have a valid handle? ($db_num) > 4. Have you tried adding error code to see the result of dbase_create(), > dbase_open() > 5. I seem to remember reading in the docs, a long time ago (2 yr) that the > dbase functions were not really reliable and were intended mostly to > extract info for export to another database. I could not be 100% wrong on > that, and I've not worked with the dbase functions in PHP. > > After this reply, please keep this focused on the php-db list. > > Regards - Miles Thompson > > At 12:14 PM 7/4/2002 +0100, labhras sammin wrote: > >Hi I need to use PHP (ver 4 windows) to add a record to a dBase iv database. > > > >I can create, open, read and close a database but when I try to add a > >record I always get the following error: > >Warning: unexpected error in C:\php\phpstuff\addTest1.php on line 23 > > > >Here is the code [shortened] that I use to create the database table, open > >the table, create the record and add the record- the database table has one > >field a 10 char string: > > > >$dbname = "test1.dbf"; > >$dbflag = 2; > >$def = array( array("name", "C", 10)); > >dbase_create($dbname, $def)); > >$db_num = dbase_open($dbname, $dbflag); > >$new_record['name'] = 'xxxxxxxxxx'; > >dbase_add_record ($db_num, $new_record); > > > >any help, advice or code samples would be very appreciated > >thanks > >Labhras > > > > > > > > > >-- > >PHP Database Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hello php-general,

    I've got a little question about imap_headers. I working on a project which must connect to local nntp server. I have no problems doing it, but as far as I know from documentation Imap_headers() fetches msg headers in to the arrey. So let's say I've got 5000 post in the box. When i try to open it it fetches all the headers. and then brings me them on the web page. I want to display sets of 50 headers per page. that makes 100 pages. and every page will connect to server fetch ALL headers and etc. Any possibility to limit headers fetch like mysql limit 0, 50 and so on? Also any ideas how to speed it up also are welcome

    -- 
    Best regards,
     Latex                          mailto:freemansubmission.org.ru
    

    attached mail follows:


    Php 4.2.1 - Apache 2.0.36 -Win98SE This configuration works great, but when I try to upgrade to Apache 2.0.39 nothing works.Even when I try php 4.3.0 it wont work.

    My question is: Is there anybody out there who have tried to configure php 4.2.1 or 4.3.0 with Apache 2.039 and Win98SE? Please tell me how!

    Erik

    attached mail follows:


    Message-ID: <20020704123656.44137.qmailpb1.pair.com> To: php-generallists.php.net From: "Peter Clarke" <peterjingo.com> Date: Thu, 4 Jul 2002 13:38:16 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [PHP] Re: $this in an XML data handler ... in a class

    I hadn't noticed that. My php.ini was set to on, changing it to off gave the warning. Having changed: xml_set_object($this->parser,&$this); to: xml_set_object($this->parser,$this); Stops the warning and the parser works fine.

    This is the class I'm using and it works fine:

    class parse_words_xml { var $words;

    function parse_words_xml($xml_data) { $this->words = array(); $this->parser = xml_parser_create(); xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); xml_set_element_handler($this->parser,"tag_open","tag_close"); xml_set_character_data_handler($this->parser,"cdata"); $this->parse($xml_data); }

    function parse($xml_data) { xml_set_object($this->parser,$this); reset ($xml_data); while (list (, $data) = each ($xml_data)) { if (!xml_parse($this->parser, $data)) { die(sprintf( "XML error: %s at line %d\n\n", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser))); } }

    }

    function tag_open($parser,$tag,$attributes) { $this->current_tag = $tag; switch($tag){ case 'Word': $this->id = $attributes['id']; $this->words[$attributes['id']] = 1; break; default: break; } }

    function cdata($parser,$cdata) { $this->temp = $cdata; }

    function tag_close($parser,$tag) { switch($tag){ case 'Word': $this->words[$this->id] = $this->temp; $this->temp = ''; break; default: break; } }

    }

    "Clay Loveless" <claykillersoft.com> wrote in message news:B9487C19.15960%claykillersoft.com... > Unfortunately, the xml_set_object function does not work to solve this > problem. I tried using it, and my results were the same as they were when I > was not using it. > > [I found that the array($this, 'function_name') method instead of 'string > function_name' for the xml_set_*_handler functions worked just as well, only > without this Warning message one gets from PHP 4.2.1 upon using > xml_set_object($this->parser, &$this): > > "PHP Warning: Call-time pass-by-reference has been deprecated - argument > passed by value; If you would like to pass it by reference, modify the > declaration of xml_set_object(). If you would like to enable call-time > pass-by-reference, you can set allow_call_time_pass_reference to true in > your INI file. However, future versions may not support this any longer."] > > > Still searching for an answer on this one ... > > Thanks, > -Clay > > > > > "Peter Clarke" <peterjingo.com> > > > > Have a look at: > > http://www.php.net/manual/en/function.xml-set-object.php > > > > xml_set_object($this->parser, &$this); > > > > > > > > "Clay Loveless" <claykillersoft.com> wrote in message > > news:B9481008.158BF%claykillersoft.com... > >> Here's a brain-bender ... At least it is for me at the moment. : ) > >> > >> When I use an XML parser inside a class, the xml_*_handler functions > > aren't > >> recognizing "$this->" variables. I can kind of see why ... But would like > > it > >> to work anyway. : ) > >> > >> Here's an example: > >> > >> class Blah > >> { > >> var $xmlparser; > >> var $current_element; > >> > >> // ... > >> > >> function _parseXML($data) > >> { > >> $this->xmlparser = xml_parser_create(); > >> xml_set_element_handler( > >> $this->xmlparser, > >> array($this,"_xml_start_element"), > >> array($this,"_xml_end_element")); > >> xml_set_character_data_handler( > >> $this->xmlparser, > >> array($this,"_xml_character_data")); > >> xml_parse($this->xmlparser, $data); > >> xml_parser_free($this->xmlparser); > >> } > >> > >> function _xml_start_element($p, $e_name, $e_attributes) > >> { > >> $this->current_element = $e_name; > >> } > >> > >> function _xml_end_element($p, $e_name) > >> { > >> // ... > >> } > >> > >> function _xml_character_data($p, $data) > >> { > >> echo "element is: ".$this->current_element."\n"; > >> echo "data is: $data\n"; > >> } > >> > >> } // end of class Blah > >> > >> > >> > >> When this XML parser gets called from within the Blah class, the "element > >> is:" portion of _xml_character_data comes out blank! > >> > >> This sort of makes sense, because the callback functions are "children" of > >> the xml_parser_create "parent" ... But should that make the children > >> ignorant of the "grandparent" variables referred to by $this->varname? > >> > >> I hope this makes sense ... Has anyone else encountered this sort of > >> problem? I'm an old hat at PHP, but am relatively new to both XML parsing > >> and writing my own classes. > >> > >> Thanks, > >> Clay > >> > > > > >

    attached mail follows:


    I use the following line in some of my php scripts to navigate between pages:

    <td align="left" width=40px><input type='button' class='bginput' value='New' onClick="this.form.action='newproduct.php?mode=new'; this.form.submit()"></td>

    The problem I have is with a page I build dynamically. The whole page is encased in <form></form> tags. In between these tags there are sections echoed as a result of a databasse query. Each of these sections is a form. After all of the sections have been created, there is a button at the bottom of the page that is similar to that above. The button is outwith the form tags of the sections but within the form tags of the whole page i.e.

    <form name="addproduct">

    <table> <!-- loop round result set creating a form for each row --> <form name="detail"> dynamic content </form> <form> dynamic content </form> <form> dynamic content </form> </table>

    <td align="left" width=40px><input type='button' class='bginput' value='New' onClick="this.form.action='newproduct.php?mode=new'; this.form.submit()"></td>

    </form>

    Clicking on the button has no effect. On all my other pages this button behaves as it should. Why?

    **************************************************** This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. ****************************************************

    attached mail follows:


    On Thu, Jul 04, 2002 at 01:44:00PM +0100, Mark Colvin wrote: > I use the following line in some of my php scripts to navigate between > pages: > > <td align="left" width=40px><input type='button' class='bginput' > value='New' onClick="this.form.action='newproduct.php?mode=new'; > this.form.submit()"></td>

    And then folks with Java'sCrap turned off won't use your site.

    Why people go to such lengths to destroy the elegance of HTML I just don't know...

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    I dont think forms can be nested. In fact I'm pretty sure.

    Mark Colvin wrote:

    >I use the following line in some of my php scripts to navigate between >pages: > > <td align="left" width=40px><input type='button' class='bginput' >value='New' onClick="this.form.action='newproduct.php?mode=new'; >this.form.submit()"></td> > >The problem I have is with a page I build dynamically. The whole page is >encased in <form></form> tags. In between these tags there are sections >echoed as a result of a databasse query. Each of these sections is a form. >After all of the sections have been created, there is a button at the bottom >of the page that is similar to that above. The button is outwith the form >tags of the sections but within the form tags of the whole page i.e. > ><form name="addproduct"> > ><table> ><!-- loop round result set creating a form for each row --> ><form name="detail"> > dynamic content ></form> ><form> > dynamic content ></form> ><form> > dynamic content ></form> ></table> > > <td align="left" width=40px><input type='button' class='bginput' >value='New' onClick="this.form.action='newproduct.php?mode=new'; >this.form.submit()"></td> > ></form> > >Clicking on the button has no effect. On all my other pages this button >behaves as it should. Why? > > >**************************************************** >This e-mail is intended for the recipient only and >may contain confidential information. If you are >not the intended recipient then you should reply >to the sender and take no further ation based >upon the content of the message. >Internet e-mails are not necessarily secure and >CCM Limited does not accept any responsibility >for changes made to this message. >Although checks have been made to ensure this >message and any attchments are free from viruses >the recipient should ensure that this is the case. >**************************************************** > > >

    attached mail follows:


    Folks:

    On Thu, Jul 04, 2002 at 11:05:38AM -0400, Analysis & Solutions wrote: > On Thu, Jul 04, 2002 at 01:44:00PM +0100, Mark Colvin wrote: > > > > <td align="left" width=40px><input type='button' class='bginput' > > value='New' onClick="this.form.action='newproduct.php?mode=new'; > > this.form.submit()"></td> > > And then folks with Java'sCrap turned off won't use your site. > > Why people go to such lengths to destroy the elegance of HTML I just don't > know...

    Mark asked me off list how to write that in HTML...

    <td align="left" width="40px"> <form action="newproduct.php" method="GET"> <input type="submit" class="bginput" name="mode" value="New" /> </form> </td>

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    Hi people,

    I want to move a file from one location to another. I expect I can only do this with 'rename', because there's no 'move'-command (at least nog in the manual). Following situation:

    original file: /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg with /var/www/html/webfotos being a symlink to /home/cvd/sanbox/webfotos new location: /var/www/html/foto/0/0/0/0/0000.thumb.jpg

    syntax: rename($old_location, $new_location);

    Error: Warning: Rename failed (Invalid cross-device link) in /home/cvd/sandbox/webfotos/admin/save.php on line 95

    When I 'su' to 'apache' (the user under which the httpd is running), I can do the following without any error:

    mv /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg /var/www/html/foto/0/0/0/0/0000.thumb.jpg

    Any ideas on why I get the error and how I can solve it? Tia!

    -- 
    Kind regards,
    Tim
    

    attached mail follows:


    Hello Tim, Tim why don't you try shell_exec ?

    Thursday, July 4, 2002, 5:03:34 PM, you wrote:

    TS> Hi people,

    TS> I want to move a file from one location to another. I expect I can only do TS> this with 'rename', because there's no 'move'-command (at least nog in the TS> manual). Following situation:

    TS> original file: /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg TS> with /var/www/html/webfotos being a symlink to /home/cvd/sanbox/webfotos TS> new location: /var/www/html/foto/0/0/0/0/0000.thumb.jpg

    TS> syntax: rename($old_location, $new_location);

    TS> Error: Warning: Rename failed (Invalid cross-device link) in TS> /home/cvd/sandbox/webfotos/admin/save.php on line 95

    TS> When I 'su' to 'apache' (the user under which the httpd is running), I can TS> do the following without any error:

    TS> mv /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg TS> /var/www/html/foto/0/0/0/0/0000.thumb.jpg

    TS> Any ideas on why I get the error and how I can solve it? Tia!

    TS> -- TS> Kind regards, TS> Tim

    -- 
    Best regards,
     Latex                            mailto:freemansubmission.org.ru
    

    attached mail follows:


    rename can "move" the file only on the same partition, it is realy just _rename_, not full _move_

    Marek

    Tim Stoop wrote:

    >Hi people, > >I want to move a file from one location to another. I expect I can only do >this with 'rename', because there's no 'move'-command (at least nog in the >manual). Following situation: > >original file: /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg >with /var/www/html/webfotos being a symlink to /home/cvd/sanbox/webfotos >new location: /var/www/html/foto/0/0/0/0/0000.thumb.jpg > >syntax: rename($old_location, $new_location); > >Error: Warning: Rename failed (Invalid cross-device link) in >/home/cvd/sandbox/webfotos/admin/save.php on line 95 > >When I 'su' to 'apache' (the user under which the httpd is running), I can >do the following without any error: > >mv /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg >/var/www/html/foto/0/0/0/0/0000.thumb.jpg > >Any ideas on why I get the error and how I can solve it? Tia! > > >

    attached mail follows:


    Marek Kilimajer wrote:

    > rename can "move" the file only on the same partition, it is realy just > _rename_, not full _move_

    So there is no full-features move in PHP?

    -- 
    Kind regards,
    Tim
    

    attached mail follows:


    Latex Master wrote:

    > Hello Tim, > Tim why don't you try shell_exec ?

    As a last resort, I might, but I'd rather do it in PHP... Code-portability, y'know :)

    -- 
    Kind regards,
    Tim
    

    attached mail follows:


    None that I know of. You need to use copy & unlink

    Tim Stoop wrote:

    >Marek Kilimajer wrote: > > > >>rename can "move" the file only on the same partition, it is realy just >>_rename_, not full _move_ >> >> > >So there is no full-features move in PHP? > > >

    attached mail follows:


    Hi,

    I'm gleaning microsoft SQL from queries within a MS Access database, for insertion into my PHP pages. This has been working fine but the example below just refuses to work,

    SELECT ExamPapers.EPaperID, ExamPapers.EPapersText, ExamPapers.[Title of Paper], ExamPapers.Course, ExamPapers.School, ExamPapers.Year, ExamPapers.[Jan/Summer], ExamPapers.[Module Code], ExamPapers.Stage, ExamPapers.[Storage Location], ExamPapers.[Add to Webpage] FROM ExamPapers WHERE (((ExamPapers.School)="Colour and Imaging Institute") AND ((ExamPapers.[Add to Webpage])=True));

    I want to pull records from 1 table (ExamPapers). The WHERE line is causing problems i.e if I remove it, my php pages actually show. Can anyone see what I'm doing wrong?

    Thanks,

    Daniel Owen-McGee

    attached mail follows:


    Hello Daniel, Try to use a query line like below: WHERE (((ExamPapers.School)=\"Colour and Imaging Institute\") AND ((ExamPapers.[Add to Webpage])=True)); And let us know it it will work

    Thursday, July 4, 2002, 5:21:50 PM, you wrote:

    DJOM> Hi,

    DJOM> I'm gleaning microsoft SQL from queries within a MS Access database, for insertion into my PHP pages. This has been working fine but the example below just refuses to work,

    DJOM> SELECT ExamPapers.EPaperID, ExamPapers.EPapersText, ExamPapers.[Title of Paper], ExamPapers.Course, ExamPapers.School, ExamPapers.Year, ExamPapers.[Jan/Summer], ExamPapers.[Module Code], DJOM> ExamPapers.Stage, ExamPapers.[Storage Location], ExamPapers.[Add to Webpage] DJOM> FROM ExamPapers DJOM> WHERE (((ExamPapers.School)="Colour and Imaging Institute") AND ((ExamPapers.[Add to Webpage])=True));

    DJOM> I want to pull records from 1 table (ExamPapers). DJOM> The WHERE line is causing problems i.e if I remove it, my php pages actually show. Can anyone see what I'm doing wrong?

    DJOM> Thanks,

    DJOM> Daniel Owen-McGee

    -- 
    Best regards,
     Latex                            mailto:freemansubmission.org.ru
    

    attached mail follows:


    Thanks for all the responses.

    C.

    > -----Original Message----- > From: César Aracena [mailto:icaamicaam.com.ar] > Sent: Wednesday, July 03, 2002 1:36 PM > To: PHP General List > Subject: [PHP] Other than substr > > Hi all. > > I need to show up some data from a DB which consist of phone numbers > with area code. They’re stored like (xxxx) xxxxxxxx. What is the best > approach to print them into some textboxes so they can be edited? I’m > using substr but area codes (inside parenthesis) goes from 3 to 5 > numbers, so sometimes the closing parenthesis is showed and other times > even the first number from the actual number is also showed. Can I use > regex instead? How is it used? I tried to figure it out in the PHP > manual, but it is NOT written in my level of English. > > > Thanks in advance, > > <mailto:webmastericaam.com.ar> Cesar Aracena > CE / MCSE+I > Neuquen, Argentina > +54.299.6356688 > +54.299.4466621 >

    attached mail follows:


    Hi friend, I want to trigger one java script function ( time delay) every time. How can I achieve this? Here my questuion is: I want to play all song files from my database. Here what I do is initially I display one button "PLAY" and then call java script delay function and it has to come back to php script and play next one again trigger to timedelay function etc...

    Any inputs highly appreciable.....

    Thanks in advance Balaji

    ================================================================ <html> <head> <script language="javascript"> <!-- function delay(timep) {

    setTimeout(" ",timep); } // --> </script> </head> <body>

    <?php

    $i=0; while($i<3) { //otherwise Just I want to print $i with some time delays //by calling javascript:delay(2000)

    }

    ?> </body> </html> ==================================================================

    Thanks in advance Balaji

    attached mail follows:


    I'm trying to develop a software package for end users with no knowledge of PHP. The package would allow these users to generate Web pages displaying a custom questionnaire to be used by consumers to answer questions online.

    I thought of writing a PHP script that asks the end users the type of questions to be displayed, the questions themselves to be displayed, and, if required, the responses to be displayed. This information would be stored in a MySQL database.

    I then would write another PHP script that would dynamically generate the questionnaire based on the information stored in the MySQL database.

    The types of questions include text fields, radio buttons, check boxes, menu selections, and text areas.

    Is this the right approach or is there another way?

    Thanks!

    Anthony Rodriguez (sbwibellatlantic.net)

    to be

    attached mail follows:


    It's the right approach, but since you're dealing with large amounts of user-contributed (untrusted, dangerous, suspicious, whatever) data both to create the forms AND to gather information from form submissions, I'd be very wary about security.

    Infact, I wouldn't recommend it for a first project unless you've got some form of programming experience in a simular web language.

    Good luck!

    Justin French

    on 04/07/02 10:51 PM, Anthony Rodriguez (sbwibellatlantic.net) wrote:

    > I'm trying to develop a software package for end users with no knowledge of > PHP. The package would allow these users to generate Web pages displaying > a custom questionnaire to be used by consumers to answer questions online. > > I thought of writing a PHP script that asks the end users the type of > questions to be displayed, the questions themselves to be displayed, and, > if required, the responses to be displayed. This information would be > stored in a MySQL database. > > I then would write another PHP script that would dynamically generate the > questionnaire based on the information stored in the MySQL database. > > The types of questions include text fields, radio buttons, check boxes, > menu selections, and text areas. > > Is this the right approach or is there another way? > > Thanks! > > Anthony Rodriguez > (sbwibellatlantic.net) > > > > > > > > to be > >

    attached mail follows:


    You need to install php-mysql* too.

    Jadiel Flores wrote:

    >Hi, I installed php and mysql today and I'm trying to use phpMyAdmin but >I'm receiving the error message: >cannot load MySQL extension, >please check PHP Configuration. > >I checked the php.ini and couldn't find anything related, my configure >command says '--with-mysql=shared,/usr' and I have no idea why it's not >working. > >I'm using redhat 7.3, Apache 1.3.23, php 4.1.2 and MySQL 3.23.51 > >Any idea or similar problem?? > >Thanks. > >Jadiel > > > > > >

    attached mail follows:


    I've got a form that's posted to a php page where I'm attempting to validate a field contains a valid email address. The eregi below seems to be totally ignored...

    if (eregi("^[a-z0-9\._-]+[a-z0-9\._-]+$", $emp_email)) { echo "<center>please enter a valid email address</center>"; exit; }

    $emp_email is being posted to the form. Any ideas why this is being ignored?

    dan

    attached mail follows:


    Dan,

    I'll give you a little piece of advise that was given to me a little while back on this list:

    Go to http://www.killersoft.com/ and grab a copy of the validateEmailFormat program.

    <QUOTE> PHP4 translation of Jeffrey E.F. Friedl's definitive Email Regex Program from O'Reilly's Mastering Regular Expressions. This function is used to confirm if an e-mail address adheres to the RFC 822 specification for internet email addresses. </QUOTE>

    Rather than trying re-invent the wheel, why not use something that conforms closely to specs, and is widely accepted by many development groups.

    All you'll have to do is something like (function names and filenames may not be right):

    <? include('inc/validEmailFormat.inc'); if(!validEmailFormat($emp_email)) { echo "<center>please enter a valid email address</center>"; } ?>

    Side topic: of course, you aren't checking for a valid email address at all, your checking to see if the email address LOOKS valid. You're not checking to see if the address is attached to an email box, or furthermore if there's anyone at the other end to open/read your email... you're just validating the appearance of the address to fall within RFC 822 specs.

    Subsequently billmicrosoft.com and nowayamigivingyoumyemailaddress.com will both return valid.

    The only way to ensure an email address is truely valid is to send an email to it, and have them respond... indicating that the address is linked to an email box and furthermore, someone opened the email, read it, and responded.

    Even then, this could be done by a robot I guess.

    Justin French -------------------- Creative Director http://Indent.com.au --------------------

    on 05/07/02 12:23 AM, dan radom (danradom.org) wrote:

    > I've got a form that's posted to a php page where I'm attempting to validate a > field contains a valid email address. The eregi below seems to be totally > ignored... > > if (eregi("^[a-z0-9\._-]+[a-z0-9\._-]+$", $emp_email)) { > echo "<center>please enter a valid email address</center>"; > exit; > } > > > $emp_email is being posted to the form. Any ideas why this is being ignored? > > dan

    attached mail follows:


    My main cnocern at this point is that the eregi is being totally ignored. I just want to make sure the email address is in a valid format, not that it is a valid email address. I'll look at validEmailFormat as well, but I don't understand why it's not even being examined.

    dan

    * Justin French (justinindent.com.au) wrote: > Dan, > > I'll give you a little piece of advise that was given to me a little while > back on this list: > > Go to http://www.killersoft.com/ and grab a copy of the validateEmailFormat > program. > > <QUOTE> > PHP4 translation of Jeffrey E.F. Friedl's definitive Email Regex Program > from O'Reilly's Mastering Regular Expressions. This function is used to > confirm if an e-mail address adheres to the RFC 822 specification for > internet email addresses. > </QUOTE> > > Rather than trying re-invent the wheel, why not use something that conforms > closely to specs, and is widely accepted by many development groups. > > > All you'll have to do is something like (function names and filenames may > not be right): > > <? > include('inc/validEmailFormat.inc'); > if(!validEmailFormat($emp_email)) > { > echo "<center>please enter a valid email address</center>"; > } > ?> > > > Side topic: of course, you aren't checking for a valid email address at > all, your checking to see if the email address LOOKS valid. You're not > checking to see if the address is attached to an email box, or furthermore > if there's anyone at the other end to open/read your email... you're just > validating the appearance of the address to fall within RFC 822 specs. > > Subsequently billmicrosoft.com and nowayamigivingyoumyemailaddress.com > will both return valid. > > > The only way to ensure an email address is truely valid is to send an email > to it, and have them respond... indicating that the address is linked to an > email box and furthermore, someone opened the email, read it, and responded. > > Even then, this could be done by a robot I guess. > > > Justin French > -------------------- > Creative Director > http://Indent.com.au > -------------------- > > > > > on 05/07/02 12:23 AM, dan radom (danradom.org) wrote: > > > I've got a form that's posted to a php page where I'm attempting to validate a > > field contains a valid email address. The eregi below seems to be totally > > ignored... > > > > if (eregi("^[a-z0-9\._-]+[a-z0-9\._-]+$", $emp_email)) { > > echo "<center>please enter a valid email address</center>"; > > exit; > > } > > > > > > $emp_email is being posted to the form. Any ideas why this is being ignored? > > > > dan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    If the regexp matches, it is a valid email, so you need ! in front of it.

    dan radom wrote:

    >I've got a form that's posted to a php page where I'm attempting to validate a field contains a valid email address. The eregi below seems to be totally ignored... > > if (eregi("^[a-z0-9\._-]+[a-z0-9\._-]+$", $emp_email)) { > echo "<center>please enter a valid email address</center>"; > exit; > } > > >$emp_email is being posted to the form. Any ideas why this is being ignored? > >dan > > >

    attached mail follows:


    HI, How to send atashments with mail() function? I have a form to mail page, and i want to atash and transmit files

    tx

    attached mail follows:


    Reply-To: <r.wrayhunky-dorry.com> From: "Robert Wray" <r.wrayhunky-dorry.com> To: <php-generallists.php.net> Date: Thu, 4 Jul 2002 15:44:15 +0100 Message-ID: <JKEMJHHGFJDOBOOFPGDPOECECAAA.r.wrayhunky-dorry.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000C_01C22371.A6886B30" Subject: Broken Cookies

    ------=_NextPart_000_000C_01C22371.A6886B30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit

    Hiyas :)

    I'm having a problem with the code copied below not creating the cookies that it should do; setcookie("loggedInUID",$_POST['uname'],ms_cookie_time((time()+120)),'/', $cookie_base);

    setcookie($_POST['site_id'],$_POST['ucaps'],ms_cookie_time((time()+120)),'/' , $cookie_base); Basically those two lines are part of a file on server X that's called by a file on server Y by a command similar to: header("Location: http://ServerX/connect.php?uname=username&site_id=siteid&ucaps=ucaps"); I'm at a complete loss as to why it's not creating the cookies properly. Any suggestions?

    Rob! x ;o)

    ------=_NextPart_000_000C_01C22371.A6886B30--

    attached mail follows:


    Hi All,

    My query (below) has been solved. Thanks to all who responded so quickly!

    Putting single quote marks around 'Colour and Imaging Institute' did the trick.

    DAniel

    Hi,

    I'm gleaning microsoft SQL from queries within a MS Access database, for insertion into my PHP pages. This has been working fine but the example below just refuses to work,

    SELECT ExamPapers.EPaperID, ExamPapers.EPapersText, ExamPapers.[Title of Paper], ExamPapers.Course, ExamPapers.School, ExamPapers.Year, ExamPapers.[Jan/Summer], ExamPapers.[Module Code], ExamPapers.Stage, ExamPapers.[Storage Location], ExamPapers.[Add to Webpage] FROM ExamPapers WHERE (((ExamPapers.School)="Colour and Imaging Institute") AND ((ExamPapers.[Add to Webpage])=True));

    I want to pull records from 1 table (ExamPapers). The WHERE line is causing problems i.e if I remove it, my php pages actually show. Can anyone see what I'm doing wrong?

    Thanks,

    Daniel Owen-McGee

    attached mail follows:


    Hallo Folks

    I have come across this problem many times... But still haven't seen anyone give a reasonably coherent solution... I am trying to get my script to read Paradox Tables... Its a no go so far... I do believe that this can be achieved via. odbc... I have tried the configurations but have fallen short each time... I keep getting the following Error:

    Warning: SQL error: [Microsoft][ODBC Paradox Driver] The Microsoft Jet database engine could not find the object 'Test.db'. Make sure the object exists and that you spell its name and the path name correctly.,

    There has to be someone in this Forum who has successfully worked with Paradox Tables in conjunction with php... Do I have to download another version of ODBC... My Scripts have no issues reading MSAccess tables the problem is when it gets to Paradox...

    Please Help...

    Spike...

    attached mail follows:


    Greetings.

    I have two pages where I upload images to a database.

    The first one is a "capture", where I insert a record to the database, and the second is to edit the data.

    The problem: When I go to insert, the following code works flawlessly:

    <? if ($cmdOk == "Save") { if (isset($imagen) && $imagen != "none") $data = addslashes(fread(fopen($image, "r"), filesize($image))); else $data = ""; ?>

    But, if I do in another page (the same darn snippet), it goes:

    Warning: fopen("C:\WINNT\Web\wuicon1.gif", "r") - No such file or directory in /web/domain/adconsolutions/htdocs/conexionescolar/frmnoticiasedi.php on line 18

    Warning: stat failed for C:\WINNT\Web\wuicon1.gif (errno=2 - No such file or directory) in /web/domain/adconsolutions/htdocs/conexionescolar/frmnoticiasedi.php on line 18

    Warning: fread(): supplied argument is not a valid File-Handle resource in /web/domain/adconsolutions/htdocs/conexionescolar/frmnoticiasedi.php on line 18

    Anybody knows why? It's the same vars, the same text boxes, etc. The only thing that changes comes after that condition...

    TIA.

    --
    Un gran saludo/Big regards...
       Arturo Barajas
       Sistemas PPG SJR
       +52 (427) 271-9100, ext. 448
    

    attached mail follows:


    > Are you able to do an nslookup of these domains from the server?

    Those, of course, were just example email addresses (I'd replaced them before sending out this email so it would be more clear). If I use a real email address I get the same error "unrouteable mail domain"

    I am able to nslookup the addresses before hand so I don't understand why the mail delivery is not working...

    thx, Liam

    > -----Original Message----- > From: Liam Gibbs [mailto:liamgibbsyahoo.com] > Sent: Wednesday, July 03, 2002 12:58 PM > To: php-generallists.php.net > Subject: [PHP] Exim sendmail faults > > I apologize; this may be more a question for the > people in php-install. But I'm having some problems > with my mail stuff in PHP. > > I have Exim version 3.12 installed, but I'm not > getting any mails sent out by PHP. I *do* get this > error mail, however: > > This is automatically emailed back to me: > > This message was created automatically by mail > delivery software. > > A message that you sent could not be delivered to > one or more of its recipients. The following > address(es) failed: > > emailtheemailaddress.com: > unrouteable mail domain "theemailaddress.com" > > This is in the error log files: > > 2002-07-02 03:26:13 17PI3B-0003sM-00 <= > roottheipaddress.org U=root > P=local S=2 > 95 > 2002-07-02 03:26:13 17PI3B-0003sM-00 ** > anotheremailanotheremailaddress.com: > unrouteable mail d > omain "anotheremailaddress.com" > 2002-07-02 03:26:13 17PI3B-0003sO-00 <= <> > R=17PI3B-0003sM-00 U=mail > P=local S=1 > 063 > 2002-07-02 03:26:13 17PI3B-0003sM-00 Error message > sent to > roottheipaddress.org > 2002-07-02 03:26:13 17PI3B-0003sM-00 Completed > 2002-07-02 03:26:13 17PI3B-0003sO-00 => root > <roottheipaddress.org> > D=localuser > T=local_delivery > 2002-07-02 03:26:13 17PI3B-0003sO-00 Completed > > Any thoughts? I know all these e-mail addresses and ip > addresses are valid (they're either mine or of > acquaintances), but the server seems to fight me on > this one. > > __________________________________________________ > Do You Yahoo!? > Sign up for SBC Yahoo! Dial - First Month Free > http://sbc.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > **************************************************************************** > This message is intended for the sole use of the individual and entity to > whom it is addressed, and may contain information that is privileged, > confidential and exempt from disclosure under applicable law. If you are > not the intended addressee, nor authorized to receive for the intended > addressee, you are hereby notified that you may not use, copy, disclose or > distribute to anyone the message or any information contained in the > message. If you have received this message in error, please immediately > advise the sender by reply email and delete the message. Thank you very > much. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com