OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Wed Aug 08 2001 - 03:18:51 CDT

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

    php-general Digest 8 Aug 2001 08:18:51 -0000 Issue 803

    Topics (messages 61696 through 61767):

    Re: close browser
            61696 by: Tyler Longren
            61697 by: Bjorn Van Simaeys
            61699 by: Christopher CM Allen
            61712 by: Robert V. Zwink
            61725 by: Christopher CM Allen
            61738 by: Ryan Fischer
            61740 by: kath
            61743 by: Ryan Fischer
            61751 by: Evan Nemerson

    IP security check
            61698 by: matt
            61700 by: Tyler Longren
            61761 by: Ren Moonen

    Hi all! How to rite a cmp function for usort()?
            61701 by: Thomas Schmid

    Determining browser encryption strength
            61702 by: Bolivar Shagnasty

    httpd.conf flags cause seg fault on configtest
            61703 by: Robert Covell

    Re: mySQL date converting
            61704 by: Bjorn Van Simaeys

    Hopefully easy Apache Problem
            61705 by: Christopher Oson
            61706 by: Julie Meloni

    Q: Kill all line brk's and white space on output?
            61707 by: Marcus James Christian

    Re: Splitting Text
            61708 by: Robert V. Zwink

    selecting words
            61709 by: Jamie Saunders
            61710 by: Alfredeen, Johan
            61767 by: Jon Farmer

    Apache Directives
            61711 by: Sean Cook

    XML/XPath Position() Syntax
            61713 by: Girish Nath
            61716 by: Gyozo Papp
            61754 by: Girish Nath

    Re: Help me please.(Running stand-alone php)
            61714 by: Tina
            61717 by: Tina
            61727 by: Tina

    Rewriting a textfile for import into a db..
            61715 by: Ryan Christensen
            61726 by: Ryan Christensen

    Re: Uptime script
            61718 by: Andreas D. Landmark

    subroutines?
            61719 by: CGI GUY
            61720 by: Jason Murray
            61731 by: Miles Thompson

    Re: File Uploads
            61721 by: Damiano Ferrari

    Re: user's ip]
            61722 by: Andreas D. Landmark

    Re: Traceroute without traceroute command!
            61723 by: Andreas D. Landmark

    sample or tutorial for conditional pulldown menus
            61724 by: Tom Beidler
            61729 by: Maxim Maletsky
            61733 by: Miles Thompson
            61742 by: Steve Werby
            61744 by: Peter Houchin

    Re: mysql escape character \'
            61728 by: hassan el forkani
            61732 by: David Robley

    Images
            61730 by: Fernando Avila
            61735 by: Hong Zhang
            61736 by: Matthew Loff

    3rd include
            61734 by: Drew P. Vogel

    עռμ!
            61737 by: ʱ

    Re: user's ip
            61739 by: Chris Birmingham
            61759 by: Adrian D'Costa

    Re: myPhpAdmin/mysql/php/ Problem
            61741 by: J. Simpson

    large commercial websites that use php?
            61745 by: jose d lopez
            61747 by: ReDucTor
            61748 by: Balaji Ankem
            61764 by: B. van Ouwerkerk

    Multiple line spanning regexp
            61746 by: Brad Hubbard
            61760 by: Brad Hubbard

    can i compile php as cgi-module and apache-module on the one server?
            61749 by: liufeng.megajoy.com
            61750 by: Evan Nemerson

    splitting text after 25 words
            61752 by: Justin French
            61753 by: Chris Lambert
            61755 by: karthik

    WAP/WML Size
            61756 by: Keith Whyman

    regular expression database searches
            61757 by: Joe Sheble \(Wizaerd\)

    Re: Insecurity with PHP authorization
            61758 by: Stefen Lars

    Re: checking for null form fields fails
            61762 by: Renze Munnik
            61765 by: Renze Munnik
            61766 by: Renze Munnik

    Bug?
            61763 by: \[Intent A/S\] Tais M. Hansen

    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:


    PHP can't. Javascript, however, does prompt before closing a browser
    window.

    On Tue, 7 Aug 2001 13:11:16 -0700
    "Ryan Christensen" <ryandevnut.com> wrote:

    > Pretty sure it can, it just prompts the user before it is closed..
    > (otherwise JS would have a BIT too much power :)
    >
    > Ryan
    >
    > > -----Original Message-----
    > > From: Tyler Longren [mailto:tylercaptainjack.com]
    > > Sent: Tuesday, August 07, 2001 1:12 PM
    > > To: jeremyprepresshelp.com
    > > Cc: php-generallists.php.net
    > > Subject: Re: [PHP] close browser
    > >
    > >
    > > PHP can't do that because php is serverside. You would need
    > Javascript.
    > > I'm not even sure if Javascript can do this.
    > >
    > > Tyler Longren
    > > Captain Jack Communications
    > > tylercaptainjack.com
    > > www.captainjack.com
    > >
    > >
    > > On Tue, 7 Aug 2001 16:10:51 -0400
    > > "Jeremy Morano" <jeremyprepresshelp.com> wrote:
    > >
    > > > Hi,
    > > >
    > > > Can anybody tell me what the code to close the browser is?
    > > >
    > > > --
    > > > PHP General Mailing List (http://www.php.net/)
    > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    > > > For additional commands, e-mail: php-general-helplists.php.net
    > > > To contact the list administrators, e-mail:
    > php-list-adminlists.php.net
    > > >
    > >
    > > --
    > > PHP General Mailing List (http://www.php.net/)
    > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    > > For additional commands, e-mail: php-general-helplists.php.net
    > > To contact the list administrators, e-mail:
    > php-list-adminlists.php.net
    > >
    > >
    >
    >
    > --
    > PHP General Mailing List (http://www.php.net/)
    > To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    > For additional commands, e-mail: php-general-helplists.php.net
    > To contact the list administrators, e-mail: php-list-adminlists.php.net
    >

    attached mail follows:


    Hi,

    Yes, Javascript can do this. Look at this:

    <script type="text/javascript">
     this.window.close();
    </script>

    You can wrap this in a <A HREF...> tag as well.

    Greetz,
    Bjorn Van Simaeys
    www.bvsenterprises.com

    --- Jeremy Morano <jeremyprepresshelp.com> wrote:
    > Hi,
    >
    > Can anybody tell me what the code to close the
    > browser is?
    >
    > --
    > PHP General Mailing List (http://www.php.net/)
    > To unsubscribe, e-mail:
    > php-general-unsubscribelists.php.net
    > For additional commands, e-mail:
    > php-general-helplists.php.net
    > To contact the list administrators, e-mail:
    > php-list-adminlists.php.net
    >

    __________________________________________________
    Do You Yahoo!?
    Make international calls for as low as $.04/minute with Yahoo! Messenger
    http://phonecard.yahoo.com/

    attached mail follows:


    Greetings:

    I have a field entry in a MYQSL table that stores the date as:
    August 02, 2001 :(

    Is there anyway to convert this to 08-02-2001 outside of the table via php?

    Better yet is there ayway I can go back into my table and change these dates
    into a better format for computation?

    attached mail follows:


    Did you look in the manual?
    http://www.php.net/manual/en/function.strtotime.php
    strtotime() -- Parse about any english textual datetime description into a
    UNIX timestamp

    This is probably what you are looking for.

    As far as converting a CHAR (assuming) type column in MySQL to DATE, I think
    you would have to write php to select each row, convert the date, then
    update the row with the new date. I would create a new TIMESTAMP column,
    write php to select the old date, convert it, then update the row with the
    new TIMESTAMP added.

    Robert V. Zwink
    DAID Development LLC
    http://www.zwink.net/daid.php

    -----Original Message-----
    From: Christopher CM Allen [mailto:callendriver8.org]
    Sent: Tuesday, August 07, 2001 4:44 PM
    To: php-generallists.php.net
    Subject: Re: [PHP] close browser

    Greetings:

    I have a field entry in a MYQSL table that stores the date as:
    August 02, 2001 :(

    Is there anyway to convert this to 08-02-2001 outside of the table via php?

    Better yet is there ayway I can go back into my table and change these dates
    into a better format for computation?

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

    attached mail follows:


    Thanks to all for the replies, I am looking into many options. One of which is traveling back in time and creating the table correctly....

    ;p

    -ccma ----- Original Message ----- From: Robert V. Zwink <rzwinkmicrocenter.com> To: <php-generallists.php.net>; Christopher CM Allen <callendriver8.org> Sent: Tuesday, August 07, 2001 5:01 PM Subject: RE: [PHP] close browser

    > Did you look in the manual? > http://www.php.net/manual/en/function.strtotime.php > strtotime() -- Parse about any english textual datetime description into a > UNIX timestamp > > > This is probably what you are looking for. > > As far as converting a CHAR (assuming) type column in MySQL to DATE, I think > you would have to write php to select each row, convert the date, then > update the row with the new date. I would create a new TIMESTAMP column, > write php to select the old date, convert it, then update the row with the > new TIMESTAMP added. > > Robert V. Zwink > DAID Development LLC > http://www.zwink.net/daid.php > > > > > -----Original Message----- > From: Christopher CM Allen [mailto:callendriver8.org] > Sent: Tuesday, August 07, 2001 4:44 PM > To: php-generallists.php.net > Subject: Re: [PHP] close browser > > > Greetings: > > I have a field entry in a MYQSL table that stores the date as: > August 02, 2001 :( > > Is there anyway to convert this to 08-02-2001 outside of the table via php? > > Better yet is there ayway I can go back into my table and change these dates > into a better format for computation? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    You wrote: > Can anybody tell me what the code to close the browser is?

    ALT+F4. ;)

    -- 
     -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
    

    attached mail follows:


    PHP cannot execute client side actions, afaik.

    - k

    ----- Original Message ----- From: "Ryan Fischer" <ryangigabee.com> To: <jeremyprepresshelp.com>; <php-generallists.php.net> Sent: Tuesday, August 07, 2001 10:39 PM Subject: Re: [PHP] close browser

    > You wrote: > > Can anybody tell me what the code to close the browser is? > > ALT+F4. ;) > > -- > -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    You wrote: > > You wrote: > > > Can anybody tell me what the code to close the browser is? > > > > ALT+F4. ;) > PHP cannot execute client side actions, afaik. > > - k

    'Twas a joke. See the winky smilie? You may all laugh now. ;)

    -- 
     -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
    

    attached mail follows:


    On Tuesday 07 August 2001 20:20, you wrote: > You wrote: > > > You wrote: > > > > Can anybody tell me what the code to close the browser is? > > > > > > ALT+F4. ;) > > > > PHP cannot execute client side actions, afaik. > > > > - k > > 'Twas a joke. See the winky smilie? You may all laugh now. ;)

    Haha tell people in multiplayer games ALT+F4 brings up a secret cheat menu... Especially when they're better than you.

    I believe the JavaScript is self.close();

    attached mail follows:


    For secure payment pages, I need for the code to determine the persons IP address, even if they have a "spoofer" running. Is this possible? Getting around the spoofer in order to catch criminals using illegal credit card #'s..

    thanks -matt (cs student)

    attached mail follows:


    $REMOTE_ADDR will give you the user's IP...it can't get the "un-spoofed" ip though.

    Tyler Longren Captain Jack Communications tylercaptainjack.com www.captainjack.com

    On Tue, 7 Aug 2001 15:37:09 -0500 "matt" <mattwireswt.edu> wrote:

    > For secure payment pages, I need for the code to determine the persons > IP > address, even if they have a "spoofer" running. Is this possible? > Getting > around the spoofer in order to catch criminals using illegal credit card > #'s.. > > thanks > -matt (cs student) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Try this code:

    if(getenv("HTTP_X_FORWARDED_FOR")) { $ip=getenv("HTTP_X_FORWARDED_FOR"); } else { $ip=getenv("REMOTE_ADDR"); } $host = gethostbyaddr($ip);

    And check out http://www.php.net/manual/en/function.getenv.php

    However, I think it is very unsafe to base your payment transactions on these features. If a criminal can get credit card data, he can sure get IP addresses also.

    Regards

    Ren

    matt wrote:

    > For secure payment pages, I need for the code to determine the persons IP > address, even if they have a "spoofer" running. Is this possible? Getting > around the spoofer in order to catch criminals using illegal credit card > #'s.. > > thanks > -matt (cs student) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Hallo, my ISP doesnt support natcasesort(), can anybody tell me how to write a cmp function? I couldnt find a documentaton about it. Sorry for my bad english Im german. Greetings Dyo

    attached mail follows:


    My web site it going to be the starting point with a link to an application that only works with browser at 128bit strength. What I would like to do is automatically determine if the user doesn't have a compatible browser and then direct them where to get the correct browser. Does anyone know how I might go about doing this?

    tia, bol

    _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

    attached mail follows:


    This is a cross-post because I am not sure if this is a php or mod_ssl problem. I have several servers running the same php setup without mod_ssl and it works.

    In httpd.conf I want to enable magic_quotes_gpc. So in the virtual directory I place:

    php_flag magic_quotes_gpc on

    This is just like all my other servers with php and without mod_ssl and it works like a charm. When I do it on this platform which is:

    mod_ssl-2.8.0-1.3.17 PHP Version 4.0.4pl1

    I get:

    rootserver5:/usr/local/apache/conf# ../bin/apachectl configtest ../bin/apachectl: line 184: 29282 Segmentation fault $HTTPD -t rootserver5:/usr/local/apache/conf#

    Any ideas why it would happen on the mod_ssl server.

    -Bob

    attached mail follows:


    Hi,

    You could write a PHP script to get all the current values (I presume that you've put varchar as datatype), parse them with string functions and convert it in the way you'd like them to be. All this is not so difficult to make.

    I prefer to store my date/times in the UNIX timestamp form. I use an int(10) field in mySQL database (int(10) means an integer with 10 digits, this way I can store more than 331 years!). This is easy to sort and to calculate with too. In your development you can use this timestamp and format it in any way you want it using the date() function.

    You'll find all references in the php.net manual.

    Greetz, Bjorn Van Simaeys www.bvsenterprises.com

    --- Christopher CM Allen <callendriver8.org> wrote: > Greetings: > > I have a field entry in a MYQSL table that stores > the date as: > August 02, 2001 :( > > Is there anyway to convert this to 08-02-2001 > outside of the table via php? > > Better yet is there ayway I can go back into my > table and change these dates > into a better format for computation? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribelists.php.net > For additional commands, e-mail: > php-general-helplists.php.net > To contact the list administrators, e-mail: > php-list-adminlists.php.net >

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    People,

    I'm sorry to send this problem out to these lists, but I'm not getting anywhere when I try to paste

    apachectl start: httpd could not be started

    message into a google search

    I'm getting a:

    # /usr/local/www/bin/apachectl start /usr/local/www/bin/apachectl start: httpd could not be started

    I realize there many problems, but where would be a good place to find out possible causes?

    Christopher Oson Programmer Not Administrator

    attached mail follows:


    CO> # /usr/local/www/bin/apachectl start CO> /usr/local/www/bin/apachectl start: httpd could not be started

    CO> I realize there many problems, but where would be a good place to CO> find out possible causes?

    logs/error_log will usually give you a reason.

    Julie Meloni juliethickbook.com "PHP Essentials" & "PHP Fast & Easy" --- www.thickbook.com ---

    attached mail follows:


    Hello,

    I've got this cool auto add email mailing list that is simply a .txt file that PHP writes to.

    So the visitor goes to a form types in their email addy and is automatically added to the .txt file which is then read when the boss wants to send out to the entire list.

    This thing works perfectly except for one prob.

    Every time some one adds them self to the list (mainly me testing right now) their addy is added on the next line down yet when I view the code I have NO \r or \n asking to add a line break.

    So my question is

    Is there a way to say ..."Write to the file emailaddys.txt and suck out all line breaks, returns, and white space?"

    i.e. make sure each address butts itself up against the next with just the comma separating them.

    I know this would work because when I manually go to the .txt file and delete the white space till all the email addy's are back to back this app works great!

    Thank you in advance my friends -Marcus

    --
    Marcus James Christian -- UNLIMITED
    Multimedia Internet Design
    http://mjchristianunlimited.com
    

    attached mail follows:


    For future reference using explode and counting the words is not the correct way to do this. Your array could be huge, and if you have multiple requests to the page this would be a horrible idea. I believe the correct way to do this is to use MySQL inherent function SUBSTRING_INDEX(str,delim,count) So for example:

    SELECT SUBSTRING_INDEX(column_name, ' ', 20) FROM table_name

    would return the first 20 words. The php way is over-doing it. If you can perform the logic in your mysql query, you should.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From MySQL manual: http://www.mysql.com/doc/S/t/String_functions.html

    SUBSTRING_INDEX(str,delim,count) Returns the substring from string str before count occurrences of the delimiter delim. If count is positive, everything to the left of the final delimiter (counting from the left) is returned. If count is negative, everything to the right of the final delimiter (counting from the right) is returned: mysql> select SUBSTRING_INDEX('www.mysql.com', '.', 2); -> 'www.mysql' mysql> select SUBSTRING_INDEX('www.mysql.com', '.', -2); -> 'mysql.com'

    This function is multi-byte safe. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Hope this helps!

    Robert V. Zwink DAID Development LLC http://www.zwink.net/daid.php

    attached mail follows:


    Hi,

    What I'd like to do is take a string (paragraph) of text consisting of say 500 words and display only the first 100 words. Is there a function able to do this?

    Thanks.

    Jamie

    attached mail follows:


    Jamie, There was a post earlier very similar to this. If you have a database, you could use SELECT LEFT(mycolumn, 100) FROM mytable WHERE ...

    Without a db, you can use the PHP substring function:

    substr()

    Hope this helps,

    Johan Alfredeen www.pongworld.com

    -----Original Message----- From: Jamie Saunders [mailto:othermailjamie-s.co.ukREMOVETOEMAIL] Sent: Tuesday, August 07, 2001 3:53 PM To: php-generallists.php.net Subject: [PHP] selecting words

    Hi,

    What I'd like to do is take a string (paragraph) of text consisting of say 500 words and display only the first 100 words. Is there a function able to do this?

    Thanks.

    Jamie

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

    attached mail follows:


    >There was a post earlier very similar to this. If you have a database, you >could use SELECT LEFT(mycolumn, 100) FROM mytable WHERE ...

    >Without a db, you can use the PHP substring function:

    >substr()

    Except that would return the first 100 characters and not the first 100 words as requested.

    To do this you would need to find the 100th space in the string and use everything before that. I would probably explode the string and loop through the first one hundred elements to reconstruct the string with the first one hundred words.

    Regards

    Jon

    Jon Farmer Systems Programmer Entanet International Ltd www.enta.net Tel 01952 428969 Mob 07968 524175

    attached mail follows:


    I am trying to figure out a way to run an application such that regardless of the url I achieve the same results. This is similar to the way apache/mod_perl works ... example

    <Location /login/> SetHandler perl-script PerlHandler somehandler::foo </Location> now anything that access /login/salkdfjaslkjf gets redirected executed through somehandler::foo

    Can I do the same type of thing with php?

    -- 
    Sean Cook
    

    Phone: 804.285.2376 email: sdcvatelecom.com __________________________________________________ God doesn't play dice. -- Albert Einstein

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org

    iEYEARECAAYFAjtwZRoACgkQb6b5SspXThStGACghd8/9tL+nYFjQa8Amsi+rCqU TaEAoLV0SX/xMZpRDfkgrm5AN5vj6oPG =91x/ -----END PGP SIGNATURE-----

    attached mail follows:


    Hi

    I'm trying to select XML nodes 25 to 50 using the position() function in the XPath class. I can select greater or less than but can't figure out a "between". Anyone have the correct syntax for this ?

    eg "//product[position() >25]"

    Thanks

    Gish

    attached mail follows:


    //product[position() > 25 and position() < 50 ]

    ----- Original Message ----- From: "Girish Nath" <girishnbtinternet.com> To: <php-generallists.php.net> Sent: 2001. augusztus 8. 00:15 Subject: [PHP] XML/XPath Position() Syntax

    > Hi > > I'm trying to select XML nodes 25 to 50 using the position() function in the > XPath class. I can select greater or less than but can't figure out a > "between". Anyone have the correct syntax for this ? > > eg "//product[position() >25]" > > > Thanks > > > Gish > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hi

    Thanks, the "and" didn't work, however a "|" did the business :)

    product[position() > 25 | position() < 50 ]

    Maybe there;s smth up with the class i'm using (www.phpxml.org)

    Gish

    ----- Original Message ----- From: "Gyozo Papp" <pgerzsonfreestart.hu> To: "Girish Nath" <girishnbtinternet.com>; <php-generallists.php.net> Sent: Tuesday, August 07, 2001 11:39 PM Subject: Re: [PHP] XML/XPath Position() Syntax

    file://product[position() > 25 and position() < 50 ]

    ----- Original Message ----- From: "Girish Nath" <girishnbtinternet.com> To: <php-generallists.php.net> Sent: 2001. augusztus 8. 00:15 Subject: [PHP] XML/XPath Position() Syntax

    > Hi > > I'm trying to select XML nodes 25 to 50 using the position() function in the > XPath class. I can select greater or less than but can't figure out a > "between". Anyone have the correct syntax for this ? > > eg "file://product[position() >25]" > > > Thanks > > > Gish > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hi,

    Because you are running this as a SSI you need to put the folling line at the top of your php script:

    #!/path/to/php

    usually:

    #!/usr/local/bin/php

    Then your script must be executeable by the webserver user just like any other cgi script.

    YTina.

    On 2001-08-07 at 12:35 miguel valero wrote:

    >Date: Tue, 7 Aug 2001 12:35:43 -0700 (PDT) >From: miguel valero <mrv169yahoo.com> >To: php-generallists.php.net >Cc: mike cullerton <php-lbakednotfried.com> >Subject: [PHP] Help me please.(Running stand-alone php) > >Unfortunately the -q parameter didn't fix the problem. > >Is anybody in the PHP mailing list that is familiar >with this kind of problem and can tell me how to get >rid of the path line in the browser output? > >Any help will be greatly appreciated. >Thanks. >--- mike cullerton <php-lbakednotfried.com> wrote: >> try the -q parameter. i'm guessing here, since i >> don't run windows nor the >> cgi version of php. >> >> :) >> >> on 8/7/01 8:27 AM, miguel valero at mrv169yahoo.com >> wrote: >> >> > Mike, >> > >> > I running the scrip from the browser >> > (http://localhost/cgi-bin/test.html) When I >> comment >> > the first line in the script >> (#-----#!c:\php\php.exe) >> > I get the following error message: >> > >> > Tue Aug 07 09:56:13 2001] [error] [client >> 127.0.0.1] >> > c:/program files/apache >> group/apache/cgi-bin/test.php >> > is not executable; ensure interpreted scripts have >> > "#!" first line >> > >> > I can not run the script w/o the line >> #!c:\php\php.exe >> > at the top of the script. >> > >> > How can I get rid of the path line on the browser >> > output ? >> > >> > Thanks >> > --- mike cullerton <php-lbakednotfried.com> >> wrote: >> >> i'm not sure i understand how you are running >> >> this... >> >> >> >> if it is a file you are running at the command >> line, >> >> try "-q" after the >> >> php.exe statement. >> >> >> >> if this is a web page, comment that line out. >> >> >> >> hope this helps, >> >> mike >> >> >> >> on 8/6/01 1:16 PM, miguel valero at >> mrv169yahoo.com >> >> wrote: >> >> >> >>> When I run the following script under an >> >> stand-alone >> >>> php 4.0.6 and Apache 1.3 (Win95/98), the path to >> >> PHP >> >>> (#!c:\php\php.exe) will show up on the first >> line >> >> of >> >>> the browser output. >> >>> >> >>> #!c:\php\php.exe >> >>> >> >>> <?php >> >>> >> >>> phpinfo(); >> >>> >> >>> ?> >> >>> >> >>> Is there a way to fix this? How can I get rid of >> >> the >> >>> path line, on the top of the page, on the >> browser >> >>> output? Any help will be greatly appreciated. >> >>> >> >>> My apologies if this has been covered before, or >> >> if >> >>> this is in the manual, but I couldn't see it >> >>> >> >>> thanks. >> >>> >> >>> >> >>> > > >__________________________________________________ >Do You Yahoo!? >Make international calls for as low as $.04/minute with Yahoo! Messenger >http://phonecard.yahoo.com/ > >

    attached mail follows:


    On 2001-08-07 at 15:39 Tina wrote:

    >Because you are running this as a SSI you need to put the folling line at >the top of your php script: > >#!/path/to/php > >usually: > >#!/usr/local/bin/php > >Then your script must be executeable by the webserver user just like any >other cgi script.

    Actually I am quite wrong here, since you are running on windows not on unix. Sorry about that. Normally there #! would not show up, perhaps there is something special about windows....

    attached mail follows:


    The solution:

    You have to configure php with --enable-discard-path as in: ./configure --without-apache --enable-discard-path before you compile it.

    This is documented here: http://www.php.net/manual/en/security.php in the section: Case 4: PHP parser outside of web tree

    Now when you do <!--#include virtual='php.cgi'--> the #!/path/to/php will not show at the top of the page.

    (The problem was indeed not local to windows).

    Tina.

    attached mail follows:


    I have a few thousand entries that have been (until now) stored in text-files that I need to get imported into a MySQL database for a new system I'm writing that makes use of them. So.. the long and short of it, I was wondering if someone could help me write a script (or supply me with one.. Perl I'm guessing would be easiest) that can turn each line in the text file from:

    123|blah|foo|bar|etc

    To be formatted like:

    INSERT INTO Table VALUES (123,'blah','foo','bar','etc');

    Thanks in advance.. any help would be appreciated!

    Ryan

    attached mail follows:


    Nevermind.. I discovered that this feature was built into MySQL already! Here's the cmd I'm using:

    LOAD DATA LOCAL INFILE '/home/user/whatever.txt' INTO TABLE Table FIELDS TERMINATED BY '|' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED BY '\n'

    .. for anyone who might have been looking for the same thing.

    Thanks!

    Ryan

    > -----Original Message----- > From: Ryan Christensen [mailto:ryandevnut.com] > Sent: Tuesday, August 07, 2001 3:34 PM > To: php-generallists.php.net > Subject: [PHP] Rewriting a textfile for import into a db.. > > > I have a few thousand entries that have been (until now) > stored in text-files that I need to get imported into a MySQL > database for a new system I'm writing that makes use of them. > So.. the long and short of it, I was wondering if someone > could help me write a script (or supply me with one.. Perl > I'm guessing would be easiest) that can turn each line in the > text file from: > > 123|blah|foo|bar|etc > > To be formatted like: > > INSERT INTO Table VALUES (123,'blah','foo','bar','etc'); > > Thanks in advance.. any help would be appreciated! > > Ryan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: > php-general-helplists.php.net To contact the list > administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    At 07.08.2001 03:51, Craig Westerman wrote: > >I'm wanting to chart the server load average data displayed when you run >The correct way to do that would be to read it straight from the source, >(eg. /proc/loadav for linux with procfs). > >That would be much quicker, and it would also save your server a fork >for each reading (unless you are running php as a cgi ;-) > >nice uptime btw... >-- >Andreas D Landmark / noXtension > > >I'm running FreeBSD. I'll see if if I can find source as you suggest.

    for FreeBSD it might be a bit harder, as it doesn't have a /proc/loadav (by default), you might find a /kern/loadav(g) (if you've got kernfs).

    If you wanna speed up the process (to get a truer number), you'll have to implement your own little solution. Using uptime or w would involve some extra cpucycles, but not too much.

    The solution in C would be pretty simple, I guess it shouldn't be too hard to hack it into your own little php function either (which would make a neat php function, why didn't I think of that earlier?).

    The man pages for uptime and getloadavg should give you all the info needed...

    btw. don't cc you posts to me, I'm still subscribed to the list, and I haven't got any plans of altering that yet...

    -- 
    Andreas D Landmark / noXtension
    Real Time, adj.:
             Here and now, as opposed to fake time, which only occurs there
    and then.
    

    attached mail follows:


    How does PHP compensate for an apparent lack of traditional subroutines (as with Perl, etc.)? It seems like I'm going to have to script separate pages for ea. set of processes in my search (i.e., print FORM, print results for SEARCH, print DETAILS, etc.). Please tell me I'm mistaken!

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    > How does PHP compensate for an apparent lack of > traditional subroutines (as with Perl, etc.)? It seems > like I'm going to have to script separate pages for > ea. set of processes in my search (i.e., print FORM, > print results for SEARCH, > print DETAILS, etc.). Please tell me I'm mistaken!

    Use functions.

    Use switch().

    Use a form that submits to itself.

    I feel like a Trainspotting poster. :)

    Jason

    -- 
    Jason Murray
    jasonmmelbourneit.com.au
    Web Developer, Melbourne IT
    "Work now, freak later!"
    

    attached mail follows:


    Jason pretty well suggested what to use.

    PHP scripts with a lot of logic in them usually have all the function definitions and logic at the top of the script and the display stuff at the end. Again, as I'm always recommending, have a look at Julie Meloni's Thickbook tutorials, particularly the custom error messages example. http://www.thickbook.com

    Have fun - Miles

    At 04:37 PM 8/7/01 -0700, CGI GUY wrote: >How does PHP compensate for an apparent lack of >traditional subroutines (as with Perl, etc.)? It seems >like I'm going to have to script separate pages for >ea. set of processes in my search (i.e., print FORM, >print results for SEARCH, >print DETAILS, etc.). Please tell me I'm mistaken! > >__________________________________________________ >Do You Yahoo!? >Make international calls for as low as $.04/minute with Yahoo! Messenger >http://phonecard.yahoo.com/ > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Scott,

    I am a Windows/ASP guy who just recently started messing around with PHP, so maybe I am completely off path, however I found this post:

    ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------- On my system (Solaris 7/SPARC, Apache 1.3.9), in order to be able to upload files larger than 8 MB, you need to increase the memory_limit in php3.ini to a value larger than 8 MB.

    For example, if MAX_FILE_SIZE is set to 209715199 in your form and upload_max_filesize is set to 209715200 in php3.ini, the largest file that can be uploaded is 7996 kilobytes or about 8 MB. Increasing the memory_limit (I increased mine to 100 MB) allows me to upload files that are up to 100 MB in size. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- --------------------------------------------

    You can find it here: http://www.php.net/manual/cs/features.file-upload.php

    HTH, Damiano

    "Scott Kalbach" <skalbachrastardm.com> wrote in message news:E15TtGs-0002BM-00mail.rastardm.com... > Hi, I am having a problem with http uploads: > > First I am using Mandrake 8.0 with apache 1.3.19 and php 4.0.4. > > I have an upload script which I need to allow large files to be uploaded. I > have set the <input type="hidden" name="MAX_FILE_SIZE" value="104857600"> > Which I believe should be 100mb. > > I have also set the same value in the php.ini file for the > memory_limit and upload_max_filesize directives and also set a longer script > execution time out. > > No matter what valuesI give these directives I still can't upload anything > over 8 megs which was the default before I changed it. I have restarted > apache and rebooted. > > Any help would be appreciated. > > Scott

    attached mail follows:


    At 07.08.2001 13:06, Renze Munnik wrote: >Ahh.... see, that wasn't clear in the question. Yeah... that's true. >Pain in the ass those proxies. They're also realy useful while >testing your (dynamic) site. NOT!!! "Hey, what's this? I thought I'd >realy changed that error. How's this possible?", "Didn't I just >change the background-color? Why is it still the same?" >BECAUSE THE DAMN PROXY DOESN'T WANT TO SHOW YOU THE NEW VERSION. >No... cache, cache, cache... Damn things always come up with pages >that are (way) to old!

    1) proxies should cache dynamic content 2) proxies should not retrieve from cache if the request is a force-refresh 3) proxies should not cache any content which URL includes "?"

    Sounds like you've got yourself a poor proxy there, I've certainly never seen any problem with developing through my proxy, apart from those pesky doubleclick ads seem to disappear.... wonder why...

    -- 
    Andreas D Landmark / noXtension
    Real Time, adj.:
             Here and now, as opposed to fake time, which only occurs there
    and then.
    

    attached mail follows:


    At 07.08.2001 21:12, James Crowley wrote: >Hi, > I would like to perform a traceroute with PHP. However, my ISP >has disabled the traceroute command normally available in >/usr/sbin/traceroute. Is there any other way? > >Regards, > >- James

    The easiest one, byfar, is to grab a binary suitable for the system in question and shove it in your own homedir owned by you and executable by you.

    They might not be too pleased if you're not supposed to run stuff like that, but if you need it, do it...

    -- 
    Andreas D Landmark / noXtension
    Real Time, adj.:
             Here and now, as opposed to fake time, which only occurs there
    and then.
    

    attached mail follows:


    I have a client that would like to duplicate something they've seen on one of their competitor's web sites. It's for an automotive parts supplier and they would like to build a search engine for different make, model, and year applications. Since a picture is worth a thousand words here's a url to see the site they would like to knock off;

    http://www.performanceproducts.com/shopper_profile.asp?mscssid=2K5UHTRR3UV28 MLG468UVDQR3F4T73P3

    They like that you could choose a year and a make, which jumps to a new page with an additional pulldown menu for models associated with the selected year and make. Some models even ask for a submodel. It's pretty cool but it's in ASP and ssssllllllloooooooowwwwwww.

    I was checking out Hotscripts and Devshed but didn't have any luck. Any info would be greatly appreciated.

    Thanks, Tom

    attached mail follows:


    Stop searching, just make it on your own.

    have a model database :

    table models:

    id | make | model | submodel | year

    then do :

    select make from models group by make

    below have the date range (can be static, since where it all began to the current year)

    then when make and year was selected :

    select model from models where make='$make' and year='$year' group by model

    after this was selected do :

    select submodel from models where make='$make' and year='$year' and model='$model'

    then check if found at least one row do the fourth pull down submodel menu, otherwise "give it a go" - load the page related to the current car.

    Use your fantasy to extend all this to suit your needs.

    Sincerely,

    Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maximphpbeginner.com www.phpbeginner.com

    -----Original Message----- From: Tom Beidler [mailto:tomorbittechservices.com] Sent: Wednesday, August 08, 2001 9:10 AM To: php list Subject: [PHP] sample or tutorial for conditional pulldown menus

    I have a client that would like to duplicate something they've seen on one of their competitor's web sites. It's for an automotive parts supplier and they would like to build a search engine for different make, model, and year applications. Since a picture is worth a thousand words here's a url to see the site they would like to knock off;

    http://www.performanceproducts.com/shopper_profile.asp?mscssid=2K5UHTRR3UV28 MLG468UVDQR3F4T73P3

    They like that you could choose a year and a make, which jumps to a new page with an additional pulldown menu for models associated with the selected year and make. Some models even ask for a submodel. It's pretty cool but it's in ASP and ssssllllllloooooooowwwwwww.

    I was checking out Hotscripts and Devshed but didn't have any luck. Any info would be greatly appreciated.

    Thanks, Tom

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

    attached mail follows:


    Yes, and you can do it all on one page; reloading as the choices are made and displaying a record of your previous choices.

    Miles

    At 10:19 AM 8/8/01 +0900, Maxim Maletsky wrote:

    >Stop searching, just make it on your own. > > >have a model database : > >table models: > >id | make | model | submodel | year > > >then do : > > select make from models group by make > >below have the date range (can be static, since where it all began to the >current year) > >then when make and year was selected : > > select model from models where make='$make' and year='$year' group >by model > >after this was selected do : > > select submodel from models where make='$make' and year='$year' and >model='$model' > >then check if found at least one row do the fourth pull down submodel menu, >otherwise "give it a go" - load the page related to the current car. > >Use your fantasy to extend all this to suit your needs. > > > >Sincerely, > > Maxim Maletsky > Founder, Chief Developer > PHPBeginner.com (Where PHP Begins) > maximphpbeginner.com > www.phpbeginner.com > > > > >-----Original Message----- >From: Tom Beidler [mailto:tomorbittechservices.com] >Sent: Wednesday, August 08, 2001 9:10 AM >To: php list >Subject: [PHP] sample or tutorial for conditional pulldown menus > > >I have a client that would like to duplicate something they've seen on one >of their competitor's web sites. It's for an automotive parts supplier and >they would like to build a search engine for different make, model, and year >applications. Since a picture is worth a thousand words here's a url to see >the site they would like to knock off; > >http://www.performanceproducts.com/shopper_profile.asp?mscssid=2K5UHTRR3UV28 >MLG468UVDQR3F4T73P3 > >They like that you could choose a year and a make, which jumps to a new page >with an additional pulldown menu for models associated with the selected >year and make. Some models even ask for a submodel. It's pretty cool but >it's in ASP and ssssllllllloooooooowwwwwww. > >I was checking out Hotscripts and Devshed but didn't have any luck. Any info >would be greatly appreciated. > >Thanks, >Tom > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    "Tom Beidler" <tomorbittechservices.com> wrote: > I have a client that would like to duplicate something they've seen on one > of their competitor's web sites. It's for an automotive parts supplier and > they would like to build a search engine for different make, model, and year > applications. Since a picture is worth a thousand words here's a url to see > the site they would like to knock off; > > http://www.performanceproducts.com/shopper_profile.asp?mscssid=2K5UHTRR3UV28 > MLG468UVDQR3F4T73P3 > > They like that you could choose a year and a make, which jumps to a new page > with an additional pulldown menu for models associated with the selected > year and make. Some models even ask for a submodel. It's pretty cool but > it's in ASP and ssssllllllloooooooowwwwwww.

    Others on the list made good suggestions about the database structure. The URL you referenced reloads the whole page. I've seen other sites achieve the same functionality by loading the elements of the second, third and fourth select boxes into javascript arrays which and regenerate the contents of the dropdown boxes and make them visible based on the element selected in the parent select box. This avoids a page reload, but forces the page to load all of the possible select box elements when it's first loaded - and it obviously requires javascript. It might be a good alternative depending on your needs. I've found that it only makes sense when very few target users will have javascript disabled and the potential contents of the select boxes are less extensive than make and model detail.

    --
    Steve Werby
    President, Befriend Internet Services LLC
    http://www.befriend.com/
    

    attached mail follows:


    Why can't you use something like:

    if ($var){ <select name="name"> <?php $query ="SELECT DISTINCT part FROM table ORDER BY part"; $result = mysql_query($query);

    while($row = mysql_fetch_array($result)){ echo '<option value="'.$row[part].'">'.$row[part].'</option><br>'; } ?> </select> }

    or something of that nature .. will save as steve said a page refresh and will populate the select box given a certain condition.

    Peter >Mailing-List: contact php-general-helplists.php.net; run by ezmlm >list-help: <mailto:php-general-helplists.php.net> >list-unsubscribe: <mailto:php-general-unsubscribelists.php.net> >list-post: <mailto:php-generallists.php.net> >Delivered-To: mailing list php-generallists.php.net >From: "Steve Werby" <steve-listsbefriend.com> >To: "Tom Beidler" <tomorbittechservices.com>, "php list" <php-generallists.php.net> >Date: Tue, 7 Aug 2001 23:07:36 -0400 >MIME-Version: 1.0 >Content-Transfer-Encoding: 7bit >X-Priority: 3 >X-MSMail-Priority: Normal >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 >Subject: Re: [PHP] sample or tutorial for conditional pulldown menus >X-Mozilla-Status: 0000 >X-Mozilla-Status2: 00000000 >X-UIDL: f699c3809f815f98082e45324098a49c > >"Tom Beidler" <tomorbittechservices.com> wrote: >> I have a client that would like to duplicate something they've seen on one >> of their competitor's web sites. It's for an automotive parts supplier and >> they would like to build a search engine for different make, model, and >year >> applications. Since a picture is worth a thousand words here's a url to >see >> the site they would like to knock off; >> >> >http://www.performanceproducts.com/shopper_profile.asp?mscssid=2K5UHTRR3UV28 >> MLG468UVDQR3F4T73P3 >> >> They like that you could choose a year and a make, which jumps to a new >page >> with an additional pulldown menu for models associated with the selected >> year and make. Some models even ask for a submodel. It's pretty cool but >> it's in ASP and ssssllllllloooooooowwwwwww. > >Others on the list made good suggestions about the database structure. The >URL you referenced reloads the whole page. I've seen other sites achieve >the same functionality by loading the elements of the second, third and >fourth select boxes into javascript arrays which and regenerate the contents >of the dropdown boxes and make them visible based on the element selected in >the parent select box. This avoids a page reload, but forces the page to >load all of the possible select box elements when it's first loaded - and it >obviously requires javascript. It might be a good alternative depending on >your needs. I've found that it only makes sense when very few target users >will have javascript disabled and the potential contents of the select boxes >are less extensive than make and model detail. > >-- >Steve Werby >President, Befriend Internet Services LLC >http://www.befriend.com/ > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net >

    ------------------------------------------------------ Peter Houchin Sun Rentals STR Manager Phone: 03 9329 1455 Fax: 03 9329 6755 peterhsunrentals.com.au http://www.sun.com.au/rentals ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ************* We rent the dot in .COM! **************

    attached mail follows:


    thanks everybody for your help, i actually had the solution before posting :))

    my question was not a 'how to' but why do we need to escape single quotes on unix systems and not on windows using the same version of php and mysql?

    At 21:44 07/08/01, you wrote: >Dear PHP-General (bit of strange, uh?), > >I guess what you are looking for is this: >http://www.php.net/manual/en/function.addslashes.php > >Hope it helps. > >Regards, > >-- > Stefan Hinz > Geschftsfhrer / CEO iConnect e-commerce solutions GmbH > # www.js-webShop.com www.iConnect.de > # Gustav-Meyer-Allee 25, 13355 Berlin > # Tel: +49-30-46307-382 Fax: +49-30-46307-388 > >----- Original Message ----- >From: "hassan el forkani" <webmasterwarmafrica.com> >To: <php-generallists.php.net> >Cc: <mysqllists.mysql.com> >Sent: Tuesday, August 07, 2001 4:32 PM >Subject: mysql escape character \' > > > > greetings; > > > > i'm not sure if this is a mysql or php issue so i'm posting to both >lists, > > > > i'm developping a community web site with news, forums......; > > while working on the admin section i noticed this behaviour: > > > > on my hosting platform (linux) > > i need to replace single quotes by \' to properly insert the data into >the > > database and avoid errors > > on my dev machine (win98) there is no need to do so as single quotes >are > > properly inserted and attempting to escape them actually inserts \' >instead > > of '; > > > > so the same code does not have the same output on windows and linux > > > > can someone explain?? > > > > > > --------------------------------------------------------------------- > > Before posting, please check: > > http://www.mysql.com/manual.php (the manual) > > http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <mysql-thread81834lists.mysql.com> > > To unsubscribe, e-mail ><mysql-unsubscribe-hinz=js-webshop.comlists.mysql.com> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > >--------------------------------------------------------------------- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <mysql-thread81880lists.mysql.com> >To unsubscribe, e-mail ><mysql-unsubscribe-webmaster=warmafrica.comlists.mysql.com> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

    attached mail follows:


    On Wed, 8 Aug 2001 09:28, hassan el forkani wrote: > thanks everybody for your help, i actually had the solution before > posting :)) > > > my question was not a 'how to' but why do we need to escape single > quotes on unix systems and not on windows using the same version of php > and mysql?

    You possibly have different configuration settings for magic_quotes-gpc and/or magic_quotes-runtime in your php.ini files on the different machines.

    -- 
    David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
    CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
    

    If you don't care where you are, then you ain't lost.

    attached mail follows:


    Hello php-general,

    Hi, I'm having some troubles because i need to resize an image. I mean, i have a page that lists every notice in the page with a small picture, and if you click over the notice you get a full article with the big photograph. But i want to put in the server only one picture (the big one) and i need php to resize it to a small preview for the list. How can i do it?

    Thanks

    -- 
    Best regards,
     Fernando                          mailto:fanointer-k.com.ar
    

    attached mail follows:


    On Tue, 7 Aug 2001, Fernando Avila wrote:

    > Date: Tue, 7 Aug 2001 22:25:39 +0100 > From: Fernando Avila <fanointer-k.com.ar> > To: php-generallists.php.net > Subject: [PHP] Images > > Hello php-general, > > Hi, I'm having some troubles because i need to resize an image. > I mean, i have a page that lists every notice in the page with a > small picture, and if you click over the notice you get a full > article with the big photograph. > But i want to put in the server only one picture (the big one) and i > need php to resize it to a small preview for the list. > How can i do it? >

    I remember there is imlib extension to php which can some of the image work.

    HZ

    attached mail follows:


    Resizing a whole page of large images on the fly every time is going to put a heavy load on your CPU...

    If you insist on doing that, see the PHP image functions available through the GD library...

    http://www.php.net/manual/en/ref.image.php

    I recommend you use PHP 4.0.6 with GD 2.0.x... With those installed, you can resample images instead of resizing... Resampling produces much better results.

    -----Original Message----- From: Fernando Avila [mailto:fanointer-k.com.ar] Sent: Tuesday, August 07, 2001 5:26 PM To: php-generallists.php.net Subject: [PHP] Images

    Hello php-general,

    Hi, I'm having some troubles because i need to resize an image. I mean, i have a page that lists every notice in the page with a small picture, and if you click over the notice you get a full article with the big photograph. But i want to put in the server only one picture (the big one) and i need php to resize it to a small preview for the list. How can i do it?

    Thanks

    -- 
    Best regards,
     Fernando                          mailto:fanointer-k.com.ar
    

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

    attached mail follows:


    Has the "3rd include" bug (where variable definitions ar "lost" at the 3rd include), been fixed yet?

    --Drew Vogel

    attached mail follows:


    𾴵ѣã dzлΪѰһõISPգôʱhttp://www.now.net.cn\\\\\\\\\\\\\\\\\\\\\\

    ע ע3μ(VDNS) ͬʱռ3μ

    һ ضŻ 8.19.1עͬʱռ6μһͬʱ6վͬʱ15ʼ˺ţ

    ؼ 280Ԫӵȶٵ100Mռ!ԥʲôأϿжɣ

    ׽ 컥ƼASPACCESSݿȫ濪ţֻ100Ԫվӵݿ⡣ ṩCGI PERL PHP JSP һ߼ռ.пռʵʱͨ15!

    "աйŻ쫷ȫ½ǿ󡢸߱׼ĵżĻ߰ȫԡ߷׼ ټϺļ۸ͻṩԼ۱ȵķhttp://idc.now.net.cn ͬʱȳʱҵӪͬʱӴͻԴϸվ ֱϵ: С michellenow.net.cn youkonow.net.cn 绰0756-2125583 22216376 sanrynow.net.cn youkonow.net.cn 0756--2216376 2139739 ӭ Today's Network supportnow.net.cn ӭǵվ http://www.now.net.cn

    һֱרҵʡΪּȳΪ

    ... עVDNSӻʵ֣գңת¼ͣʼ¼ɣָƵȲ,ԼĴμվָκοռ䡣

    attached mail follows:


    I would use

    $HTTP_SERVER_VARS["REMOTE_ADDR"] or $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]

    to return the IP address..

    I have seen, people using if($ip == $REMOTE_ADDR) { // do whatever } but in some configurations of PHP this can be a bad thing..

    index.php?REMOTE_ADDR=10.0.0.1 would override the variable $REMOTE_ADDR (in SOME configurations)

    Its probably alot harder for a malicious user to fake the HTTP_SERVER_VARS array than just a normal variable.

    Just my .02c :)

    Regards

    Chris

    -----Original Message----- From: Renze Munnik [mailto:renzedatalink.nl] Sent: Tuesday, 7 August 2001 10:07 PM To: php-generallists.php.net Subject: Re: [Re: [PHP] user's ip]

    On Tue, Aug 07, 2001 at 02:01:04PM +0200, Ren Moonen wrote: > The problem is that REMOTE_ADDR returns the IP address of the > proxy (if the user > accesses the web-page via a proxy. This will allways return the IP > address of > the user's machine: > > if(getenv(HTTP_X_FORWARDED_FOR)) > { > $ip=getenv(HTTP_X_FORWARDED_FOR); > } > else > { > $ip=getenv(REMOTE_ADDR); > } > $host = gethostbyaddr($ip); >

    Ahh.... see, that wasn't clear in the question. Yeah... that's true. Pain in the ass those proxies. They're also realy useful while testing your (dynamic) site. NOT!!! "Hey, what's this? I thought I'd realy changed that error. How's this possible?", "Didn't I just change the background-color? Why is it still the same?" BECAUSE THE DAMN PROXY DOESN'T WANT TO SHOW YOU THE NEW VERSION. No... cache, cache, cache... Damn things always come up with pages that are (way) to old!

    But anyway... that's not what this was about (just my own frustration). But I just don't use the proxy nomore. Only for testing things like REMOTE_ADDR etc.

    But thank you for specifying the question. And eh, you're right. I just didn't know the question was about this problem.

    --
    

    * R&zE:

    -- -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl --

    attached mail follows:


    On Tue, 7 Aug 2001, Renze Munnik wrote:

    > On Tue, Aug 07, 2001 at 03:55:25PM +0530, Adrian D'Costa wrote: > > Hi, > > > > I am trying to get the ip address of any user browsing a particular page. > > > > I tried $REMOTE_ADDR but that give me only the remote address. What would > > be the best way? > > > > Adrian > > > Okay... Help me out here... > You want to know someones IP-address and using $REMOTE_ADDR you get > the IP-address of the user. What's the problem man?!?!?!

    Well man:), my script show only the website's ipaddress.

    Adrian

    attached mail follows:


    I've tried every combination of single and or double qoutes i can think of. I don't thats it.

    thanx though

    David Robley wrote:

    > On Tue, 7 Aug 2001 01:52, Julian Simpson wrote: > > who's fault is this?: > > I have a table 'cdrequest' it has columns 'albumfill' and > > 'releasedatefill' among others.... when i do the following query with > > myphpadmin > > update cdrequest set albumfill = "hot shots II", releasedatefill = > > 20010708 where requstID = 2; i get: > > You have an error in your SQL syntax near '\"hot shots II\", > > releasedatefill = 20010708 where requstID = 2' at line 1 I can't see > > any reason for the error..... > > part 2: > > when I flip to properties for the cdrequest just to make sure i'm > > spelling the columns corectly and cut and paste the exact same query on > > that page IT WORKS.... > > Why would it work on that page but not the other. both are supposed to > > be places where you can enter a normal sql query.. > > It also doesn't work in my PHP script which is where I really want it > > to work. What am I missing?? > > > > You might try using single quotes rather than double quotes to delimit > your string value in the SQL statement. > > -- > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > Do vegetarians eat animal crackers?

    attached mail follows:


    I'm trying to convince some suits that PHP is widely used on large commercial websites- not just intranets and small sites.

    I've seen some posts on this, but since this mailing list keeps getting bigger- I wanted to put the question out again:

    What large commercial websites use php?

    Some that I have found: nbci.com sprint.ca livebid.amazon.com xoom.com mp3.lycos.com admworld.com communityconnect.com indy500.com viant.com dialpad.com ElectronicArts.com Viacom/MTV

    Thanks all for any input!

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    sourceforge.net planetsourceocde.com f2s.com easydns.com hell, just use a search engine, and do a search for say .php .gov .edu and you will find a great load of sites that have pages done it php... - James "ReDucTor" Mitchell ----- Original Message ----- From: "jose d lopez" <josedlopezyahoo.com> To: <php-generallists.php.net> Sent: Wednesday, August 08, 2001 1:53 PM Subject: [PHP] large commercial websites that use php?

    > I'm trying to convince some suits that PHP is widely > used on large commercial websites- not just intranets > and small sites. > > I've seen some posts on this, but since this mailing > list keeps getting bigger- I wanted to put the > question out again: > > What large commercial websites use php? > > > > Some that I have found: > nbci.com > sprint.ca > livebid.amazon.com > xoom.com > mp3.lycos.com > admworld.com > communityconnect.com > indy500.com > viant.com > dialpad.com > ElectronicArts.com > Viacom/MTV > > Thanks all for any input! > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    SAFEWEB.COM


    attached mail follows:


    >I've seen some posts on this, but since this mailing >list keeps getting bigger- I wanted to put the >question out again: > >What large commercial websites use php?

    about two weeks ago there was a thread called "Example high-profile PHP sites"

    A few links were provided..

    Bye,

    B.

    attached mail follows:


    I'm trying to delete everything in a <UL> that spans multiple lines.

    I just want to get rid of the whole thing and thought it would be relatively straight forward but I'm getting nowhere.

    The list takes the form;

    <UL> <LI CLASS="resultstable">Blah</LI> <LI CLASS="resultstable"><a href="http://somewhere">Blah</a></LI> </UL>

    So far I've got this;

    $response = preg_replace( "/(<ul>)(.*?)(<\/ul>)/im", "", $response );

    which doesn't work :-) HELP!

    TIA, Brad

    -- 
    Brad Hubbard
    Congo Systems
    12 Northgate Drive,
    Thomastown, Victoria, Australia 3074
    Email: bradcongosystems.com
    Ph: +61-3-94645981
    Fax: +61-3-94645982
    Mob: +61-419107559
    

    attached mail follows:


    On Wed, 8 Aug 2001 14:41, Brad Hubbard wrote: > I'm trying to delete everything in a <UL> that spans multiple lines. > > I just want to get rid of the whole thing and thought it would be > relatively straight forward but I'm getting nowhere. > > The list takes the form; > > <UL> > <LI CLASS="resultstable">Blah</LI> > <LI CLASS="resultstable"><a href="http://somewhere">Blah</a></LI> > </UL> > > So far I've got this; > > $response = preg_replace( "/(<ul>)(.*?)(<\/ul>)/im", "", $response ); > > which doesn't work :-) HELP! > > TIA, > Brad

    Dohh!

    Got it.

    $response = preg_replace( "/(<ul>)(.*?)(<\/ul>)/is", "", $response );

    Don't you love people who fix their own problems.

    Cheers, Brad

    attached mail follows:


    Help

    attached mail follows:


    z{Sʗ{Vr&5鞮'zr 躗(Naz+-i ^N6MvnN0U슉1,jwMtNn5Mt׾,ZjWh z{S}ĝx<JyQxqrWrۥyjv^{azޱ:tzZN m4m*.º-i0ܢjb)c](jGٚ觲֥~*^ iܢw+ajl"i^{-Nyަ鬉&)^jƦۥy(vv

    attached mail follows:


    Hi all,

    I'd like to split a text block at 25 words, as a teaser for the full article. Now I know how to split at a certain character, but i don't want a half word or anything, so I want (i guess) to hunt for the 25th occurence of " " (a space), and split $text into two new variables, $text_a and $text_b.

    Then I'll prolly want append something like "... click here to read more" on the end of $text_a.

    Seems easy enough, but I can't see anything in the manual about splitting on a numbered occurence of a string (but I could be looking in the wrong spot :)

    Running PHP4 BTW

    Thanks heaps in advance Justin French

    attached mail follows:


    $teaser = explode(" ", $article, 26)); array_pop($teaser); $teaser = implode(" ", $teaser);

    /* Chris Lambert, CTO - chriswhitecrown.net WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */

    ----- Original Message ----- From: Justin French <justinindent.com.au> To: php <php-generallists.php.net> Sent: Wednesday, August 08, 2001 12:57 AM Subject: [PHP] splitting text after 25 words

    | Hi all, | | I'd like to split a text block at 25 words, as a teaser for the full | article. Now I know how to split at a certain character, but i don't | want a half word or anything, so I want (i guess) to hunt for the 25th | occurence of " " (a space), and split $text into two new variables, | $text_a and $text_b. | | Then I'll prolly want append something like "... click here to read | more" on the end of $text_a. | | Seems easy enough, but I can't see anything in the manual about | splitting on a numbered occurence of a string (but I could be looking | in the wrong spot :) | | Running PHP4 BTW | | | | Thanks heaps in advance | Justin French | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: php-general-unsubscribelists.php.net | For additional commands, e-mail: php-general-helplists.php.net | To contact the list administrators, e-mail: php-list-adminlists.php.net | | |

    attached mail follows:


    Hi,

    Best way i guess would be traverse the whole string and check for space. Have a counter var which keeps count of the space. At the 25th occurence do something like this -

    $text_a = substr($text, 1, $i);

    i assume that $i is the increment var in the loop.

    $text_b = substr($text, $i+1);

    This should give u the strings in 2 vars.

    Now u can add anything with $text_a."...Click here ".$text_b

    Hope i was helpful, Karthik.

    ----- Original Message ----- From: "Justin French" <justinindent.com.au> To: "php" <php-generallists.php.net> Sent: Wednesday, August 08, 2001 10:27 AM Subject: [PHP] splitting text after 25 words

    > Hi all, > > I'd like to split a text block at 25 words, as a teaser for the full > article. Now I know how to split at a certain character, but i don't > want a half word or anything, so I want (i guess) to hunt for the 25th > occurence of " " (a space), and split $text into two new variables, > $text_a and $text_b. > > Then I'll prolly want append something like "... click here to read > more" on the end of $text_a. > > Seems easy enough, but I can't see anything in the manual about > splitting on a numbered occurence of a string (but I could be looking > in the wrong spot :) > > Running PHP4 BTW > > > > Thanks heaps in advance > Justin French > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    I'm using php/mysql to create some wml pages which work fine BUT as always there is a problem.

    It seems that you are only allowed to have wml pages of 1400 bytes, anyone got any clever ideas how I can judge/control how big my generated pages are ? Info comes out from mysql - sometimes just one address - no problems sometimes 20 addresses and then dificulties ??

    Anyone help ?

    attached mail follows:


    I know this would probably be better placed on the mySQL mailing list, but alas I do not subscribe to it and am hesitant to do so to ask one question. Enough PHP users use mySQL that perhaps the answer could be found here.

    In searching through a text field in a mySQL database, I would like to search for a keyword and return that record as a resultset, obvious no? However, I do not want the search to return true if the search word or phrase falls within an HTML tag contained within the text. The field in question will contain some basic HTML tags but I don't want them searched, just the freeform text.

    what would be the best approach? I'm not all that well versed in regular expressions, well let's face it, I probably couldn't put a regular expression together if my life depended on it, and any assistance would be greatly appreciated.

    Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, PHP/mySQL & ColdFusion/MSSQL http://www.wizaerd.com ================================= The Canvas Expert Online The #1 Resource For Canvas Information http://www.TheCanvasExpert.com =================================

    attached mail follows:


    I just have just found this article, that describes this technique:

    http://apachetoday.com/mailprint.php3?action=pv<sn=2000-06-14-002-01-PS#SetEnvIf

    Thank you all for your help. :-))

    S

    >From: Maxwell Hung <maxwell_hungyahoo.com> >To: stefenlarshotmail.com >Subject: Re: [PHP] Insecurity with PHP authorization >Date: Tue, 7 Aug 2001 11:22:33 +0100 (BST) > >Hi Stefan > >You can do this > >#Add this httpd.conf N.B apache > 1.3.12 >SetEnvIfNoCase Referer "^http://www.mysite/" >local_ref=1 > ># place the following into a .htaccess file in the dir >you wish to protect the files >Options -Indexes > ># change the extensions you want to protect ><FilesMatch ".(doc|zip|xls|flp)"> > Order Allow,Deny > Allow from env=local_ref ></FilesMatch> > >This will stop and direct requests to files as the env >var will not be set. > >I've used it on my setup and it's fine. As noted above >this will only work with apache > 1.3.12 > >If you get it working could you forward it to the php >list I can't get there through this a/c > >HTH > >M > --- Stefen Lars <stefenlarshotmail.com> wrote: > >Hello all > > > > I have just implemented a mySQL authorization: each > > html and php page checks > > to see whether a user is logged in by checking a > > cookie in the user browser. > > The user can log out and edit her profile (including > > password). If a page is > > called without the user being logged in, he is > > presented with a log in form. > > This works very well. There is an SSL connection to > > the server. Only a hash > > value of the password is stored in the database. > > > > However, if I directly request a graphic (or a ZIP > > file etc) from the site, > > by entering: > > https://www.myserver.com/photo.jpg for example, I > > can download that file > > without being logged in (naturally). > > > > In the particular *intranet* project that I am > > working on, this is > > particularly undesirable, as only personnel at the > > companys four locations > > may have access to the intranet. And there certainly > > will be a lot of > > confidential ZIP and graphic files placed on the > > server. > > > > I do realize that if I were to place a .htaccess > > file in the root of the > > intranet server, I could prevent the above from > > happening, but then I loose > > the advantage of having the users profile in a > > database, where a user can > > easily change her password. Allowing a web user to > > edit a password in the > > .htaccess file poses more problems than it solves, > > especially as it > > certainly could occur that more than one persons > > wants to edit his password > > simultaneously. > > > > Could anyone suggest a method to allow a user to > > easily edit his password, > > but at the same time, not allow direct access to > > specific non-PHP files on > > the intranet server? > > > > Perhaps one method would be to restrict access to > > the companys four gateway > > servers (IP addresses). However, I feel this is not > > to secure, and these IPs > > could be spoofed (and this does not really solve the > > problem). > > > > Any enlightenment on this subject would be well > > received. > > > > TIA > > > > S. > > > > > > >_________________________________________________________________ > > Get your FREE download of MSN Explorer at > > http://explorer.msn.com/intl.asp > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > > php-general-unsubscribelists.php.net > > For additional commands, e-mail: > > php-general-helplists.php.net > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > > > > >____________________________________________________________ >Do You Yahoo!? >Get your free yahoo.co.uk address at http://mail.yahoo.co.uk >or your free yahoo.ie address at http://mail.yahoo.ie

    _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

    attached mail follows:


    On Tue, Aug 07, 2001 at 11:58:51AM -0600, mike cullerton wrote: > > i don't use echo either. i use printf. i was just trying to pass along some > things i learned reading the manual that were related to the topic.

    Cool... finaly. You won't believe how many people use echo(). And I realy don't know why. But, hey, if we take a look at many of the (pieces of) scripts you see passing by on this list people don't seem to care about error-checking. Many of 'm don't even look at the logfiles or don't have anything logged into them. And ofcourse I have to admit what's so interesting about error-checking printf? Well... I say, you always have to check anything that returns a value. You can better check to much than not enough. You agree?

    > > > But you'll have to admit, using braces makes things a lot easier. > > i already did.

    Hmmmm... yeah... Oops... Sorry! Think my error-checking failed :)

    > > And because what this was all about was JavaScript (and not PHP),

    I must admit... it's a bit strange on a PHP-list but hey, the real problem he had was in the JS, so...

    > cool, i came in late in the thread. i _do_ use braces. i like braces. braces > are my friends.

    Most excellent, dude! :)

    > > > And ehhhh, who said anything about returning multiple values? > > again, just something learned from the manual.

    Ah... okay... Can be useful... But isn't that more of... you know... like RTFM?!?! But, hey; it's true alright. Do it all the time. Well... pretty often anyway.

    > i was only trying to pass on info about differences between function calls, > statements and constructs, and hopefully helping someone out in the process.

    Okay... "problem" solved.

    > isn't that what we do here?

    Sure is!!!

    CYa'round

    -- 
    

    * R&zE:

    -- -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl --

    attached mail follows:


    On Tue, Aug 07, 2001 at 09:26:48AM -0700, Mark Maggelet wrote: > > This isn't right, empty() won't give an error if $input isn't set.

    That's true. Empty() doesn't return an error when $input isn't defined. I didn't RT(F)M on this one. I always use "(!isset($something) && empty($something))" to check whether or not $something is empty/not set. It's realy more of a feeling. Empty() actualy only checks for a value in $something. It's basicaly the same as "(!$something)" except that empty() doesn't return a warning if $something isn't set (...look, this time I did RTM :). So... basicaly, with empty() you don't check if $something is set. You just don't get to know it. So that's why I use isset() with it. I know the result is the same, but hey... I'm the same guy that checks the returnvalue of printf() and stuff (another thread in this list). So... well... Let's just say I have a 'checking-fetish' of some kind :p

    -- 
    

    * R&zE:

    -- -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl --

    attached mail follows:


    On Wed, Aug 08, 2001 at 10:06:51AM +0200, Renze Munnik wrote: > (...) > checks the returnvalue of printf() and stuff (another thread in this > list).

    oops... it's the same thread...

    I NEED COFEE!!!!!!!!!!!

    -- 
    

    * R&zE:

    -- -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl --

    attached mail follows:


    Hi!

    I just came across this weird thing. Bug? You tell me!

    print (int)((8.85-8)*100);

    I would think the line above would print "85". But for some reason, it prints "84"?? Can anyone tell me why that is?

    --
    Intent A/S
    Tais M. Hansen
    Web Developer