OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general-digest-help_at_lists.php.net
Date: Tue Jan 07 2003 - 17:05:11 CST

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

    php-general Digest 7 Jan 2003 23:05:11 -0000 Issue 1809

    Topics (messages 130552 through 130638):

    Re: Get your *own* IP...?!
            130552 by: info.t-host.com
            130554 by: Chris Hewitt
            130558 by: info.t-host.com
            130560 by: Chris Hewitt
            130564 by: info.t-host.com
            130565 by: Jason Wong
            130567 by: Tom Rogers

    Re: XHTML Validator Problem
            130553 by: Tom Rogers

    groupware tool in PHP for PostgreSQL
            130555 by: Miguel González Castaños
            130562 by: Jason Wong
            130573 by: Miguel González Castaños
            130623 by: Maxim Maletsky

    Re: [PHP-GEN] Directory Listing with php on unix boxes
            130556 by: Robert Fisher

    Re: Opening DOS with PHP commands
            130557 by: Chris Hewitt

    Re: Text editors
            130559 by: Scott Houseman
            130568 by: Stephan Seidt
            130580 by: Leon Mergen
            130621 by: Michael Sweeney
            130622 by: Didier McGillis

    Re: ftp and www
            130561 by: Jason Wong
            130574 by: Marek Kilimajer
            130611 by: Brian V Bonini

    Re: XHTML Validator Problem[Scanned]
            130563 by: Michael Egan
            130566 by: Tom Rogers
            130572 by: Michael Egan

    Re: Session ID changes
            130569 by: Marek Kilimajer

    Re: Far out!!!! More IIS problems.....
            130570 by: Marek Kilimajer
            130582 by: Scott Fletcher
            130589 by: Brian McGarvie
            130602 by: Scott Fletcher

    Re: MySQL field to maintain formatting
            130571 by: Vernon

    Re: email a web page
            130575 by: Brian McGarvie

    Re: Using VS.NET for PHP Projects - Revisit
            130576 by: Didier McGillis
            130579 by: Chris Boget

    Forwarding POST info from a PHP script
            130577 by: David Barrett
            130583 by: Brian McGarvie
            130585 by: David Barrett
            130587 by: Marek Kilimajer
            130588 by: Larry Brown
            130615 by: David Barrett
            130617 by: David Barrett

    Re: Defaults in drop down list...
            130578 by: Joel Boonstra
            130626 by: Guy Haynes

    Re: No input file specified. Please help.
            130581 by: Marek Kilimajer

    I am a dullard
            130584 by: Todd Barr
            130586 by: Jason Wong
            130619 by: Hugh Danaher

    apache + php + MS active directory
            130590 by: Ezra Nugroho
            130593 by: Brian McGarvie

    Development tools
            130591 by: Didier McGillis
            130592 by: Brian McGarvie
            130606 by: Didier McGillis
            130608 by: Brian McGarvie

    Undefined index a different problem
            130594 by: Mekrand
            130598 by: Marek Kilimajer
            130600 by: Mekrand
            130609 by: Marek Kilimajer
            130610 by: Matt Schroebel

    Re: Development tools[Scanned]
            130595 by: Michael Egan
            130596 by: Michael Egan
            130605 by: Didier McGillis
            130607 by: Michael Egan

    Issues w/ WHOIS and Fgets
            130597 by: Ben Vaughn
            130613 by: Marek Kilimajer
            130614 by: Ben Vaughn

    regular expression help
            130599 by: adrian murphy.2020tourism.com
            130625 by: Maxim Maletsky
            130628 by: Khalid El-Kary

    Found a solution to the php.ini problem on IIS.....
            130601 by: Scott Fletcher

    Re: session_start() in php.ini does not work on Microsoft IIS
            130603 by: Scott Fletcher

    Re: php.ini - changes aren't taking?
            130604 by: Scott Fletcher

    Question abt php installation
            130612 by: Lic. Carlos A. Triana Torres

    Re: PHP and MySQL bug
            130616 by: Marek Kilimajer
            130629 by: Nuno Lopes

    Slow file uploads.
            130618 by: Claes Gustavsson
            130632 by: Tim Meader

    Why it doesn't work?
            130620 by: KidA

    Re: Double entry into MySQL..
            130624 by: Michael Sweeney

    Re: Zend IDE vs. PhpEd
            130627 by: Maxim Maletsky

    custom error handling
            130630 by: electroteque
            130631 by: electroteque
            130636 by: Michael Sims

    Adding HTTP URL Code
            130633 by: ELLIOTT,KATHERINE A (HP-FtCollins,ex1)

    php-ldap - multiple modify actions within a single request
            130634 by: Karim Jafarmadar
            130635 by: Michael Sims

    test_smtp.php
            130637 by: Rad Craig
            130638 by: Manuel Lemos

    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:


    Hello Michael,

    please go to your Bash-Shell. There you type:
    MYIP=`/sbin/ifconfig ppp0 grep inet | cut -d: -f2 | cut -d" " -f1` ;

    $MYIP has now your dyn IP Adress.

    Best regards,
    Oliver Etzel
    ---------------------------------------------------------------
    infot-host.de
    Phone +49 89 54071102
    New - .eu-Domains
    Scriptinstallation Serverconfiguration Hosting Serverhousing Domains
    www.t-host.de
    ---------------------------------------------------------------

    > Does anyone know a way to fetch your own IP-adress? I need it because I run
    > a web server on my computer with a dynamic-IP so I need it to change all the
    > URLs it creates dynamically...

    attached mail follows:


    Charles likes PHP wrote:

    >Does anyone know a way to fetch your own IP-adress? I need it because I run
    >a web server on my computer with a dynamic-IP so I need it to change all the
    >URLs it creates dynamically...
    >
    Maybe I'm not understanding your situation properly so please correct me
    if I'm wrong. URLs should have the FQDN not IP address. DNS was created
    so that fixed, easy to remember, names could be given to computers not
    numbers. The numbers (IP address) may change.

    If you are running a server, its hostname should be fixed, e.g.
    mybox.myisp.com whilst its ip address may change.

    I suggest that you use $_SERVER['SERVER_NAME'] in the URL. Its populated
    with Apache under linux, but whatever you are using you should have a
    way to get the hostname. Best if you are running a server is to get a
    static ip address from your isp but few will have them these days (I'm
    on a static IP address from Demon Internet). As long as your hostname
    remains the same you will have little problem. Your isp should provide
    forward DNS for your hostname (they should provide reverse too). Maybe
    for dns you may need something like dyndns.org.

    Some broadband ISPs use hostnames based upon the IP address e.g.
    dsl-111.222.333.444.myisp.com. It saves them playing with DNS and are
    intended for end users (who would usually have no problem with it as
    they would not be trying to run a server).

    Hope this helps.

    Chris

    attached mail follows:


    Hello all,
    Oh my god
    As a perl hacker I did it that easy way:

    Please go to your Linux Bash-Shell. There you type:

    MYIP=`/sbin/ifconfig ppp0 grep inet | cut -d: -f2 | cut -d" " -f1` ;

    $MYIP has now your dyn IP Adress.

    Best regards,
    Oliver Etzel
    ---------------------------------------------------------------
    infot-host.de
    Phone +49 89 54071102
    New - .eu-Domains
    Scriptinstallation Serverconfiguration Hosting Serverhousing Domains
    www.t-host.de
    ---------------------------------------------------------------
      ----- Original Message -----
      From: Chris Hewitt
      To: Charles likes PHP
      Cc: php-generallists.php.net
      Sent: Tuesday, January 07, 2003 12:22 PM
      Subject: Re: [PHP] Get your *own* IP...?!

      Charles likes PHP wrote:

    >Does anyone know a way to fetch your own IP-adress? I need it because I run
    >a web server on my computer with a dynamic-IP so I need it to change all the
    >URLs it creates dynamically...
    >
      Maybe I'm not understanding your situation properly so please correct me
      if I'm wrong. URLs should have the FQDN not IP address. DNS was created
      so that fixed, easy to remember, names could be given to computers not
      numbers. The numbers (IP address) may change.

      If you are running a server, its hostname should be fixed, e.g.
      mybox.myisp.com whilst its ip address may change.

      I suggest that you use $_SERVER['SERVER_NAME'] in the URL. Its populated
      with Apache under linux, but whatever you are using you should have a
      way to get the hostname. Best if you are running a server is to get a
      static ip address from your isp but few will have them these days (I'm
      on a static IP address from Demon Internet). As long as your hostname
      remains the same you will have little problem. Your isp should provide
      forward DNS for your hostname (they should provide reverse too). Maybe
      for dns you may need something like dyndns.org.

      Some broadband ISPs use hostnames based upon the IP address e.g.
      dsl-111.222.333.444.myisp.com. It saves them playing with DNS and are
      intended for end users (who would usually have no problem with it as
      they would not be trying to run a server).

      Hope this helps.

      Chris

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

    attached mail follows:


    infot-host.com wrote:

    >$MYIP has now your dyn IP Adress.
    >
    Yes. So make up a URL with it and _hope_ that when a user clicks it the
    address has not changed.

    My point was simply that, for a server, the server FQDN hostname should
    be fixed and never change. Use the hostname in any URL and avoid the IP
    address problem completely.

    Regards

    Chris

    attached mail follows:


    Oh man,

    Then you write a short script, that whenever IP changes then start it anew.
    You don´t have to make it public.

      ----- Original Message -----
      From: Chris Hewitt
      To: php-generallists.php.net
      Sent: Tuesday, January 07, 2003 1:20 PM
      Subject: Re: [PHP] Get your *own* IP...?!

      infot-host.com wrote:

    >$MYIP has now your dyn IP Adress.
    >
      Yes. So make up a URL with it and _hope_ that when a user clicks it the
      address has not changed.

      My point was simply that, for a server, the server FQDN hostname should
      be fixed and never change. Use the hostname in any URL and avoid the IP
      address problem completely.

      Regards

      Chris

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

    attached mail follows:


    On Tuesday 07 January 2003 20:28, infot-host.com wrote:

    > Then you write a short script, that whenever IP changes then start it anew.
    > You don´t have to make it public.

    Right, so what if people like your site so much and they bookmark a particular
    page?

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

    /* EARTH smog | bricks AIR -- mud -- FIRE soda water | tequila WATER */

    attached mail follows:


    Hi,

    Tuesday, January 7, 2003, 6:45:43 AM, you wrote: ClP> Does anyone know a way to fetch your own IP-adress? I need it because I run ClP> a web server on my computer with a dynamic-IP so I need it to change all the ClP> URLs it creates dynamically...

    ClP> Thanks!

    ClP> -Charles

    I think you should take a look at this :))

    http://www.dyndns.org/

    -- 
    regards,
    Tom
    

    attached mail follows:


    Hi,

    Tuesday, January 7, 2003, 6:58:08 PM, you wrote: ME> I've finally got round to making some attempt to validating the pages of a site I've done with PHP using the W3C XHTML Validator. However, it's throwing out errors wherever I use session control ME> on pages.

    ME> The server generates PHP Session ID variables which are added to links to other pages but my understanding is that these are rejected on the basis that the '&' and '=' characters are invalid (I ME> might be wrong here).

    ME> Examples of the error messages generated by the validator are given below:

    ME> Line 154, column 102: cannot generate system identifier for general entity "PHPSESSID" ME> ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df ME> ^ ME> Line 154, column 102: general entity "PHPSESSID" not defined and no default entity (explain... <http://validator.w3.org/docs/errors.html>). ME> ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df ME> ^

    ME> These are the only error messages left - having dealt with the dozens of others left in through my own sloppy coding :-(

    ME> I'm not sure how to tackle this given that these elements of the page are generated automatically.

    ME> Is there a way round this or are there any sources of information relating to this area?

    ME> Thanks in advance,

    ME> Michael Egan

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

    In your php.ini set arg_separator.output to &amp; That should fix it.

    -- 
    regards,
    Tom
    

    attached mail follows:


    hi all,

    I am looking for any tool in PHP using PostgreSQL for setting up a collaborative web based system for a small group of people.

    Mainly we need a system to track a list of tasks and maybe to track the task related to a project (therefore some kind of project tracking).

    I have been looking around during more than one month, and the best that I have found seems to be phpGroupware, PHProjekt and TuTOS but I am hoping to get some comments/suggestions from you guys.

    Many thanks in advance.

    Miguel

    attached mail follows:


    On Tuesday 07 January 2003 19:18, Miguel González Castaños wrote: > hi all, > > I am looking for any tool in PHP using PostgreSQL for setting up a > collaborative web based system for a small group of people. > > Mainly we need a system to track a list of tasks and maybe to track the > task related to a project (therefore some kind of project tracking). > > I have been looking around during more than one month, and the best > that I have found seems to be phpGroupware, PHProjekt and TuTOS but I am > hoping to get some comments/suggestions from you guys.

    You have started a new thread by taking an existing posting and replying to it while you changed the subject.

    That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a "References:" header that tells all recipients which posting(s) your posting refers to. A mail client uses this information to build a threaded view ("tree view") of the postings.

    With your posting style you successfully torpedoed this useful feature; your posting shows up within an existing thread it has nothing to do with.

    Always do a fresh post when you want to start a new thread. To achieve this, click on "New message" instead of "Reply" within your mail client, and enter the list address as the recipient. You can save the list address in your address book for convenience.

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

    /* Accordion, n.: A bagpipe with pleats. */

    attached mail follows:


    hi all,

    I am looking for any tool in PHP using PostgreSQL for setting up a collaborative web based system for a small group of people.

    Mainly we need a system to track a list of tasks and maybe to track the

    task related to a project (therefore some kind of project tracking).

    I have been looking around during more than one month, and the best that I have found seems to be phpGroupware, PHProjekt and TuTOS but I am

    hoping to get some comments/suggestions from you guys.

    Many thanks in advance.

    Miguel

    Jason Wong and the rest: Sorry for the inconvenience of my malformed last post

    attached mail follows:


    Miguel González Castaños <mgctid.es> wrote... :

    > I have been looking around during more than one month, and the best > that I have found seems to be phpGroupware, PHProjekt and TuTOS but I am > hoping to get some comments/suggestions from you guys.

    probably phpGroupWare.

    --
    Maxim Maletsky
    maximphp.net
    

    attached mail follows:


    I didn't see any sorting in your code. so maybe I missed something, however you could try natcasesort() function.

    your new line would look like this:

    while (false !== ($file = readdir($handle))) $filenames[] = natcasesort($file);

    please note that this sorts in alphanumeric order and not case sensitive.

    Hope this helps,

    Robert Fisher Axis Solutions, Inc.

    __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com

    attached mail follows:


    Tony Tzankoff wrote:

    >Does anybody know if a MS-DOS window (running a BAT file) can be opened >using a PHP command? Right now, I have Windows using the Task Scheduler to >open the MS-DOS window (which creates a file used later by PHP), while a PHP >webpage loops every few minutes and does whatever it needs to with the file. >I am trying to intergrate the MS-DOS window timing with PHP to avoid >conflicts. ANy suggestions? Is this even doable? > Does system('mybatchfile.bat') not work?

    HTH Chris

    attached mail follows:


    Hi there.

    I find that the Maguma Studio works very nicely.

    http://www.maguma.com/

    I've only used the 'light' version, as it's free.

    Cheers

    Scott

    On 2003/01/07 11:59, Karl James wrote: > Hello guys, > Right now im using dreamweaver mx > > I was wondering if anyone knew of any good free text editors that has > line counts > And is good for php…. > > Thanks > karl > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 > >

    -- 
    Scott Houseman
    Senior Software Developer
    Junk Mail Publishing (Pty) Ltd
    T + 27 12 342 3840 ext 2806 F +27 12 342 3876
    E scottjunkmail.co.za | www.junkmail.co.za
    A 1312 Pretorius Street, Hatfield, Pretoria
    P O Box 6574, Pretoria, 0001, South Africa
    +27 82 491 8021
    

    attached mail follows:


    You wanted advert ;p www.weaverslave.de , has also a good english translation and many other languages.

    Karl James wrote: > Hello guys, > Right now im using dreamweaver mx > > I was wondering if anyone knew of any good free text editors that has > line counts > And is good for php…. > > Thanks > karl > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 > >

    -- 
    When ipv6 and tcpa are there.. When this Palladium server wrecks..
    I won't be able to drink my coffe then!
    

    attached mail follows:


    www.editplus.com

    "Karl James" <karl.jamesverizon.net> wrote in message news:007f01c2b633$7b746c50$cc6c2f04karle8hnwwmn0f... Hello guys, Right now im using dreamweaver mx

    I was wondering if anyone knew of any good free text editors that has line counts And is good for php….

    Thanks karl

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
    

    attached mail follows:


    jEdit. www.jedit.org.

    On Tue, 2003-01-07 at 01:59, Karl James wrote: > Hello guys, > Right now im using dreamweaver mx > > I was wondering if anyone knew of any good free text editors that has > line counts > And is good for php…. > >

    attached mail follows:


    Edit Plus www.editplus.com theres a trial period that never ends.

    >From: Michael Sweeney <Michael.Sweeneyverisity.com> >To: Karl James <karl.jamesverizon.net> >CC: php-generallists.php.net >Subject: Re: [PHP] Text editors >Date: 07 Jan 2003 10:00:45 -0800 > >jEdit. www.jedit.org. > >On Tue, 2003-01-07 at 01:59, Karl James wrote: > > Hello guys, > > Right now im using dreamweaver mx > > > > I was wondering if anyone knew of any good free text editors that has > > line counts > > And is good for php…. > > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* http://join.msn.com/?page=features/virus

    attached mail follows:


    On Wednesday 08 January 2003 04:16, Mukta Telang wrote: > Hi, > I am told to " merge ftp and www " !

    In response to what? What are you trying to solve?

    > I cant understand what it means.. > May be it means that it should be possible to browse ftp directory > from a browser? > What is php's support for ftp?

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

    /* A couple of kids tried using pickles instead of paddles for a Ping-Pong game. They had the volley of the Dills. */

    attached mail follows:


    There are many of them: http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/File_Management/

    Mukta Telang wrote:

    >Hi, >I am told to " merge ftp and www " ! >I cant understand what it means.. >May be it means that it should be possible to browse ftp directory >from a browser? >What is php's support for ftp? >Mukta > > > > > >

    attached mail follows:


    On Tue, 2003-01-07 at 15:16, Mukta Telang wrote:

    > May be it means that it should be possible to browse ftp directory > from a browser?

    Which is entirely possible without PHP

    attached mail follows:


    Tom,

    Thanks for that.

    I don't have access to the server on which the site is being run but I'll suggest the change to the hosting company.

    Michael Egan

    -----Original Message----- From: Tom Rogers [mailto:trogerskwikin.com] Sent: 07 January 2003 10:57 To: Michael Egan Cc: PHP General (E-mail) Subject: Re: [PHP] XHTML Validator Problem[Scanned]

    Hi,

    Tuesday, January 7, 2003, 6:58:08 PM, you wrote: ME> I've finally got round to making some attempt to validating the pages of a site I've done with PHP using the W3C XHTML Validator. However, it's throwing out errors wherever I use session control ME> on pages.

    ME> The server generates PHP Session ID variables which are added to links to other pages but my understanding is that these are rejected on the basis that the '&' and '=' characters are invalid (I ME> might be wrong here).

    ME> Examples of the error messages generated by the validator are given below:

    ME> Line 154, column 102: cannot generate system identifier for general entity "PHPSESSID" ME> ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df ME> ^ ME> Line 154, column 102: general entity "PHPSESSID" not defined and no default entity (explain... <http://validator.w3.org/docs/errors.html>). ME> ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df ME> ^

    ME> These are the only error messages left - having dealt with the dozens of others left in through my own sloppy coding :-(

    ME> I'm not sure how to tackle this given that these elements of the page are generated automatically.

    ME> Is there a way round this or are there any sources of information relating to this area?

    ME> Thanks in advance,

    ME> Michael Egan

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

    In your php.ini set arg_separator.output to &amp; That should fix it.

    -- 
    regards,
    Tom
    

    attached mail follows:


    Hi,

    Tuesday, January 7, 2003, 10:23:54 PM, you wrote: ME> Tom,

    ME> Thanks for that.

    ME> I don't have access to the server on which the site is being run but I'll suggest the change to the hosting company.

    ME> Michael Egan

    ME> -----Original Message----- ME> From: Tom Rogers [mailto:trogerskwikin.com] ME> Sent: 07 January 2003 10:57 ME> To: Michael Egan ME> Cc: PHP General (E-mail) ME> Subject: Re: [PHP] XHTML Validator Problem[Scanned]

    ME> Hi,

    ME> Tuesday, January 7, 2003, 6:58:08 PM, you wrote: ME>> I've finally got round to making some attempt to validating the pages of a site I've done with PHP using the W3C XHTML Validator. However, it's throwing out errors wherever I use session control ME>> on pages.

    ME>> The server generates PHP Session ID variables which are added to links to other pages but my understanding is that these are rejected on the basis that the '&' and '=' characters are invalid (I ME>> might be wrong here).

    ME>> Examples of the error messages generated by the validator are given below:

    ME>> Line 154, column 102: cannot generate system identifier for general entity "PHPSESSID" ME>> ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df ME>> ^ ME>> Line 154, column 102: general entity "PHPSESSID" not defined and no default entity (explain... <http://validator.w3.org/docs/errors.html>). ME>> ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df ME>> ^

    ME>> These are the only error messages left - having dealt with the dozens of others left in through my own sloppy coding :-(

    ME>> I'm not sure how to tackle this given that these elements of the page are generated automatically.

    ME>> Is there a way round this or are there any sources of information relating to this area?

    ME>> Thanks in advance,

    ME>> Michael Egan

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

    ME> In your php.ini set arg_separator.output to &amp; ME> That should fix it.

    You can put this at the top of your scripts:

    ini_set('arg_separator.output','&amp;');

    -- 
    regards,
    Tom
    

    attached mail follows:


    Tom,

    Thanks again. This gives me full control over things which always seems the best solution.

    Michael

    > You can put this at the top of your scripts:

    > ini_set('arg_separator.output','&amp;');

    attached mail follows:


    Scott Fletcher wrote:

    >"[-^-!-%-" <monfortengineering.sdsu.edu> wrote in message >news:<Pine.GSO.4.31.0301060928360.10129-100000kahuna.engineering.sdsu.edu>. >.. > > >>Hello all, >> >>I need some clarification. To my understanding, each visit to php site >>creates a UNIQUE Session ID (SID). >> Only when you call session_start() - this function checks for $_REQUEST[session_name()], if there is one, it is used, else it creates one.

    >>And, that ID stays constants until the >>browser is shutdown, or the session is specifically destroyed. >>Is this correct? If not, then please advise. >> >> Basicly yes, session cookie lifetime is controled by session_lifetime configuration directive, its default 0 means cookie is destroyed after the browser closes.

    >>I'm trying to develop a cookie-less, persistent, shopping cart, which >>saves the cart details, in a database. I need to associate each order >>(cart item) to the current session id. However, the session ID number, >>seems to change, everytime the page is reloaded. Is this how it works? >>Am i missing something? >> >> Session ID is stored as a cookie, or you have to pass SID constant in each link of your page that points to your site and also as a hidden field in forms.

    >>Please advise. >> >>Thanks. >> >>-john >> >> >> >> > > >

    attached mail follows:


    phpinfo will tell you which php.ini is used

    Scott Fletcher wrote:

    >I tried various methods on IIS after configuring hte PHP.INI. Such as >shutting down IIS, restarting IIS and rebooting hte machine. Here's one >latest addition that I found to be very far out!!!!!! What I did was I >renamed the php.ini to php1.ini and goes throught the procedures. Guess >what the website still is the same. So, I renamed the php.ini back and make >some changes in php.ini. Still the same result. I'm still working on it. > > > > >

    attached mail follows:


    I only have one php.ini on the machine and the filepath point to this one.

    "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message news:3E1ACDF5.6030308webglobe.sk... > phpinfo will tell you which php.ini is used > > Scott Fletcher wrote: > > >I tried various methods on IIS after configuring hte PHP.INI. Such as > >shutting down IIS, restarting IIS and rebooting hte machine. Here's one > >latest addition that I found to be very far out!!!!!! What I did was I > >renamed the php.ini to php1.ini and goes throught the procedures. Guess > >what the website still is the same. So, I renamed the php.ini back and make > >some changes in php.ini. Still the same result. I'm still working on it. > > > > > > > > > > >

    attached mail follows:


    php (.exe or .dll) will look for a php.ini in both, c:\(windows_dir) and c:\php\ (I am not sure what location takes priority - I'd assume c:\(windows_dir)

    "Scott Fletcher" <scottabcoa.com> wrote in message news:20030107145714.97215.qmailpb1.pair.com... > I only have one php.ini on the machine and the filepath point to this one. > > "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message > news:3E1ACDF5.6030308webglobe.sk... > > phpinfo will tell you which php.ini is used > > > > Scott Fletcher wrote: > > > > >I tried various methods on IIS after configuring hte PHP.INI. Such as > > >shutting down IIS, restarting IIS and rebooting hte machine. Here's one > > >latest addition that I found to be very far out!!!!!! What I did was I > > >renamed the php.ini to php1.ini and goes throught the procedures. Guess > > >what the website still is the same. So, I renamed the php.ini back and > make > > >some changes in php.ini. Still the same result. I'm still working on > it. > > > > > > > > > > > > > > > > > > >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02
    

    attached mail follows:


    Hi Fella!

    I found the problem and fixed it. I only have one php.ini which is found under 'c:\winnt\'. What happen was that a couple of months ago, someone in my company without my knowledge had made a backup copy of php.ini and put it into hte D:\ drive. So, IIS for some reason didn't go to c:\winnt\ directory and jumped from c: drive to d: drive and use the backup php.ini. I fixed the problem by renaming hte file, from php.ini to php.ini_safe. This then cause the IIS to revert back to the php.ini in c:\winnt.

    Hope this knowledge will help everyone one day. The weird thing is that when I use phpinfo(). It didnt show any file path. It just said the filepath is 'php.ini', no 'c:\winnt\php.ini' at all. It just said 'php.ini' before I renamed the file. After renaming the file, it still say 'php.ini' as if nothing had changed.

    Take care, Scott

    "Brian McGarvie" <brian.mcgarvieanypurposeloans.co.uk> wrote in message news:20030107153716.39471.qmailpb1.pair.com... > php (.exe or .dll) will look for a php.ini in both, c:\(windows_dir) and > c:\php\ (I am not sure what location takes priority - I'd assume > c:\(windows_dir) > > "Scott Fletcher" <scottabcoa.com> wrote in message > news:20030107145714.97215.qmailpb1.pair.com... > > I only have one php.ini on the machine and the filepath point to this one. > > > > "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message > > news:3E1ACDF5.6030308webglobe.sk... > > > phpinfo will tell you which php.ini is used > > > > > > Scott Fletcher wrote: > > > > > > >I tried various methods on IIS after configuring hte PHP.INI. Such as > > > >shutting down IIS, restarting IIS and rebooting hte machine. Here's > one > > > >latest addition that I found to be very far out!!!!!! What I did was > I > > > >renamed the php.ini to php1.ini and goes throught the procedures. > Guess > > > >what the website still is the same. So, I renamed the php.ini back and > > make > > > >some changes in php.ini. Still the same result. I'm still working on > > it. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02 > >

    attached mail follows:


    That did it thanks!

    V

    attached mail follows:


    "Dc" <dcurranpowerup.com.au> wrote in message news:20030106100453.3608.qmailpb1.pair.com... > Hi all, > > I have a newsletter ready to email to my database of customers. > > The entire newsletter incl graphics , layout etc is enclosed within a form > which posts to a second page which s supposed to email the desired > page..........but it does not work! The code is listed below........ > > _______________________________________________________ > > <?php > > $dbcnx = mysql_connect("localhost","", ""); > if (!$dbcnx) { > echo( "<P>Unable to connect to the " . > "database server at this time.</P>" ); > > exit(); > > } > > if (! mysql_select_db("NameOfDataBase") ) > > { > > echo( "<P>Unable to locate the " . > "database at this time.</P>" ); > > exit(); > > } > > ?> > > <? > // HTML VERSION > > > $result = mysql_query( > "SELECT EmailAddress FROM emailbasketrecipient"); > if (!$result) > { > echo("<P>Error performing query: " . > mysql_error() . "</P>"); > exit(); > } > while ( $row = mysql_fetch_array($result) ) > { > > $message = " > <html> > <head> > <title>::: Welcome to my Newsletter :::</title> > <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'> > > </head> > > <body> > <div align='center'> > <table width='750' border='0' cellspacing='0' cellpadding='0' > height='162'> > > > > content content etc > > > > </table> > > </div> > </body> > </html> > > "; > > $email = $row["EmailAddress"]; > > (line 79) $headers .= "From: My site.com<dcurranpowerup.com.au>\n"; > $headers .= "X-Sender: <dcurranpowerup.com.au>\n"; > $headers .= "X-Mailer: testDC\n"; > $headers .= "Return-Path: <dcurranpowerup.com.au>\n"; > $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; > $subject = " Club Newsletter"; > (line 91) mail($email, $subject , $message, $headers); > $headers = ""; > > } > > echo("$message"); > > ?> > _________________________________________________________ > > and then I get this message each time......... > > Warning: Undefined variable: headers in > c:\www\cavalier\admin\newsletteremailcommand.php on line 79 > > Warning: Failed to Connect in > c:\www\cavalier\admin\newsletteremailcommand.php on line 91 > > > Any quick and easy tips to get my newsletter happening? Even a new script or > easy tutorial in Englsih. > > > Thanks > > DC > > > >

    try and change your first $headers .= "stuff" to $headers = "stuff";

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02
    

    attached mail follows:


    for coding like that I use HomeSite, I dont like Microsoft Tools, but I guess they have a use.

    >From: "Sean Malloy" <seanelement.net.au> >To: "PHP Windows" <php-windowslists.php.net>, "PHP General" ><php-generallists.php.net> >Subject: [PHP] Using VS.NET for PHP Projects - Revisit >Date: Tue, 7 Jan 2003 17:56:08 +1100 > >Hi. > >I kind of got PHP syntax highlighting working within Visual Studio.NET > >I've created a page, which mentions the steps you need to take to get it >working, as well as a screen shot. Everyone loves screen shots. > >http://www.quake-au.net/php/php_and_vsdotnet.htm > >Hope someone finds it useful apart from me. > >Regards, > >Sean > >-----Original Message----- >From: Sean Malloy [mailto:seanelement.net.au] >Sent: Tuesday, 7 January 2003 1:34 PM >To: PHP General >Subject: [PHP] Using VS.NET for PHP Projects > > > >I know I can use Visual Studio to edit PHP files as plain text, but has >anyone seen any way of creating some sort of add-in, or macro or whatever, >which would do syntax highlighting on PHP files? > > > >-- >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

    _________________________________________________________________ Help STOP SPAM: Try the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

    attached mail follows:


    > for coding like that I use HomeSite, I dont like Microsoft Tools, but I > guess they have a use.

    I use Homesite (v5) as well. And while it is a very useful tool, I just wish it were better supported. Not only is it a memory hog but it's got a leak like a seive. Earlier versions were worse and at least I don't have to re- boot every other hour with v5. But I still get loads of pointer errors, exception errors when I close down, etc. If there was anything else that had the same features as HS, I'd start using that in an instant. Sadly, I've yet to come across anything like that so I'm stuck with HS.

    Chris

    attached mail follows:


    I want to be able to retrieve POST variable in one PHP script (which is straight-forward) and then send these from the script to another one returning the processed input.

    I have written a script that will parse a frames-based page and render it as a flat page (i.e. all frames displayed as a table in one HTML file) - this is so that I can create a website using frames, and still let browsers that don't support frames to access it without my having to create a separate version of the site.

    e.g.: http://www.redradish.co.uk/rr/index.htm (frames based site) http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1 (the same site rendered as single page).

    The problem is that if in the frames-based site one of the frames is a form submission, I need to be able to send this data to the original form and retrieve the output to display in the rendered page.

    e.g. http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug =1 (this is a page that has a contact form).

    I can't find any information on how to forward such a request.

    The script in question is located at: http://www.redradish.co.uk/php/framesprocessor.php

    It uses these variables (passed using GET or POST): Frameset frameset page. This needs to be parsed and a static HTML page created. Target (optional) full URL of page to be displayed in frmae named TargetName. TargetName (optional) name of the frame that $Target should appear in. MainFrame (optional) is the frame from which header info, etc. is taken. Default is first frame. AllHead (optional) If set (is 1 or more), copies <HEAD> content from all frames. RenderMethod (optional) defines how the frameset is to be represented: 1 - All frames dumped into new page in order they appear in frameset. 2 - tables are used to attempt to recreate original format Default is 1. LinkSearch (optional) how links are replaced: 1 - Only specific tags are replaced 2 - Anything within quotes (' or ") that contains document path is replaced Default is 1. Debug If set (greater than 0), debug info is added in comments.

    It works to a good degree on most frames-based sites, but does have a couple of failings (such as the one mentioned) that I would like to overcome.

    The other problem is handling JavaScript in e.g. <frame src="JavaScript:openpage(xx)">. There is no way to process JavaScript in PHP that I am aware of - does anyone have a workaround for this? i.e. so that my script can process the JavaScript function and retrieve the relevant page for inclusion in the rendered page.

    Hope someone can help!

    Thanks.

    Dave

    attached mail follows:


    Could be an issue on the webserver if PHP has register_globals set to off...

    "David Barrett" <phpdavebarrett.co.uk> wrote in message news:20030107142246.67602.qmailpb1.pair.com... > I want to be able to retrieve POST variable in one PHP script (which is > straight-forward) and then send these from the script to another one > returning the processed input. > > I have written a script that will parse a frames-based page and render it as > a flat page (i.e. all frames displayed as a table in one HTML file) - this > is so that I can create a website using frames, and still let browsers that > don't support frames to access it without my having to create a separate > version of the site. > > e.g.: > http://www.redradish.co.uk/rr/index.htm (frames based site) > http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra > dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1 > (the same site > rendered as single page). > > The problem is that if in the frames-based site one of the frames is a form > submission, I need to be able to send this data to the original form and > retrieve the output to display in the rendered page. > > e.g. > http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra > dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con > tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug > =1 > (this is a page that has a contact form). > > I can't find any information on how to forward such a request. > > The script in question is located at: > http://www.redradish.co.uk/php/framesprocessor.php > > It uses these variables (passed using GET or POST): > Frameset frameset page. This needs to be parsed and a static HTML page > created. > Target (optional) full URL of page to be displayed in frmae named > TargetName. > TargetName (optional) name of the frame that $Target should appear in. > MainFrame (optional) is the frame from which header info, etc. is > taken. > Default is first frame. > AllHead (optional) If set (is 1 or more), copies <HEAD> content from all > frames. > RenderMethod (optional) defines how the frameset is to be represented: > 1 - All frames dumped into new page in order they appear in > frameset. > 2 - tables are used to attempt to recreate original format > Default is 1. > LinkSearch (optional) how links are replaced: > 1 - Only specific tags are replaced > 2 - Anything within quotes (' or ") that contains document path is > replaced > Default is 1. > Debug If set (greater than 0), debug info is added in comments. > > It works to a good degree on most frames-based sites, but does have a couple > of failings (such as the one mentioned) that I would like to overcome. > > The other problem is handling JavaScript in e.g. <frame > src="JavaScript:openpage(xx)">. There is no way to process JavaScript in > PHP that I am aware of - does anyone have a workaround for this? i.e. so > that my script can process the JavaScript function and retrieve the relevant > page for inclusion in the rendered page. > > > Hope someone can help! > > Thanks. > > Dave > > >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02
    

    attached mail follows:


    Think you may have misread the problem, or I am not good at explaining it ;-)

    I can receive POST variables fine, and GET. My problem is that when a frameset (which my script renders) contains a form, I need to retrieve the OUTPUT from the form's target (i.e. ACTION tag), so I need to send all the POST (or GET... but that is easy) data received by my script onwards to another.

    Does this make more sense?

    "Brian McGarvie" <brian.mcgarvieanypurposeloans.co.uk> wrote in message news:20030107145736.99455.qmailpb1.pair.com... > Could be an issue on the webserver if PHP has register_globals set to off... > > "David Barrett" <phpdavebarrett.co.uk> wrote in message > news:20030107142246.67602.qmailpb1.pair.com... > > I want to be able to retrieve POST variable in one PHP script (which is > > straight-forward) and then send these from the script to another one > > returning the processed input. > > > > I have written a script that will parse a frames-based page and render it > as > > a flat page (i.e. all frames displayed as a table in one HTML file) - this > > is so that I can create a website using frames, and still let browsers > that > > don't support frames to access it without my having to create a separate > > version of the site. > > > > e.g.: > > http://www.redradish.co.uk/rr/index.htm (frames based site) > > > http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra > > dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1 > > (the same site > > rendered as single page). > > > > The problem is that if in the frames-based site one of the frames is a > form > > submission, I need to be able to send this data to the original form and > > retrieve the output to display in the rendered page. > > > > e.g. > > > http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra > > > dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con > > > tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug > > =1 > > (this is a page that has a contact form). > > > > I can't find any information on how to forward such a request. > > > > The script in question is located at: > > http://www.redradish.co.uk/php/framesprocessor.php > > > > It uses these variables (passed using GET or POST): > > Frameset frameset page. This needs to be parsed and a static HTML > page > > created. > > Target (optional) full URL of page to be displayed in frmae named > > TargetName. > > TargetName (optional) name of the frame that $Target should appear in. > > MainFrame (optional) is the frame from which header info, etc. is > > taken. > > Default is first frame. > > AllHead (optional) If set (is 1 or more), copies <HEAD> content from > all > > frames. > > RenderMethod (optional) defines how the frameset is to be represented: > > 1 - All frames dumped into new page in order they appear in > > frameset. > > 2 - tables are used to attempt to recreate original format > > Default is 1. > > LinkSearch (optional) how links are replaced: > > 1 - Only specific tags are replaced > > 2 - Anything within quotes (' or ") that contains document path is > > replaced > > Default is 1. > > Debug If set (greater than 0), debug info is added in comments. > > > > It works to a good degree on most frames-based sites, but does have a > couple > > of failings (such as the one mentioned) that I would like to overcome. > > > > The other problem is handling JavaScript in e.g. <frame > > src="JavaScript:openpage(xx)">. There is no way to process JavaScript in > > PHP that I am aware of - does anyone have a workaround for this? i.e. so > > that my script can process the JavaScript function and retrieve the > relevant > > page for inclusion in the rendered page. > > > > > > Hope someone can help! > > > > Thanks. > > > > Dave > > > > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02 > >

    attached mail follows:


    David Barrett wrote:

    >Think you may have misread the problem, or I am not good at explaining it >;-) > >I can receive POST variables fine, and GET. My problem is that when a >frameset (which my script renders) contains a form, I need to retrieve the >OUTPUT from the form's target (i.e. ACTION tag), so I need to send all the >POST (or GET... but that is easy) data received by my script onwards to >another. > >Does this make more sense? > > It makes sense, but your solution is messy. Still you can use curl

    > >

    attached mail follows:


    There is probably a better way but what I do is create hidden fields in the form of the first page and populate it with the variable I need to go on to the next one. Ie for variable a, b, c, d coming to the first page...

    <form name=sendit action=nextwebpage method=post>

    [Do something with some or all of those variables here]

    echo "<input type=hidden name=a value=$a>"; echo "<input type=hidden name=b value=$b>"; echo "<input type=hidden name=c value=$c>"; echo "<input type=hidden name=d value=$d>"; echo "<input type=submit value=\"Next Page\"> echo "</form>

    That is what I usually do because I don't know of a better way. So if you don't find one you can always resort to that. And if you need these to move on automatically by telling another frame window what the variables are while this one is still visible, you can use javascript to send variables to other frames. That is out of the scope of this message and I'd have to look up the syntax for that, but it is definitely possible.

    Larry S. Brown Dimension Networks, Inc. (727) 723-8388

    -----Original Message----- From: David Barrett [mailto:phpdavebarrett.co.uk] Sent: Tuesday, January 07, 2003 9:30 AM To: php-generallists.php.net Subject: [PHP] Forwarding POST info from a PHP script

    I want to be able to retrieve POST variable in one PHP script (which is straight-forward) and then send these from the script to another one returning the processed input.

    I have written a script that will parse a frames-based page and render it as a flat page (i.e. all frames displayed as a table in one HTML file) - this is so that I can create a website using frames, and still let browsers that don't support frames to access it without my having to create a separate version of the site.

    e.g.: http://www.redradish.co.uk/rr/index.htm (frames based site) http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1 (the same site rendered as single page).

    The problem is that if in the frames-based site one of the frames is a form submission, I need to be able to send this data to the original form and retrieve the output to display in the rendered page.

    e.g. http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug =1 (this is a page that has a contact form).

    I can't find any information on how to forward such a request.

    The script in question is located at: http://www.redradish.co.uk/php/framesprocessor.php

    It uses these variables (passed using GET or POST): Frameset frameset page. This needs to be parsed and a static HTML page created. Target (optional) full URL of page to be displayed in frmae named TargetName. TargetName (optional) name of the frame that $Target should appear in. MainFrame (optional) is the frame from which header info, etc. is taken. Default is first frame. AllHead (optional) If set (is 1 or more), copies <HEAD> content from all frames. RenderMethod (optional) defines how the frameset is to be represented: 1 - All frames dumped into new page in order they appear in frameset. 2 - tables are used to attempt to recreate original format Default is 1. LinkSearch (optional) how links are replaced: 1 - Only specific tags are replaced 2 - Anything within quotes (' or ") that contains document path is replaced Default is 1. Debug If set (greater than 0), debug info is added in comments.

    It works to a good degree on most frames-based sites, but does have a couple of failings (such as the one mentioned) that I would like to overcome.

    The other problem is handling JavaScript in e.g. <frame src="JavaScript:openpage(xx)">. There is no way to process JavaScript in PHP that I am aware of - does anyone have a workaround for this? i.e. so that my script can process the JavaScript function and retrieve the relevant page for inclusion in the rendered page.

    Hope someone can help!

    Thanks.

    Dave

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

    attached mail follows:


    Why is my solution messy?

    My script has to deal with a form from ANY server, it is not written simply to process framesets on mine. I can therefore not rewrite the page from which the form is posted (as I won't have access to the server), otherwise I could obviously write an elegant solution that wouldn't need to repost anything.

    If I am missing something, please elaborate. Thanks!

    "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message news:3E1AF1FC.1020504webglobe.sk... > > > David Barrett wrote: > > >Think you may have misread the problem, or I am not good at explaining it > >;-) > > > >I can receive POST variables fine, and GET. My problem is that when a > >frameset (which my script renders) contains a form, I need to retrieve the > >OUTPUT from the form's target (i.e. ACTION tag), so I need to send all the > >POST (or GET... but that is easy) data received by my script onwards to > >another. > > > >Does this make more sense? > > > > > It makes sense, but your solution is messy. Still you can use curl > > > > > >

    attached mail follows:


    The solution must assume that I DO NOT HAVE ACCESS to the first script (from which the form is posted). Obviously if I assume access to the script, I wouldn't be doing it this way anyway, it is very inefficient. While the example script is located on my server, this is just to show what I am trying to achieve.

    I have received a solution that should work (thank-you Hartmut). I am going to test it shortly.

    "Larry Brown" <larry.browndimensionnetworks.com> wrote in message news:CBECIONKKLMDDCIKHALJKEBCFJAA.larry.browndimensionnetworks.com... > There is probably a better way but what I do is create hidden fields in the > form of the first page and populate it with the variable I need to go on to > the next one. Ie for variable a, b, c, d coming to the first page... > > <form name=sendit action=nextwebpage method=post> > > [Do something with some or all of those variables here] > > echo "<input type=hidden name=a value=$a>"; > echo "<input type=hidden name=b value=$b>"; > echo "<input type=hidden name=c value=$c>"; > echo "<input type=hidden name=d value=$d>"; > echo "<input type=submit value=\"Next Page\"> > echo "</form> > > That is what I usually do because I don't know of a better way. So if you > don't find one you can always resort to that. And if you need these to move > on automatically by telling another frame window what the variables are > while this one is still visible, you can use javascript to send variables to > other frames. That is out of the scope of this message and I'd have to look > up the syntax for that, but it is definitely possible. > > > > Larry S. Brown > Dimension Networks, Inc. > (727) 723-8388 > > -----Original Message----- > From: David Barrett [mailto:phpdavebarrett.co.uk] > Sent: Tuesday, January 07, 2003 9:30 AM > To: php-generallists.php.net > Subject: [PHP] Forwarding POST info from a PHP script > > I want to be able to retrieve POST variable in one PHP script (which is > straight-forward) and then send these from the script to another one > returning the processed input. > > I have written a script that will parse a frames-based page and render it as > a flat page (i.e. all frames displayed as a table in one HTML file) - this > is so that I can create a website using frames, and still let browsers that > don't support frames to access it without my having to create a separate > version of the site. > > e.g.: > http://www.redradish.co.uk/rr/index.htm (frames based site) > http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra > dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1 > (the same site > rendered as single page). > > The problem is that if in the frames-based site one of the frames is a form > submission, I need to be able to send this data to the original form and > retrieve the output to display in the rendered page. > > e.g. > http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra > dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con > tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug > =1 > (this is a page that has a contact form). > > I can't find any information on how to forward such a request. > > The script in question is located at: > http://www.redradish.co.uk/php/framesprocessor.php > > It uses these variables (passed using GET or POST): > Frameset frameset page. This needs to be parsed and a static HTML page > created. > Target (optional) full URL of page to be displayed in frmae named > TargetName. > TargetName (optional) name of the frame that $Target should appear in. > MainFrame (optional) is the frame from which header info, etc. is > taken. > Default is first frame. > AllHead (optional) If set (is 1 or more), copies <HEAD> content from all > frames. > RenderMethod (optional) defines how the frameset is to be represented: > 1 - All frames dumped into new page in order they appear in > frameset. > 2 - tables are used to attempt to recreate original format > Default is 1. > LinkSearch (optional) how links are replaced: > 1 - Only specific tags are replaced > 2 - Anything within quotes (' or ") that contains document path is > replaced > Default is 1. > Debug If set (greater than 0), debug info is added in comments. > > It works to a good degree on most frames-based sites, but does have a couple > of failings (such as the one mentioned) that I would like to overcome. > > The other problem is handling JavaScript in e.g. <frame > src="JavaScript:openpage(xx)">. There is no way to process JavaScript in > PHP that I am aware of - does anyone have a workaround for this? i.e. so > that my script can process the JavaScript function and retrieve the relevant > page for inclusion in the rendered page. > > > Hope someone can help! > > Thanks. > > Dave > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    > I have a drop down list with all fifty states. very common. I conjured > up a way to store the value when you return to edit the form, but there > most be an easier way either in html, or in php. Here is what I > currently have. > > <select name="state"> > <option value="AL"{$stateselected['AL']}>Alabama</option> > <option value="AK"{$stateselected['AK']}>Alaska</option> > <option value="AZ"{$stateselected['AZ']}>Arizona</option> > . > </select> > > $stateselected['$state'] is an array that stores the state that was > selected on the prior form. is there an easier way, to have a default > state picked out of this drop down list.???

    A trick I picked up from someone on this list:

    <?php $$state = ' selected="true"'; print <<<END <select name="state"> <option value="AL"$AL>Alabama</option> <option value="AK"$AK>Alaska</option> <option value="AZ"$AZ>Arizona</option> <!-- . . . --> </select> END; ?>

    That's it! If $state is set to 'AZ', then the $$state line creates a variable called $AZ, and sets its value to ' selected="true"'. Running the code produces this HTML:

    <select name="state"> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AZ" selected="true">Arizona</option> <!-- . . . --> </select>

    This solution might be considered ugly for several reasons:

    * all sorts of warnings are thrown, one for each unset state variable * it's entirely un-obvious to the casual code-reviewer what's going on. So it requires more documentation. * you run the risk of stepping on pre-existing variables.

    However, the upside, namely, eliminating a *ton* of code, is attractive enough to me that I use this for most select boxes I do.

    Joel

    -- 
    [ joel boonstra | jboonstragospelcom.net ]
    

    attached mail follows:


    Here is another option for you to sample.

    The function takes two parameters, one is the name of the list box, the other is the value to be initally selected. The second parameter is optional, if not present, no value will be inially selected. I do not remember where I picked this up, but I have used it many times.

    --------------------------------------------------- function MakeStateDropMenu($Name,$Selected=""){

    $StateDropMenu=<<<StateDropMenu <select name="$Name"> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AZ">Arizona</option> </select>

    StateDropMenu; if ($Selected){ $StateDropMenu = preg_replace("|\"$Selected\">*|","\"$Selected\" selected>",$StateDropMenu); } return $StateDropMenu; } --------------------------------------------------- To call function from page: <?php echo MakeStateDropMenu("states","$selectedstate"); ?>

    Guy Haynes

    Steven Kallstrom wrote: > I have a drop down list with all fifty states. very common. I conjured > up a way to store the value when you return to edit the form, but there > most be an easier way either in html, or in php. Here is what I > currently have. > > <select name="state"> > <option value="AL"{$stateselected['AL']}>Alabama</option> > <option value="AK"{$stateselected['AK']}>Alaska</option> > <option value="AZ"{$stateselected['AZ']}>Arizona</option> > . > </select> > > $stateselected['$state'] is an array that stores the state that was > selected on the prior form. is there an easier way, to have a default > state picked out of this drop down list.??? > > Thanks, > > Steven Kallstrom >

    attached mail follows:


    Try using full URI, e.g. http://localhost/index.php

    David Scott wrote:

    >I am running this file from a tutorial: > ><html> > ><head> > <title>Something Useful Tutorial</title> ></head> > ><body> > ><?php > >echo $_SERVER["HTTP_USER_AGENT"]; > >?> > ></body> > ></html> > >When this file is run from my webserver (IIS) I get a page that says: No >input file specified. >What can I do to get this working? > > > > >

    attached mail follows:


    Okay...I am now having difficulty with putting things INTO the database.

    The form is on another page, and links to this one.

    <?php $Host="localhost"; $User="us34992a"; $Password="******"; $DBname="db34992a"; $Link=mysql_connect ($Host, $User, $Password); $db=mysql_select_db($DBname, $Link) or die ("Unable to select database"); $Query="INSERT into calendar values ('$meeting_name','$meeting_place','$meeting_date','$meeting_note')"; $result=mysql_query($Query); mysql_close ($Link); ?>

    attached mail follows:


    On Wednesday 08 January 2003 02:09, Todd Barr wrote: > Okay...I am now having difficulty with putting things INTO the database. > > The form is on another page, and links to this one. > > <?php > $Host="localhost"; > $User="us34992a"; > $Password="******"; > $DBname="db34992a"; > $Link=mysql_connect ($Host, $User, $Password); > $db=mysql_select_db($DBname, $Link) > or die ("Unable to select database"); > $Query="INSERT into calendar values > ('$meeting_name','$meeting_place','$meeting_date','$meeting_note')"; > $result=mysql_query($Query); > mysql_close ($Link); > ?>

    And what is the problem?

    What does $Query contain?

    After doing mysql_query() what does mysql_error() show?

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

    /* Numbers talk, bullshit walks.

    - Dave Miller on linux-kernel */

    attached mail follows:


    Try, $Query="INSERT into calendar (meeting_name, meeting_place, meeting_date, meeting_note) values ('$meeting_name','$meeting_place','$meeting_date','$meeting_note')"; Hope this helps, Hugh

    ----- Original Message ----- From: "Jason Wong" <php-generalgremlins.biz> To: <php-generallists.php.net> Sent: Tuesday, January 07, 2003 7:14 AM Subject: Re: [PHP] I am a dullard

    > On Wednesday 08 January 2003 02:09, Todd Barr wrote: > > Okay...I am now having difficulty with putting things INTO the database. > > > > The form is on another page, and links to this one. > > > > <?php > > $Host="localhost"; > > $User="us34992a"; > > $Password="******"; > > $DBname="db34992a"; > > $Link=mysql_connect ($Host, $User, $Password); > > $db=mysql_select_db($DBname, $Link) > > or die ("Unable to select database"); > > $Query="INSERT into calendar values > > ('$meeting_name','$meeting_place','$meeting_date','$meeting_note')"; > > $result=mysql_query($Query); > > mysql_close ($Link); > > ?> > > And what is the problem? > > What does $Query contain? > > After doing mysql_query() what does mysql_error() show? > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Numbers talk, bullshit walks. > > - Dave Miller on linux-kernel > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Now, this is a rather unlikely configuration, but ...

    I am working on a linux based web work based on apache and php, but the authentication system on site is based on MS active directory.

    Does anyone know if apache + php can be configured to authenticate users through active directory?

    Is it possible to write htaccess files that queries MS active directory?

    Can we treat MS active directory just like any other LDAP, i.e. is it LDAP V2 compliant?

    I value any response.

    Thanks,

    attached mail follows:


    Yip...

    Investigate... LDAP

    "Ezra Nugroho" <ezrangoshen.edu> wrote in message news:1041954345.2831.1775.camelezran.goshen.edu... > Now, this is a rather unlikely configuration, but ... > > I am working on a linux based web work based on apache and php, but the > authentication system on site is based on MS active directory. > > Does anyone know if apache + php can be configured to authenticate users > through active directory? > > Is it possible to write htaccess files that queries MS active directory? > > Can we treat MS active directory just like any other LDAP, i.e. is it > LDAP V2 compliant? > > I value any response. > > Thanks, > >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02
    

    attached mail follows:


    There was one discussion starting about coding/development tools. I was wondering if anyone out there knows of good development/coding tools for Java and C++. I've been using Visual C++ for the C++ part, and hand coding Java. I just started on both of them and wanting to learn how to use them, but I know the tools could speed up the process, especially I am a learn by doing type of guy.

    _________________________________________________________________ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup

    attached mail follows:


    And this has what to do with PHP?

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02
    

    attached mail follows:


    Well cant you use PHP to augment Java and C++, such as communication between MQ and PHP could be done by using C++ or Java? Java Applet included in a PHP page.

    >From: "Brian McGarvie" <brian.mcgarvieanypurposeloans.co.uk> >To: php-generallists.php.net >Subject: [PHP] Re: Development tools >Date: Tue, 7 Jan 2003 15:45:07 -0000 > >And this has what to do with PHP? > > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02 > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

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

    attached mail follows:


    Yes you can use java classes... from php. Yes you can write & compile C++ to a dll and use it.

    For Java: Notepad + the JDK :) DLL's (C++) Notepad + dgcpp :)

    IF you want a GUI - Java = JBuilder is best I've used. C++ - typically VC++ :\

    There are some free alternatives but the above are the 2 industry tools.

    But your question regarding tools to do either is still not PHP :)

    "Didier McGillis" <codesmokerhotmail.com> wrote in message news:F70BED0kpB9pbKWZfEA00012a1ahotmail.com... > There was one discussion starting about coding/development tools. I was > wondering if anyone out there knows of good development/coding tools for > Java and C++. I've been using Visual C++ for the C++ part, and hand coding > Java. I just started on both of them and wanting to learn how to use them, > but I know the tools could speed up the process, especially I am a learn by > doing type of guy. > > _________________________________________________________________ > The new MSN 8 is here: Try it free* for 2 months > http://join.msn.com/?page=dept/dialup >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.431 / Virus Database: 242 - Release Date: 17/12/02
    

    attached mail follows:


    my problem is, i have a script that works well before php 4.2.3

    its sth like that {..

    for($i=0; $i<count($line); $i++); // loop line numbers ... }

    //2nd part { echo ("$i"); }

    now i changed second part as;

    echo("$GLOBALS[i]");

    and it gives me notice that undefined index i. how can i solve this problem? thanks

    attached mail follows:


    Mekrand wrote:

    >my problem is, >i have a script that works well before php 4.2.3 > >its sth like that >{.. > > for($i=0; $i<count($line); $i++); // loop line numbers >... >} > >//2nd part >{ >echo ("$i"); >} > >now i changed second part as; > >echo("$GLOBALS[i]"); > should not be

    echo("$GLOBALS[$i]");

    > >and it gives me notice that undefined index i. >how can i solve this problem? >thanks > > > > > >

    attached mail follows:


    thanks but this time it gives 2 error, undefined variable i, undefined index i for $GLOBALS[$i] "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message news:3E1AF819.2060703webglobe.sk... > > > Mekrand wrote: > > >my problem is, > >i have a script that works well before php 4.2.3 > > > >its sth like that > >{.. > > > > for($i=0; $i<count($line); $i++); // loop line numbers > >... > >} > > > >//2nd part > >{ > >echo ("$i"); > >} > > > >now i changed second part as; > > > >echo("$GLOBALS[i]"); > > > should not be > > echo("$GLOBALS[$i]"); > > > > > >and it gives me notice that undefined index i. > >how can i solve this problem? > >thanks > > > > > > > > > > > > >

    attached mail follows:


    These are not errors, but notices, you can get around it using: if(isset($i) && array_key_exists($GLOBALS, $i)) echo $GLOBALS[$i];

    or you might prefer setting error_reporting to not display notices

    Mekrand wrote:

    >thanks but this time it gives 2 error, >undefined variable i, >undefined index i for >$GLOBALS[$i] >"Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message >news:3E1AF819.2060703webglobe.sk... > > >>Mekrand wrote: >> >> >> >>>my problem is, >>>i have a script that works well before php 4.2.3 >>> >>>its sth like that >>>{.. >>> >>>for($i=0; $i<count($line); $i++); // loop line numbers >>>... >>>} >>> >>>//2nd part >>>{ >>>echo ("$i"); >>>} >>> >>>now i changed second part as; >>> >>>echo("$GLOBALS[i]"); >>> >>> >>> >>should not be >> >>echo("$GLOBALS[$i]"); >> >> >> >> >>>and it gives me notice that undefined index i. >>>how can i solve this problem? >>>thanks >>> >>> >>> >>> >>> >>> >>> >>> > > > > >

    attached mail follows:


    Try: echo($GLOBALS[$i]);

    Or echo "{$GLOBALS[$i]}";

    This times it's the array in the double quoted strings ...

    attached mail follows:


    Didier,

    I'm afraid you really are asking for some harsh responses.

    Your last comment in particular invites some rather obvious, albeit rude, acronyms.

    > I just started on both of them and wanting to learn how to use them, > but I know the tools could speed up the process, especially I am a learn > by doing type of guy.

    Perhaps a search on Google for Java or C++ might help you out.

    Michael Egan

    attached mail follows:


    Didier,

    I meant to say Java and C++ IDEs.

    Regards,

    Michael Egan

    attached mail follows:


    Thanks,

    I know my English is bad and I probably didnt articulate the question properly. I understand that some people think that newbies asking questions, or particpating in discussions should be subject to rude retorical questions, and I know that these people tend to feel that they need to place their 2 cents when they have nothing to add to the conversation.

    I understand that I'm not a briant coder or I might not have the best english. BUt I hope to learn or help someone else who asks a question that I can answer ... if I can't then I hope to learn from the answers he might recieve. But I do know that if I can't contribute, I'm not going to answer anything.

    ... btw thanks for the answer in the other email .. I'll check those out.

    >From: "Michael Egan" <MEgan3tc.org.uk> >To: "Didier McGillis" <codesmokerhotmail.com>,<php-generallists.php.net> >Subject: RE: [PHP] Development tools[Scanned] >Date: Tue, 7 Jan 2003 15:50:31 -0000 > >Didier, > >I'm afraid you really are asking for some harsh responses. > >Your last comment in particular invites some rather obvious, albeit rude, >acronyms. > > > I just started on both of them and wanting to learn how to use them, > > but I know the tools could speed up the process, especially I am a learn > > by doing type of guy. > >Perhaps a search on Google for Java or C++ might help you out. > >Michael Egan

    _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

    attached mail follows:


    Didier,

    It's not that people object to stupid questions being posed - or, indeed poor use of English. Some of the best responses to queries I've seen are from people for whom English is not their first language.

    What people do object to is questions being posed to the incorrect lists - I'm sure there are plenty of forums and mailing lists dedicated to both the areas you are keen to investigate. These will undoubtedly be the better sources of information.

    By keeping the lists dedicated to specific areas, even where these can interact, the lists are kept to more manageable proportions.

    Good luck with your explorations.

    Michael Egan

    attached mail follows:


    Hello,

    Long time reader, first time e-mailer :-). I am having a pretty strange issue with fgets and a socket, and was hoping that perhaps someone here can help me. First, my code:

    function dowhois($who) {

    $data = array("");

    $whom = trim($who);

    $fp = fsockopen ("127.0.0.1", 43, $errno, $errstr, 30) or die("Could not open socket to proxy");

    if (!$fp) { die("$errstr ($errno)\n"); } else { fputs ($fp, "$whom\r\n") or die("Could not write to socket"); while ($fp && !feof($fp)) { $packet = fgets($fp, 4096) or die("Could not read from socket"); array_push($data, $packet) or die("Could not push data into array"); } fclose ($fp); } return $data; }

    As you can see, this is a function that accepts a string as an argument and is supposed to open a connection to a local WHOIS server, query for that string and return the results in an array. Unfortunately, when I call this function I always trip the third die();, "Could not read from socket." fgets always trips this. I am running PHP 4.3.0. I will also share some things I have learned in the last two days worth of problem-solving:

    - If I use fread instead of fget, I can pull the data, although it looks pretty worthless (I need \n terminated to parse the output properly) - Changing $fp from blocking to non-blocking alleviates no problems - Changing the max line length to anything does not cause issues - I have turned on auto_detect_line_endings to no avail - I have a pretty much identical script that does an HTTP query and that works. 3rd party php scripts that use sockets also work. It seems that WHOIS is causing the problem?

    Thanks for any help anyone can provide!

    Regards, Ben

    ------ Ben Vaughn Security Analyst Blackbird Technologies 703-796-1438 W / 703-868-5258 C bvaughnblackbirdtech.com ------


    • application/x-pkcs7-signature attachment: smime.p7s

    attached mail follows:


    try if(($packet = fgets($fp, 4096)) === false) die(...);

    instead. The same for array_push

    Ben Vaughn wrote:

    >Hello, > > Long time reader, first time e-mailer :-). I am having a pretty >strange issue with fgets and a socket, and was hoping that perhaps >someone here can help me. First, my code: > >function dowhois($who) { > > $data = array(""); > > $whom = trim($who); > > $fp = fsockopen ("127.0.0.1", 43, $errno, $errstr, 30) or >die("Could not open socket to proxy"); > > if (!$fp) { > die("$errstr ($errno)\n"); > } else { > fputs ($fp, "$whom\r\n") or die("Could not write to >socket"); > while ($fp && !feof($fp)) { > $packet = fgets($fp, 4096) or die("Could not >read from socket"); > array_push($data, $packet) or die("Could not >push data into array"); > } > fclose ($fp); > } > return $data; >} > >As you can see, this is a function that accepts a string as an argument >and is supposed to open a connection to a local WHOIS server, query for >that string and return the results in an array. Unfortunately, when I >call this function I always trip the third die();, "Could not read from >socket." fgets always trips this. I am running PHP 4.3.0. I will also >share some things I have learned in the last two days worth of >problem-solving: > >- If I use fread instead of fget, I can pull the data, although it looks >pretty worthless (I need \n terminated to parse the output properly) >- Changing $fp from blocking to non-blocking alleviates no problems >- Changing the max line length to anything does not cause issues >- I have turned on auto_detect_line_endings to no avail >- I have a pretty much identical script that does an HTTP query and that >works. 3rd party php scripts that use sockets also work. It seems that >WHOIS is causing the problem? > > >Thanks for any help anyone can provide! > >Regards, >Ben > >------ >Ben Vaughn >Security Analyst >Blackbird Technologies >703-796-1438 W / 703-868-5258 C >bvaughnblackbirdtech.com >------ > > >

    attached mail follows:


    I was just about to reply that I found the problem, and you are correct. Fgets was reaching EOF, finding nothing, and tripping the die(). I was killing myself, quite literally. Thanks!

    -biv

    ------ Ben Vaughn Security Analyst Blackbird Technologies 703-796-1438 W / 703-868-5258 C bvaughnblackbirdtech.com ------

    -----Original Message----- From: Marek Kilimajer [mailto:kilimajerwebglobe.sk] Sent: Tuesday, January 07, 2003 11:57 AM To: Ben Vaughn Cc: php-generallists.php.net Subject: Re: [PHP] Issues w/ WHOIS and Fgets

    try if(($packet = fgets($fp, 4096)) === false) die(...);

    instead. The same for array_push

    Ben Vaughn wrote:

    >Hello, > > Long time reader, first time e-mailer :-). I am having a pretty >strange issue with fgets and a socket, and was hoping that perhaps >someone here can help me. First, my code: > >function dowhois($who) { > > $data = array(""); > > $whom = trim($who); > > $fp = fsockopen ("127.0.0.1", 43, $errno, $errstr, 30) or >die("Could not open socket to proxy"); > > if (!$fp) { > die("$errstr ($errno)\n"); > } else { > fputs ($fp, "$whom\r\n") or die("Could not write to >socket"); > while ($fp && !feof($fp)) { > $packet = fgets($fp, 4096) or die("Could not >read from socket"); > array_push($data, $packet) or die("Could not >push data into array"); > } > fclose ($fp); > } > return $data; >} > >As you can see, this is a function that accepts a string as an argument >and is supposed to open a connection to a local WHOIS server, query for >that string and return the results in an array. Unfortunately, when I >call this function I always trip the third die();, "Could not read from >socket." fgets always trips this. I am running PHP 4.3.0. I will also >share some things I have learned in the last two days worth of >problem-solving: > >- If I use fread instead of fget, I can pull the data, although it looks >pretty worthless (I need \n terminated to parse the output properly) >- Changing $fp from blocking to non-blocking alleviates no problems >- Changing the max line length to anything does not cause issues >- I have turned on auto_detect_line_endings to no avail >- I have a pretty much identical script that does an HTTP query and that >works. 3rd party php scripts that use sockets also work. It seems that >WHOIS is causing the problem? > > >Thanks for any help anyone can provide! > >Regards, >Ben > >------ >Ben Vaughn >Security Analyst >Blackbird Technologies >703-796-1438 W / 703-868-5258 C >bvaughnblackbirdtech.com >------ > > >


    • application/x-pkcs7-signature attachment: smime.p7s

    attached mail follows:


    I'm a bit useless at regular expressions so i thought i ask. i need to turn all [link url=http://www.site.com] link to site [/link]

    in a string into html

    <a href= ...etc

    and back again. thanks adrian

    attached mail follows:


    Here is your answer:

    http://www.phpbuilder.com/columns/ying20000718.php3?page=2

    --
    Maxim Maletsky
    maximphp.net
    

    "adrian murphy2020tourism.com" <adrian.murphy2020tourism.com> wrote... :

    > I'm a bit useless at regular expressions so i thought i ask. > i need to turn all > [link url=http://www.site.com] link to site [/link] > > in a string into html > > <a href= ...etc > > and back again. > thanks > adrian > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    why don't you just use str_replace ?

    >I'm a bit useless at regular expressions so i thought i ask. >i need to turn all >[link url=http://www.site.com] link to site [/link] > >in a string into html > ><a href= ...etc > >and back again. >thanks >adrian > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    _________________________________________________________________ Help STOP SPAM: Try the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

    attached mail follows:


    Hi Fella!

    I found the problem and fixed it. I only have one php.ini which is found under 'c:\winnt\'. What happen was that a couple of months ago, someone in my company without my knowledge had made a backup copy of php.ini and put it into hte D:\ drive. So, IIS for some reason didn't go to c:\winnt\ directory and jumped from c: drive to d: drive and use the backup php.ini. I fixed the problem by renaming hte file, from php.ini to php.ini_safe. This then cause the IIS to revert back to the php.ini in c:\winnt.

    Hope this knowledge will help everyone one day. The weird thing is that when I use phpinfo(). It didnt show any file path. It just said the filepath is 'php.ini', no 'c:\winnt\php.ini' at all. It just said 'php.ini' before I renamed the file. After renaming the file, it still say 'php.ini' as if nothing had changed.

    Take care, Scott

    attached mail follows:


    Hi Fella!

    I found the problem and fixed it. I only have one php.ini which is found under 'c:\winnt\'. What happen was that a couple of months ago, someone in my company without my knowledge had made a backup copy of php.ini and put it into hte D:\ drive. So, IIS for some reason didn't go to c:\winnt\ directory and jumped from c: drive to d: drive and use the backup php.ini. I fixed the problem by renaming hte file, from php.ini to php.ini_safe. This then cause the IIS to revert back to the php.ini in c:\winnt.

    Hope this knowledge will help everyone one day. The weird thing is that when I use phpinfo(). It didnt show any file path. It just said the filepath is 'php.ini', no 'c:\winnt\php.ini' at all. It just said 'php.ini' before I renamed the file. After renaming the file, it still say 'php.ini' as if nothing had changed.

    Take care, Scott

    "Scott Fletcher" <scottabcoa.com> wrote in message news:20030106161943.71542.qmailpb1.pair.com... > Hi! > > It have been a while that I don't remember how did I jogged MS-IIS's > memory or something. Perhap a baseball bat will help. I'm not here to ask > for help on writing script for session ID or stuffs like that. I'm here > asking for help in jogging IIS's memory with a baseball bat. > > When I use the PHP command, session_start and tested it out on the > website. I get an error messages saying as shown on the clipping down > below.... This is the script I use alone. > > <? > $salt="C4155DDAF13A529594FB7C2541F4D4C7"; > session_start($salt); > ?> > > This is the error messages.... > > --clip-- > Warning: open(/tmp\sess_C4155DDAF13A529594FB7C2541F4D4C7, O_RDWR) failed: m > (2) in D:\DealPack\....... on line 24 > > Warning: open(/tmp\sess_C4155DDAF13A529594FB7C2541F4D4C7, O_RDWR) failed: m > (2) in Unknown on line 0 > > Warning: Failed to write session data (files). Please verify that the > current setting of session.save_path is correct (/tmp) in Unknown on line 0 > --clip-- > > I can see the problem with "/tmp" so I looked through the PHP.INI and > modify the script. The line of code here goes from .... to ..... > > --clip-- > From ... > session.save_path = /tmp ; argument passed to save_handler > session.cookie_path = / ; the path the cookie is valid for > > To.... > session.save_path = \tmp ; argument passed to save_handler > session.cookie_path = \ ; the path the cookie is valid for > --clip-- > > I even created the folder 'tmp' on the c:\ drive. I stopped the website > then I stopped the IIS. I then start the IIS then start the website. When > accessing this script on the website, I still get the same error. The > problem here is that IIS does not actually refreshed or restarted.... I > even rebooted the machine. > > I can use your help. Thanks! > > Scott F. > >

    attached mail follows:


    Hi Fella!

    I found the problem and fixed it. I only have one php.ini which is found under 'c:\winnt\'. What happen was that a couple of months ago, someone in my company without my knowledge had made a backup copy of php.ini and put it into hte D:\ drive. So, IIS for some reason didn't go to c:\winnt\ directory and jumped from c: drive to d: drive and use the backup php.ini. I fixed the problem by renaming hte file, from php.ini to php.ini_safe. This then cause the IIS to revert back to the php.ini in c:\winnt.

    Hope this knowledge will help everyone one day. The weird thing is that when I use phpinfo(). It didnt show any file path. It just said the filepath is 'php.ini', no 'c:\winnt\php.ini' at all. It just said 'php.ini' before I renamed the file. After renaming the file, it still say 'php.ini' as if nothing had changed.

    Take care, Scott

    P.S. Rad Craig, try to find it there is duplicate php.ini somewhere and renamed it to something like 'php.ini_safe'.

    "Rad Craig" <radinductionconcepts.com> wrote in message news:KMELKAFALABGNLCPCNJHAEAJCDAA.radinductionconcepts.com... > I have been trying to get my email working. I have made some changes in the > php.ini file in the Windoze directory, but when I run phpinfo() the changes > I make aren't changing on what it prints out. > > I have logging turned on in my php.ini file, but phpinfo() says it's turned > off. > > Any ideas? > ================================ > Rad Craig > >

    attached mail follows:


    Hi, I have succesfully installed php with Apache and Mysql under FreeBSD; everything is working great...but after installing it I realized that I need some more "extensions" installed as well, such as GD and so on. Now, the question is: What should I do to add the new extensions to the existing installation without having to reinstall everything again? Will I keep the old settings if I only add the new extension??? Thanks for anybody's help.

    attached mail follows:


    Message-ID: <3E1B0932.4020707webglobe.sk> Date: Tue, 07 Jan 2003 18:06:58 +0100 From: Marek Kilimajer <kilimajerwebglobe.sk> MIME-Version: 1.0 To: Nuno Lopes <nunoplopesclix.pt> CC: MySQL List <mysqllists.mysql.com>, php-generallists.php.net Content-Type: text/plain; charset=us-ascii; formatowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP] Re: PHP and MySQL bug

    mysql_select_db("be"); -- this failed do echo mysql_error(); to see what went wrong

    Nuno Lopes wrote:

    >I done a echo of Mysql_error and it returned: >'Nenhum banco de dados foi selecionado' > >(I have the mysql server in portuguese, but the translation is something >like 'no db was selected') > > >----- Original Message ----- >From: "David Freeman" <dfreemanoutbackqld.net.au> >To: <php-generallists.php.net> >Sent: Sunday, January 05, 2003 10:29 PM >Subject: RE: [PHP] Re: PHP and MySQL bug > > > > >> > MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'"); // this >> > query doesn't work!!!! >> >>Personally, I'd call it bad programming practice to do a database update >>and not check to see if it worked or not. In this case, how are you >>determining that the query did not work? Are you manually checking the >>database? You don't have anything in your code to check the status of >>this query. >> >>Perhaps this might get you somewhere: >> >>$qid = mysql_query("UPDATE d SET h = '$h' WHERE id = '$id'"); >> >>if (isset($qid) && mysql_affected_rows() = 1) >>{ >> echo "query executed"; >>} else { >> echo "query failed: " . mysql_error(); >>} >> >>At least this way you might get some indication of where the problem is. >> >>CYA, Dave >> >> > > > > >

    attached mail follows:


    I'm using Windows 2000.

    ----- Original Message ----- From: "Cleber" <racionalconstel.com.br> To: "Nuno Lopes" <nunoplopesclix.pt> Sent: Tuesday, January 07, 2003 10:23 AM Subject: Re: [PHP] Re: PHP and MySQL bug

    > Try add to /etc/hosts the name and ip of DB is located > > > ----- Original Message ----- > From: "Nuno Lopes" <nunoplopesclix.pt> > To: <php-generallists.php.net>; <mysqllists.mysql.com> > Sent: Tuesday, January 07, 2003 7:31 AM > Subject: Re: [PHP] Re: PHP and MySQL bug > > > > I have the latest version of PHP (4.3.0) as module in apache 2.0.43 and > > mysql 3.23.49. > > Everything is working fine, except this. > > With pconnect the error is the same! > > > > > > ----- Original Message ----- > > From: "Larry Brown" <larry.browndimensionnetworks.com> > > To: "MySQL List" <mysqllists.mysql.com> > > Sent: Monday, January 06, 2003 6:28 PM > > Subject: RE: [PHP] Re: PHP and MySQL bug > > > > > > > This definitely sounds like a buggy installation or there may be some > > > problem with the communication between the web server and the mysqld. > Is > > > the db on a different machine? Try using mysql_pconnect instead of > > connect > > > just to see what result you get. I have read some unfavorable > statements > > > about using pconnect with a large number of hits so if it works you > should > > > read the comments about it on php.net. Do a search for mysql_pconnect. > > > > > > Larry S. Brown > > > Dimension Networks, Inc. > > > (727) 723-8388 > > > > > > -----Original Message----- > > > From: Nuno Lopes [mailto:nunoplopesclix.pt] > > > Sent: Monday, January 06, 2003 1:09 PM > > > To: MySQL List; php-generallists.php.net > > > Subject: [PHP] Re: PHP and MySQL bug > > > > > > The problem is if I close the connection and reopen it the query is > done, > > > but if I remain with the same connection has the previous query, mysql > > > returns an error. > > > > > > > > > ----- Original Message ----- > > > From: "Larry Brown" <larry.browndimensionnetworks.com> > > > To: "MySQL List" <mysqllists.mysql.com> > > > Sent: Sunday, January 05, 2003 4:16 PM > > > Subject: Re:PHP and MySQL bug > > > > > > > > > > Try replacing the following line... > > > > > > > > MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'"); // this query > > doesn't > > > > work!!!! > > > > > > > > With... > > > > > > > > $query = "UPDATE d SET h='$h' WERE id='$id'"; > > > > $queryr = mysql_query($query) or die("The sql statement does not > > > execute"); > > > > > > > > if(mysql_affected_rows() !== 1) > > > > { > > > > die("The sql statement is successfully run however either h did not > > > > change or there is an internal error. Try executing the sql from the > > > > command line to make sure it otherwise works."); > > > > } > > > > > > > > and see which is coming back. > > > > > > > > > > > > Larry S. Brown > > > > Dimension Networks, Inc. > > > > (727) 723-8388

    attached mail follows:


    Hi....

    I'm developing a site where the user shall be able to upload files. The size of theese files can range from approx. 1-500 Mb. The problem is that the file upload is stored in memory and starts to swap with large files (~ > 100 Mb). I want the uploaded file to be written directly to disk. Is there any settings for this?

    Server info: Cobalt RaQ 4 512 Mb RAM Cobalt Linux release 6.0 (Shinkansen-Decaf) apache 2.0.43 PHP 4.2.3

    /Claes

    attached mail follows:


    Unfortunately not that I know of with PHP. However, I had to do the same thing for our users here and I found a great solution to be mod_perl for Apache. It writes to disk into a temporary file and then copies that file into the dir you specify. This isn't evangelism, just informing you of how I eventually solved the same problem on my end. Also look into libapreq for Apache... simplifies things even more. However, I'd stick with Apache 1.3.27 if you go this route though, mod_perl's Apache 2 version isn't quite up to production snuff.

    Hope this helps.

    At 06:26 PM 1/7/2003 +0100, Claes Gustavsson wrote: >Hi.... > >I'm developing a site where the user shall be able to upload files. The >size of theese files can range from >approx. 1-500 Mb. The problem is that the file upload is stored in memory >and starts to swap with large files (~ > 100 Mb). >I want the uploaded file to be written directly to disk. >Is there any settings for this? > >Server info: >Cobalt RaQ 4 >512 Mb RAM >Cobalt Linux release 6.0 (Shinkansen-Decaf) >apache 2.0.43 >PHP 4.2.3 > > >/Claes > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php >

    ---
    Tim Meader
    ODIN Unix Group
    ACS Government Services, Inc. - (301) 286-8013
    tmeadercne-odin.gsfc.nasa.gov 
    

    attached mail follows:


    Date: Tue, 7 Jan 2003 18:50:55 +0500 From: KidA <kidakeymail.it> To: php-generallists.php.net Message-ID: <20030107185055.A1360kidA.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Why it doesn't work?

    Hi to all, I found this error in my code:

    class BaseForm {

    var $_fields; var $_method; var $_postedData; var $_formAction;

    .... ....

    function init($eMsgFile,$method,$formAction) { ... ...

    $this->_method=strtoupper($method);

    ----->>> Why next line gives me the error "variable _POST is undefined" ??? <<<------ $this->_postedData=${"_".$this->_method};

    $this->_formAction=(empty($formAction))?basename($_SERVER['PHP_SELF']):$formAction;

    }

    Is it normal????

    Thank you a lot!

    KidA

    attached mail follows:


    There's nothing in your posted code that could cause two inserts into mysql. The only thing I can think of is that somehow, your script is getting executed twice. Is there any way that could be happening?

    ..michael..

    On Mon, 2003-01-06 at 16:03, Altug Sahin wrote: > Hi here, > > I am sending a file to user's browser and logging the downloaded file into > MySQL but everytime this script works, I see double entry in the MySQL > table... Why is this happening? > > Any ideas? > > Thanks > > <? > $today = date("Y-m-d"); > > $conn = db_connect(); > > if(!$conn) > echo "Can't connect to database..."; > > $query = "INSERT INTO track_dl (dldate, email, file) > VALUES ('$today', 'useremail.com', 'file.ext')"; > > $result = mysql_query($query); > > if(!$result) > echo "Can't execute query: " . mysql_error(); > > header("Content-type: application/pdf"); > readfile("file.pdf"); > exit(); > ?>

    -- 
    Michael Sweeney <sweeneyverisity.com>
    Verisity Design, Inc
    

    attached mail follows:


    "John Wells" <jbsourceillustrated.com> wrote... :

    > Thanks for the reply. I'm also impressed with Zend's autocompletion...I > can't even get PHPEd to autocomplete on objects. > > Finally, one frustrating thing on the part of both editors is the > inability to autocomplete on arrays of object references...but I suppose > that's a little difficult with a dynamically typed language.

    Isn't it a little bit too much of paranoia for autocompletion? In programming schools they make you writing the programs on paper so you understand it better :)

    I, personally, only care about the code highlighting. Autocompleting often exposes you to make silly mistakes (not always, of course) and these are the hardest ones to debug. Copying, pasting and replacing is much "safer", IMHO.

    For that, I prefer EditPlus on win32 - simple autocompletion (I wrote one for them -