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 Nov 12 2002 - 08:28:10 CST

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

    php-general Digest 12 Nov 2002 14:28:10 -0000 Issue 1700

    Topics (messages 123925 through 123999):

    Re: echo w/ here document
            123925 by: . Edwin
            123976 by: Craig Buxton
            123982 by: Aaron Gould
            123984 by: Marco Tabini
            123987 by: Troy May

    Re: User Contributed Notes at php.net?
            123926 by: . Edwin

    Re: Mcrypt Under IIS 5 / Win32?
            123927 by: Nick Richardson
            123928 by: Ray Hunter
            123946 by: Nick Richardson

    Can somebody help me with making a login Script?
            123929 by: Tweak2x
            123934 by: Jason Sheets
            123937 by: Justin French
            123949 by: Jon Haworth
            123965 by: Maxim Maletsky

    Moving Files From One Directory To Another
            123930 by: . Nilaab
            123932 by: Jason Sheets
            123933 by: John W. Holmes

    PHP Timer + Java
            123931 by: Mohsin Rahman
            123953 by: Ernest E Vogelsinger

    Re: _POST & _GET
            123935 by: Chris Shiflett
            123936 by: Rasmus Lerdorf
            123939 by: Chris Shiflett
            123941 by: Rasmus Lerdorf
            123951 by: Ernest E Vogelsinger

    Re: Submit hitting enter problem
            123938 by: dwalker

    Help w/ $_SESSION
            123940 by: conbud
            123942 by: Jason Wong
            123944 by: conbud
            123945 by: conbud
            123947 by: Jason Wong
            123966 by: Maxim Maletsky

    Re: Would appreciate thoughts on session management
            123943 by: Charles Wiltgen
            123961 by: Justin French

    Can PHP perform DNS zone transfers etc.?
            123948 by: Eivind Olsen

    Re: random numbers
            123950 by: Jon Haworth
            123952 by: Tamas
            123954 by: Jon Haworth

    Rotation of images
            123955 by: Sear, Mick
            123963 by: Andrew Brampton

    Genrate a graph
            123956 by: Chris Grigor
            123957 by: Marek Kilimajer
            123959 by: Jason Wong
            123960 by: Marek Kilimajer

    left click downloads
            123958 by: Javier Montserat
            123964 by: Maxim Maletsky
            123968 by: Ernest E Vogelsinger

    Here Document on Mac OS X
            123962 by: Craig Buxton
            123972 by: . Edwin
            123980 by: Jason Wong
            123997 by: Pierre Vaudrey

    Oracle 7 support
            123967 by: Dan Field
            123978 by: Ford, Mike [LSS]
            123988 by: Maxim Maletsky
            123990 by: Maxim Maletsky
            123992 by: Dan Field
            123999 by: Ford, Mike [LSS]

    Re: PHP not working in html
            123969 by: John W. Holmes

    How do i make an upload script?
            123970 by: Tweak2x
            123974 by: . Edwin
            123975 by: Jon Haworth

    what happen to comments in php documntation
            123971 by: Alawi albaity
            123973 by: . Edwin

    include file with parameters
            123977 by: Fikret CAN
            123981 by: Denis N. Peplin
            123983 by: John W. Holmes

    phpweb mirror w/o rsync
            123979 by: Denis N. Peplin

    PHP seg faulting
            123985 by: Mike Hall
            123994 by: Maxim Maletsky

    testing
            123986 by: pig pig
            123989 by: Troy May

    Problem with header redirect with register_globals off
            123991 by: pig pig
            123993 by: Marco Tabini

    flushing data as it's being generated
            123995 by: arch
            123996 by: Jason Wong

    internet marketing
            123998 by: Edward Peloke

    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 Marco,

    "Marco Tabini" <marcotinicode.com> wrote:

    > You need to remove the semicolon from the beginning of your heredoc
    > expression. The semicolon tells PHP (incorrectly) that the instruction
    > terminates, while in fact it doesn't:

    I think...

    > <?php
    > $name="John Doe"

    you meant the semicolon at the end of ENDOFECHO; (below) and NOT at the end
    of "John Doe"; (above) ;)

    - E

    > echo <<< ENDOFECHO;
    > <HTML>
    > <BODY>
    > <H3>ECHO TEST</H3>
    > Hello, $name.
    > </BODY>
    > </HTML>
    > ENDOFECHO;
    > ?>
    >
    > This will work.
    >
    >

    attached mail follows:


    I'm still having a problem with including a here document. Trying this
    code:

    <?php
    echo <<<ENDOFECHO
    <HTML>
    <BODY>
    hello... hello... hello... hello...
    </BODY>
    </HTML>
    ENDOFECHO;
    ?>

    I get a parse error on line 7. Please help. I have a major project that
    has ground to a halt.

    Craig Buxton
    Gravity Pilot Productions
    craiggravitypilot.com

    attached mail follows:


    Looks ok to me. Try making sure that all white space is removed from after
    the "echo <<<ENDOFECHO", and both before and after the "ENDOFECHO;" line.
    Heredocs don't play nicely with white space...

    --
    Aaron Gould
    webdevelpartscanada.com
    Web Developer
    Parts Canada
    

    ----- Original Message ----- From: "Craig Buxton" <craigskydiveu.com> To: <php-generallists.php.net> Sent: Tuesday, November 12, 2002 5:32 AM Subject: [PHP] re: echo w/ here document

    > I'm still having a problem with including a here document. Trying this > code: > > <?php > echo <<<ENDOFECHO > <HTML> > <BODY> > hello... hello... hello... hello... > </BODY> > </HTML> > ENDOFECHO; > ?> > > I get a parse error on line 7. Please help. I have a major project that > has ground to a halt. > > Craig Buxton > Gravity Pilot Productions > craiggravitypilot.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Works fine on my system. As Aaron said, make sure there are no spaces around ENDOFECHO;

    Marco

    -- 
    ------------
    php|architect - The magazine for PHP Professionals
    The first monthly worldwide magazine dedicated to PHP programmers
    Check us out on the web at http://www.phparch.com
    

    On Tue, 2002-11-12 at 08:21, Aaron Gould wrote: > Looks ok to me. Try making sure that all white space is removed from after > the "echo <<<ENDOFECHO", and both before and after the "ENDOFECHO;" line. > Heredocs don't play nicely with white space... > -- > Aaron Gould > webdevelpartscanada.com > Web Developer > Parts Canada > > > ----- Original Message ----- > From: "Craig Buxton" <craigskydiveu.com> > To: <php-generallists.php.net> > Sent: Tuesday, November 12, 2002 5:32 AM > Subject: [PHP] re: echo w/ here document > > > > I'm still having a problem with including a here document. Trying this > > code: > > > > <?php > > echo <<<ENDOFECHO > > <HTML> > > <BODY> > > hello... hello... hello... hello... > > </BODY> > > </HTML> > > ENDOFECHO; > > ?> > > > > I get a parse error on line 7. Please help. I have a major project that > > has ground to a halt. > > > > Craig Buxton > > Gravity Pilot Productions > > craiggravitypilot.com > > > > > > -- > > 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 >

    attached mail follows:


    Newbie here. Works fine for me too.

    -----Original Message----- From: Marco Tabini [mailto:marcottabini.ca] Sent: Tuesday, November 12, 2002 5:31 AM To: Aaron Gould Cc: Craig Buxton; Subject: Re: [PHP] re: echo w/ here document

    Works fine on my system. As Aaron said, make sure there are no spaces around ENDOFECHO;

    Marco

    --
    ------------
    php|architect - The magazine for PHP Professionals
    The first monthly worldwide magazine dedicated to PHP programmers
    Check us out on the web at http://www.phparch.com
    

    On Tue, 2002-11-12 at 08:21, Aaron Gould wrote: > Looks ok to me. Try making sure that all white space is removed from after > the "echo <<<ENDOFECHO", and both before and after the "ENDOFECHO;" line. > Heredocs don't play nicely with white space... > -- > Aaron Gould > webdevelpartscanada.com > Web Developer > Parts Canada > > > ----- Original Message ----- > From: "Craig Buxton" <craigskydiveu.com> > To: <php-generallists.php.net> > Sent: Tuesday, November 12, 2002 5:32 AM > Subject: [PHP] re: echo w/ here document > > > > I'm still having a problem with including a here document. Trying this > > code: > > > > <?php > > echo <<<ENDOFECHO > > <HTML> > > <BODY> > > hello... hello... hello... hello... > > </BODY> > > </HTML> > > ENDOFECHO; > > ?> > > > > I get a parse error on line 7. Please help. I have a major project that > > has ground to a halt. > > > > Craig Buxton > > Gravity Pilot Productions > > craiggravitypilot.com > > > > > > -- > > 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 >

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

    attached mail follows:


    "Ernest E Vogelsinger" <ernestvogelsinger.at> wrote:

    > At 23:33 11.11.2002, Tracy Finifter Rotton said: > --------------------[snip]-------------------- > >Does anyone know what happened to the User Contributed Notes on the PHP > >Manual? I went to go find one today, and they all appear to be gone! > --------------------[snip]-------------------- > > yeah, right... this afternoon they were still there I believe... >

    Strange...

    But you can try the mirrors--the "User Contributed Notes" are still there...

    http://www.php.net/mirrors.php

    - E

    attached mail follows:


    Ok, another question if you can help.

    I have (I think) all the components I need (cygwin1.dll, php_mcrypt.dll, etc...). Php_mcrypt.dll is in the PHP dir, everything else is in %windir%.

    When I try to use any of the mcrypt stuff now, I get:

    PHP Warning: Unable to load dynamic library './php_mcrypt.dll' - The specified procedure could not be found. in Unknown on line 0

    You have any idea what I might be doing wrong?

    //Nick

    -----Original Message----- From: .: B i g D o g :. [mailto:bigdogventicon.com] Sent: Monday, November 11, 2002 4:50 AM To: Nick Richardson Cc: php-generallists.php.net Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?

    You need to uncomment the dll in the php.ini file...do a search for it and then uncomment it or add it to the php.ini file...

    That will load it...

    *Note: i would add that directory to your path that contains the mcrypt dll or all dlls for php and the extension directory to...

    On Mon, 2002-11-11 at 19:42, Nick Richardson wrote: > Yes, there is a DLL for it, but getting PHP to know it is there is > where I'm having the problem - I don’t know how to get PHP to under > windows to do the equivalent of --with-mcrypt in configure under > linux. - maybe I havn't registered the mcrypt dll's correctly or > something like that... But I just can't get it to work. > > Everytime I try to do it I get 'call to undefined function ..... ' > > //Nick > > -----Original Message----- > From: .: B i g D o g :. [mailto:bigdogventicon.com] > Sent: Monday, November 11, 2002 4:37 AM > To: Nick Richardson > Cc: php-generallists.php.net; php-windowslists.php.net > Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32? > > > > is there not a dll for mcrypt? > > > On Mon, 2002-11-11 at 19:34, Nick Richardson wrote: > > I asked this before, but didn't get a response. > > > > Anyone out there have any experience a/o know where I can find > > information on getting the mcrypt functionality to work under Win32 - > > I have found a port of mcrypt for Win32, and also learned that you can > > > compile it using cygwin - but I don’t know how to register mcrypt w/ > > PHP and 'turn on' the mcrypt* functions. > > > > If anyone has any information or urls / how-tos it would be greatly > > appreciated! > > > > Thanks! > > > > //Nick Richardson > > // esoteric.webgte.net > > > > > > --- > > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell > > NO! > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 > > > -- > .: B i g D o g :. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    .: B i g D o g :.
    

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

    --- Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002

    attached mail follows:


    Basically,

    Are you loading the dll via the file or php? Make sure that the directory(s) where the dlls are located are in your windows path.

    If that doesnt work then you can always put the dll in your systems dll directory...

    On Mon, 2002-11-11 at 19:58, Nick Richardson wrote: > Ok, another question if you can help. > > I have (I think) all the components I need (cygwin1.dll, php_mcrypt.dll, > etc...). Php_mcrypt.dll is in the PHP dir, everything else is in > %windir%. > > When I try to use any of the mcrypt stuff now, I get: > > PHP Warning: Unable to load dynamic library './php_mcrypt.dll' - The > specified procedure could not be found. in Unknown on line 0 > > You have any idea what I might be doing wrong? > > //Nick > > -----Original Message----- > From: .: B i g D o g :. [mailto:bigdogventicon.com] > Sent: Monday, November 11, 2002 4:50 AM > To: Nick Richardson > Cc: php-generallists.php.net > Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32? > > > You need to uncomment the dll in the php.ini file...do a search for it > and then uncomment it or add it to the php.ini file... > > That will load it... > > *Note: i would add that directory to your path that contains the mcrypt > dll or all dlls for php and the extension directory to... > > > On Mon, 2002-11-11 at 19:42, Nick Richardson wrote: > > Yes, there is a DLL for it, but getting PHP to know it is there is > > where I'm having the problem - I don¢t know how to get PHP to under > > windows to do the equivalent of --with-mcrypt in configure under > > linux. - maybe I havn't registered the mcrypt dll's correctly or > > something like that... But I just can't get it to work. > > > > Everytime I try to do it I get 'call to undefined function ..... ' > > > > //Nick > > > > -----Original Message----- > > From: .: B i g D o g :. [mailto:bigdogventicon.com] > > Sent: Monday, November 11, 2002 4:37 AM > > To: Nick Richardson > > Cc: php-generallists.php.net; php-windowslists.php.net > > Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32? > > > > > > > > is there not a dll for mcrypt? > > > > > > On Mon, 2002-11-11 at 19:34, Nick Richardson wrote: > > > I asked this before, but didn't get a response. > > > > > > Anyone out there have any experience a/o know where I can find > > > information on getting the mcrypt functionality to work under Win32 > - > > > I have found a port of mcrypt for Win32, and also learned that you > can > > > > > compile it using cygwin - but I don¢t know how to register mcrypt w/ > > > PHP and 'turn on' the mcrypt* functions. > > > > > > If anyone has any information or urls / how-tos it would be greatly > > > appreciated! > > > > > > Thanks! > > > > > > //Nick Richardson > > > // esoteric.webgte.net > > > > > > > > > --- > > > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell > > > NO! > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 > > > > > -- > > .: B i g D o g :. > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > --- > > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > -- > .: B i g D o g :. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 >

    -- 
    Thank you,
    

    Ray Hunter

    attached mail follows:


    I'm trying to load it via php.ini w/ extension=php_mcrypt.dll and php_mcrypt.dll is in the extension_dir - When php_mcrypt.dll is not in the right place, it tells me it can't load the dll.

    Is there something other than the cygwin1.dll and php_mcrypt.dll that I have to install on the system - all the documentation (what little there is that I have found) has said that I don't need anything other than these 2 files.

    -----Original Message----- From: Ray Hunter [mailto:rhunterventicon.com] Sent: Monday, November 11, 2002 12:48 PM To: Nick Richardson Cc: php-generallists.php.net Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?

    Basically,

    Are you loading the dll via the file or php? Make sure that the directory(s) where the dlls are located are in your windows path.

    If that doesnt work then you can always put the dll in your systems dll directory...

    On Mon, 2002-11-11 at 19:58, Nick Richardson wrote: > Ok, another question if you can help. > > I have (I think) all the components I need (cygwin1.dll, > php_mcrypt.dll, etc...). Php_mcrypt.dll is in the PHP dir, everything

    > else is in %windir%. > > When I try to use any of the mcrypt stuff now, I get: > > PHP Warning: Unable to load dynamic library './php_mcrypt.dll' - The > specified procedure could not be found. in Unknown on line 0 > > You have any idea what I might be doing wrong? > > //Nick > > -----Original Message----- > From: .: B i g D o g :. [mailto:bigdogventicon.com] > Sent: Monday, November 11, 2002 4:50 AM > To: Nick Richardson > Cc: php-generallists.php.net > Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32? > > > You need to uncomment the dll in the php.ini file...do a search for it

    > and then uncomment it or add it to the php.ini file... > > That will load it... > > *Note: i would add that directory to your path that contains the > mcrypt dll or all dlls for php and the extension directory to... > > > On Mon, 2002-11-11 at 19:42, Nick Richardson wrote: > > Yes, there is a DLL for it, but getting PHP to know it is there is > > where I'm having the problem - I don?t know how to get PHP to under > > windows to do the equivalent of --with-mcrypt in configure under > > linux. - maybe I havn't registered the mcrypt dll's correctly or > > something like that... But I just can't get it to work. > > > > Everytime I try to do it I get 'call to undefined function ..... ' > > > > //Nick > > > > -----Original Message----- > > From: .: B i g D o g :. [mailto:bigdogventicon.com] > > Sent: Monday, November 11, 2002 4:37 AM > > To: Nick Richardson > > Cc: php-generallists.php.net; php-windowslists.php.net > > Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32? > > > > > > > > is there not a dll for mcrypt? > > > > > > On Mon, 2002-11-11 at 19:34, Nick Richardson wrote: > > > I asked this before, but didn't get a response. > > > > > > Anyone out there have any experience a/o know where I can find > > > information on getting the mcrypt functionality to work under > > > Win32 > - > > > I have found a port of mcrypt for Win32, and also learned that you > can > > > > > compile it using cygwin - but I don?t know how to register mcrypt > > > w/ PHP and 'turn on' the mcrypt* functions. > > > > > > If anyone has any information or urls / how-tos it would be > > > greatly appreciated! > > > > > > Thanks! > > > > > > //Nick Richardson > > > // esoteric.webgte.net > > > > > > > > > --- > > > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell > > > NO! > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 > > > > > -- > > .: B i g D o g :. > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > --- > > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell > > NO! > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > -- > .: B i g D o g :. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- > Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 >

    -- 
    Thank you,
    

    Ray Hunter

    --- Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002

    attached mail follows:


    can somebody please help me make an login script step one by one? My website is http://tweak2x.cjb.net and I am looking for a login section for memebers. I woud also like help making a register page, and such. I have IIS 5.0 and php 4 installed (although it is the installer version). So can somebody please help me? Thanks

    Matt

    attached mail follows:


    Hello Matt,

    There are several authentication tutorials available at http://www.hotscripts.com/PHP/Tips_and_Tutorials/User_Authentication/

    You may also want to look in the scripts section at http://www.hotscripts.com/PHP/Scripts_and_Programs/User_Authentication/

    Both of the above links will provide information on authenticating users (allowing them to login).

    Jason

    On Mon, 2002-11-11 at 21:27, Tweak2x wrote: > can somebody please help me make an login script step one by one? My > website is http://tweak2x.cjb.net and I am looking for a login section for > memebers. I woud also like help making a register page, and such. I have IIS > 5.0 and php 4 installed (although it is the installer version). So can > somebody please help me? Thanks > > Matt > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    on 12/11/02 2:27 PM, Tweak2x (Tweak2xCarolina.rr.com) wrote:

    > can somebody please help me make an login script step one by one? My > website is http://tweak2x.cjb.net and I am looking for a login section for > memebers. I woud also like help making a register page, and such. I have IIS > 5.0 and php 4 installed (although it is the installer version). So can > somebody please help me? Thanks

    See this article, it's got all the building blocks you need, they'll just need adapting.

    http://www.WebmasterBase.com/article/319

    Justin French -------------------- Creative Director http://Indent.com.au Web Developent & Graphic Design --------------------

    attached mail follows:


    Hi Matt,

    > can somebody please help me make an login script step > one by one? My website is http://tweak2x.cjb.net and > I am looking for a login section for memebers.

    Start by reading this article:

    http://zend.com/zend/tut/authentication.php

    And then get back to us with any problems you run into.

    Cheers Jon

    attached mail follows:


    Also, look up on PHP Beginner, it was covered on it: www.phpbeginner.com

    --
    Maxim Maletsky
    maximphp.net
    

    Jon Haworth <jhaworthwitanjardine.co.uk> wrote... :

    > Hi Matt, > > > can somebody please help me make an login script step > > one by one? My website is http://tweak2x.cjb.net and > > I am looking for a login section for memebers. > > Start by reading this article: > > http://zend.com/zend/tut/authentication.php > > And then get back to us with any problems you run into. > > Cheers > Jon > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Which built-in PHP functions would I use to move a file from one directory into another? I'm thinking that this requires more than one function to achieve what I want.

    What approaches should I take? Do I need to copy the file into a temporary directory first and then move it to the destination directory? Or Is it possible for me to move the file directly from one directory into another?

    The functions I read about so far are copy() and move_uploaded_file(), but the move_uploaded_file() function seems to work only when the file is uploaded from an HTML form, or am I wrong?

    Just looking for some direction.

    - Nilaab

    attached mail follows:


    Hello Nilaab,

    It sounds like you are looking for the rename() function. This function renames (also known as move) a file.

    You can find out more about rename() at http://us.php.net/manual/en/function.rename.php

    Jason

    On Mon, 2002-11-11 at 21:42, Nilaab wrote: > Which built-in PHP functions would I use to move a file from one directory > into another? I'm thinking that this requires more than one function to > achieve what I want. > > What approaches should I take? Do I need to copy the file into a temporary > directory first and then move it to the destination directory? Or Is it > possible for me to move the file directly from one directory into another? > > The functions I read about so far are copy() and move_uploaded_file(), but > the move_uploaded_file() function seems to work only when the file is > uploaded from an HTML form, or am I wrong? > > Just looking for some direction. > > - Nilaab > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    > Which built-in PHP functions would I use to move a file from one directory > into another? I'm thinking that this requires more than one function to > achieve what I want. > > What approaches should I take? Do I need to copy the file into a temporary > directory first and then move it to the destination directory? Or Is it > possible for me to move the file directly from one directory into another? > > The functions I read about so far are copy() and move_uploaded_file(), but > the move_uploaded_file() function seems to work only when the file is > uploaded from an HTML form, or am I wrong? > > Just looking for some direction.

    Use copy() to copy the file and then unlink() to delete the old one if the copy is successful.

    Or you can use exec() to make a system call to do it.

    ---John Holmes...

    attached mail follows:


    OK.. probably a easy thing, but I am complicating it too much. Here is what I am trying to accomplish.

    Using PHP4.0.2 and PostgreSQL 7.1.

    I am creating a time tracking system where a user, based on their login, gets a list of open projects. I have clientid, projectid, description, estimate time, and actual time spent on the project. it is the "Actual Time" data that I am trying to collect. I give the user a list of all their tasks, and want them to click a FORM BUTTON (can be anything as long as it accomplishes what I am doing) that passes variables like clientid, projectid, startime, description to the popup. What I want to do is use that popup window to show how much time they have spent since the click on "START TASK" form button is pressed. I then want to show them a running time starting from 00:00:00 upwards. Sort of like a stopwatch. The popup has a STOP/CLOSE link that, when pressed, will update the database with the unixtime stamp of the start and end of the project.

    I have the 00:00:00 counter going no problem, but the problem I run into:

    1) How to pass the STARTTIME only when the START TASK button is pressed?

    Apprently using

    echo "<input type=button value=\"Start\" onclick=\"window.open('popup.html?clientid=$starttime=strtotime(\"now\")&$thisclientid&projectid=$thisclientid','TEST','height=200,width=300,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=no')\">";

    does not pass the unixtime (now) to the popup.

    2). Since this is a Java popup, how do I get the close form action back and insert my endtime into the database from the popup?

    3). How do I mix php in a Java function?

    Any help and pointers appreciated. Thanks.

    Mohsin Rahman mtechbuffnet.net

    attached mail follows:


    At 22:28 11.11.2002, Mohsin Rahman said: --------------------[snip]-------------------- >1) How to pass the STARTTIME only when the START TASK button is pressed? > >Apprently using > >echo "<input type=button value=\"Start\" >onclick=\"window.open('popup.html?clientid=$starttime=strtotime(\"now\")&$th >isclientid&projectid=$thisclientid','TEST','height=200,width=300,resizable=y >es,toolbar=no,status=no,menubar=no,scrollbars=no')\">"; > >does not pass the unixtime (now) to the popup.

    You're merging the function call "strtotime()" into a string - that won't work. The other query parameters seem also not to be correctly identified. Try this:

    $starttime = =strtotime('now'); $uri = 'popup.html?' . "clientid=$thisclientid" . "&projectid=$thisprojectid" . "&starttime=$starttime";

    echo '<input type=button value="Start"', 'onclick="window.open(\'', $uri, '\',\'TEST\',', '\'height=200,width=300,resizable=yes,toolbar=no,', 'status=no,menubar=no,scrollbars=no\')">';

    >2). Since this is a Java popup, how do I get the close form action back >and insert my endtime into the database from the popup?

    I don't know - this depends on how the Java applet is written. Basically it should issue a request to an URI passing either the time, or the elapsed time, as a parameter.

    Caution - this would pass the time at the client workstation which might differ considerably from the server time. I'd suggest a solution where the server generates some kind of client token that's passed to the Java applet. The server would then associate this token with what he knows as "project start time". Upon hitting the stop button at the client's the applet would just pass back this token, annotated by the action (stop, reset, cancel, whatever). The server would then have a chance to take the appropriate action.

    >3). How do I mix php in a Java function?

    You don't. PHP is a server side issue, Java runs at the client's (at least in this scenario). The client browser starts the Java applet on behalf of the HTML code your server-side application outputs. The Java applet can only communicate with the server using URI requests.

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

    attached mail follows:


    John W. Holmes wrote:

    >>Can I use both _GET and _POST in the same php file? Thanks!! >> >> >Yes, you can use both in your code, but only one method is going to be >valid when your page is requested by a user. A user can't request a page >with both a GET and POST request at the same time. >

    It is true that a Web client can only use one method in an HTTP request, but this is not as directly related to $_GET and $_POST as it sounds.

    There is a sort of naming convention that no one seems to agree on, and that is what to call the different types of data a client can submit. Everyone agrees on cookies, because they are named in a specification, but what do you call variables contained in the query string of a URL? What about variables contained in the content section of a POST request?

    As it turns out, different communities use different names. The PHP community, for the most part, uses the term "get variables" to refer to those contained in the query string of a URL. Other communities refer to these as URL variables. The PHP community, again for the most part, uses the term "post variables" to refer to variables contained in the content section of a POST request. Others sometimes call these form variables.

    One important point is that these variables are not defined by the type of request in which they are contained. Consider this HTTP request:

    POST /index.php?foo=bar HTTP/1.1 Host: 127.0.0.1 Content-Type: application/x-www-form-urlencoded Content-Length: 17

    username=shiflett

    The receiving page, index.php, will have $_GET["foo"] defined as well as $_POST["username"]. So, the answer to the original poster's question (as I interpret the question) is yes.

    If you are interested in some of the reasons behind the different choices for naming these variables, read on ...

    The use of get variables and post variables originates from the valid values of the method attribute of the HTML form tag. When get is specified, the Web client will submit a GET request to the URL identified in the action attribute. In order to accomodate all of the user's data included in the form, the Web client will include this data in the query string of the URL it requests. In fact, if the following HTML is used ...

    <form action="/index.php?foo=bar" method="get">

    ... most browsers will basically overwrite the foo variable defined in the URL with all of the user's data submitted in the form. This is a common pitfall. So, because of this behavior of browsers, variables that are included in the URL in this way are often called get variables. It is more of a reference to the method attribute of the HTML form tag than it is a reference to the HTTP request method. If a method of post is specified, the Web client will use a POST request and include all of the data in the content section of the request, leaving the URL specified in the action attribute untouched. Thus, variables included in the content section of a POST request are often called post variables.

    The reason for the term URL variables is simply because these variables are located within the URL. The use of form variables is a bit less intuitive, and some people passionately disagree with this term when used as an equivalent to post variables. The reason for the disagreement is that many developers refer to form variables as any data submitted in a form, regardless of the method being used. However, those that prefer the term form variables are looking beyond HTML. Consider this HTML form ...

    <form action="/index.php" method="get"> <input type="hidden" name="foo" value="bar"> <input type="submit"> </form>

    ... and this HTML link ...

    <a href="/index.php?foo=bar">Click Here</a>

    When a user submits this form or clicks this link, the request is identical and will look something like this:

    GET /index.php?foo=bar HTTP/1.1 Host: 127.0.0.1

    Thus, because there is no difference from a technical perspective, these variables are considered URL variables, regardless of whether they were submitted in an HTML form.

    ColdFusion developers are more familiar with the URL/form distinction than the get/post one, as the former are variable scopes. PHP developers generally use the get/post distinction due to the arrays $_GET and $_POST. As I understand it, mod_perl developers do not distinguish the two, though I have only heard this from one source (though he is a highly respected member of the mod_perl community). I am less certain about other communities.

    That's probably more information than anyone wanted on this topic, but perhaps some people were as curious about this as I once was.

    Chris

    attached mail follows:


    > ColdFusion developers are more familiar with the URL/form distinction > than the get/post one, as the former are variable scopes. PHP developers > generally use the get/post distinction due to the arrays $_GET and > $_POST. As I understand it, mod_perl developers do not distinguish the > two, though I have only heard this from one source (though he is a > highly respected member of the mod_perl community). I am less certain > about other communities.

    Not that it matters, but the Get/Post/Cookie naming in PHP predates the existence of the various $_GET or $HTTP_GET_VARS variables by quite a bit. It was the naming that spawned the variable names, not the other way around. I didn't make up these names. They are right out of the HTTP spec. ie. <form action=... method=GET/POST> It seemed obvious and natural to follow this convention in PHP. But yes, the fact that you can have GET variables on a POST request is perhaps somewhat confusing and perhaps the reason why other communities have labelled this data as URL variables. However, I think it is very confusing to call POST variables "form" variables as you can very easily have GET-method forms in which case this "form" data now comes in a URL variable.

    Regardless, your explanation was excellent and I hope someone from the documentation teams picks this up and puts it somewhere logical, with your permission of course.

    -Rasmus

    attached mail follows:


    Rasmus Lerdorf wrote:

    >>ColdFusion developers are more familiar with the URL/form distinction >>than the get/post one, as the former are variable scopes. PHP developers >>generally use the get/post distinction due to the arrays $_GET and >>$_POST. As I understand it, mod_perl developers do not distinguish the >>two, though I have only heard this from one source (though he is a >>highly respected member of the mod_perl community). I am less certain >>about other communities. >> >> > >Not that it matters, but the Get/Post/Cookie naming in PHP predates the >existence of the various $_GET or $HTTP_GET_VARS variables by quite a bit. >It was the naming that spawned the variable names, not the other way >around. >

    Yeah, I didn't mean to suggest that actually. I just meant that most PHP developers use the get/post distinction due to the PHP variables, as they are likely more influenced by that than by outside resources such as RFCs, etc. Most communities tend to embrace the syntactical properties of their language of choice. In this case, even though the use of "get variables" and "post variables" came before $HTTP_GETS_VARS or the more recent $_GET, your naming decisions have basically shaped this community's perspective.

    >I didn't make up these names. They are right out of the HTTP >spec. ie. <form action=... method=GET/POST> >It seemed obvious and natural to follow this convention in PHP. >

    I prefer PHP's naming convention, but then I cannot claim to be impartial. :-) The use of get/post comes directly from the form tag you mention (you mean HTML spec though, right?), and I think this is much more intuitive to developers. The example I gave of a form with method="get" and a link yielding equivalent HTTP requests is hidden from developers, so the similarity is not the least bit intuitive.

    >But yes, the fact that you can have GET variables on a POST request is perhaps >somewhat confusing and perhaps the reason why other communities have >labelled this data as URL variables. However, I think it is very >confusing to call POST variables "form" variables as you can very easily >have GET-method forms in which case this "form" data now comes in a URL >variable. >

    Yeah, that perfectly illustrates the arguments that each group uses to defend their stance. The URL/form people often cite the fact that URL variables can be present in a POST request, so why call them get variables? The get/post people (us) think it is even more confusing to call post variables form variables, since form variables (which we tend to consider any variables submitted in an HTML form) can be get variables.

    Anyway, thanks for your insight. Some of these slightly off-topic issues are more interesting than the on-topic ones. :-) Maybe our community needs a historian to collect some of this information for those of us who are interested (or am I the only one?).

    Chris

    attached mail follows:


    > I prefer PHP's naming convention, but then I cannot claim to be > impartial. :-) The use of get/post comes directly from the form tag you > mention (you mean HTML spec though, right?)

    Well, no, the HTTP spec specifies the primitive request methods as being GET, PUT, POST, DELETE, HEAD, OPTIONS and TRACE. It is the request method that you are setting in the HTML form and that method is defined in the HTTP spec. But I suppose that is a semantic point.

    -Rasmus

    attached mail follows:


    **WARNING** longer post that usual **WARNING** longer post that usual **WARNING**

    At 07:54 12.11.2002, Chris Shiflett said: --------------------[snip]-------------------- >Anyway, thanks for your insight. Some of these slightly off-topic issues >are more interesting than the on-topic ones. :-) Maybe our community >needs a historian to collect some of this information for those of us >who are interested (or am I the only one?). --------------------[snip]--------------------

    It's slightly more than historical - in fact the behavior of GET and POST is quite clearly laid out in RFC2616 (http://ftp.rfc-editor.org/in-notes/rfc2616.txt) which represents the "proposed standard" for HTTP/1.1.

    To start with, data passed within the URI is called "query", as laid out in rfc2616, 3.2.2:

    3.2.2 http URL

    The "http" scheme is used to locate network resources via the HTTP protocol. This section defines the scheme-specific syntax and semantics for http URLs.

    http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]] [...]

    Si I assume the "correct" way to call our GET variables would be query variables, and the $_GET superglobal should rather be the $_QUERY superglobal...

    Rfc2616 also deals with the server side implications of GET and POST methods:

    9.1.1 Safe Methods

    Implementors should be aware that the software represents the user in their interactions over the Internet, and should be careful to allow the user to be aware of any actions they might take which may have an unexpected significance to themselves or others.

    In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested.

    Naturally, it is not possible to ensure that the server does not generate side-effects as a result of performing a GET request; in fact, some dynamic resources consider that a feature. The important distinction here is that the user did not request the side-effects, so therefore cannot be held accountable for them.

    In plain english, developers SHOULD use $_GET variables only to _compose_ information, not to take some action to _create_ information. We should always be aware that an URI can always be saved in a link collection ("Favirites"), or used as a link target, as opposed to POSTed data.

    9.5 POST

    The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:

    - Annotation of existing resources;

    - Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;

    - Providing a block of data, such as the result of submitting a form, to a data-handling process;

    - Extending a database through an append operation.

    The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI. [...]

    Responses to this method are not cacheable, unless the response includes appropriate Cache-Control or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent to retrieve a cacheable resource.

    [...]

    This is as clear as it can be - use POST to perform server-side actions with side effects, like creating a database entity, modifying/deleting a document, etc. Contrary to GET, a POST URI cannot be saved or hyperlinked to, at least not in conjunction with posted data.

    Of course the RFC is quite alert of any side effects that might be introduced by us developers ;-> and adds as a note:

    13.9 Side Effects of GET and HEAD

    Unless the origin server explicitly prohibits the caching of their responses, the application of GET and HEAD methods to any resources SHOULD NOT have side effects that would lead to erroneous behavior if these responses are taken from a cache. They MAY still have side effects, but a cache is not required to consider such side effects in its caching decisions. Caches are always expected to observe an origin server's explicit restrictions on caching.

    We note one exception to this rule: since some applications have traditionally used GETs and HEADs with query URLs (those containing a "?" in the rel_path part) to perform operations with significant side effects, caches MUST NOT treat responses to such URIs as fresh unless the server provides an explicit expiration time. This specifically means that responses from HTTP/1.0 servers for such URIs SHOULD NOT be taken from a cache. See section 9.1.1 for related information.

    It is beyond my knowledge why this rule is seemingly ignored most of the time - maybe most web servers automatically include their default cache mime headers in a response to a GET request, ignoring if it contains a query or not.

    Personally I try to use GET (with or without a session identifier) only in application environments that are not security related. When a user is logged in, and this login gets recorded in a SID that is part of a GET request URI, this session can easily ba shared among others while it is active. That wouldn't even be session "hijacking" as it is acceptable to pass an URI along...

    But that would be the topic of another thread.

    Sorry for the long post, but I believe it is important to have a look at the relevant standards from time to time.

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

    attached mail follows:


    It is a client side browser issue. Which browser are you testing within???

    -----Original Message----- From: rija <rijavatu.com> To: php <php-generallists.php.net> Date: Sunday, November 10, 2002 9:49 PM Subject: [PHP] Submit hitting enter problem

    What am I missing?

    My form does not submit when I hit enter in the text box. I do something approximately like this :

    <form action="index.php?s=add" method=post> .... <input type=text name=bongabe value=something> ... <input type=submit value=submit name=submit>

    //

    Thanks in advance.

    attached mail follows:


    Hey, How would I insert $_SESSION['user'] and $_SESSION['pass']

    into this mysql_query("select count(*) AS numfound from admins where user='$user' AND pass='$pass'",$db);

    right now I have $_SESSION['user'] = $_POST['user'] $_SESSION['pass'] = $_POST['pass']

    and I need to put $_SESSION['user'] where the $user is in the above statement and so one w/ $pass

    Thanks Lee

    attached mail follows:


    On Tuesday 12 November 2002 15:05, conbud wrote: > Hey, > How would I insert $_SESSION['user'] and $_SESSION['pass'] > > into this > mysql_query("select count(*) AS numfound from admins where user='$user' AND > pass='$pass'",$db); > > right now I have > $_SESSION['user'] = $_POST['user'] > $_SESSION['pass'] = $_POST['pass'] > > and I need to put $_SESSION['user'] where the $user is in the above > statement and so one w/ $pass

    You mean like this?

    mysql_query("select count(*) AS numfound from admins where user='{$_SESSION['user']}' AND pass='{$_SESSION['pass']}'",$db);

    BTW, it is much better to assign your query to a variable, eg $qry, then do

    mysql_query($qry, $db) or die('Error in $qry ' . mysql_error());

    That way if your query doesn't work you'll at least know why.

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

    /* Perhaps the biggest disappointments were the ones you expected anyway. */

    attached mail follows:


    Hey, I do have it in a variable but I just choose to leave it out. Ive tried so many different things with this and even what you gave me for some reason didnt work. The variables are being set, if I echo $_SESSION['user'] then right data is shown. However as soon as I put it in the mysql_query it stops working. Im using it for a login script that I include at the start of every page. Heres what I got:

    <?php session_start(); ?> <?php $_SESSION['user'] = $_POST['user']; $_SESSION['pass'] = $_POST['pass']; ?> <?php $db = mysql_connect("$host", "user", "pass"); mysql_select_db("$dtb",$db); $result = mysql_query("select count(*) AS numfound from admins where user='{$_SESSION['user']}' AND pass='{$_SESSION['pass']}'",$db); echo "".$_SESSION['user']." ".$_SESSION['pass']."";

    $result_ar = mysql_fetch_array($result); if ($result_ar['numfound'] < 1) { session_unset(); session_destroy(); include("error.php"); exit; } ?>

    I include that at the top of every page I want to protect.

    Lee

    "Jason Wong" <php-generalgremlins.com.hk> wrote in message news:200211121537.49604.php-generalgremlins.com.hk... > On Tuesday 12 November 2002 15:05, conbud wrote: > > Hey, > > How would I insert $_SESSION['user'] and $_SESSION['pass'] > > > > into this > > mysql_query("select count(*) AS numfound from admins where user='$user' AND > > pass='$pass'",$db); > > > > right now I have > > $_SESSION['user'] = $_POST['user'] > > $_SESSION['pass'] = $_POST['pass'] > > > > and I need to put $_SESSION['user'] where the $user is in the above > > statement and so one w/ $pass > > You mean like this? > > mysql_query("select count(*) AS numfound from admins where > user='{$_SESSION['user']}' AND > pass='{$_SESSION['pass']}'",$db); > > BTW, it is much better to assign your query to a variable, eg $qry, then do > > mysql_query($qry, $db) or die('Error in $qry ' . mysql_error()); > > That way if your query doesn't work you'll at least know why. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Perhaps the biggest disappointments were the ones you expected anyway. > */ >

    attached mail follows:


    Also the echo statement is just there for testing purposes to make sure the variable were containing the correct data.

    Lee

    "Conbud" <conbuddyahoo.com> wrote in message news:20021112075942.16291.qmailpb1.pair.com... > Hey, > I do have it in a variable but I just choose to leave it out. > Ive tried so many different things with this and even what you gave me for > some reason didnt work. The variables are being set, if I echo > $_SESSION['user'] then right data is shown. However as soon as I put it in > the mysql_query it stops working. Im using it for a login script that I > include at the start of every page. Heres what I got: > > <?php > session_start(); > ?> > <?php > $_SESSION['user'] = $_POST['user']; > $_SESSION['pass'] = $_POST['pass']; > ?> > <?php > $db = mysql_connect("$host", "user", "pass"); > mysql_select_db("$dtb",$db); > $result = mysql_query("select count(*) AS numfound from admins where > user='{$_SESSION['user']}' AND > pass='{$_SESSION['pass']}'",$db); > echo "".$_SESSION['user']." ".$_SESSION['pass'].""; > > $result_ar = mysql_fetch_array($result); > if ($result_ar['numfound'] < 1) > { > session_unset(); > session_destroy(); > include("error.php"); > exit; > } > ?> > > I include that at the top of every page I want to protect. > > Lee > > "Jason Wong" <php-generalgremlins.com.hk> wrote in message > news:200211121537.49604.php-generalgremlins.com.hk... > > On Tuesday 12 November 2002 15:05, conbud wrote: > > > Hey, > > > How would I insert $_SESSION['user'] and $_SESSION['pass'] > > > > > > into this > > > mysql_query("select count(*) AS numfound from admins where user='$user' > AND > > > pass='$pass'",$db); > > > > > > right now I have > > > $_SESSION['user'] = $_POST['user'] > > > $_SESSION['pass'] = $_POST['pass'] > > > > > > and I need to put $_SESSION['user'] where the $user is in the above > > > statement and so one w/ $pass > > > > You mean like this? > > > > mysql_query("select count(*) AS numfound from admins where > > user='{$_SESSION['user']}' AND > > pass='{$_SESSION['pass']}'",$db); > > > > BTW, it is much better to assign your query to a variable, eg $qry, then > do > > > > mysql_query($qry, $db) or die('Error in $qry ' . mysql_error()); > > > > That way if your query doesn't work you'll at least know why. > > > > -- > > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > > Open Source Software Systems Integrators > > * Web Design & Hosting * Internet & Intranet Applications Development * > > > > /* > > Perhaps the biggest disappointments were the ones you expected anyway. > > */ > > > >

    attached mail follows:


    On Tuesday 12 November 2002 15:59, conbud wrote: > Hey, > I do have it in a variable but I just choose to leave it out. > Ive tried so many different things with this and even what you gave me for > some reason didnt work.

    *Why* doesn't it work?

    > The variables are being set, if I echo > $_SESSION['user'] then right data is shown. However as soon as I put it in > the mysql_query it stops working. Im using it for a login script that I > include at the start of every page. Heres what I got:

    I repeat:

    > > mysql_query($qry, $db) or die('Error in $qry ' . mysql_error());

    > > > > That way if your query doesn't work you'll at least know why.

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

    /* Matz's Law: A conclusion is the place where you got tired of thinking. */

    attached mail follows:


    what PHP version are you running? $_SESSION variable is only available since PHP v4.1.0 and, btw, you always need to use session_start() before using it.

    --
    Maxim Maletsky
    maximphp.net
    

    Jason Wong <php-generalgremlins.com.hk> wrote... :

    > On Tuesday 12 November 2002 15:59, conbud wrote: > > Hey, > > I do have it in a variable but I just choose to leave it out. > > Ive tried so many different things with this and even what you gave me for > > some reason didnt work. > > *Why* doesn't it work? > > > The variables are being set, if I echo > > $_SESSION['user'] then right data is shown. However as soon as I put it in > > the mysql_query it stops working. Im using it for a login script that I > > include at the start of every page. Heres what I got: > > I repeat: > > > > mysql_query($qry, $db) or die('Error in $qry ' . mysql_error()); > > > > > > > That way if your query doesn't work you'll at least know why. > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Matz's Law: > A conclusion is the place where you got tired of thinking. > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I posted this yesterday:

    > Specifically, I'm considering using hidden fields for persistent object > properties because (1) I don't want cookies to be an issue, (2) I prefer not > to have session IDs appear in a URL, and (3) I prefer not to use require a > database just to store persistent properties.

    After Justin and Ernest straightened me out, I went back to the drawing board and came up with a method that I call Invisible GET.

    Let's say my page is at <http://www.getsome.com/>. When I want to change the month (for example), I...

    (1) Open <http://www.getsome.com/submit.php?month=3& target=http://www.getsome.com/>.

    (2) In submit.php script, I throw all $_REQUEST variables (except "target" and "PHPSESSID") into $_SESSION variables, and...

    (3) ...redirect to $_REQUEST['target'] via header().

    I've sure I've invented something that nobody's done before. :^P This method feels about perfect. Users won't be seeing or bookmarking garbage-filled URLs, and I'm not using lots of hacky stuff to achieve it.

    I wish I could generate submit.php on the fly, though -- I'm trying very hard not to pollute the web folder with anything that I don't have to, and file creation/deletion is very expensive since I have to do it via FTP. Any ideas on this one?

    -- Charles Wiltgen

    attached mail follows:


    Seems to me like this would generate a lot of extra server traffic, and a little confusion... The only benefit I can see is that you're getting rid of ugly page URLs.

    Problems I can see:

    1. sessions need to be carried around... if your user has cookies turned off, or you wish not to use them; a) the sessions will break, or b) you will need to carry the SID around in a URL

    So, your URLs will actually look like http://www.site.com/article.php?PHPSESSID=12413523245546453

    Nothing I can see in your code/idea changes the fact that EACH INSTANCE OF A SCRIPT NEEDS TO MAINTAIN STATE (carry the session around).

    You have two choices: - cookies - URL - compile with trans-sid -- uses cookies if possible, otherwise uses URL

    I have never seen anything else work.

    2. bookmarking/linking/etc... essentially what you're saying is that one URL, page.php, will do many different things (like present many different articles), based on session information... this doesn't sound to good to me... bookmarking, search engines, etc etc might all get it wrong, and certainly would make it hard for people to email the URL to a friend, or link to it from another site.

    You *may* want to consider the apache mod_rewrite stuff. I spotted an article on sitepoint.com about it.... erm... here we go:

    http://www.webmasterbase.com/article/910

    Instead of: http://site.com/page.php?article=4, you can do things like: http://site.com/page.php/article/4, which are very bookmark / link / session / searchengine friendly.

    Just one last note... PHP sessions, by default, store the session variables in files transparently (ie, you don't have to do much), NOT a database. So, writing a script that requires sessions will NOT require MySQL.

    Just look at amazon, yahoo, msn, or any other big site... they just pass the sid around in URLs, and people deal with it. Learn from the "best".

    Cheers,

    Justin

    on 12/11/02 5:55 PM, Charles Wiltgen (listswiltgen.net) wrote:

    > I posted this yesterday: > >> Specifically, I'm considering using hidden fields for persistent object >> properties because (1) I don't want cookies to be an issue, (2) I prefer not >> to have session IDs appear in a URL, and (3) I prefer not to use require a >> database just to store persistent properties. > > After Justin and Ernest straightened me out, I went back to the drawing > board and came up with a method that I call Invisible GET. > > Let's say my page is at <http://www.getsome.com/>. When I want to change > the month (for example), I... > > (1) Open <http://www.getsome.com/submit.php?month=3& > target=http://www.getsome.com/>. > > (2) In submit.php script, I throw all $_REQUEST variables (except > "target" and "PHPSESSID") into $_SESSION variables, and... > > (3) ...redirect to $_REQUEST['target'] via header(). > > I've sure I've invented something that nobody's done before. :^P > This method feels about perfect. Users won't be seeing or bookmarking > garbage-filled URLs, and I'm not using lots of hacky stuff to achieve it. > > I wish I could generate submit.php on the fly, though -- I'm trying very > hard not to pollute the web folder with anything that I don't have to, and > file creation/deletion is very expensive since I have to do it via FTP. Any > ideas on this one? > > -- Charles Wiltgen >

    Justin French -------------------- Creative Director http://Indent.com.au Web Developent & Graphic Design --------------------

    attached mail follows:


    Hello.

    I'm about to write a DNS-related project in PHP4 and would like to use TSIG-signed DNS-updates, AXFR-based zonetransfers etc. When using Perl I could use the excellent Net::DNS module for this. Does anyone know if there exists anything like that for PHP4? I have searched on the PHP website and the mailinglists without finding anything like that.

    -- 
    Regards
    Eivind Olsen
    <eivindaminor.no>
    

    attached mail follows:


    Hi Tamas,

    > /* srand is not important since php v>=4.2.0 */ > $numbers = range (1,90); > $x = array_rand ($numbers, 5); > foreach ($x as $v) echo "{$numbers[$v]} "; > > It works fine, except the first query: php may restart > the random numbers, if it is not used for some seconds.

    I'm not sure how to solve this, but I'm curious as to why you don't want to use mt_rand:

    <?php

    for ($i=1; $i<=6; $i++) $x[] = mt_rand(1, 90);

    foreach ($x as $current) echo $current. "<br />";

    ?>

    You still get an array at the end of it, which seems to be what you're after.

    Cheers Jon

    attached mail follows:


    Jon!

    > <?php > for ($i=1; $i<=6; $i++) > $x[] = mt_rand(1, 90); > foreach ($x as $current) > echo $current. "<br />"; > ?>

    Thanks for help, but your program may generate same numbers between the 5 generated numbers, hovewer I want to generate different numbers such as lottery-numbers. array_rand() is a very nice solution for this problem, other solutions with mt_rand() should be much longer. (I should care about if this random number has generated already or not) But if this is the only solution I'll do it in this way... (in this case there are a lot of useless php functions, that use random numbers adjusted to the simple srand() such as shuffle())

    Tamas

    attached mail follows:


    Hi Tamas,

    > > <?php > > for ($i=1; $i<=6; $i++) > > $x[] = mt_rand(1, 90); > > foreach ($x as $current) > > echo $current. "<br />"; > > ?> > > Thanks for help, but your program may generate same numbers between > the 5 generated numbers, hovewer I want to generate different numbers > such as lottery-numbers.

    That's not a problem: just add a couple of lines to test for existence:

    $i = 0; while ($i<6) { $pick = mt_rand(1, 90); if (!in_array($pick, $x)) { $x[] = $pick; $i++; } }

    > But if this is the only solution I'll do it in this way.

    It's *never* the only solution :-)

    Cheers Jon

    attached mail follows:


    I can use ImageMagick to rotate images, and that would be my preferred technique, but I was wondering how you might use GD to rotate images. As far as I can see, it's not possible. Anyone tried it?

    Mick

    e-ssociate EPSON (UK) Ltd. Tel 01442 227374 www.epson.co.uk

    attached mail follows:


    You could write your own rotation code, moving every pixel one by one,

    Otherwise I've not used GD enough to know one... but actually quickly looking at the GD Function list I found: http://www.php.net/manual/en/function.imagerotate.php

    Voila

    Andrew ----- Original Message ----- From: "Sear, Mick" <msearepson.co.uk> To: <php-generallists.php.net> Sent: Tuesday, November 12, 2002 10:43 AM Subject: [PHP] Rotation of images

    > I can use ImageMagick to rotate images, and that would be my preferred > technique, but I was wondering how you might use GD to rotate images. As > far as I can see, it's not possible. Anyone tried it? > > Mick > > e-ssociate > EPSON (UK) Ltd. > Tel 01442 227374 > www.epson.co.uk > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Howdi All

    Anyone know if there is a function in php that can take values and generate a graph ???

    Thanks in advance

    C

    -------------------------------------- Chris Grigor --------------------------------------

    attached mail follows:


    No, there is not, but there are classes for that, look for jgraph

    Chris Grigor wrote:

    >Howdi All > >Anyone know if there is a function in php that can take values and >generate a graph ??? > >Thanks in advance > >C > >-------------------------------------- >Chris Grigor >-------------------------------------- > > > > >

    attached mail follows:


    On Tuesday 12 November 2002 19:04, Marek Kilimajer wrote: > No, there is not, but there are classes for that, look for jgraph

    I believe you mean "jpgraph" !

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

    /* When angry, count four; when very angry, swear. -- Mark Twain, "Pudd'nhead Wilson's Calendar" */

    attached mail follows:


    Yes, you are right, I was too lazy to look it up :-)

    Jason Wong wrote:

    >On Tuesday 12 November 2002 19:04, Marek Kilimajer wrote: > > >>No, there is not, but there are classes for that, look for jgraph >> >> > >I believe you mean "jpgraph" ! > > >

    attached mail follows:


    I want to make it easier for people to download files from my website by having the download start when the visitor clicks a link (as opposed to right click / save target as).

    How can I achieve this with PHP? Do I include the file in a header() call ?

    Thanks,

    javier

    _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus

    attached mail follows:


    Yes. Just make a header appropriate for browser to understand that it should fire up the download dialog.

    --
    Maxim Maletsky
    maximphp.net
    

    "Javier Montserat" <codareefhotmail.com> wrote... :

    > I want to make it easier for people to download files from my website by > having the download start when the visitor clicks a link (as opposed to > right click / save target as). > > How can I achieve this with PHP? Do I include the file in a header() call ? > > Thanks, > > javier > > > > > > _________________________________________________________________ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    At 13:15 12.11.2002, Maxim Maletsky said: --------------------[snip]-------------------- >Yes. Just make a header appropriate for browser to understand that it >should fire up the download dialog. --------------------[snip]--------------------

    To force virtually any browser into download mode, specify your content being an application/octet-stream:

    header('Content-Type: application/octet-stream');

    Of course, if you're serving an MSWord document (phew) you might have MSWord open directly in the browser:

    header('Content-Type: application/msword');

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

    attached mail follows:


    I have been trying to include an echo statement incorporating a here document on pages being served by my Mac OS X (v10.1.5) and Apache (v1.3)

    When I try to browse test.php, which contains...

    <?php echo<<<ENDOFECHO <html> hello...hello... </html> ENDOFECHO; ?>

    I get a parse error. When I upload it to my ISP it works as expected, but again it won't work on my server. What can I change or where can I go for an answer.

    Thanks

    attached mail follows:


    Hello,

    "Craig Buxton" <craiggravitypilot.com> wrote: > I have been trying to include an echo statement incorporating a here > document on pages being served by my Mac OS X (v10.1.5) and Apache (v1.3) > > When I try to browse test.php, which contains... > > <?php > echo<<<ENDOFECHO > <html> > hello...hello... > </html> > ENDOFECHO; > ?> > > I get a parse error. When I upload it to my ISP it works as expected, > but again it won't work on my server. What can I change or where can I > go for an answer.

    I did a "copy and paste" and your code works fine. Perhaps, you can (1) post the exact error message (2) check whether you uploaded *the same* file :) (3) make sure that there's no spaces, etc. after the semi-colon

    > ENDOFECHO;

    - E

    attached mail follows:


    On Tuesday 12 November 2002 20:05, Craig Buxton wrote: > I have been trying to include an echo statement incorporating a here > document on pages being served by my Mac OS X (v10.1.5) and Apache (v1.3) > > When I try to browse test.php, which contains... > > <?php > echo<<<ENDOFECHO > <html> > hello...hello... > </html> > ENDOFECHO; > ?> > > I get a parse error. When I upload it to my ISP it works as expected, > but again it won't work on my server. What can I change or where can I > go for an answer.

    I think it's something to do with the end of line character -- you have to use a single linefeed character (0Ah). Try searching the archives, I think this issue cropped up a few weeks ago.

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

    /* Man 1: Ask me the what the most important thing about telling a good joke is.

    Man 2: OK, what is the most impo --

    Man 1: ______TIMING! */

    attached mail follows:


    Le mardi, 12 nov 2002, à 14:15 Europe/Paris, Jason Wong a écrit :

    > On Tuesday 12 November 2002 20:05, Craig Buxton wrote: >> I have been trying to include an echo statement incorporating a here >> document on pages being served by my Mac OS X (v10.1.5) and Apache >> (v1.3) >> >> When I try to browse test.php, which contains... >> >> <?php >> echo<<<ENDOFECHO >> <html> >> hello...hello... >> </html> >> ENDOFECHO; >> ?> >> >> I get a parse error. When I upload it to my ISP it works as expected, >> but again it won't work on my server. What can I change or where can I >> go for an answer. > > I think it's something to do with the end of line character -- you > have to use > a single linefeed character (0Ah). Try searching the archives, I think > this > issue cropped up a few weeks ago. If I copy your test.php file in BBEdit and save it as Macintosh file it does'nt work , but works saved as a Unix file > > [...] > > Pierre Vaudrey

    attached mail follows:


    Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ? I have found functions specific to Oracle 8i and some more generic functions (are these only for Oracle 9?).

    Also, is there a doc containing all levels of support for 3rd party products? save me pestering the list in future. I couldn't locate it myself though.

    Many thanks,

    -- 
    Dan Field
    Systems Development Officer - Social Services Dept.
    Ceredigion County Council.
    

    ******************************************************************************** Mae'r neges ebost hon, ynghyd ag unrhyw ffeiliau sydd ynghlwm wrthi, yn gyfrinachol ac at ddefnydd yr unigolyn neu sefydliad y cyfeiriwyd hi ato. Pe dderbynioch y neges hon mewn camgymeriad, byddwch mor garedig a rhoi gwybod i'r rheolwr system.

    Mae'r nodyn hwn hefyd yn cadarnhau bod y neges ebost hon wedi cael ei archwilio am bresenoldeb feirws cyfrifiadurol gan MIMEsweeper.

    ******************************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.

    This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.

    ********************************************************************************

    attached mail follows:


    > -----Original Message----- > From: Dan Field [mailto:danfceredigion.gov.uk] > Sent: 12 November 2002 12:18 > > Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ?

    Yes. > I have found functions specific to Oracle 8i and some more generic > functions (are these only for Oracle 9?).

    No -- the OCI8 functions are actually recommended for Oracle 7 upwards. The ora_* functions are older and do not use the newer OCI methodology.

    Cheers!

    Mike

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

    attached mail follows:


    Dan Field <danfceredigion.gov.uk> wrote... :

    > Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ?

    Yes, it is. Oracle extension is supporting Oracle 7th version, while OCI8 is primarily for 8 and 9th versions, they might be also working for Oracle 7.

    > I have found functions specific to Oracle 8i and some more generic > functions (are these only for Oracle 9?).

    Generic (ora_*) are for Oracle 7 and up, OCI8 is for 8 and 9.

    > Also, is there a doc containing all levels of support for 3rd party > products? save me pestering the list in future. I couldn't locate it > myself though.

    Official manual has a list of PHP extension - that is what one should read.

    --
    Maxim Maletsky
    maximphp.net
    

    > Many thanks, > > -- > Dan Field > Systems Development Officer - Social Services Dept. > Ceredigion County Council. > > > > ******************************************************************************** > Mae'r neges ebost hon, ynghyd ag unrhyw ffeiliau sydd ynghlwm wrthi, > yn gyfrinachol ac at ddefnydd yr unigolyn neu sefydliad y cyfeiriwyd hi ato. > Pe dderbynioch y neges hon mewn camgymeriad, byddwch > mor garedig a rhoi gwybod i'r rheolwr system. > > Mae'r nodyn hwn hefyd yn cadarnhau bod y neges ebost hon wedi > cael ei archwilio am bresenoldeb feirws cyfrifiadurol gan MIMEsweeper. > > ******************************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > > ******************************************************************************** > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    OCI 7 does not need any modification to support 8 and 9 but they aren't as powerful, thus should only be used for Oracle 7.

    OCI8 is the 8th OCI and fully supports Oracle 8 with and Oracle 9. For Oracle 9 there are a few thing that are missing, but overall can be safely used on high level production environments.

    We interface 3.5 Terrabytes Oracle 8 database framework for an e-government project using PHP's OCI8 extension.

    --
    Maxim Maletsky
    maximphp.net
    

    "Ford, Mike [LSS]" <M.Fordlmu.ac.uk> wrote... :

    > > -----Original Message----- > > From: Dan Field [mailto:danfceredigion.gov.uk] > > Sent: 12 November 2002 12:18 > > > > Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ? > > Yes. > > > I have found functions specific to Oracle 8i and some more generic > > functions (are these only for Oracle 9?). > > No -- the OCI8 functions are actually recommended for Oracle 7 upwards. The > ora_* functions are older and do not use the newer OCI methodology. > > Cheers! > > Mike > > --------------------------------------------------------------------- > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Beckett Park, LEEDS, LS6 3QS, United Kingdom > Email: m.fordlmu.ac.uk > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    On Tue, 2002-11-12 at 13:03, Ford, Mike [LSS] wrote: > > -----Original Message----- > > From: Dan Field [mailto:danfceredigion.gov.uk] > > Sent: 12 November 2002 12:18 > > > > Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ? > > Yes. > > > I have found functions specific to Oracle 8i and some more generic > > functions (are these only for Oracle 9?). > > No -- the OCI8 functions are actually recommended for Oracle 7 upwards. The > ora_* functions are older and do not use the newer OCI methodology.

    That is great news, thanks Mike. My second problem then lies with my current PHP Setup. I have been using the binary RPMs from RedHat up to now, which do not sem to have been compiled with the Oracle functionality included. If I recompile PHP, will I need the Oracle headers on the machine also? If so this could be a problem as the Oracle server I wish to use is not on the same machine as the webserver.

    Cheers

    -- 
    Dan Field
    Systems Development Officer - Social Services Dept.
    Ceredigion County Council.
    

    ******************************************************************************** Mae'r neges ebost hon, ynghyd ag unrhyw ffeiliau sydd ynghlwm wrthi, yn gyfrinachol ac at ddefnydd yr unigolyn neu sefydliad y cyfeiriwyd hi ato. Pe dderbynioch y neges hon mewn camgymeriad, byddwch mor garedig a rhoi gwybod i'r rheolwr system.

    Mae'r nodyn hwn hefyd yn cadarnhau bod y neges ebost hon wedi cael ei archwilio am bresenoldeb feirws cyfrifiadurol gan MIMEsweeper.

    ******************************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.

    This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.

    ********************************************************************************

    attached mail follows:


    > -----Original Message----- > From: Dan Field [mailto:danfceredigion.gov.uk] > Sent: 12 November 2002 13:39 > > On Tue, 2002-11-12 at 13:03, Ford, Mike [LSS] wrote: > > > -----Original Message----- > > > From: Dan Field [mailto:danfceredigion.gov.uk] > > > Sent: 12 November 2002 12:18 > > > > > > Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ? > > > > Yes. > > > > > I have found functions specific to Oracle 8i and some more generic > > > functions (are these only for Oracle 9?). > > > > No -- the OCI8 functions are actually recommended for > Oracle 7 upwards. The > > ora_* functions are older and do not use the newer OCI methodology. > > That is great news, thanks Mike. My second problem then lies with my > current PHP Setup. I have been using the binary RPMs from RedHat up to > now, which do not sem to have been compiled with the Oracle > functionality included. If I recompile PHP, will I need the Oracle > headers on the machine also? If so this could be a problem as > the Oracle > server I wish to use is not on the same machine as the webserver.

    Sorry, I can't help with this one as I'm not the administrator of our main Unix server, and my test server is Windows so I used the pre-compiled binaries.

    But hopefully one of the Oracle gurus on this list will spring to your aid!

    Cheers!

    Mike

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

    attached mail follows:


    > PHP isn't working in my html docs - what changes do I need to make to get it > to do so? Does it need to be recompiled? Can I do it without re-compiling?

    Give your file a .php extension, maybe?

    ---John Holmes...

    attached mail follows:


    How do i make an upload script?

    attached mail follows:


    "Tweak2x" <Tweak2xCarolina.rr.com> wrote in message news:20021112123023.55841.qmailpb1.pair.com... > How do i make an upload script?

    http://us.php.net/manual/en/features.file-upload.php

    - E

    attached mail follows:


    Hi,

    > How do i make an upload script?

    You need an HTML form with an <input type="file"> element, and a script to handle the upload.

    Post your code and tell us what problems you're having. If you haven't written any code yet, go and read this section of the manual:

    http://www.php.net/manual/en/features.file-upload.php

    Cheers Jon

    attached mail follows:


    I dont see any comments where is this useful comments go ?

    attached mail follows:


    Hello,

    "Alawi albaity" <alawiphp4web.com> wrote: > I dont see any comments > where is this useful comments go ?

    ...you just missed these:

    http://marc.theaimsgroup.com/?l=php-general&m=103705820013067&w=2

    http://marc.theaimsgroup.com/?l=php-general&m=103706935420920&w=2

    - E

    attached mail follows:


    hello PHP developers,

    I am going to convert a site that works with frames to the equivalent with includes. I have several template files whic behaves according to query string parameters. I don't want to make big changes, just make it work. <?php include("tmplt1.php?var1=val1&var2=val2"); ?> Is that possible?

    I lasltly consider the solutions that states convert into functions :-)

    Regards,

    İyi Çalışmalar. Fikret CAN Pergel Group İletişim Hizmetleri A.Ş Akkirman Sok. No:59 80220 Nişantaşı - İstanbul Tel: (0 212) 230 01 91 / 145 Fax: (0 212) 241 59 12

    attached mail follows:


    On Tuesday 12 November 2002 15:55, Fikret CAN wrote: > hello PHP developers, > > I am going to convert a site that works with frames to the equivalent with > includes. I have several template files whic behaves according to query > string parameters. I don't want to make big changes, just make it work. > <?php > include("tmplt1.php?var1=val1&var2=val2"); > ?> Try this way: <?php $var1=val1; $var2=val2; include("tmplt1.php"); ?>

    attached mail follows:


    > On Tuesday 12 November 2002 15:55, Fikret CAN wrote: > > hello PHP developers, > > > > I am going to convert a site that works with frames to the equivalent with > > includes. I have several template files whic behaves according to query > > string parameters. I don't want to make big changes, just make it work. > > <?php > > include("tmplt1.php?var1=val1&var2=val2"); > > ?>

    You don't need to pass vars to an include file. Whatever variables are available to the main script at the time of the include() are available to the included file. It's the same as copying that code into your main file at that point.

    ---John Holmes...

    attached mail follows:


    Hello!

    I make copy of phpweb module using cvs, and now I just want to run php website on my local machine, but can't find mirrors.inc:

    Fatal error: Failed opening required 'mirrors.inc' (include_path='.:/bd/src/phpweb/include') in /bd/src/phpweb/include/site.inc on line 12

    What wrong?

    Thanks.

    attached mail follows:


    Afternoon:

    I'm having problems with PHP CGI crashing and I have no idea why. The script I'm running hasn't changed, nor has the server setup. It ran fine for several weeks and then started crashing. I rebooted the server (FreeBSD 4.6) and it was fine for a couple of days... now its crashing again.

    I was running PHP 4.2.1. I upgraded to 4.2.3 and its still doing it.

    Here is a backtrace, but its all greek to me. Can anyone explain what on earth all this means?

    Thanks

    Mike

    #0 0x28353386 in localeconv () from /usr/lib/libc.so.4 #1 0x28364ee1 in strtod () from /usr/lib/libc.so.4 #2 0x8127ac1 in is_numeric_string (str=0x81fe224 "SELECT", length=6, lval=0xbbc00164, dval=0xbbc00158, allow_errors=0 '\000') at zend_operators.h:94 #3 0x81276fa in zendi_smart_strcmp (result=0xbbc00348, s1=0xbe84f24, s2=0x82bd4fc) at zend_operators.c:1653 #4 0x8126346 in compare_function (result=0xbbc00348, op1=0xbe84f24, op2=0x82bd4fc) at zend_operators.c:1128 #5 0x8126c2a in is_equal_function (result=0xbbc00348, op1=0xbe84f24, op2=0x82bd4fc) at zend_operators.c:1276 #6 0x814d64f in execute (op_array=0x82b9d24) at ./zend_execute.c:1114 #7 0x8150337 in execute (op_array=0x82ca224) at ./zend_execute.c:1638 #8 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 #9 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638

    .... (another 59,052 of these) ...

    #59061 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 #59062 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 #59063 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 #59064 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 #59065 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 #59066 0x8150337 in execute (op_array=0x8206b24) at ./zend_execute.c:1638 #59067 0x81208b3 in call_user_function_ex (function_table=0x821a698, object_pp=0x81fcc30, function_name=0x81fdd24, retval_ptr_ptr=0xbfbfd810, param_count=3, params=0x826bc64, no_separation=1, symbol_table=0x0) at zend_execute_API.c:517 #59068 0x812019d in call_user_function (function_table=0x81ac040, object_pp=0x82a6b60, function_name=0x821eae4, retval_ptr=0x826bda4, param_count=3, params=0xbfbfd8a8) at zend_execute_API.c:373 #59069 0x80f1f21 in xml_call_handler (parser=0x82a6b24, handler=0x821eae4, argc=3, argv=0xbfbfd8a8) at xml.c:375

    #59070 0x80f2922 in _xml_startElementHandler (userData=0x82a6b24, name=0x81f3a40 "event", attributes=0x82a6c10) at xml.c:657 #59071 0x80f7b53 in doContent (parser=0x81bfc00, startTagLevel=0, enc=0x816ebc0, s=0x82e617a "<event date=\"20021112 16:15:00\" venue=\"Newmarket\"><outcome price=\"SP\" id=\"31,PAI370676\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370677\" saddlecloth=\"2\" /><outcome price=\"NR\" id=\"31,PAI370678\" "..., end=0x82e9779 "", nextPtr=0x0) at xmlparse.c:1659 #59072 0x80f705a in contentProcessor (parser=0x81bfc00, start=0x82e504a "<bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370738\" saddlecloth=\"2\""..., end=0x82e9779 "", endPtr=0x0) at xmlparse.c:1349 #59073 0x80f9ee2 in doProlog (parser=0x81bfc00, enc=0x816ebc0, s=0x82e504a "<bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370738\" saddlecloth=\"2\""..., end=0x82e9779 "", tok=29, next=0x82e504a "<bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370738\" saddlecloth=\"2\""..., nextPtr=0x0) ---Type <return> to continue, or q <return> to quit--- at xmlparse.c:2687 #59074 0x80f9a54 in prologProcessor (parser=0x81bfc00, s=0x82e5024 "<?xml version=\"1.0\" encoding=\"utf-8\"?><bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price="..., end=0x82e9779 "", nextPtr=0x0) at xmlparse.c:2523 #59075 0x80f99ea in prologInitProcessor (parser=0x81bfc00, s=0x82e5024 "<?xml version=\"1.0\" encoding=\"utf-8\"?><bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price="..., end=0x82e9779 "", nextPtr=0x0) at xmlparse.c:2512 #59076 0x80f68c8 in php_XML_Parse (parser=0x81bfc00, s=0x82e5024 "<?xml version=\"1.0\" encoding=\"utf-8\"?><bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price="..., len=18261, isFinal=1) at xmlparse.c:1103 #59077 0x80f4864 in zif_xml_parse (ht=3, return_value=0x81fdc24, this_ptr=0x0, return_value_used=1) at xml.c:1341 #59078 0x8150156 in execute (op_array=0x82060a4) at ./zend_execute.c:1598 #59079 0x8150337 in execute (op_array=0x81f6f24) at ./zend_execute.c:1638 #59080 0x8129bd5 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:812 #59081 0x8063bed in php_execute_script (primary_file=0xbfbffab8) at main.c:1383 #59082 0x80612a4 in main (argc=4, argv=0xbfbffb34) at cgi_main.c:778 #59083 0x80603bd in _start ()

    attached mail follows:


    Try posting this on bugs.php.net onto the appropriate category. Add the output too. There you will have more chances to know why this happens.

    --
    Maxim Maletsky
    maximphp.net
    

    Mike Hall <mike.hallopencube.co.uk> wrote... :

    > Afternoon: > > I'm having problems with PHP CGI crashing and I have no idea why. The > script I'm running hasn't changed, nor has the server setup. It ran fine > for several weeks and then started crashing. I rebooted the server > (FreeBSD 4.6) and it was fine for a couple of days... now its crashing > again. > > I was running PHP 4.2.1. I upgraded to 4.2.3 and its still doing it. > > Here is a backtrace, but its all greek to me. Can anyone explain what on > earth all this means? > > Thanks > > Mike > > #0 0x28353386 in localeconv () from /usr/lib/libc.so.4 > #1 0x28364ee1 in strtod () from /usr/lib/libc.so.4 > #2 0x8127ac1 in is_numeric_string (str=0x81fe224 "SELECT", length=6, lval=0xbbc00164, dval=0xbbc00158, allow_errors=0 '\000') > at zend_operators.h:94 > #3 0x81276fa in zendi_smart_strcmp (result=0xbbc00348, s1=0xbe84f24, s2=0x82bd4fc) at zend_operators.c:1653 > #4 0x8126346 in compare_function (result=0xbbc00348, op1=0xbe84f24, op2=0x82bd4fc) at zend_operators.c:1128 > #5 0x8126c2a in is_equal_function (result=0xbbc00348, op1=0xbe84f24, op2=0x82bd4fc) at zend_operators.c:1276 > #6 0x814d64f in execute (op_array=0x82b9d24) at ./zend_execute.c:1114 > #7 0x8150337 in execute (op_array=0x82ca224) at ./zend_execute.c:1638 > #8 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 > #9 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 > > .... (another 59,052 of these) ... > > #59061 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 > #59062 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 > #59063 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 > #59064 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 > #59065 0x8150337 in execute (op_array=0x82065a4) at ./zend_execute.c:1638 > #59066 0x8150337 in execute (op_array=0x8206b24) at ./zend_execute.c:1638 > #59067 0x81208b3 in call_user_function_ex (function_table=0x821a698, object_pp=0x81fcc30, function_name=0x81fdd24, > retval_ptr_ptr=0xbfbfd810, param_count=3, params=0x826bc64, no_separation=1, symbol_table=0x0) at zend_execute_API.c:517 > #59068 0x812019d in call_user_function (function_table=0x81ac040, object_pp=0x82a6b60, function_name=0x821eae4, > retval_ptr=0x826bda4, param_count=3, params=0xbfbfd8a8) at zend_execute_API.c:373 > #59069 0x80f1f21 in xml_call_handler (parser=0x82a6b24, handler=0x821eae4, argc=3, argv=0xbfbfd8a8) at xml.c:375 > > > > #59070 0x80f2922 in _xml_startElementHandler (userData=0x82a6b24, name=0x81f3a40 "event", attributes=0x82a6c10) at xml.c:657 > #59071 0x80f7b53 in doContent (parser=0x81bfc00, startTagLevel=0, enc=0x816ebc0, > s=0x82e617a "<event date=\"20021112 16:15:00\" venue=\"Newmarket\"><outcome price=\"SP\" id=\"31,PAI370676\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370677\" saddlecloth=\"2\" /><outcome price=\"NR\" id=\"31,PAI370678\" "..., > end=0x82e9779 "", > nextPtr=0x0) at xmlparse.c:1659 > #59072 0x80f705a in contentProcessor (parser=0x81bfc00, > start=0x82e504a "<bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370738\" saddlecloth=\"2\""..., > end=0x82e9779 "", endPtr=0x0) at xmlparse.c:1349 > #59073 0x80f9ee2 in doProlog (parser=0x81bfc00, enc=0x816ebc0, > s=0x82e504a "<bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370738\" saddlecloth=\"2\""..., end=0x82e9779 "", > tok=29, > next=0x82e504a "<bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price=\"SP\" id=\"31,PAI370738\" saddlecloth=\"2\""..., nextPtr=0x0) > ---Type <return> to continue, or q <return> to quit--- > at xmlparse.c:2687 > #59074 0x80f9a54 in prologProcessor (parser=0x81bfc00, > s=0x82e5024 "<?xml version=\"1.0\" encoding=\"utf-8\"?><bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price="..., end=0x82e9779 "", > nextPtr=0x0) at xmlparse.c:2523 > #59075 0x80f99ea in prologInitProcessor (parser=0x81bfc00, > s=0x82e5024 "<?xml version=\"1.0\" encoding=\"utf-8\"?><bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price="..., end=0x82e9779 "", > nextPtr=0x0) at xmlparse.c:2512 > #59076 0x80f68c8 in php_XML_Parse (parser=0x81bfc00, > s=0x82e5024 "<?xml version=\"1.0\" encoding=\"utf-8\"?><bdml memberid=\"11\" password=\"good9top\"><event date=\"20021112 13:05:00\" venue=\"Huntingdon\"><outcome price=\"SP\" id=\"31,PAI370737\" saddlecloth=\"1\" /><outcome price="..., len=18261, isFinal=1) > at xmlparse.c:1103 > #59077 0x80f4864 in zif_xml_parse (ht=3, return_value=0x81fdc24, this_ptr=0x0, return_value_used=1) at xml.c:1341 > #59078 0x8150156 in execute (op_array=0x82060a4) at ./zend_execute.c:1598 > #59079 0x8150337 in execute (op_array=0x81f6f24) at ./zend_execute.c:1638 > #59080 0x8129bd5 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:812 > #59081 0x8063bed in php_execute_script (primary_file=0xbfbffab8) at main.c:1383 > #59082 0x80612a4 in main (argc=4, argv=0xbfbffb34) at cgi_main.c:778 > #59083 0x80603bd in _start () > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    testing

    __________________________________________________ Do You Yahoo!? Great flight deals, travel info and prizes! http://sg.travel.yahoo.com

    attached mail follows:


    I think it works. ;)

    -----Original Message----- From: pig pig [mailto:pigpig8080yahoo.com.sg] Sent: Tuesday, November 12, 2002 5:44 AM To: php-generallists.php.net Subject: [PHP] testing

    testing

    __________________________________________________ Do You Yahoo!? Great flight deals, travel info and prizes! http://sg.travel.yahoo.com

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

    attached mail follows:


    Hi All,

    I am having problem with redirecting using header function with register_globals off. It works fine on my PC but not on the site as the register_globals is off on the server. When redirecting on the server it gave an CGI error:

    CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

    I am using session to pass some variables to the target page, could this cause the problem? Is there a work around for this problem?

    Thanks in advance.

    CK Ong

    __________________________________________________ Do You Yahoo!? Great flight deals, travel info and prizes! http://sg.travel.yahoo.com

    attached mail follows:


    Can you post some code?

    Marco

    -- 
    ------------
    php|architect - The magazine for PHP Professionals
    The first monthly worldwide magazine dedicated to PHP programmers
    Check us out on the web at http://www.phparch.com
    

    On Tue, 2002-11-12 at 08:52, pig pig wrote: > Hi All, > > I am having problem with redirecting using header > function with register_globals off. It works fine on > my PC but not on the site as the register_globals is > off on the server. When redirecting on the server it > gave an CGI error: > > CGI Error > The specified CGI application misbehaved by not > returning a complete set of HTTP headers. The headers > it did return are: > > > I am using session to pass some variables to the > target page, could this cause the problem? > Is there a work around for this problem? > > Thanks in advance. > > CK Ong > > __________________________________________________ > Do You Yahoo!? > Great flight deals, travel info and prizes! > http://sg.travel.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hi..

    I'm using php to pull data from a mysql table and output it to the browser. Pretty basic stuff. The problem is that the output is very slow, seen from the browser end, because the html output isn't displayed at all until all the data has been retrieved. Actually it's just the <table> part of the html that delays. Every <table> row corresponds to a row from the mysql table, and many rows are being displayed.

    However, I've seen php generated pages that display the data even as it's being pulled from the database. So the delay time isn't as hard to endure.

    I'm wondering if anyone knows what the trick is to output a large volume of html data from php in the second way. I've tried adding flush to the end of every iteration of the loop that's looping through the rows of data, but it doesn't help.

    Thanks!

    attached mail follows:


    On Tuesday 12 November 2002 22:10, arch wrote: > Hi.. > > I'm using php to pull data from a mysql table and output it to the browser. > Pretty basic stuff. The problem is that the output is very slow, seen from > the browser end, because the html output isn't displayed at all until all > the data has been retrieved. Actually it's just the <table> part of the > html that delays. Every <table> row corresponds to a row from the mysql > table, and many rows are being displayed. > > However, I've seen php generated pages that display the data even as it's > being pulled from the database. So the delay time isn't as hard to endure. > > I'm wondering if anyone knows what the trick is to output a large volume of > html data from php in the second way. I've tried adding flush to the end of > every iteration of the loop that's looping through the rows of data, but it > doesn't help.

    Most browsers only start rendering tables when they see the </table> tag. One solution is to split your single table into multiple tables each with, say 10 rows. However one drawback using this method is that if you do not specify the column widths then they can vary from table to table and it may look a bit odd.

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

    /* Objects are lost only because people look where they are not rather than where they are. */

    attached mail follows:


    My php site is almost done so now I need to begin the task of getting it noticed online. Can anyone suggest some good books or sites where I can learn all the basics and tricks for marketing my site?

    Thanks, Eddie