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: Tue Aug 07 2001 - 15:17:51 CDT

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

    php-general Digest 7 Aug 2001 20:17:51 -0000 Issue 802

    Topics (messages 61561 through 61695):

    Re: Insecurity with PHP authorization
            61561 by: Michael Mehlmann
            61568 by: Remo Pini
            61610 by: Mark Roedel
            61661 by: Stefen Lars

    system()
            61562 by: Jon Yaggie
            61563 by: David Robley

    Re: Splitting Text
            61564 by: Jordan Elver

    Re: checking for null form fields fails
            61565 by: Renze Munnik
            61638 by: mike cullerton
            61644 by: Renze Munnik
            61662 by: Mark Maggelet
            61672 by: mike cullerton

    Re: XML Next 25 Results
            61566 by: Girish Nath

    Returning arrays from a function?
            61567 by: Ronny Salomonsen

    Currency help
            61569 by: Mitja Simčič
            61570 by: Renze Munnik

    Solaris/Apache/PHP load problem
            61571 by: Peter Ostry

    PHP inside code problem
            61572 by: Nick K.
            61574 by: Renze Munnik
            61581 by: Wagner Tomy

    Re: [PHP-DEV] how do i check if a field exists
            61573 by: Sebastian Bergmann

    Re: Any good gif/jpg processing tool for PHP??
            61575 by: Girish Nath

    how can i tell if a field exists
            61576 by: zippy
            61602 by: elias

    Problem with inserts to mysql
            61577 by: Jon Farmer

    text imports
            61578 by: Karl Phillipson
            61580 by: Wagner Tomy
            61582 by: Karl Phillipson
            61583 by: Wagner Tomy
            61584 by: Karl Phillipson
            61585 by: Wagner Tomy

    user's ip
            61579 by: Adrian D'Costa
            61587 by: Renze Munnik
            61588 by: Karl Phillipson
            61595 by: Daniel Rezny

    enabling Sessions
            61586 by: Efrem Radaelli

    Re: user's ip]
            61589 by: René Moonen
            61591 by: Renze Munnik

    Split array
            61590 by: Veniamin Goldin
            61593 by: Tim
            61594 by: Karl Phillipson

    Header error!
            61592 by: karthik

    function into string
            61596 by: Veniamin Goldin
            61598 by: Tom Carter
            61599 by: Renze Munnik

    Re: I HAVE A PROBLEM HERE...
            61597 by: Tom Carter

    Threads
            61600 by: Jordan Elver

    calendar, msg board, chat in PHP
            61601 by: Eric Wood
            61604 by: Chris Lambert

    Best way to take a copy of a Database from Server to server
            61603 by: elias
            61605 by: Jon Farmer
            61606 by: Karl Phillipson
            61612 by: Daniel Rezny
            61613 by: elias
            61616 by: Andrew Brampton
            61630 by: Hidulf

    Re: Unable to create COM objects on Win2k
            61607 by: Mikael hultgren

    Re: Session problem
            61608 by: Chad Day
            61627 by: hassan el forkani
            61628 by: hassan el forkani
            61632 by: Chad Day
            61648 by: hassan el forkani

    Re: SSL encryption type in PHP?
            61609 by: Sean C. McCarthy

    IP Address
            61611 by: Joseph Bannon
            61614 by: Renze Munnik
            61615 by: Joseph Bannon
            61617 by: Renze Munnik
            61619 by: Renze Munnik
            61623 by: B. van Ouwerkerk
            61645 by: Kurth Bemis

    Am I being Hacked ???
            61618 by: Mark Lo
            61625 by: Sean C. McCarthy
            61629 by: Chris Lee

    Include
            61620 by: Veniamin Goldin
            61621 by: Johnson, Kirk

    Re: Easiest Automated mailing list concept?
            61622 by: Marcus James Christian

    Re: running stand-alone php
            61624 by: miguel valero

    Re: xsl:include doesn't work from php, it works with sabcmd
            61626 by: Peter Clarke
            61646 by: Marius Andreiana

    if(!$submit)
            61631 by: Tarrant Costelloe
            61633 by: Wagner Tomy
            61634 by: Chris Cocuzzo
            61635 by: Renze Munnik
            61636 by: Colin Viebrock
            61642 by: mike cullerton

    Upper or Lower Case
            61637 by: Tarrant Costelloe
            61639 by: Bjorn Van Simaeys
            61641 by: Tarrant Costelloe
            61650 by: James Holloway
            61652 by: Jon Farmer
            61665 by: Don Read
            61670 by: Philip Olson
            61674 by: Bjorn Van Simaeys

    Re: array + checkbox
            61640 by: Ben Bleything

    mysql escape character \'
            61643 by: hassan el forkani
            61647 by: Anton Stroganov
            61664 by: Hugh Danaher
            61687 by: Stefan Hinz

    ICMP Ping
            61649 by: James Crowley
            61651 by: Tyler Longren
            61653 by: hassan el forkani
            61655 by: Sean C. McCarthy

    apache processes & memory use
            61654 by: WendyIR.aol.com

    converting numeric to a string
            61656 by: Don
            61657 by: Alexander Wagner
            61658 by: rm
            61660 by: Kees Hoekzema
            61667 by: Philip Olson

    Database Stored Procedure Result
            61659 by: James Stevens

    something worong
            61663 by: Eduardo Kokubo

    Re: php_gd.dll for windows, please help me....
            61666 by: SED

    Re: something wrong
            61668 by: Eduardo Kokubo
            61669 by: Rich Cavanaugh
            61675 by: Eduardo Kokubo
            61677 by: Eduardo Kokubo
            61678 by: Eduardo Kokubo

    Connecting to WDDX server in PHP
            61671 by: Vikram Vaswani

    Passing HTTP_POST from one script to another
            61673 by: Vikram Vaswani

    PHP INSTALL
            61676 by: Christian Cresante
            61681 by: Christian Cresante
            61683 by: Tyler Longren

    WDDX recordset data
            61679 by: Vikram Vaswani
            61680 by: Thies C. Arntzen
            61682 by: Bjorn Van Simaeys

    Help me please.(Running stand-alone php)
            61684 by: miguel valero
            61690 by: Bjorn Van Simaeys

    MySQL connection
            61685 by: BRACK
            61686 by: Tyler Longren
            61688 by: Ryan Christensen
            61689 by: Bjorn Van Simaeys

    Traceroute without traceroute command!
            61691 by: James Crowley

    close browser
            61692 by: Jeremy Morano
            61693 by: Tyler Longren
            61694 by: Ryan Christensen

    Sending information to a script on another host....
            61695 by: Brandon Orther

    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:


    If you don't have a very high load, then you could move all not-php-files
    out of htdocs-root and use a pseudo-root directory htdocs/../rawfiles as root
    for redirect.php.
    For example image.jpg is placed in htdocs/../rawfiles/images then access it
    with /redirect.php?/images/image.jpg !
    redirect.php only checks for authorization and then does a fpassthru!
    that won't cost much!

    hth
    Michael

    > 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 company’s 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 company’s 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
    >

    -- 
    Aufgepasst - jetzt viele 1&1 New WebHosting Pakete ohne
    Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung!
    http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a
    

    attached mail follows:


    Or you could tell your webserver to deny everything except access to redirect.php, this saves you from moving everything to some obscure place...

    > -----Original Message----- > From: Michael Mehlmann [mailto:mailing_listgmx.at] > Sent: Tuesday, August 07, 2001 10:18 AM > To: Stefen Lars > Cc: php-generallists.php.net > Subject: Re: [PHP] Insecurity with PHP authorization > > > If you don't have a very high load, then you could move all not-php-files > out of htdocs-root and use a pseudo-root directory > htdocs/../rawfiles as root > for redirect.php. > For example image.jpg is placed in htdocs/../rawfiles/images then > access it > with /redirect.php?/images/image.jpg ! > redirect.php only checks for authorization and then does a fpassthru! > that won't cost much! > > hth > Michael > > > 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 company’s 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 > company’s 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 > > > > -- > Aufgepasst - jetzt viele 1&1 New WebHosting Pakete ohne > Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! > http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a > > > -- > 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:


    > -----Original Message----- > From: Stefen Lars [mailto:stefenlarshotmail.com] > Sent: Tuesday, August 07, 2001 3:03 AM > To: php-generallists.php.net > Subject: [PHP] Insecurity with PHP authorization > > > 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.

    If you control the server, have you considered something along the lines of mod_auth_mysql (which would allow you to place a .htaccess file that authenticates using the information stored in your mysql database)? I've used it on a few projects here with good results.

    You can pick up a copy from the "contrib" downloads at mysql.com.

    ---
    Mark Roedel (roedelmletu.edu) | "There cannot be a crisis next week.
    Systems Programmer / WebMaster |  My schedule is already full."
         LeTourneau University     |                   -- Henry Kissinger 
    

    attached mail follows:


    Hello Max

    Thank you for this interesting idea!

    I have implemented it on my test server and it seems to do what I want. However, at the moment, I do not fully understand what is happening. However, I will study the Apache docs right now.

    Thanks!

    Jonathan

    >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 > > company’s 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 company’s 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:


    how can i find out what kind of error i am recieving when i call a command thru system()?

    attached mail follows:


    On Tue, 7 Aug 2001 17:55, Jon Yaggie wrote: > how can i find out what kind of error i am recieving when i call a > command thru system()?

    Well, reading the docs it looks like system only returns an error code - if you want to get all that is returned from the command you might want to try exec or passthru. Be mindful of the security of what you pass to these functions; and also check the status of safe mode as that has some effect on such calls.

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

    Which way to Castle Anthrax?

    attached mail follows:


    Thanks for that. I ended up using your method as using the LEFT function in a SELECT only grabs characters.

    Cheers,

    Jord

    On Monday 06 August 2001 17:37, you wrote: > You can do this several ways... Either use explode(): > http://www.php.net/manual/en/function.explode.php > > ...to split the retrieved data by a space " " as the delimeter, then use > a for() loop to print X number of words... E.g.: > > $array = explode(" ", $db_string); > > for($i = 0; $i < 25; $i++) > echo $array[$i]; > > (That will print the first 25 words...) > > > Or, another way to do it is to use strtok() to tokenize the string... > http://www.php.net/manual/en/function.strtok.php > > The manual has a good example of tokenizing a string into individual > words... > > > -----Original Message----- > From: Jordan Elver [mailto:jord.elvervirgin.net] > Sent: Monday, August 06, 2001 5:20 PM > To: PHP General Mailing List > Subject: [PHP] Splitting Text > > > Hi, > Can anyone give some pointers for my problem. > I want to pull articles out of a db and then show the first x number of > words > with a read more link to the rest of the article. > > Could someone point me in the right direction. I've seen a code snippet > for > this, but now I can't find it :-( > > TIA, > > Jord

    -- 
    Jordan Elver
    Web Developer
    The InternetOne UK Ltd
    

    attached mail follows:


    On Mon, Aug 06, 2001 at 12:31:38PM -0700, Mark Maggelet wrote: > i can't tell if it's just a email formatting thing, but if there's a > line break in the onsubmit string it might mess things up.

    It no _might_ mess things up... It sure does! Good one. But... another thing. You just might want to consider using braces. They're not invented for nothing. When you call functions (like return) you should use braces. Especialy when you start writing more complex scripts, the not using any braces, is just the thing that may because a lot of trouble. Weird thing btw, that the JavaScript console doesn't show any errors when there's a newline between return and verifyInput. I mean... it's a good example of a syntax error. But that stupid console doesn't show any damn thing. Btw... not that it matter anyway, but: onsubmit="return <\n> verifyInput();" doesn't do the right thing (as we've all seen), but: onsubmit="return( <\n> verifyInput());" does. (...)

    > well, if it makes it this far, $input will be set, but the value will > be "". try empty() instead of !isset()

    Well, Mark... almost! You shouldn't use empty() _instead_ of isset(). You should use 'm together:

    if (isset ($input) && !empty($input)) { print ("Okay... form is completed!"); } else { print ("No way... can't do!"); }

    Because, when you check using empty($input) there's still the possibility that $input isn't defined at all. And then some horrible error still arises in your logfile. Note btw that you shouldn't change the order of isset() and empty() in the above example.

    -- 
    

    * 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 8/7/01 2:43 AM, Renze Munnik at renzedatalink.nl wrote:

    > On Mon, Aug 06, 2001 at 12:31:38PM -0700, Mark Maggelet wrote: >> i can't tell if it's just a email formatting thing, but if there's a >> line break in the onsubmit string it might mess things up. > > It no _might_ mess things up... It sure does! Good one. > But... another thing. You just might want to consider using braces. > They're not invented for nothing. When you call functions (like > return) you should use braces. Especialy when you start writing more > complex scripts, the not using any braces, is just the thing that > may because a lot of trouble.

    a couple things.

    although i agree with the general notion of using braces, return is not a function (the manual calls it a statement), and atleast from what i can find in the manual it doesn't take braces.

    http://www.php.net/manual/en/functions.returning-values.php

    also from that page - "You can't return multiple values from a function, but similar results can be obtained by returning a list."

    i'm not really sure what the difference is between function, statement and language construct (which is what echo is). syntactically, i know that functions require parentheses.

    with echo, the manual says you _cannot_ use parantheses if you are echoing more than one thing.

    http://www.php.net/manual/en/function.echo.php

    -- mike cullerton

    attached mail follows:


    On Tue, Aug 07, 2001 at 09:23:02AM -0600, mike cullerton wrote: > on 8/7/01 2:43 AM, Renze Munnik at renzedatalink.nl wrote: > > > On Mon, Aug 06, 2001 at 12:31:38PM -0700, Mark Maggelet wrote: > >> i can't tell if it's just a email formatting thing, but if there's a > >> line break in the onsubmit string it might mess things up. > > > > It no _might_ mess things up... It sure does! Good one. > > But... another thing. You just might want to consider using braces. > > They're not invented for nothing. When you call functions (like > > return) you should use braces. Especialy when you start writing more > > complex scripts, the not using any braces, is just the thing that > > may because a lot of trouble. > > a couple things. > > although i agree with the general notion of using braces, return is not a > function (the manual calls it a statement), and atleast from what i can find > in the manual it doesn't take braces. > > http://www.php.net/manual/en/functions.returning-values.php > > also from that page - "You can't return multiple values from a function, but > similar results can be obtained by returning a list." > > i'm not really sure what the difference is between function, statement and > language construct (which is what echo is). syntactically, i know that > functions require parentheses. > > with echo, the manual says you _cannot_ use parantheses if you are echoing > more than one thing. > > http://www.php.net/manual/en/function.echo.php > > -- mike cullerton > > > -- > 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

    You're right, return is a statement. I never said, though, to use braces with echo. Actualy I didn't say anything about echo. I never use echo, for some weird reason I just don't like it. I prefer print. So... I don't realy care how echo should be used. But you'll have to admit, using braces makes things a lot easier. And because what this was all about was JavaScript (and not PHP), using braces is a smart thing, because in JavaScript you can make realy ugly constructions in which things _can_ go wrong (no syntax error, but _wrong_) if you don't use braces. In JavaScript it's not required to end each line with a semicolon like in PHP. This can cause weird flows if you also don't use braces. And ehhhh, who said anything about returning multiple values?

    To be honest... I don't understand what you try to achieve with your post.... Please let me know...

    -- 
    

    * 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:


    >Well, Mark... almost! You shouldn't use empty() _instead_ of >isset(). You should use 'm together: > > if (isset ($input) && !empty($input)) { > print ("Okay... form is completed!"); > } else { > print ("No way... can't do!"); > } > >Because, when you check using empty($input) there's still the >possibility that $input isn't defined at all. And then some horrible >error still arises in your logfile.

    This isn't right, empty() won't give an error if $input isn't set.

    attached mail follows:


    on 8/7/01 9:40 AM, Renze Munnik at renzedatalink.nl wrote:

    >> a couple things. >> >> although i agree with the general notion of using braces, return is not a >> function (the manual calls it a statement), and atleast from what i can find >> in the manual it doesn't take braces. >> >> http://www.php.net/manual/en/functions.returning-values.php >> >> also from that page - "You can't return multiple values from a function, but >> similar results can be obtained by returning a list." >> >> i'm not really sure what the difference is between function, statement and >> language construct (which is what echo is). syntactically, i know that >> functions require parentheses. >> >> with echo, the manual says you _cannot_ use parantheses if you are echoing >> more than one thing. >> >> http://www.php.net/manual/en/function.echo.php >> >> -- mike cullerton >> > > You're right, return is a statement. > I never said, though, to use braces with echo. Actualy I didn't say > anything about echo. I never use echo, for some weird reason I just > don't like it. I prefer print. So... I don't realy care how echo > should be used.

    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.

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

    i already did.

    > And because what this was all about was JavaScript (and not PHP), > using braces is a smart thing, because in JavaScript you can make > realy ugly constructions in which things _can_ go wrong (no syntax > error, but _wrong_) if you don't use braces. In JavaScript it's not > required to end each line with a semicolon like in PHP. This can > cause weird flows if you also don't use braces.

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

    > And ehhhh, who said anything about returning multiple values?

    again, just something learned from the manual.

    > > To be honest... I don't understand what you try to achieve with your > post.... Please let me know...

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

    isn't that what we do here?

    :) mike

    -- mike cullerton

    attached mail follows:


    Hi

    I'd thought of specifying the limit in the request but unfortunately that option isn't available to me :(

    I've just downloaded an xpath class from phpxml.org, looks really kewl, and i hope it can allow me to do this.

    Thanks

    Girish

    ----- Original Message ----- From: "Gerry Kirk" <gerrymccb.org> To: "Girish Nath" <girishnbtinternet.com> Sent: Tuesday, August 07, 2001 8:19 AM Subject: Re: [PHP] XML Next 25 Results

    I think the best approach would be if you could specify in your query the number of rows you want and the starting row number. In MySQL, you can do that with LIMIT(row_num, #_rows).

    Otherwise, it may be possible to use an XPath function that matches against the current index of a particular XML element. Are you using XSLT at all?

    Gerry

    At 07:37 AM 07/08/01 +0100, you wrote: >Hi Gerry > >The XML isn't coming directly from a database, it's coming from an IIS >server that i query (i generate XML file containing the parameters of the >query, POST it to the IIS machine, it runs some .ASP to query an inhouse >database, then POST the XML results back to me) > >I then parse the XML to generate a HTML table, however sometimes i may end >up with a massive table, and i'm trying to find a way to break that table >into pages of 25 results. However, i'm completely stumped how to do this :( > >Regards > > >Girish > >-- > > function fetchXML($parameters, $request) { > > $appserverIP = "123.456.789.10"; > $appserverPort = "8080"; > $appserverPacketSize = "4096"; > $phpServer = "aeris"; > > $header .= "POST /directory/" . $request . " HTTP/1.1\r\n"; > $header .= "Host: " . $phpServer . "\r\n"; > $header .= "User-Agent: PHP\r\n"; > $header .= "Content-type: application/x-www-form-urlencoded\r\n"; > $header .= "Content-length: " . strlen($parameters)."\r\n"; > $header .= "Connection: close\r\n\r\n"; > > $fp = fsockopen($appserverIP,$appserverPort); > > if ($fp) { > fputs($fp, $header . $parameters); > > while (!feof($fp)) { > $response .= fgets($fp,$appserverPacketSize); > } > > fclose($fp); > } > > return cleanXML($response); // custom function to strip HTTP >headers from fetched data. > > } > > > > > >----- Original Message ----- >From: "Gerry Kirk" <gerrymccb.org> >To: "Girish Nath" <girishnbtinternet.com> >Sent: Tuesday, August 07, 2001 5:22 AM >Subject: Re: [PHP] XML Next 25 Results > > >Hello Girish, > >I can't help you with your problem, as I am just getting acquainted with >XML myself. I've been doing some research to assess the feasibility of >using PHP and XML for a web-based database-driven application. > >If you don't mind, could you share with me how you are using XML? Are you >retrieving / querying / storing data from a database? > >Thanks, >Gerry Kirk > > > >-- >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:


    What could be wrong when I don't get any results from an array made from whitin a function?

    function test_print($item, y){ if (ereg("[0-9]", $item)) { $numa[$i] = $item; echo $GLOBALS["i"] . " - $numa[$i]\n"; $GLOBALS["i"]++; }

    Printing from within this function works fine, but when I want to do the same output outside the function I get nothing. How can I return the array outside the function?

    This is how I call the script:

    while (list ($line_num, $line) = each ($fcontents)) { if ($line_num == 7) { $min = explode (" ", $line); array_walk ($min, 'test_print'); reset ($min); } if ($line_num == 8) { $max = explode (" ", $line); array_walk($max, 'test_print'); reset ($max); } if ($line_num > 8) break; set_time_limit(160); }

    attached mail follows:


    Hello,

    My problem is how to find simple way to change REAL number from MySQL to currency type with PHP.

    Exmaple: MySQL: 12323434,34 I need to parse it as: 12.323.434,34

    tnx, mitja.

    attached mail follows:


    On Tue, Aug 07, 2001 at 11:30:18AM +0200, Mitja Simčič wrote: > Hello, > > My problem is how to find simple way to change REAL number > from MySQL to currency type with PHP. > > Exmaple: > MySQL: 12323434,34 > I need to parse it as: 12.323.434,34 > > tnx, > mitja.

    One simple function number_format:

    http://www.php.net/manual/en/function.number-format.php

    -- 
    

    * 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:


    Hopefully the last hill to climb in our first Solaris installation - Apache cannot load a module:

    bash-2.03# /usr/apache/bin/apachectl start Syntax error on line 244 of /etc/apache/httpd.conf: Cannot load /web/libexec/libphp4.so into server: ld.so.1: /usr/apache/bin/httpd: fatal: /web/libexec/libphp4.so: open failed: No such file or directory /usr/apache/bin/apachectl start: httpd could not be started

    Files are there where the error messages says, but obviousely they cannot be loaded. User 'root', group 'bin', permissions read/write/execute for all.

    Is this a known problem with a known fix?

    TIA, Peter

    attached mail follows:


    hi there

    --------------------------------------------- if ($act = "add") //Add the message... { if (!empty($user_name) && !empty($user_ip) && !empty($user_message) && !empty($user_sex)) { if (!($html_support)) { $user_message = htmlspecialchars("$user_message"); } $user_message = ereg_replace("\n","<br>","$user_message"); $userinfo = "$user_nameˇ±ˇ±$user_sexˇ±ˇ±$user_ipˇ±ˇ±$user_messageˇ±ˇ±$user_date"."\n"; $fp = fopen("$filename",'a'); flock($fp,2); fwrite($fp, $userinfo); flock($fp,1); fclose($fp); header("Location: index.php"); setcookie("cuser",$user_name,time()+(3600*24*365),"/","$SERVER_NAME"); exit; } } ---------------------------------------------

    The code above is what I use for processing messages.... Everytime when I'm trying to use the function, htmlspecialchars(), it'll replace " with &quot; . After that, I save the data and print out again, the result will add "\" after the data... ( I don't want the extra "\") There is an example. When I try to type in ^^" to be my new message, it suppose to show the same thing. However, in the saved data, it shows ˇ±ˇ±^^\&quot; (ˇ±ˇ± is what I use to different from different filez) I don't want the extra "\".... however, I tried the way in below:

    I use

    $user_message = eregi_replace("<","&lt;","$user_message"); $user_message = eregi_replace(">","&gt;","$user_message");

    instead of the original one which is

    $user_message = htmlspecialchars("$user_message");

    however, when I check the saved file, it still have and extra \ before the characters " . god damn it.... I run this code in windows98SR2, maybe it's micro$oft's problem, is it? plz help me.....thx dudes

    ....nick

    attached mail follows:


    Try using stripslashes() before htmlspecialchars().

    -- 
    

    * 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:


    try this:

    if (!($html_support)) { $user_message = htmlspecialchars(stripslashes($user_message)); }

    Wagner Tomy Web Developer Editus S.A. ----- Original Message ----- From: "Nick K." <geteasyseed.net.tw> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 12:11 PM Subject: [PHP] PHP inside code problem

    hi there

    --------------------------------------------- if ($act = "add") //Add the message... { if (!empty($user_name) && !empty($user_ip) && !empty($user_message) && !empty($user_sex)) { if (!($html_support)) { $user_message = htmlspecialchars("$user_message"); } $user_message = ereg_replace("\n","<br>","$user_message"); $userinfo = "$user_name!ˇÓ!ˇÓ$user_sex!ˇÓ!ˇÓ$user_ip!ˇÓ!ˇÓ$user_message!ˇÓ!ˇÓ$user_date"."\n";

    $fp = fopen("$filename",'a'); flock($fp,2); fwrite($fp, $userinfo); flock($fp,1); fclose($fp); header("Location: index.php"); setcookie("cuser",$user_name,time()+(3600*24*365),"/","$SERVER_NAME"); exit; } } ---------------------------------------------

    The code above is what I use for processing messages.... Everytime when I'm trying to use the function, htmlspecialchars(), it'll replace " with &quot; . After that, I save the data and print out again, the result will add "\" after the data... ( I don't want the extra "\") There is an example. When I try to type in ^^" to be my new message, it suppose to show the same thing. However, in the saved data, it shows !ˇÓ!ˇÓ^^\&quot; (!ˇÓ!ˇÓ is what I use to different from different filez) I don't want the extra "\".... however, I tried the way in below:

    I use

    $user_message = eregi_replace("<","&lt;","$user_message"); $user_message = eregi_replace(">","&gt;","$user_message");

    instead of the original one which is

    $user_message = htmlspecialchars("$user_message");

    however, when I check the saved file, it still have and extra \ before the characters " . god damn it.... I run this code in windows98SR2, maybe it's micro$oft's problem, is it? plz help me.....thx dudes

    ....nick

    attached mail follows:


    zippy wrote: > I am having trouble with some data i am retrieving from a mysql > database.

    Please ask your question on the php-general list.

    This list is for development of - not with - PHP.

    Thanks, Sebastian

    -- 
      Sebastian Bergmann                     Measure Traffic & Usability
      http://sebastian-bergmann.de/            http://phpOpenTracker.de/
    

    attached mail follows:


    Hi

    I've used ImageMagick to resize images from 1152*768 pixels down to 640*480 pixels. It runs very quickly, you can also try it from the command line to see what you think of the performance. Also, it comes with some support programs that allow filters such as gamma correction etc. It seems to anti-alias images better than GD when resizing too.

    It's cool :)

    Girish

    ----- Original Message ----- From: "Jon Yaggie" <dmsalesdesign-monster.com> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 8:03 AM Subject: Re: [PHP] Re: Any good gif/jpg processing tool for PHP??

    how do you feel about the speed of imagemagick? fastwr? slower than gd functions?

    ----- Original Message ----- From: "Girish Nath" <girishnbtinternet.com> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 1:56 PM Subject: Re: [PHP] Re: Any good gif/jpg processing tool for PHP??

    > Hi > > I've used ImageMagick in the past(it runs on NT and Linux), I found it gives > higher quality results than the builtin functions especially when resizing > jpegs. > > http://www.imagemagick.org > > > Girish > > > ----- Original Message ----- > From: "Gaylen Fraley" <gfraley5earthlink.net> > To: <php-generallists.php.net> > Sent: Tuesday, August 07, 2001 4:43 AM > Subject: [PHP] Re: Any good gif/jpg processing tool for PHP?? > > > PHP does exactly that. Look in the manual for the Image functions. > > -- > > "Diego Fulgueira Pastor" <dfulmetahogar.com> wrote in message > news:PDEPKLDIPCODFDGNLKBBIEFEDDAA.dfulmetahogar.com... > > I am sure many of you have had this same problem. I want all uploaded > images > > to my site (gifs and jpg) to be resized "on the fly" so that all have the > > same width and height. Does anyone knows about a tool (free, if possible) > > that can do this under Win2k, IIS 5.0 and that can be used with PHP 4.0? > A > > php extension (dll) would be great. If it works only for one format (gif > or > > jpg) is fine. > > Thanks in advance for any tip. > > > > Cheers, Diego. > > > > > > > > -- > 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,

    I am having trouble with some data i am retrieving from a mysql database.

    after a query i am using mysql_fetch_array in a while loop to retrieve data. ie;-

    $row = mysql_fetch_array($result);

    once i have a $row i am getting relevant data i want using;-

    $data = $myrow["field_name"];

    where "field_name" actually exists but may not be used (null).

    the problem is that if it is not used then warnings are generated, even if i do;-

    if($myrow["field_name"] != null){ $data = $myrow["field_name"]; }

    it still generates warnings. can any one help?

    thanks in advance

    scott

    attached mail follows:


    Yes!

    Try: <? if (isset($row["fieldname"])) echo "value is:" . $row["fieldname"]; ?>

    "Zippy" <zippy__2khotmail.com> wrote in message news:3b6fc80b.495472news.php.net... > hi, > > I am having trouble with some data i am retrieving from a mysql > database. > > after a query i am using mysql_fetch_array in a while loop to retrieve > data. ie;- > > $row = mysql_fetch_array($result); > > once i have a $row i am getting relevant data i want using;- > > $data = $myrow["field_name"]; > > where "field_name" actually exists but may not be used (null). > > the problem is that if it is not used then warnings are generated, > even if i do;- > > if($myrow["field_name"] != null){ > $data = $myrow["field_name"]; > } > > it still generates warnings. can any one help? > > thanks in advance > > scott >

    attached mail follows:


    Hi,

    This is a real strange one. I am writing a shell script in PHP which I am cronning to run every 5 mins. Basically it downloads email via imap. Splits it up into it relevant sections and adds it to a database. It does multiple inserts, and update and multiple selects. The problem I have is that some of the inserts dont work. There is no error returned ny mysql_error() and if echo the SQL out and run in the MySQL client then it inserts ok. The thing is that it is not the same query every time either. Sometimes its the first insert and naother time its the second insert. I have attached the script in case you want to check it out.. Any ideas anyone?

    Thanks

    Jon

    #!/usr/local/bin/php -q <? // A script which dowmloads the support email and processes it

    $dbhost = "localhost"; $dbuser = "user"; $dbpassword = "password"; $dbname = "support"; $time = time();

    mysql_pconnect($dbhost, $dbuser, $dbpassword); mysql_select_db($dbname); //Open the mailbox and check if mail waiting $mailstream = imap_open("{imap.server.com:143}INBOX","user","password"); $email = imap_headers($mailstream); if (count($email) == 0) { //echo "Nothing to process ... \n"; imap_expunge($mailstream); imap_close($mailstream); mysql_close(); exit; } //echo count($email) ." \n"; for ($i=1; $i<=count($email); $i++) { ;

    $thisheader = imap_header($mailstream, $i); $subject = $thisheader->subject; $from = $thisheader->from; $name = $from[0]->personal; $fromaddr = sprintf("%s%s",$from[0]->mailbox,$from[0]->host); //echo $subject . " " . $fromaddr . " " . $name . "\n"; $struc = imap_fetchstructure($mailstream, $i, FT_UID); //echo "type: " . $struc->bytes . "\n"; if (empty($struc->bytes)) { //echo "Type: " . $struc->type . "\n"; //echo "Sub-type: " . $struc->subtype . "\n"; $mailtext = trim(imap_fetchbody($mailstream, $i, 1)); //echo "Parts Count: " . Count($struc->parts) . "\n"; for ($z = 1; $z < Count($struc->parts) + 1; $z++) { //echo "Part No. " . $z . ": " . $struc->parts[$z]->type . "\n"; if ($struc->parts[$z]->ifparameters) { $parameters = $struc->parts[$z]->parameters; $resarray = get_object_vars($parameters[0]); $filename[] = $resarray["value"]; $filesrc[] = addslashes(imap_fetchbody($mailstream, $i, $z + 1)); switch ($struc->parts[$z]->type) { case 0: $type = "text";

    case 1: $type = "multipart";

    case 2: $type = "message";

    case 3: $type = "application";

    case 4: $type = "audio";

    case 5: $type = "image";

    case 6: $type = "video";

    case 7: $type = "other";

    default: $type = "text";

    } $filetype[] = addslashes($type . "/" . strtolower($struc->parts[$z]->subtype)); if ($type . "/" . strtolower($struc->parts[$z]->subtype) == "text/html") { if (eregi("\.htm", $resarray["value"]) || eregi("\.html", $resarray["value"])) { } else { $HTML = TRUE; } }

    $attachments = TRUE; }

    }

    } else { $mailtext = trim(imap_body($mailstream, $i)); $attachments = FALSE; }

    //echo "$mailtext\n";

    if ($HTML) { //echo "html\n"; imap_delete($mailstream, $i); $bodytext = "Sorry that's HTML mail and we dont accept it\n"; mail ($fromaddr, "RE: " . $subject, $bodytext, "From: Customer Support <supportemail.co.uk>"); continue; }

    if (eregi("SUP[0-9][0-9][0-9][0-9][0-9][0-9]", $subject)) { //echo "Existing support call\n"; } else { //echo "New Support Call\n"; //get next support number $sSQL = "select * from ticketnumbers"; $result = mysql_db_query($dbname, $sSQL); $row = mysql_fetch_array($result); $thisnumber = $row[0]; $nextnumber = $thisnumber; $thisnumber++; $sSQL = "update ticketnumbers set ticketnumber = " . $thisnumber; //echo $sSQL . "\n"; $result = mysql_db_query($dbname, $sSQL);

    //add new support request to db $ticket = "SUP" . sprintf("%07d", $nextnumber); $sSQL = "insert into supportrequests (ticketnumber, dateopened, datelastactioned, origemail, subject) values ('$ticket', $time, $time, '$fromaddr', '" . trim($subject) . "');";

    //echo $sSQL1 . "\n"; mysql_query($sSQL);

    //echo $result1 . " " . mysql_errno() . ":" . mysql_error() . "\n";

    //get new supportrequestid $sSQL = "select * from supportrequests where ticketnumber = '" . $ticket . "'"; $result = mysql_db_query($dbname, $sSQL); $row = mysql_fetch_array($result); $supportid = $row[0];

    $emailtext = trim(imap_body($mailstream, $i)); $sSQL = "insert into supportdetail (supportrequestid, fromname, email, text, datereceived) values (" . $supportid . ", '" . $name . "', '" . $fromaddr . "', '" . $mailtext . "', " . $time . ")"; //echo $sSQL . "\n"; mysql_query($sSQL); usleep(1000);

    //get supportdetailid for this email if ($attachments) { $sSQL = "select supportdetailid from supportdetail where datereceived = " . $time . " and supportrequestid = " . $supportid; //echo $sSQL4 . "\n"; $result = mysql_db_query($dbname, $sSQL); $row = mysql_fetch_array($result4); $supportdetailid = $row[0]; $numatt = count($filesrc); for ($h =0; $h<$numatt; $h++) { $sSQL = "insert into attachments (supportdetailid, filename, attachment, filetype) values ($supportdetailid[0], '$filename[$h]', '" . $filesrc[$h] . "', '$filetype[$h]')"; //echo $sSQL5 . "\n"; $result = mysql_db_query($dbname, $sSQL); } } $bodytext = "Thank you for your support request\n\n"; $bodytext = $bodytext . "We have assigned the following ticket number to this request " . $ticket . "\n"; if ($attachments) { $bodytext = $bodytext . "\nWe received the following attachments from you\n"; for ($u=0; $u<$numatt; $u++) { $bodytext = $bodytext . "File: " . $filename[$u] . " type: " . $filetype[$u] . "\n"; } } $bodytext = $bodytext . "\nPlease make sure that the ticket number is quoted in all correspondence\n"; $bodytext = $bodytext . "and that it appears in the subject line of all emails\n"; $bodytext = $bodytext . "you send regarding this matter\n\n"; $bodytext = $bodytext . "Customer Service Team\n";

    mail($fromaddr, "RE: " . $subject . " " . $ticket, $bodytext, "From:Customer Support <supportemail.co.uk>"); } imap_delete($mailstream, $i); }

    //Close the mail box like a good little boy imap_expunge($mailstream); imap_close($mailstream); mysql_close();

    ?>

    attached mail follows:


    Hi,

    I have been given a (notepad generated) text file which contains a list of countries in a format such as:

    United Kingdom, United States, Blah, Blah, Blah,

    I have imported the data into a countries table in a mySQL database using the excellent 'mysqlfront' prog. No probs on the import itself except for some pesky pipes that I believe to be carriage returns.

    Anyone know a way I can strip these out so I have nice clean data.

    Ta in adavance.

    Karl

    Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL

    Saffron Hill: 0207 693 8300

    attached mail follows:


    http://www.php.net/manual/en/function.chop.php

    Returns the argument string without trailing whitespace, including newlines

    Wagner Tomy Web Developer Editus S.A. ----- Original Message ----- From: "Karl Phillipson" <KarlSaffronHill.com> To: "'Alexander Wagner'" <wagnerglobalpark.de>; "MindHunter" <mindhuntermailbox.co.za>; <php-generallists.php.net> Sent: Tuesday, August 07, 2001 12:53 PM Subject: [PHP] text imports

    > Hi, > > I have been given a (notepad generated) text file which contains a list of > countries in a format such as: > > United Kingdom, > United States, > Blah, > Blah, > Blah, > > I have imported the data into a countries table in a mySQL database using > the excellent 'mysqlfront' prog. No probs on the import itself except for > some pesky pipes that I believe to be carriage returns. > > Anyone know a way I can strip these out so I have nice clean data. > > Ta in adavance. > > Karl > > > > Saffron Hill Ventures > 67 Clerkenwell Road > London > EC1R 5BL > > Saffron Hill: 0207 693 8300 >

    attached mail follows:


    Yup, thanks Wagner.

    I can do this within PHP itself using trim or chop, I was hoping for a snippet of SQL code that would do it from the command line.

    This is what have done:

    LOAD DATA LOCAL INFILE 'C:\MYDIR\countries.txt' INTO TABLE DBNAME.COUNTRY LINES TERMINATED BY ',' (COUNTRY_NAME)

    ========================== Karl Phillipson PHP SQL Programmer

    Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL

    Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318

    -----Original Message----- From: Wagner Tomy [mailto:tomy.wagnerluxweb.lu] Sent: 07 August 2001 12:00 To: Karl Phillipson; 'Alexander Wagner'; MindHunter; php-generallists.php.net Subject: Re: [PHP] text imports

    http://www.php.net/manual/en/function.chop.php

    Returns the argument string without trailing whitespace, including newlines

    Wagner Tomy Web Developer Editus S.A. ----- Original Message ----- From: "Karl Phillipson" <KarlSaffronHill.com> To: "'Alexander Wagner'" <wagnerglobalpark.de>; "MindHunter" <mindhuntermailbox.co.za>; <php-generallists.php.net> Sent: Tuesday, August 07, 2001 12:53 PM Subject: [PHP] text imports

    > Hi, > > I have been given a (notepad generated) text file which contains a list of > countries in a format such as: > > United Kingdom, > United States, > Blah, > Blah, > Blah, > > I have imported the data into a countries table in a mySQL database using > the excellent 'mysqlfront' prog. No probs on the import itself except for > some pesky pipes that I believe to be carriage returns. > > Anyone know a way I can strip these out so I have nice clean data. > > Ta in adavance. > > Karl > > > > Saffron Hill Ventures > 67 Clerkenwell Road > London > EC1R 5BL > > Saffron Hill: 0207 693 8300 >

    -- 
    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:


    ah k,

    yes that's the way to do it in SQL ;p

    Tomy Wagner Web Developer Editus S.A.

    ----- Original Message ----- From: "Karl Phillipson" <KarlSaffronHill.com> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 1:08 PM Subject: RE: [PHP] text imports

    > Yup, thanks Wagner. > > I can do this within PHP itself using trim or chop, I was hoping for a > snippet of SQL code that would do it from the command line. > > This is what have done: > > LOAD DATA LOCAL INFILE 'C:\MYDIR\countries.txt' INTO TABLE DBNAME.COUNTRY > LINES TERMINATED BY ',' (COUNTRY_NAME) > > ========================== > Karl Phillipson > PHP SQL Programmer > > Saffron Hill Ventures > 67 Clerkenwell Road > London > EC1R 5BL > > Saffron Hill: 0207 693 8300 > Direct Line: 0207 693 8318 > > > -----Original Message----- > From: Wagner Tomy [mailto:tomy.wagnerluxweb.lu] > Sent: 07 August 2001 12:00 > To: Karl Phillipson; 'Alexander Wagner'; MindHunter; > php-generallists.php.net > Subject: Re: [PHP] text imports > > > http://www.php.net/manual/en/function.chop.php > > Returns the argument string without trailing whitespace, including newlines > > Wagner Tomy > Web Developer > Editus S.A. > ----- Original Message ----- > From: "Karl Phillipson" <KarlSaffronHill.com> > To: "'Alexander Wagner'" <wagnerglobalpark.de>; "MindHunter" > <mindhuntermailbox.co.za>; <php-generallists.php.net> > Sent: Tuesday, August 07, 2001 12:53 PM > Subject: [PHP] text imports > > > > Hi, > > > > I have been given a (notepad generated) text file which contains a list of > > countries in a format such as: > > > > United Kingdom, > > United States, > > Blah, > > Blah, > > Blah, > > > > I have imported the data into a countries table in a mySQL database using > > the excellent 'mysqlfront' prog. No probs on the import itself except for > > some pesky pipes that I believe to be carriage returns. > > > > Anyone know a way I can strip these out so I have nice clean data. > > > > Ta in adavance. > > > > Karl > > > > > > > > Saffron Hill Ventures > > 67 Clerkenwell Road > > London > > EC1R 5BL > > > > Saffron Hill: 0207 693 8300 > > > > > -- > 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:


    So if this is the way to do it in SQL, is there a way to get rid of the pipe linefeeds using SQL too?

    If not I s'pose the solution is to run a php 'trim' script, grab the data, perform the modifications and then re-insert the data back into the table....

    Bit long winded but if that's the only way?

    ========================== Karl Phillipson PHP SQL Programmer

    Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL

    Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318

    -----Original Message----- From: Wagner Tomy [mailto:tomy.wagnerluxweb.lu] Sent: 07 August 2001 12:06 To: Karl Phillipson; php-generallists.php.net Subject: Re: [PHP] text imports

    ah k,

    yes that's the way to do it in SQL ;p

    Tomy Wagner Web Developer Editus S.A.

    ----- Original Message ----- From: "Karl Phillipson" <KarlSaffronHill.com> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 1:08 PM Subject: RE: [PHP] text imports

    > Yup, thanks Wagner. > > I can do this within PHP itself using trim or chop, I was hoping for a > snippet of SQL code that would do it from the command line. > > This is what have done: > > LOAD DATA LOCAL INFILE 'C:\MYDIR\countries.txt' INTO TABLE DBNAME.COUNTRY > LINES TERMINATED BY ',' (COUNTRY_NAME) > > ========================== > Karl Phillipson > PHP SQL Programmer > > Saffron Hill Ventures > 67 Clerkenwell Road > London > EC1R 5BL > > Saffron Hill: 0207 693 8300 > Direct Line: 0207 693 8318 > > > -----Original Message----- > From: Wagner Tomy [mailto:tomy.wagnerluxweb.lu] > Sent: 07 August 2001 12:00 > To: Karl Phillipson; 'Alexander Wagner'; MindHunter; > php-generallists.php.net > Subject: Re: [PHP] text imports > > > http://www.php.net/manual/en/function.chop.php > > Returns the argument string without trailing whitespace, including newlines > > Wagner Tomy > Web Developer > Editus S.A. > ----- Original Message ----- > From: "Karl Phillipson" <KarlSaffronHill.com> > To: "'Alexander Wagner'" <wagnerglobalpark.de>; "MindHunter" > <mindhuntermailbox.co.za>; <php-generallists.php.net> > Sent: Tuesday, August 07, 2001 12:53 PM > Subject: [PHP] text imports > > > > Hi, > > > > I have been given a (notepad generated) text file which contains a list of > > countries in a format such as: > > > > United Kingdom, > > United States, > > Blah, > > Blah, > > Blah, > > > > I have imported the data into a countries table in a mySQL database using > > the excellent 'mysqlfront' prog. No probs on the import itself except for > > some pesky pipes that I believe to be carriage returns. > > > > Anyone know a way I can strip these out so I have nice clean data. > > > > Ta in adavance. > > > > Karl > > > > > > > > Saffron Hill Ventures > > 67 Clerkenwell Road > > London > > EC1R 5BL > > > > Saffron Hill: 0207 693 8300 > > > > > -- > 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:


    RE: [PHP] text importstry this:

    LOAD DATA LOCAL INFILE 'C:\MYDIR\countries.txt' INTO TABLE DBNAME.COUNTRY LINES TERMINATED BY ',\n' (COUNTRY_NAME)

    or if it does not work, simply drop the commas and use the newline character as separator ?

    Tomy Wagner Web Developer Editus S.A. ----- Original Message ----- From: Karl Phillipson To: 'Wagner Tomy' ; php-generallists.php.net Sent: Tuesday, August 07, 2001 1:16 PM Subject: RE: [PHP] text imports

    So if this is the way to do it in SQL, is there a way to get rid of the pipe linefeeds using SQL too?

    If not I s'pose the solution is to run a php 'trim' script, grab the data, perform the modifications and then re-insert the data back into the table....

    Bit long winded but if that's the only way?

    ========================== Karl Phillipson PHP SQL Programmer

    Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL

    Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318

    -----Original Message----- From: Wagner Tomy [mailto:tomy.wagnerluxweb.lu] Sent: 07 August 2001 12:06 To: Karl Phillipson; php-generallists.php.net Subject: Re: [PHP] text imports

    ah k,

    yes that's the way to do it in SQL ;p

    Tomy Wagner Web Developer Editus S.A.

    ----- Original Message ----- From: "Karl Phillipson" <KarlSaffronHill.com> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 1:08 PM Subject: RE: [PHP] text imports

    > Yup, thanks Wagner. > > I can do this within PHP itself using trim or chop, I was hoping for a > snippet of SQL code that would do it from the command line. > > This is what have done: > > LOAD DATA LOCAL INFILE 'C:\MYDIR\countries.txt' INTO TABLE DBNAME.COUNTRY > LINES TERMINATED BY ',' (COUNTRY_NAME) > > ========================== > Karl Phillipson > PHP SQL Programmer > > Saffron Hill Ventures > 67 Clerkenwell Road > London > EC1R 5BL > > Saffron Hill: 0207 693 8300 > Direct Line: 0207 693 8318 > > > -----Original Message----- > From: Wagner Tomy [mailto:tomy.wagnerluxweb.lu] > Sent: 07 August 2001 12:00 > To: Karl Phillipson; 'Alexander Wagner'; MindHunter; > php-generallists.php.net > Subject: Re: [PHP] text imports > > > http://www.php.net/manual/en/function.chop.php > > Returns the argument string without trailing whitespace, including newlines > > Wagner Tomy > Web Developer > Editus S.A. > ----- Original Message ----- > From: "Karl Phillipson" <KarlSaffronHill.com> > To: "'Alexander Wagner'" <wagnerglobalpark.de>; "MindHunter" > <mindhuntermailbox.co.za>; <php-generallists.php.net> > Sent: Tuesday, August 07, 2001 12:53 PM > Subject: [PHP] text imports > > > > Hi, > > > > I have been given a (notepad generated) text file which contains a list of > > countries in a format such as: > > > > United Kingdom, > > United States, > > Blah, > > Blah, > > Blah, > > > > I have imported the data into a countries table in a mySQL database using > > the excellent 'mysqlfront' prog. No probs on the import itself except for > > some pesky pipes that I believe to be carriage returns. > > > > Anyone know a way I can strip these out so I have nice clean data. > > > > Ta in adavance. > > > > Karl > > > > > > > > Saffron Hill Ventures > > 67 Clerkenwell Road > > London > > EC1R 5BL > > > > Saffron Hill: 0207 693 8300 > > > > > -- > 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,

    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

    attached mail follows:


    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?!?!?!

    -- 
    

    * 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:


    Read this:

    http://www.php.net/manual/en/function.getenv.php

    $ip = getenv ("REMOTE_ADDR");

    ========================== Karl Phillipson PHP SQL Programmer

    Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL

    Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318

    -----Original Message----- From: Adrian D'Costa [mailto:adrianpcsadvt.com] Sent: 07 August 2001 11:25 To: php general list Subject: [PHP] user's ip

    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

    -- 
    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:


    Hello Adrian,

    Tuesday, August 07, 2001, 12:25:25 PM, you wrote:

    ADC> Hi,

    ADC> I am trying to get the ip address of any user browsing a particular page.

    ADC> I tried $REMOTE_ADDR but that give me only the remote address. What would ADC> be the best way?

    When you recieve a remote_host_name you can find out a ip with gethostbyname(String name_recieved)

    I hope it helps

    -- 
    Best regards,
     Daniel                            mailto:danielrezny.sk
    

    attached mail follows:


    Hi! how i can enable session? i have installed PHP4 and IIS 5.0 on W2K Server. PHP scripts work correctly, but when i use session_start() the same script don't work! I must set same key in php.ini for enabling sessions? or ..?

    thanks! efrem

    PS: sorry for my poor english!

    attached mail follows:


    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);

    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?!?!?! > > -- > > * 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 > -- «««««««««««««««««««««««« > > -- > 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:


    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:


    hello !

    Please help me.

    How do I split array so, that I'll get string variable with "," delimeter of each array value ?

    Thank you!

    attached mail follows:


    See:

    http://www.php.net/implode

    - Tim http://www.phptemplates.org

    On 07 Aug 2001 14:02:04 +0200, Veniamin Goldin wrote: > How do I split array so, that I'll get string variable with "," delimeter of > each array value ?

    attached mail follows:


    you could use implode

    http://www.php.net/manual/en/function.implode.php

    ========================== Karl Phillipson PHP SQL Programmer

    Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL

    Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318

    -----Original Message----- From: Veniamin Goldin [mailto:veniamin.goldinlabbis.lt] Sent: 07 August 2001 13:02 To: php-generallists.php.net Subject: [PHP] Split array

    hello !

    Please help me.

    How do I split array so, that I'll get string variable with "," delimeter of each array value ?

    Thank you!

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

    I am running PHP 4.06 on Windows 2000 with IIS 5. I am running PHP in CGI mode.

    I seem to be getting "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

    "

    Why is this error happening ? Please dont ask me to shift to DLL mode of running PHP as it gives worse problems like access violations etc.

    It would be really helpful if someone could tell me as to how correct the same.

    Thanks, Karthik.

    attached mail follows:


    Sorry for the dummies question, but how do I insert into string like:

    echo "balalala"

    how to insert function in the midle like : echo "balalala [trim(odbc_result($result_id,3))] aasasasas"

    Thank you.

    > ----- Original Message ----- > From: "René Moonen" <rene.moonenoberthur.nl> > To: <php-generallists.php.net> > Sent: Tuesday, August 07, 2001 2:02 PM > Subject: [Re: [PHP] user's ip] > > > > 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); > > > > > > 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?!?!?! > > > > > > -- > > > > > > * 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 > > > -- «««««««««««««««««««««««« > > > > > > -- > > > 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:


    Try readin the manual before posting.. all you want is the string concatenation operator .

    PHP is weakly typed so no direct conversion is needed

    echo "balalala " . trim(odbc_result($result_id,3)) . " aasasasas"

    > Sorry for the dummies question, but how do I insert into string like: > > echo "balalala" > > how to insert function in the midle like : > echo "balalala [trim(odbc_result($result_id,3))] aasasasas" > > > Thank you. > > > ----- Original Message ----- > > From: "René Moonen" <rene.moonenoberthur.nl> > > To: <php-generallists.php.net> > > Sent: Tuesday, August 07, 2001 2:02 PM > > Subject: [Re: [PHP] user's ip] > > > > > > > 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); > > > > > > > > > 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?!?!?! > > > > > > > > -- > > > > > > > > * 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 > > > > -- «««««««««««««««««««««««« > > > > > > > > -- > > > > 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:


    On Tue, Aug 07, 2001 at 02:30:31PM +0200, Veniamin Goldin wrote: > Sorry for the dummies question, but how do I insert into string like: > > echo "balalala" > > how to insert function in the midle like : > echo "balalala [trim(odbc_result($result_id,3))] aasasasas" > > > Thank you. >

    How about:

    echo "balalala ".trim(odbc_result($result_id,3))." aasasasas";

    or

    echo "balalala [".trim(odbc_result($result_id,3))."] aasasasas";

    depending on what you meant by the '[' and ']'.

    This is just one of many possible ways of doing it. I, myself, am not to happy with echo(). Don't ask me why, just a feeling... No return value and stuff. I prefer using real functions that I can check on being successful. So how about:

    print ("balalala [".trim(odbc_result($result_id,3))."] aasasasas");

    or

    printf ("balalala [%s] aasasasas", trim(odbc_result($result_id,3)));

    Well... as I said, many possibilities...

    -- 
    

    * 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:


    Generally I would expect one of two possibilities in this scenario.. either a) you are passing thru the url (limited I believe to about 255 characters)...if so use a form with METHOD=post or b) you are storing in a DB and the size of the field in the db is too small (in general most rdbms' will just cut the string off to fit without any warning).

    Have you tried doing a dump of $HTTP_POST_VARS and $HTTP_GET_VARS?

    HTH,Tom > i assume you mean your passing the variable as part of > the url...PHP_SELF?a=something (is this what your > doing) if so make sure you use > rawurlencode/urlencode before passing the variable and > rawurldecode/urldecode on the variable afterwards... > > > --- Joshman <Joshezcrosswinds.net> wrote: > > the php file wont submit to the next file (which is > > th same file actually: > > $PHP_SELF ) because the variable is too big for some > > reason aparently, evn > > though i have other variables larger than that > > particular one... > > > > > __________________________________________________ > 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:


    Hi, I know this question has been asked before but I can't find a good clear example.

    How can I list threads, forum style from a mysql db table.

    My table is:

    id parent_id subject text

    Can any please help?

    Thanks,

    Jord

    -- 
    Jordan Elver
    Web Developer
    The InternetOne UK Ltd
    

    attached mail follows:


    I'm looking to give each of my virtual domain accounts a calendar, msg board, and maybe a chat function to their web site.

    Anyone know of a php program that has messaging and calendaring working together?

    Thanks! -eric wood

    attached mail follows:


    <plug>vBulletin is PHP/MySQL backed forum software that includes an integrated calendar component.</plug>

    However, it'll cost you $85/site/year, so you might be best off tying a few free components together.

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

    ----- Original Message ----- From: Eric Wood <ericinterplas.com> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 8:54 AM Subject: [PHP] calendar, msg board, chat in PHP

    | I'm looking to give each of my virtual domain accounts a calendar, msg | board, and maybe a chat function to their web site. | | Anyone know of a php program that has messaging and calendaring working | together? | | Thanks! | -eric wood | | | | -- | 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:


    Hello.

    I have two MySql databases running on different servers. I have no root access and only PHP + Mysql and MysqlAdmin.

    How can i take a dump of first database (which is about 1MB) and restore that dump on the second one?

    Actually, I'm doing a structure dump, but the outputed SQL text is very big!..I'm not able to paste it all in the second server's sql query textbox.

    Any ideas?

    attached mail follows:


    >How can i take a dump of first database (which is about 1MB) and restore >that dump on the second one?

    If you have Telnet access use the mysqldump and mysql clients to export then import.

    Regards

    Jon

    attached mail follows:


    This might be of some use?

    http://www.mysql.com/doc/m/y/mysqlhotcopy.html

    ========================== Karl Phillipson PHP SQL Programmer

    Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL

    Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318

    -----Original Message----- From: elias [mailto:elias_bachaalanyyahoo.com] Sent: 07 August 2001 14:53 To: php-generallists.php.net Subject: [PHP] Best way to take a copy of a Database from Server to server

    Hello.

    I have two MySql databases running on different servers. I have no root access and only PHP + Mysql and MysqlAdmin.

    How can i take a dump of first database (which is about 1MB) and restore that dump on the second one?

    Actually, I'm doing a structure dump, but the outputed SQL text is very big!..I'm not able to paste it all in the second server's sql query textbox.

    Any ideas?

    -- 
    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:


    Hello elias,

    Tuesday, August 07, 2001, 3:52:57 PM, you wrote:

    e> Hello.

    e> I have two MySql databases running on different servers. I have no root e> access and only PHP + Mysql and MysqlAdmin.

    e> How can i take a dump of first database (which is about 1MB) and restore e> that dump on the second one?

    e> Actually, I'm doing a structure dump, but the outputed SQL text is very e> big!..I'm not able to paste it all in the second server's sql query textbox.

    You can do it from your machine with mysqldump.

    syntax is: mysqldump --host=here_write_sql_server_1 --user=user --password=hassword name_of_database > file.txt

    On the second server you can do it with command

    mysql --host=here_write_sql_server_2 --user=user --password=hassword name_of_database < file.txt

    I hope it helps

    -- 
    Best regards,
     Daniel                            mailto:danielrezny.sk
    

    attached mail follows:


    No I don't really have Telnet access....I have only access to phpMyAdmin 2.0.1 via my Hosting Control Panel... And it happens that both servers have this tool to access the database.

    How can I copy from a server to another?

    Please Help!

    "Jon Farmer" <jonfarmerenta.net> wrote in message news:OOEBLEHOEDLBKALJPPJCMEJACAAA.jonfarmerenta.net... > >How can i take a dump of first database (which is about 1MB) and restore > >that dump on the second one? > > > If you have Telnet access use the mysqldump and mysql clients to export then > import. > > Regards > > Jon >

    attached mail follows:


    Just a very big guess. Can you use system or exec command to run one of those telnet commands from a PHP script?

    Or even better idea, can you ask your hosts to do it for you :)

    Andrew

    ----- Original Message ----- From: "elias" <elias_bachaalanyyahoo.com> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 3:26 PM Subject: Re: [PHP] Best way to take a copy of a Database from Server to server

    > No I don't really have Telnet access....I have only access to phpMyAdmin > 2.0.1 via my Hosting Control Panel... > And it happens that both servers have this tool to access the database. > > How can I copy from a server to another? > > Please Help! > > > "Jon Farmer" <jonfarmerenta.net> wrote in message > news:OOEBLEHOEDLBKALJPPJCMEJACAAA.jonfarmerenta.net... > > >How can i take a dump of first database (which is about 1MB) and restore > > >that dump on the second one? > > > > > > If you have Telnet access use the mysqldump and mysql clients to export > then > > import. > > > > Regards > > > > Jon > > > > > > -- > 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:


    easy, go inside each table, there will be the structure dump function available. that will allow you to take the data for that table only. this may give you a smaller size of data.

    --
    Hidulf
    http://www.hidulf.com
    "Elias" <elias_bachaalanyyahoo.com> wrote in message
    news:20010807125524.74017.qmailpb1.pair.com...
    > Hello.
    >
    > I have two MySql databases running on different servers. I have no root
    > access and only PHP + Mysql and MysqlAdmin.
    >
    > How can i take a dump of first database (which is about 1MB) and restore
    > that dump on the second one?
    >
    > Actually, I'm doing a structure dump, but the outputed SQL text is very
    > big!..I'm not able to paste it all in the second server's sql query
    textbox.
    >
    > Any ideas?
    >
    >
    >
    

    attached mail follows:


    On Mon, 6 Aug 2001 17:44:29 -0500 "Diego Fulgueira Pastor" <dfulmetahogar.com> wrote:

    > Hi! I have the following problem: > > I am using IIS 5.0 on Win2k, and I am unable to create COM objects. For > example, the following code will produce the script to halt: > > $myObject= new COM("CDONTS.NewMail"); > $myObject->to='memysite.com'; > $myObject->send();

    Im no expert here, but shouldnt the second line be $myObject->to('memysite.com');

    Or am i missing something here

    micke <mikaeluds.se>

    -- 
    "Love is a snowmobile racing across the tundra.  Suddenly it flips
    over, pinning you underneath.  At night, the ice weasels come."
                                            -- Matt Groening
    

    attached mail follows:


    I tried this, I still have the same problem. Is this a bug in the version of PHP I am running?

    Chad

    -----Original Message----- From: mike cullerton [mailto:php-lbakednotfried.com] Sent: Monday, August 06, 2001 4:58 PM To: Chad Day; php-generallists.php.net Subject: Re: [PHP] Session problem

    i would try

    session_start(); session_register("NAME");

    $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND PASSWORD = '$PASSWORD'");

    if ($row = mysql_fetch_array($res)) { $NAME = $row[NAME]; }

    notice that $NAME is registered before being assigned to.

    on 8/6/01 2:23 PM, Chad Day at cdayatpco.com wrote:

    > PHP 4.0.2 .. > > I have a very basic script, gets the user's name, registers it, then > displays "Welcome, $NAME." $NAME is the session registered name. > > If I constantly reload that page that says Welcome, sometimes $NAME appears, > sometimes not. Completely random. It just loses track of the variable. > > My code: > > auth.php: > > session_start(); > > ... > > $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND > PASSWORD = '$PASSWORD'"); > > if ($row = mysql_fetch_array($res)) { > $NAME = $row[NAME]; > session_register("NAME"); > } > > ... > > Header("Location: menu.php"); > > > > menu.php: > > session_start(); > > echo "Welcome, $NAME"; > > > > So like, what the hell. Why would it keep losing track of $NAME? > > Thanks, > Chad >

    -- mike cullerton

    --
    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:


    indeed it's not working properly, first of all please make sur the pages are not cashed send a header (Cache-control: NO cache) i'm not sure about the syntax so check the manual then try to modify your code like this and tell us what happens:

    <?php if (!HTTP_SESSION_VARS['count']) { global $count; $count = 0; session_register ("count"); echo "Hello visitor, you have seen this page $count; times"; } else { $count = HTTP_SESSION_VARS['count']; $count++; session_register ("count"); echo "Hello visitor, you have seen this page ".HTTP_SESSION_VARS['count']"."; times";

    ?> might seem a little overloaded but it's to make sur there is no confusion between count as a session var and the other var; if this is not working then the problem is else whrere and w'll continue lokkin :))

    regards

    At 15:41 07/08/01, you wrote: >Still loses it .. check this out: > >http://www.militarycity.com/classified/realtors/count.php > >The entire code for that page, taken from an example on zend: > ><?php >session_register ("count"); >$count++; >?> > >Hello visitor, you have seen this page <?php echo $count; ?> times.<p> > > >Try loading it about 10 times or so, watch what happens. > >Chad > >-----Original Message----- >From: hassan el forkani [mailto:webmasterwarmafrica.com] >Sent: Tuesday, August 07, 2001 8:34 AM >To: Chad Day >Subject: RE: [PHP] Session problem > > >hello > >At 15:16 07/08/01, you wrote: > >My code: > > > > > > auth.php: > > > > > > session_start(); > > > > > > ... > > > > > > $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND > > > PASSWORD = '$PASSWORD'"); > > > > > > if ($row = mysql_fetch_array($res)) { > >//try adding this: > global $NAME; > > > > $NAME = $row[NAME]; > > > session_register("NAME"); > > > } > > > > > > ... > > > > > > Header("Location: menu.php"); > > >regards

    attached mail follows:


    oh i forgot!!! you have to put this at the beginning of your page <?php session_start(); ?>

    indeed it's not working properly, first of all please make sur the pages are not cashed send a header (Cache-control: NO cache) i'm not sure about the syntax so check the manual then try to modify your code like this and tell us what happens:

    <?php if (!HTTP_SESSION_VARS['count']) { global $count; $count = 0; session_register ("count"); echo "Hello visitor, you have seen this page $count; times"; } else { $count = HTTP_SESSION_VARS['count']; $count++; session_register ("count"); echo "Hello visitor, you have seen this page ".HTTP_SESSION_VARS['count']"."; times";

    ?> might seem a little overloaded but it's to make sur there is no confusion between count as a session var and the other var; if this is not working then the problem is else whrere and w'll continue lokkin :))

    regards

    At 15:41 07/08/01, you wrote: >Still loses it .. check this out: > >http://www.militarycity.com/classified/realtors/count.php > >The entire code for that page, taken from an example on zend: > ><?php >session_register ("count"); >$count++; >?> > >Hello visitor, you have seen this page <?php echo $count; ?> times.<p> > > >Try loading it about 10 times or so, watch what happens. > >Chad > >-----Original Message----- >From: hassan el forkani [mailto:webmasterwarmafrica.com] >Sent: Tuesday, August 07, 2001 8:34 AM >To: Chad Day >Subject: RE: [PHP] Session problem > > >hello > >At 15:16 07/08/01, you wrote: > >My code: > > > > > > auth.php: > > > > > > session_start(); > > > > > > ... > > > > > > $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND > > > PASSWORD = '$PASSWORD'"); > > > > > > if ($row = mysql_fetch_array($res)) { > >//try adding this: > global $NAME; > > > > $NAME = $row[NAME]; > > > session_register("NAME"); > > > } > > > > > > ... > > > > > > Header("Location: menu.php"); > > >regards

    attached mail follows:


    Done, still not working. I know that usually has to be there, I was just going to copy the example from the manual directly, since the session should automatically kickoff when it hits the session_register bit. This truly has me baffled.

    Chad

    -----Original Message----- From: hassan el forkani [mailto:webmasterwarmafrica.com] Sent: Tuesday, August 07, 2001 9:37 AM To: Chad Day Cc: php-generallists.php.net Subject: RE: [PHP] Session problem

    oh i forgot!!! you have to put this at the beginning of your page <?php session_start(); ?>

    indeed it's not working properly, first of all please make sur the pages are not cashed send a header (Cache-control: NO cache) i'm not sure about the syntax so check the manual then try to modify your code like this and tell us what happens:

    <?php if (!HTTP_SESSION_VARS['count']) { global $count; $count = 0; session_register ("count"); echo "Hello visitor, you have seen this page $count; times"; } else { $count = HTTP_SESSION_VARS['count']; $count++; session_register ("count"); echo "Hello visitor, you have seen this page ".HTTP_SESSION_VARS['count']"."; times";

    ?> might seem a little overloaded but it's to make sur there is no confusion between count as a session var and the other var; if this is not working then the problem is else whrere and w'll continue lokkin :))

    regards

    At 15:41 07/08/01, you wrote: >Still loses it .. check this out: > >http://www.militarycity.com/classified/realtors/count.php > >The entire code for that page, taken from an example on zend: > ><?php >session_register ("count"); >$count++; >?> > >Hello visitor, you have seen this page <?php echo $count; ?> times.<p> > > >Try loading it about 10 times or so, watch what happens. > >Chad > >-----Original Message----- >From: hassan el forkani [mailto:webmasterwarmafrica.com] >Sent: Tuesday, August 07, 2001 8:34 AM >To: Chad Day >Subject: RE: [PHP] Session problem > > >hello > >At 15:16 07/08/01, you wrote: > >My code: > > > > > > auth.php: > > > > > > session_start(); > > > > > > ... > > > > > > $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND > > > PASSWORD = '$PASSWORD'"); > > > > > > if ($row = mysql_fetch_array($res)) { > >//try adding this: > global $NAME; > > > > $NAME = $row[NAME]; > > > session_register("NAME"); > > > } > > > > > > ... > > > > > > Header("Location: menu.php"); > > >regards

    --
    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:


    this code works on my machines:

    <?php

    header ("Cache-Control: no-cache, must-revalidate, max_age=0"); session_start(); if ($HTTP_SESSION_VARS['count']) { $count = $HTTP_SESSION_VARS['count']; $count++; session_register ("count"); echo "Hello visitor, you have seen this page ".$HTTP_SESSION_VARS['count']." times";

    } else { global $count; $count = 1; session_register("count"); echo "Hello visitor, you have never seen this page before"; } ?>

    test it, i think the problem was about starting $count at zero; if it still ait working for you then check your php.ini settings regards

    At 16:50 07/08/01, Chad Day wrote: >Done, still not working. I know that usually has to be there, I was just >going to copy the example from the manual directly, since the session should >automatically kickoff when it hits the session_register bit. This truly has >me baffled. > >Chad > >-----Original Message----- >From: hassan el forkani [mailto:webmasterwarmafrica.com] >Sent: Tuesday, August 07, 2001 9:37 AM >To: Chad Day >Cc: php-generallists.php.net >Subject: RE: [PHP] Session problem > > >oh i forgot!!! >you have to put this at the beginning of your page ><?php >session_start(); >?> > >indeed it's not working properly, >first of all please make sur the pages are not cashed send a header >(Cache-control: NO cache) i'm not sure about the syntax so check the manual >then try to modify your code like this and tell us what happens: > ><?php >if (!HTTP_SESSION_VARS['count']) >{ >global $count; >$count = 0; >session_register ("count"); >echo "Hello visitor, you have seen this page $count; times"; >} >else { >$count = HTTP_SESSION_VARS['count']; >$count++; >session_register ("count"); >echo "Hello visitor, you have seen this page >".HTTP_SESSION_VARS['count']"."; times"; > >?> >might seem a little overloaded but it's to make sur there is no confusion >between count as a session var and the other var; >if this is not working then the problem is else whrere and w'll continue >lokkin :)) > >regards > > > >At 15:41 07/08/01, you wrote: > >Still loses it .. check this out: > > > >http://www.militarycity.com/classified/realtors/count.php > > > >The entire code for that page, taken from an example on zend: > > > ><?php > >session_register ("count"); > >$count++; > >?> > > > >Hello visitor, you have seen this page <?php echo $count; ?> times.<p> > > > > > >Try loading it about 10 times or so, watch what happens. > > > >Chad > > > >-----Original Message----- > >From: hassan el forkani [mailto:webmasterwarmafrica.com] > >Sent: Tuesday, August 07, 2001 8:34 AM > >To: Chad Day > >Subject: RE: [PHP] Session problem > > > > > >hello > > > >At 15:16 07/08/01, you wrote: > > >My code: > > > > > > > > auth.php: > > > > > > > > session_start(); > > > > > > > > ... > > > > > > > > $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND > > > > PASSWORD = '$PASSWORD'"); > > > > > > > > if ($row = mysql_fetch_array($res)) { > > > >//try adding this: > > global $NAME; > > > > > > $NAME = $row[NAME]; > > > > session_register("NAME"); > > > > } > > > > > > > > ... > > > > > > > > Header("Location: menu.php"); > > > > > >regards > > > >-- >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,

    You can tell it using the variables from the server. Using Apache you can access the variables specs at:

    http://www.apache-ssl.org/docs.html

    With Apache SSL is SSL_CIPHER returns the variable about SSL/TLS ciphersuite.

    Sean C. McCarthy SCI, SL (www.sci-spain.com)

    "Dr. Evil" wrote: > > Is there a function in PHP which can tell me the encryption strength > being used by the browser? I want to be able to put a little message > on the page saying, "You are using strong encryption" or "Warning: you > should upgrade your browser to one which supports 128bit crypto". > > Thanks > > -- > 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:


    What is the php code to get a visitor's IP address?

    Thanks, Joseph

    attached mail follows:


    On Tue, Aug 07, 2001 at 08:11:52AM -0500, Joseph Bannon wrote: > What is the php code to get a visitor's IP address? > > Thanks, > Joseph

    You might want to consider reading some of the other posts for a change. There's an interesting thread on this list today. It's about the exact same question you just asked. Try reading that!

    It's called: user's ip

    -- 
    

    * 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:


    Just because you're having a bad day doesn't mean I should. Can you just tell me what it is? I don't have those posts.

    J

    -----Original Message-----

    On Tue, Aug 07, 2001 at 08:11:52AM -0500, Joseph Bannon wrote: > What is the php code to get a visitor's IP address? > > Thanks, > Joseph

    You might want to consider reading some of the other posts for a change. There's an interesting thread on this list today. It's about the exact same question you just asked. Try reading that!

    It's called: user's ip

    attached mail follows:


    On Tue, Aug 07, 2001 at 08:29:34AM -0500, Joseph Bannon wrote: > Just because you're having a bad day doesn't mean I should. Can you just > tell me what it is? I don't have those posts. > > J

    Wow... I believe you're the one having the bad day. Anyway, here's the result of the thread... It's the code you need.

    =====[ Get remote IP ]=====

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

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

    --
    

    * 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:


    > > =====[ Get remote IP ]===== > > if(getenv(HTTP_X_FORWARDED_FOR)) > { > $ip=getenv(HTTP_X_FORWARDED_FOR); > } > else > { > $ip=getenv(REMOTE_ADDR); > } > $host = gethostbyaddr($ip); > > =========================== >

    Oh... btw... I just gave a real look at that piece of code. You might want to write it a bit different:

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

    The other one does work, but quoting makes a lot of difference in your logfiles. Without quoting yet get al kinds of warnings.

    -- 
    

    * 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:


    >Just because you're having a bad day doesn't mean I should. Can you just >tell me what it is? I don't have those posts.

    You don't need those posts to check the archive.

    You should find a link on the page where you subscribed.

    Checking the archive before you post would help to get less traffic on this list.

    Bye,

    B.

    attached mail follows:


    At 09:29 AM 8/7/2001, Joseph Bannon wrote:

    <rant>

    This is the problem with todays "web programmers" and with PHP.

    One - With the explosion in the ease of HTML and related technologies EVERYBODY is a designer/programmer....lets face it....some have it some don't. If you think that blinking text is great...or if you think that table borders are a great then you need to stop attempting to be a designer and get a real job.

    Two - Damn you Rasmus!!!! PHP is a great lang for anything web related....with a nice low learning curve. Thats the problem..PHP is soooo eays to use. So every moron and his brother now programs in PHP and floods the list with questions like "How do i get the users IP?"

    READ THE FREAKING MANUAL!!!!!!!!

    most of us did....in fact i keep a printed copy of the manual next to my desk.......to avoid asking questions like the above.

    </rant>

    ~kurth

    >Just because you're having a bad day doesn't mean I should. Can you just >tell me what it is? I don't have those posts. > >J

    attached mail follows:


    Hi,

    My apache log files contains the following log info sending from my desktop to my server which hosted at remote data center, I am wondering, am I being hacked ?? Is there something wrong in my apache server ??

    203.218.49.24 - - [07/Aug/2001:22:04:52 +0800] "-" 408 - - "-" "-" 203.218.49.24 - - [07/Aug/2001:22:04:55 +0800] "-" 408 - - "-" "-" 203.218.49.24 - - [07/Aug/2001:22:04:56 +0800] "-" 408 - - "-" "-" 203.218.49.24 - - [07/Aug/2001:22:04:56 +0800] "-" 408 - - "-" "-"

    Thanks

    Mark

    attached mail follows:


    Hi Mark,

    408 is an HTTP status code meaning Request Timeout. The excerpt from the RFC2616 is:

    408 Request Timeout The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.

    Do you have lots of this? If just a few I wouldn't say its an attack but a problem from the person making the request.

    Sean C. McCarthy SCI, SL (www.sci-spain.com)

    Mark Lo wrote: > > Hi, > > My apache log files contains the following log info sending from my > desktop to my server which hosted at remote data center, I am wondering, am > I being hacked ?? Is there something wrong in my apache server ?? > > 203.218.49.24 - - [07/Aug/2001:22:04:52 +0800] "-" 408 - - "-" "-" > 203.218.49.24 - - [07/Aug/2001:22:04:55 +0800] "-" 408 - - "-" "-" > 203.218.49.24 - - [07/Aug/2001:22:04:56 +0800] "-" 408 - - "-" "-" > 203.218.49.24 - - [07/Aug/2001:22:04:56 +0800] "-" 408 - - "-" "-" > > Thanks > > Mark > > -- > 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:


    check your status code at http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.9

    on a side note, your post was in the wrong newsgroup, try a orum related to http not php.

    --
    

    Chris Lee leemediawaveonline.com

    "Mark Lo" <mark3dsources.com> wrote in message news:000901c11f4a$f36666e0$7c7ba8c0mark... > Hi, > > My apache log files contains the following log info sending from my > desktop to my server which hosted at remote data center, I am wondering, am > I being hacked ?? Is there something wrong in my apache server ?? > > > > 203.218.49.24 - - [07/Aug/2001:22:04:52 +0800] "-" 408 - - "-" "-" > 203.218.49.24 - - [07/Aug/2001:22:04:55 +0800] "-" 408 - - "-" "-" > 203.218.49.24 - - [07/Aug/2001:22:04:56 +0800] "-" 408 - - "-" "-" > 203.218.49.24 - - [07/Aug/2001:22:04:56 +0800] "-" 408 - - "-" "-" > > > Thanks > > Mark >

    attached mail follows:


    help me please ! I try to use include() and require() an that what i get: The path is 100% good.

    Warning: Failed opening '../inc/menu.inc' for inclusion (include_path='') in

    attached mail follows:


    > I try to use include() and require() an that what i get: > The path is 100% good. > > Warning: Failed opening '../inc/menu.inc' for inclusion > (include_path='') in

    Make sure that file permissions allow 'nobody' to view the file.

    attached mail follows:


    It's LINUX and I don't own the server I lease it from affordablehost.com

    Thanks, Marcus

    Justin French wrote:

    > What platform is the server? Unix? Win98? > It shouldn't be putting line breaks in. > > Do you have access to MySQL? If so, that may be a solution. > > Justin French > > Marcus James Christian wrote: > > > > Hello, > > > > I've been having quite a challenging ordeal making a simple custom > > mailing list using PHP. > > > > The part where automatically added names happen to an external file > > works but if I put line breaks in it drops them from their hidden Bcc > > list. Which is a no can do for this. > > > > Then when I don't put in line breaks from the string somewhere after > > many names the machine automatically puts a line break in and leaves > > this very uncool three or four most recent names sitting in the top part > > of the emails body!? > > > > Help, > > > > Marcus > > > > -- > > Marcus James Christian -- UNLIMITED > > Multimedia Internet Design > > http://mjchristianunlimited.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

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

    attached mail follows:


    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/ > > > -- mike cullerton > >

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

    attached mail follows:


    "Marius Andreiana" <mariuswdg.ro> wrote in message news:997106394.6244.3.camelaurora.wdg.ro... > Hi > > I try to keep some common xsl templates in separate files and > use <xsl:include href="file.xsl"/> > > It works fine if I process them from cmd line with sabcmd, > but the same files don't work in php, I get > Fatal error: msgtype: error in ... > when I add the line xsl:include (if I remove it it's ok) > > What's the problem? (I'm using sablotron 0.52) > > Thanks! > Marius Andreiana > --

    Have you tried Sablotron 0.60?

    Peter

    attached mail follows:


    On 07 Aug 2001 15:30:44 +0100, Peter Clarke wrote: > Have you tried Sablotron 0.60? yes, the same.

    How could I see at least what the problem is? (meaningful error message)

    -- 
    Marius Andreiana
    --
    You don't have to go to jail for helping your neighbour
    http://www.gnu.org/philosophy/
    

    attached mail follows:


    When using if (!$submit) I get an error saying: Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line 1 Fair enough, so then I add if (isset(!$submit)) and I then get an error; Parse error: parse error, expecting `T_VARIABLE' or `'$'' Could someone please tell me the more than likely simple sollution.

    Thanks

    Taz

    attached mail follows:


    > Fair enough, so then I add if (isset(!$submit)) and I then get an error; ^^^^^^^^^^^^ try

    if(!isset($submit))

    instead

    Tomy Wagner Web Developer Editus S.A. ----- Original Message ----- From: "Tarrant Costelloe" <tcostelloeinsur-e.net> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 4:47 PM Subject: [PHP] if(!$submit)

    > When using if (!$submit) I get an error saying: > Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line > 1 > Fair enough, so then I add if (isset(!$submit)) and I then get an error; > Parse error: parse error, expecting `T_VARIABLE' or `'$'' > Could someone please tell me the more than likely simple sollution. > > Thanks > > Taz > > -- > 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.

    if(isset($submit)) { }

    chris

    ----- Original Message ----- From: Tarrant Costelloe <tcostelloeinsur-e.net> To: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 10:47 AM Subject: [PHP] if(!$submit)

    > When using if (!$submit) I get an error saying: > Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line > 1 > Fair enough, so then I add if (isset(!$submit)) and I then get an error; > Parse error: parse error, expecting `T_VARIABLE' or `'$'' > Could someone please tell me the more than likely simple sollution. > > Thanks > > Taz > > -- > 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:


    On Tue, Aug 07, 2001 at 03:47:19PM +0100, Tarrant Costelloe wrote: > When using if (!$submit) I get an error saying: > Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line > 1 > Fair enough, so then I add if (isset(!$submit)) and I then get an error; > Parse error: parse error, expecting `T_VARIABLE' or `'$'' > Could someone please tell me the more than likely simple sollution. > > Thanks > > Taz

    if (!isset ($submit)) or if (!isset ($submit) || empty ($submit))

    You were SO close!

    -- 
    

    * 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:


    > When using if (!$submit) I get an error saying: > Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line > 1 > Fair enough, so then I add if (isset(!$submit)) and I then get an error; > Parse error: parse error, expecting `T_VARIABLE' or `'$'' > Could someone please tell me the more than likely simple sollution.

    if (!isset($submit)) { ...

    Note the location of the "!"

    - Colin

    attached mail follows:


    if (!isset($submit))

    :)

    on 8/7/01 8:47 AM, Tarrant Costelloe at tcostelloeinsur-e.net wrote:

    > When using if (!$submit) I get an error saying: > Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line > 1 > Fair enough, so then I add if (isset(!$submit)) and I then get an error; > Parse error: parse error, expecting `T_VARIABLE' or `'$'' > Could someone please tell me the more than likely simple sollution. > > Thanks > > Taz

    -- mike cullerton

    attached mail follows:


    When doing the following if statement: if ($name == "neo") How can you specify that it doesn't matter whether the first letter of "Neo" is in captials or not.

    Thanks!

    Taz

    attached mail follows:


    Hi,

    I have run accross this problem too, and I solve it this way:

    if(strtolower($name1) == strtolower($name2))

    I compare both variables in lower case, this way capitals don't matter at all.

    Greetz, Bjorn Van Simaeys www.bvsenterprises.com

    --- Tarrant Costelloe <tcostelloeinsur-e.net> wrote: > When doing the following if statement: > if ($name == "neo") > How can you specify that it doesn't matter whether > the first letter of "Neo" > is in captials or not. > > Thanks! > > Taz > > > -- > 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:


    Ok thanks,

    I found jons way the easiest:

    if ($name == "neo" || $name == "Neo")

    -----Original Message----- From: Bjorn Van Simaeys [mailto:cyberplasmayahoo.com] Sent: 07 August 2001 16:24 To: php-generallists.php.net Subject: Re: [PHP] Upper or Lower Case

    Hi,

    I have run accross this problem too, and I solve it this way:

    if(strtolower($name1) == strtolower($name2))

    I compare both variables in lower case, this way capitals don't matter at all.

    Greetz, Bjorn Van Simaeys www.bvsenterprises.com

    --- Tarrant Costelloe <tcostelloeinsur-e.net> wrote: > When doing the following if statement: > if ($name == "neo") > How can you specify that it doesn't matter whether > the first letter of "Neo" > is in captials or not. > > Thanks! > > Taz > > > -- > 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/

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

    What happens if they type "NeO", or "NEO", or "nEo", or "neO" (etc)? ;) Also, if you're using this in a large application (or intend to in the future), are you going to type out all of the names as you have done with the neo example? Bjorn's method is much better, and you're better off getting into good practice early.

    James

    "Tarrant Costelloe" <tcostelloeinsur-e.net> wrote in message news:B8DC55700B11DA4F8AA61B2803F3D1A80DC489insure-ems.insur-e.net... > Ok thanks, > > I found jons way the easiest: > > if ($name == "neo" || $name == "Neo") > > > -----Original Message----- > From: Bjorn Van Simaeys [mailto:cyberplasmayahoo.com] > Sent: 07 August 2001 16:24 > To: php-generallists.php.net > Subject: Re: [PHP] Upper or Lower Case > > > Hi, > > I have run accross this problem too, and I solve it > this way: > > if(strtolower($name1) == strtolower($name2)) > > I compare both variables in lower case, this way > capitals don't matter at all. > > > Greetz, > Bjorn Van Simaeys > www.bvsenterprises.com

    attached mail follows:


    >What happens if they type "NeO", or "NEO", or "nEo", or "neO" (etc)? ;) >Also, if you're using this in a large application (or intend to in the >future), are you going to type out all of the names as you have done with >the neo example? >Bjorn's method is much better, and you're better off getting into good >practice early.

    Who mentioned anything about typing? In the example given it was a hardcoded string.

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

    attached mail follows:


    On 07-Aug-2001 Bjorn Van Simaeys wrote: > Hi, > > I have run accross this problem too, and I solve it > this way: > > if(strtolower($name1) == strtolower($name2)) > > I compare both variables in lower case, this way > capitals don't matter at all. > >

    if (0 == strcasecmp('neo', $name)) // why didn't the call this stricmp ? echo 'matched';

    if eregi('^neo$', $name) echo 'matched also';

    Regards,

    -- 
    Don Read                                       dreadtexas.net
    -- It's always darkest before the dawn. So if you are going to 
       steal the neighbor's newspaper, that's the time to do it.
    

    attached mail follows:


    Also keep in mind that sometimes spaces find their ways into the string and using trim() will get rid of them. Something like :

    if (strcasecmp('neo',trim($name)) == 0) {

    echo 'You chose our Neo line of goods, way to go!'; }

    Not to say spaces randomly attach to strings :-) but to be safe, I'm usually a trim freak. I Love to trim!

    Regards, Philip

    On Tue, 7 Aug 2001, Don Read wrote:

    > > On 07-Aug-2001 Bjorn Van Simaeys wrote: > > Hi, > > > > I have run accross this problem too, and I solve it > > this way: > > > > if(strtolower($name1) == strtolower($name2)) > > > > I compare both variables in lower case, this way > > capitals don't matter at all. > > > > > > if (0 == strcasecmp('neo', $name)) // why didn't the call this stricmp ? > echo 'matched'; > > if eregi('^neo$', $name) > echo 'matched also'; > > Regards, > -- > Don Read dreadtexas.net > -- It's always darkest before the dawn. So if you are going to > steal the neighbor's newspaper, that's the time to do it. > > -- > 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 must agree with Don that strcasecmp is the best way to go. Combined with the 'trim' function this is completely foolproof.

    Thanks, Don!

    Bjorn Van Simaeys www.bvsenterprises.com

    --- Don Read <dreadtexas.net> wrote: > > On 07-Aug-2001 Bjorn Van Simaeys wrote: > > Hi, > > > > I have run accross this problem too, and I solve > it > > this way: > > > > if(strtolower($name1) == strtolower($name2)) > > > > I compare both variables in lower case, this way > > capitals don't matter at all. > > > > > > if (0 == strcasecmp('neo', $name)) // why didn't > the call this stricmp ? > echo 'matched'; > > if eregi('^neo$', $name) > echo 'matched also'; > > Regards, > -- > Don Read > dreadtexas.net > -- It's always darkest before the dawn. So if you > are going to > steal the neighbor's newspaper, that's the time > to do it. > > -- > 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:


    try this:

    If( strcmp($voorraad[1],'on') == 0 ) // it's checked else // it's not

    Good luck, Ben

    -----Original Message----- From: Tijmen Hennink [mailto:tijmenmediaconnect.nl] Sent: Monday, August 06, 2001 1:34 AM To: php-generallists.php.net Subject: [PHP] array + checkbox

    Hi All,

    I've the following weird problem. I have a form which contains an array with values of some checkboxes. This is the HTML-part: <INPUT TYPE=checkbox name=voorraad checked> if checked or <INPUT TYPE=checkbox name=voorraad>

    Now I want to check which of the checkboxes are really checked. So I've got the following PHP code: if(count($voorraad[1])>0) { echo "VOORRAAD NEE"; } else { echo "VOORRAAD JA"; }

    I've tried it with isset($voorraad[1]), count, is_null($voorraad[1]) but all the functions doesn't work. Does anyone see what I'm doing wrong??

    Met vriendelijke groet/with kind regards, Tijmen Hennink ------------------------------------------------------------------------

    ----
    tijmenmediaconnect.nl
    Mediconnect
    ------------------------------------------------------------------------
    ----
     
    Dit e-mail bericht is uitsluitend bestemd voor de geadresseerde(n).
    Gebruik van deze informatie door andere dan de geadresseerde
    is verboden.
    Het is evenmin toegestaan om deze informatie openbaar te maken,
    te vermenigvuldigen, te verspreiden of te verstrekken aan derden. Aan
    dit
    bericht kunnen geen rechten worden ontleend.
    Indien u dit mailtje heeft ontvangen terwijl het niet aan u gericht was,
    reply richting mij en verwijder vervolgens de email en uitgeprinte
    versies
    van dit mailtje.
     
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++++
    This e-mail is intended for the use of the addressee(s) only and may
    contain privileged, confidential, or proprietary information that is
    exempt
    from disclosure under law.  If you have received this message in error,
    please inform me promptly by reply e-mail, then delete the e-mail and
    any printed copy.
     
    Thank you.
    

    attached mail follows:


    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??

    attached mail follows:


    ----- Original Message ----- From: hassan el forkani <webmasterwarmafrica.com> Sent: Tuesday, August 07, 2001 07:32 > 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?? >

    Well, what I use for any form fields that may have special characters in them (text, textarea) is a combination of htmlspecialchars() and addslashes() on input, and stripslashes() on output - for example:

    $textfield = "some&strange'text"; $escaped = addslashes(htmlspecialchars($textfield)); $sql = "INSERT INTO table VALUES (textfield), ('$escaped')"; ... db query ...;

    now, the special characters such as ampersand are converted into their hex equivalents, and any characters that need to be escaped are escaped properly... All you need to do now is remember to use stripslashes() on output:

    $sql = "SELECT textfield FROM table WHERE id = '1'"; ... db query ...; echo stripslashes($textfield);

    for more info see the appropriate manual pages: http://www.php.net/manual/en/function.htmlspecialchars.php http://www.php.net/manual/en/function.addslashes.php http://www.php.net/manual/en/function.stripslashes.php

    Hope this helps

    Anton Stroganov www.artwithin.com webmaster

    attached mail follows:


    Rasmus, solved this problem for me earlier today. Hope this helps

    Rasmus,

    Thank you very much. I ended up using the following statement, and it works!!

    > $results=mysql_query(stripslashes($sql_statement));

    What I have now is a textarea box where I can input trial searches. This is why I'm dealing with the whole sql statement. With time, I plan on passing only the variables. Thanks again. Hugh ----- Original Message ----- From: Rasmus Lerdorf <rasmusphp.net> To: Hugh Danaher <hdanaherearthlink.net> Cc: <php-generallists.php.net> Sent: Wednesday, July 18, 2001 1:49 AM Subject: Re: [PHP] help on getting rid of \'

    > > I am working with php and mysql and have the need to write a query like: > > > > $sql_statement=mysql_query(" select * from table where column='string' "); > > > > What comes out is: > > > > select * from table where column=\'string\' > > Only if you pass that variable through a GET/POST/COOKIE operation and you > have magic_quotes_gpc enabled in your php.ini file. Either turn > magic_quotes off or call stripslashes() on your string before passing it > to MySQL. > > But, are you sure you want to be passing entire query strings between > pages? Normally you would only pass the actual query arguments. In your > case probably the 'string' part. > > -Rasmus >

    ----- Original Message ----- From: hassan el forkani <webmasterwarmafrica.com> To: <php-generallists.php.net> Cc: <mysqllists.mysql.com> Sent: Tuesday, August 07, 2001 7:32 AM Subject: [PHP] 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?? > > > -- > 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:


    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
      Geschäftsführer / 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 > >

    attached mail follows:


    Hi, I'm trying to write a port scanner similar to http://scan.sygatetech.com to expose security holes in a PC or server. However, I can't figure out how to perform an ICMP ping. Does anyone know how?

    Regards,

    - James

    Editor, VB Web ================== Web - http://www.vbweb.co.uk Email - jamesvbweb.co.uk ICQ# - 60612011 Fax - +44(0)8707052859 ==================

    attached mail follows:


    exec("ping 127.0.0.1");

    -- 
    +-----------------------------+
    |        Tyler Longren        | 
    | Captain Jack Communications |
    |    tylercaptainjack.com    |
    |     www.captainjack.com     |
    +-----------------------------+
    

    On Tue, 7 Aug 2001 17:11:36 +0100 "James Crowley" <jamesvbweb.co.uk> wrote:

    > Hi, > I'm trying to write a port scanner similar to > http://scan.sygatetech.com to expose security holes in a PC or server. > However, I can't figure out how to perform an ICMP ping. Does anyone > know how? > > Regards, > > - James > > Editor, VB Web > ================== > Web - http://www.vbweb.co.uk > Email - jamesvbweb.co.uk > ICQ# - 60612011 > Fax - +44(0)8707052859 > ================== > > > -- > 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:


    look for icmp at http://phpclasses.upperdesigns.com i beilive there is a class that does just that

    regards

    At 18:11 07/08/01, you wrote: >Hi, > I'm trying to write a port scanner similar to >http://scan.sygatetech.com to expose security holes in a PC or server. >However, I can't figure out how to perform an ICMP ping. Does anyone >know how? > >Regards, > >- James > >Editor, VB Web >================== >Web - http://www.vbweb.co.uk >Email - jamesvbweb.co.uk >ICQ# - 60612011 >Fax - +44(0)8707052859 >================== > > >-- >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 All,

    You meant: http://www.PHPClasses.UpperDesign.com/

    didn't you?

    Sean C. McCarthy SCI, SL (www.sci-spain.com)

    hassan el forkani wrote: > > look for icmp at > http://phpclasses.upperdesigns.com i beilive there is a class that does > just that > > regards > > At 18:11 07/08/01, you wrote: > >Hi, > > I'm trying to write a port scanner similar to > >http://scan.sygatetech.com to expose security holes in a PC or server. > >However, I can't figure out how to perform an ICMP ping. Does anyone > >know how? > > > >Regards, > > > >- James > > > >Editor, VB Web > >================== > >Web - http://www.vbweb.co.uk > >Email - jamesvbweb.co.uk > >ICQ# - 60612011 > >Fax - +44(0)8707052859 > >================== > > > > > >-- > >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:


    ok, I'm confused, any help would be greatly appreciated. Using PHP4 with Apache (version?). My problem is that I'm getting emalloc errors. Not the massive ones like those related to the database bugs, it's anywhere from 1 byte to 43 bytes. In my debug attempt I've been watching apache processes (top), trying to track memory usage. It seems to vary size between 14M & 16M & vary RES from 12M to 14M. Is this varying normal? Is this size normal? (2400 line program reading a 1400 row/29 col. spreadsheet into an array...yes, it is necessary to have the whole thing in the array at one time, at least, I can't figure out a way not to.) I would think the same program ran repeatedly should require approx. the same memory each time. Also, I seem to have apache processes hanging around for days. So that even running a little 4 line echo/sleep/echo program will pick up one of these rogue process id's & then it appears that the 4 line program is running at 14M/12M now, that's just not possible. Is it normal for the process id's to hang around in sleep mode interminally lik! e that? If I restart apache, th

    e processes of course die, but I can't do that constantly. Is there a way to free up the memory that I'm just not aware of? Or something I should be looking at that I'm not? I'm at a loss, I'm more likely to blame my code (only my 2nd php program) than a php/apache bug or something of the like. But I haven't a clue where to look. (changing the way I handled the array slightly & using unset I did manage to save approx. 4M, but I'll need to save more than that as the spreadsheet grows). Eventually it may all go into a database, but not any time soon.

    Any suggestions or enlightenment would be greatly appreciated. wendy

    attached mail follows:


    Hi,

    I'm looking at the 'String' section of the online documentation. I cannot find a function that converts a numeric to a string, e.g., 1 --> "1".

    Am I blind or does this not exist?

    Thanks, Don

    attached mail follows:


    Don wrote: > Hi, > > I'm looking at the 'String' section of the online documentation. I > cannot find a function that converts a numeric to a string, e.g., 1 > --> "1". > > Am I blind or does this not exist?

    With loose typing, this is not really necessary.

    If I'm wrong here, you might use settype() or do a type cast: $str = (string)$int;

    regards Wagner

    -- 
    Madness takes its toll. Please have exact change.
    

    attached mail follows:


    check out settype() however read the doc on types you may not need settype at all

    rm

    --- Don <donlclcan.com> wrote: > Hi, > > I'm looking at the 'String' section of the online > documentation. I cannot > find a function that converts a numeric to a string, > e.g., 1 --> "1". > > Am I blind or does this not exist? > > Thanks, > Don > > > -- > 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:


    hey,

    this function does not exists. An interger can be treated as string without any problems, see also: http://www.php.net/manual/en/language.types.string.php#language.types.string .conversion

    Kees

    > -----Original Message----- > From: Don [mailto:donlclcan.com] > Sent: Tuesday, August 07, 2001 6:35 PM > To: php list > Subject: [PHP] converting numeric to a string > > > Hi, > > I'm looking at the 'String' section of the online documentation. I cannot > find a function that converts a numeric to a string, e.g., 1 --> "1". > > Am I blind or does this not exist? > > Thanks, > Don > > > -- > 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:


    Have a look here :

    http://php.net/manual/en/language.types.type-juggling.php

    http://php.net/manual/en/function.settype.php

    regards, philip

    On Tue, 7 Aug 2001, Don wrote:

    > Hi, > > I'm looking at the 'String' section of the online documentation. I cannot > find a function that converts a numeric to a string, e.g., 1 --> "1". > > Am I blind or does this not exist? > > Thanks, > Don > > > -- > 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 use ODBC on a Win2K system to connect to a MS-SQL database. I use a stored procedure in the database to add a record to a table. The stored procedure returns a result code that is either the records ID or a -1 indication that the record was not added. How do I check the return result in PHP using ODBC?

    Thanks in advance

    James

    attached mail follows:


    Hi,

    I'm using this code to delete a file using onunload, but this is not working. Can anyone please tell me why? I know the function apaga() works, but the onunload thing doesn't. I probably missed a detail.

    <html> <head> </head> <BODY onunload="return apaga($diretorio);"> <?php

    function apaga($diretorio){

    unlink ("$diretorio.tgz");

    }

    attached mail follows:


    Try this one:

    http://php4win.de/

    SED

    -----Original Message----- From: Marius Pertravčius [mailto:Lietuvaxxx.lt] Sent: 4. ágúst 2001 22:33 To: php-generallists.php.net Subject: [PHP] php_gd.dll for windows, please help me....

    Sveiki, PHP,

    Does anyone here has good php_gd.dll file that supports GD in windows.I can't download it from http://php.weblogs.com/php_gd , because it is damaged or smth. If you have, please email to me with this file. I need it very very much... Thank you

    ____________________________ 2001.08.05, sekmadienis Marius Pertravčius iCQ: #125733984 Lietuvaxxx.lt

    -- 
    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 tried it using return and without it, but unfortunly neither cases worked.

    ----- Original Message ----- From: Chris Cocuzzo <cuzomediaone.net> To: Eduardo Kokubo <kokuboinf.univali.br> Sent: Tuesday, August 07, 2001 2:21 PM Subject: Re: [PHP] something worong

    > hey- > > I'm not sure, but maybe try this: > > body onunload="<?php return apaga($diretorio);?>" > > for some reason i don't think that'd work, prolly because of the quotes > around the php, however i think you need to call it that way. But can you > ever use return that way?? > > chris > > > ----- Original Message ----- > From: Eduardo Kokubo <kokuboinf.univali.br> > To: <php-generallists.php.net> > Cc: <kokuboinf.univali.br> > Sent: Tuesday, August 07, 2001 1:12 PM > Subject: [PHP] something worong > > > Hi, > > I'm using this code to delete a file using onunload, but this is not > working. Can anyone please tell me why? I know the function apaga() works, > but the onunload thing doesn't. I probably missed a detail. > > <html> > <head> > </head> > <BODY onunload="return apaga($diretorio);"> > <?php > > function apaga($diretorio){ > > unlink ("$diretorio.tgz"); > > } > > >

    attached mail follows:


    Ok, this is just a variant of a question asked almost daily. You are trying to call a PHP function using JavaScript. PHP is handled on the server, JavaScript is done client side. The browser doesn't know anything about PHP. Another option might be to use the onunload handler to popup (might piss off people though) a window which would load that PHP script and delete the file.

    rich

    -----Original Message----- From: Eduardo Kokubo [mailto:kokuboinf.univali.br] Sent: Tuesday, August 07, 2001 1:49 PM To: Chris Cocuzzo Cc: php-generallists.php.net Subject: Re: [PHP] something wrong

    I tried it using return and without it, but unfortunly neither cases worked.

    ----- Original Message ----- From: Chris Cocuzzo <cuzomediaone.net> To: Eduardo Kokubo <kokuboinf.univali.br> Sent: Tuesday, August 07, 2001 2:21 PM Subject: Re: [PHP] something worong

    > hey- > > I'm not sure, but maybe try this: > > body onunload="<?php return apaga($diretorio);?>" > > for some reason i don't think that'd work, prolly because of the quotes > around the php, however i think you need to call it that way. But can you > ever use return that way?? > > chris > > > ----- Original Message ----- > From: Eduardo Kokubo <kokuboinf.univali.br> > To: <php-generallists.php.net> > Cc: <kokuboinf.univali.br> > Sent: Tuesday, August 07, 2001 1:12 PM > Subject: [PHP] something worong > > > Hi, > > I'm using this code to delete a file using onunload, but this is not > working. Can anyone please tell me why? I know the function apaga() works, > but the onunload thing doesn't. I probably missed a detail. > > <html> > <head> > </head> > <BODY onunload="return apaga($diretorio);"> > <?php > > function apaga($diretorio){ > > unlink ("$diretorio.tgz"); > > } > > >

    --
    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:


    Well, I did as you suggested but the page is popping up onload not onunload.

    <BODY onunload="apaga();"> <script language="javascript"> function apaga(){ window.open(compressao2.php?diretorio=d14,"compressao2","toolbar=no");} </script>

    ----- Original Message ----- From: Rich Cavanaugh <rcavanaughadvolve.com> To: Eduardo Kokubo <kokuboinf.univali.br>; Chris Cocuzzo <cuzomediaone.net> Cc: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 2:52 PM Subject: RE: [PHP] something wrong

    > Ok, this is just a variant of a question asked almost daily. You are trying > to call a PHP function using JavaScript. PHP is handled on the server, > JavaScript is done client side. The browser doesn't know anything about PHP. > Another option might be to use the onunload handler to popup (might piss off > people though) a window which would load that PHP script and delete the > file. > > rich > > > > -----Original Message----- > From: Eduardo Kokubo [mailto:kokuboinf.univali.br] > Sent: Tuesday, August 07, 2001 1:49 PM > To: Chris Cocuzzo > Cc: php-generallists.php.net > Subject: Re: [PHP] something wrong > > > I tried it using return and without it, but unfortunly neither cases > worked. > > ----- Original Message ----- > From: Chris Cocuzzo <cuzomediaone.net> > To: Eduardo Kokubo <kokuboinf.univali.br> > Sent: Tuesday, August 07, 2001 2:21 PM > Subject: Re: [PHP] something worong > > > > hey- > > > > I'm not sure, but maybe try this: > > > > body onunload="<?php return apaga($diretorio);?>" > > > > for some reason i don't think that'd work, prolly because of the quotes > > around the php, however i think you need to call it that way. But can you > > ever use return that way?? > > > > chris > > > > > > ----- Original Message ----- > > From: Eduardo Kokubo <kokuboinf.univali.br> > > To: <php-generallists.php.net> > > Cc: <kokuboinf.univali.br> > > Sent: Tuesday, August 07, 2001 1:12 PM > > Subject: [PHP] something worong > > > > > > Hi, > > > > I'm using this code to delete a file using onunload, but this is not > > working. Can anyone please tell me why? I know the function apaga() works, > > but the onunload thing doesn't. I probably missed a detail. > > > > <html> > > <head> > > </head> > > <BODY onunload="return apaga($diretorio);"> > > <?php > > > > function apaga($diretorio){ > > > > unlink ("$diretorio.tgz"); > > > > } > > > > > > > > > -- > 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:


    Sorry, forget what I said. The code is working fine with your suggestion. I was refreshing the page constantly and each time it was opening the window.

    ----- Original Message ----- From: Rich Cavanaugh <rcavanaughadvolve.com> To: Eduardo Kokubo <kokuboinf.univali.br>; Chris Cocuzzo <cuzomediaone.net> Cc: <php-generallists.php.net> Sent: Tuesday, August 07, 2001 2:52 PM Subject: RE: [PHP] something wrong

    > Ok, this is just a variant of a question asked almost daily. You are trying > to call a PHP function using JavaScript. PHP is handled on the server, > JavaScript is done client side. The browser doesn't know anything about PHP. > Another option might be to use the onunload handler to popup (might piss off > people though) a window which would load that PHP script and delete the > file. > > rich > > > > -----Original Message----- > From: Eduardo Kokubo [mailto:kokuboinf.univali.br] > Sent: Tuesday, August 07, 2001 1:49 PM > To: Chris Cocuzzo > Cc: php-generallists.php.net > Subject: Re: [PHP] something wrong > > > I tried it using return and without it, but unfortunly neither cases > worked. > > ----- Original Message ----- > From: Chris Cocuzzo <cuzomediaone.net> > To: Eduardo Kokubo <kokuboinf.univali.br> > Sent: Tuesday, August 07, 2001 2:21 PM > Subject: Re: [PHP] something worong > > > > hey- > > > > I'm not sure, but maybe try this: > > > > body onunload="<?php return apaga($diretorio);?>" > > > > for some reason i don't think that'd work, prolly because of the quotes > > around the php, however i think you need to call it that way. But can you > > ever use return that way?? > > > > chris > > > > > > ----- Original Message ----- > > From: Eduardo Kokubo <kokuboinf.univali.br> > > To: <php-generallists.php.net> > > Cc: <kokuboinf.univali.br> > > Sent: Tuesday, August 07, 2001 1:12 PM > > Subject: [PHP] something worong > > > > > > Hi, > > > > I'm using this code to delete a file using onunload, but this is not > > working. Can anyone please tell me why? I know the function apaga() works, > > but the onunload thing doesn't. I probably missed a detail. > > > > <html> > > <head> > > </head> > > <BODY onunload="return apaga($diretorio);"> > > <?php > > > > function apaga($diretorio){ > > > > unlink ("$diretorio.tgz"); > > > > } > > > > > > > > > -- > 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:


    > Well, I did as you suggested but the page is popping up onload not onunload.--------forget it. this code is working fine. I was refreshing the page, what was calling the unload function. > > <BODY onunload="apaga();"> > <script language="javascript"> > function apaga(){ > window.open(compressao2.php?diretorio=d14,"compressao2","toolbar=no");} > </script> > > > ----- Original Message ----- > From: Rich Cavanaugh <rcavanaughadvolve.com> > To: Eduardo Kokubo <kokuboinf.univali.br>; Chris Cocuzzo > <cuzomediaone.net> > Cc: <php-generallists.php.net> > Sent: Tuesday, August 07, 2001 2:52 PM > Subject: RE: [PHP] something wrong > > > > Ok, this is just a variant of a question asked almost daily. You are > trying > > to call a PHP function using JavaScript. PHP is handled on the server, > > JavaScript is done client side. The browser doesn't know anything about > PHP. > > Another option might be to use the onunload handler to popup (might piss > off > > people though) a window which would load that PHP script and delete the > > file. > > > > rich > > > > > > > > -----Original Message----- > > From: Eduardo Kokubo [mailto:kokuboinf.univali.br] > > Sent: Tuesday, August 07, 2001 1:49 PM > > To: Chris Cocuzzo > > Cc: php-generallists.php.net > > Subject: Re: [PHP] something wrong > > > > > > I tried it using return and without it, but unfortunly neither cases > > worked. > > > > ----- Original Message ----- > > From: Chris Cocuzzo <cuzomediaone.net> > > To: Eduardo Kokubo <kokuboinf.univali.br> > > Sent: Tuesday, August 07, 2001 2:21 PM > > Subject: Re: [PHP] something worong > > > > > > > hey- > > > > > > I'm not sure, but maybe try this: > > > > > > body onunload="<?php return apaga($diretorio);?>" > > > > > > for some reason i don't think that'd work, prolly because of the quotes > > > around the php, however i think you need to call it that way. But can > you > > > ever use return that way?? > > > > > > chris > > > > > > > > > ----- Original Message ----- > > > From: Eduardo Kokubo <kokuboinf.univali.br> > > > To: <php-generallists.php.net> > > > Cc: <kokuboinf.univali.br> > > > Sent: Tuesday, August 07, 2001 1:12 PM > > > Subject: [PHP] something worong > > > > > > > > > Hi, > > > > > > I'm using this code to delete a file using onunload, but this is not > > > working. Can anyone please tell me why? I know the function apaga() > works, > > > but the onunload thing doesn't. I probably missed a detail. > > > > > > <html> > > > <head> > > > </head> > > > <BODY onunload="return apaga($diretorio);"> > > > <?php > > > > > > function apaga($diretorio){ > > > > > > unlink ("$diretorio.tgz"); > > > > > > } > > > > > > > > > > > > > > > -- > > 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,

    I have a script running on a server, which retrieves some values from a DB and encodes them into WDDX.

    I have another script running on the client, which deserializes WDDX and SAX-parses the XML data.

    How do I connect the two, so that the client script connects to the server, runs the server script and gets the resulting WDDX packet?

    Thanks!

    Vikram

    --
    I wouldn't recommend sex, drugs, and insanity for everyone, but it works
    for me.
    

    attached mail follows:


    Hi,

    'nother question: if I have a form which submits data in POST to script "a.php", and I now want to pass this POSTed data to "b.php" - how do I do this?

    I have tried the technique of iterating through $HTTP_POST and concatenating the key-value pairs into a GET URL, which works perfectly. However, I would like to pass the data from a.php to b.php as POST data, in the HTTP_POST array itself - is this possible, and how do I do it?

    Thanks!

    Vikram

    --
    I wouldn't recommend sex, drugs, and insanity for everyone, but it works
    for me.
    

    attached mail follows:


    I posted this yesterday and got no response. i know somebody out there went thru this.

    I have php4.0.4pl1 installed from redhat 7.1 binary cd along w/ apache 1.3.19, mysql, ldap, etc. everything works fine, but now i want support for pdf and swf. i looked for a configure script for php but none was found. how would i go about doing this? i would hate to install it from the source as i just want one or two exts installed. if i have pdf.so or swf.so and uncomment those lines where it loads it in php.ini, it should work, right? that is, if someone can send me those two files. i'm confused. can someone help me out? thanks in advance.

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

    attached mail follows:


    ok, can i do this? build it with all the --enable-blahs, so i wouldn't need to recompile apache since it already knows about php (i would use the same version). would this be a mess? redhat installs in wierd places. i installed php from the source in 6.1 and it worked fine. now, it seems all the php files are everywhere. would --force take care of this? i really want to do the smallest work possible. thanks again.

    --- Tim <infozearthlink.net> wrote: > As far as I know, you need to build from source to > accomplish that. > > - Tim > > On 07 Aug 2001 11:45:21 -0700, Christian Cresante > wrote: > > I posted this yesterday and got no response. i > > know somebody out there went thru this. > > > > I have php4.0.4pl1 installed from redhat 7.1 > binary > > cd along w/ apache 1.3.19, mysql, ldap, etc. > > everything works fine, but now i want support for > pdf > > and swf. i looked for a configure script for php > but > > none was found. how would i go about doing this? > i > > would hate to install it from the source as i just > > want one or two exts installed. if i have pdf.so > or > > swf.so and uncomment those lines where it loads it > in > > php.ini, it should work, right? that is, if > someone > > can send me those two files. i'm confused. can > > someone help me out? thanks in advance. > > > > > > > > __________________________________________________ > > 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 > > > >

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

    attached mail follows:


    I suggest you uninstall everything that apache installed and do it all from source. It always seems to be much easier that way.

    Good luck, Tyler Longren Captain Jack Communications tylercaptainjack.com www.captainjack.com

    On Tue, 7 Aug 2001 12:06:57 -0700 (PDT) Christian Cresante <cresantecyahoo.com> wrote:

    > ok, can i do this? build it with all the > --enable-blahs, so i wouldn't need to recompile > apache since it already knows about php (i would use > the same version). would this be a mess? redhat > installs in wierd places. i installed php from the > source in 6.1 and it worked fine. now, it seems all > the php files are everywhere. would --force take care > of this? i really want to do the smallest work > possible. thanks again. > > --- Tim <infozearthlink.net> wrote: > > As far as I know, you need to build from source to > > accomplish that. > > > > - Tim > > > > On 07 Aug 2001 11:45:21 -0700, Christian Cresante > > wrote: > > > I posted this yesterday and got no response. i > > > know somebody out there went thru this. > > > > > > I have php4.0.4pl1 installed from redhat 7.1 > > binary > > > cd along w/ apache 1.3.19, mysql, ldap, etc. > > > everything works fine, but now i want support for > > pdf > > > and swf. i looked for a configure script for php > > but > > > none was found. how would i go about doing this? > > i > > > would hate to install it from the source as i just > > > want one or two exts installed. if i have pdf.so > > or > > > swf.so and uncomment those lines where it loads it > > in > > > php.ini, it should work, right? that is, if > > someone > > > can send me those two files. i'm confused. can > > > someone help me out? thanks in advance. > > > > > > > > > > > > __________________________________________________ > > > 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 > > > > > > > > > > __________________________________________________ > 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:


    Can anyone point me to a resource which explains how to iterate through WDDX recordsets with PHP?

    Thanks!

    Vikram

    --
    I wouldn't recommend sex, drugs, and insanity for everyone, but it works
    for me.
    

    attached mail follows:


    On Wed, Aug 08, 2001 at 12:21:30AM +0500, Vikram Vaswani wrote: > Can anyone point me to a resource which explains how to iterate through > WDDX recordsets with PHP?

    wddx_deserialize()?

    attached mail follows:


    You can find nice documentation for all WDDX functions on php.net:

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

    Greetz, Bjorn Van Simaeys www.bvsenterprises.com

    --- Vikram Vaswani <bacchusvsnl.com> wrote: > Can anyone point me to a resource which explains how > to iterate through > WDDX recordsets with PHP? > > Thanks! > > Vikram > -- > I wouldn't recommend sex, drugs, and insanity for > everyone, but it works > for me. > > -- > 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:


    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:


    Miguel,

    I see that your script has the extension .html Rename that file to .php and it normally should work.

    Greetz, Bjorn Van Simaeys www.bvsenterprises.com

    --- miguel valero <mrv169yahoo.com> wrote: > 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/ > > -- > 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:


    I just wanned to bring the issue of security of MySQL connection:

    Let us imagine that SQL server was down for some hours (of course without us knowing it) and at the same hours our SQL site was visited by some kind of hacker, he can see on his screen all our SQL connection info like username, password, and database name. You may hide this information in different file than the file that your users open then the hacker will see something like "include("connect.inc");" or "require("connect.inc");" (of course IF server is down). So you may only imagine the consequences of this visit of the hacker. What can we do to protect our sensitive information if SQL server is down?

    Youri

    attached mail follows:


    If the SQL server is down how will he hack it? That's like hacking a webserver that doesn't exist.

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

    On Tue, 7 Aug 2001 21:35:58 +0200 "BRACK" <braknettaxi.com> wrote:

    > I just wanned to bring the issue of security of MySQL connection: > > Let us imagine that SQL server was down for some hours (of > course without us knowing it) and at the same hours our SQL site > was visited by some kind of hacker, he can see on his screen all > our SQL connection info like username, password, and database > name. You may hide this information in different file than the file > that your users open then the hacker will see something like > "include("connect.inc");" or "require("connect.inc");" (of course IF > server is down). So you may only imagine the consequences of > this visit of the hacker. What can we do to protect our sensitive > information if SQL server is down? > > Youri > > -- > 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 curious as to how the "hacker" would see all this information (the username.. password, etc..) just by going to a site where the SQL backend was down?

    Ryan

    > -----Original Message----- > From: BRACK [mailto:braknettaxi.com] > Sent: Tuesday, August 07, 2001 12:36 PM > To: php-generallists.php.net > Subject: [PHP] MySQL connection > > > I just wanned to bring the issue of security of MySQL connection: > > Let us imagine that SQL server was down for some hours (of > course without us knowing it) and at the same hours our SQL site > was visited by some kind of hacker, he can see on his screen all > our SQL connection info like username, password, and database > name. You may hide this information in different file than the file > that your users open then the hacker will see something like > "include("connect.inc");" or "require("connect.inc");" (of course IF > server is down). So you may only imagine the consequences of > this visit of the hacker. What can we do to protect our sensitive > information if SQL server is down? > > Youri > > -- > 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,

    I think BRACK a.k.a. Jouri means that the connection string (from the PHP pages) would be visible in the client's browser once the SQL server stops running. However, I am not so sure about this as all commands are processed on the server - it will, however display an error message that the SQL server is inaccessible.

    Greetz, Bjorn Van Simaeys www.bvsenterprises.com

    --- Tyler Longren <tylercaptainjack.com> wrote: > If the SQL server is down how will he hack it? > That's like hacking a > webserver that doesn't exist. > > Tyler Longren > Captain Jack Communications > tylercaptainjack.com > www.captainjack.com > > > On Tue, 7 Aug 2001 21:35:58 +0200 > "BRACK" <braknettaxi.com> wrote: > > > I just wanned to bring the issue of security of > MySQL connection: > > > > Let us imagine that SQL server was down for some > hours (of > > course without us knowing it) and at the same > hours our SQL site > > was visited by some kind of hacker, he can see on > his screen all > > our SQL connection info like username, password, > and database > > name. You may hide this information in different > file than the file > > that your users open then the hacker will see > something like > > "include("connect.inc");" or > "require("connect.inc");" (of course IF > > server is down). So you may only imagine the > consequences of > > this visit of the hacker. What can we do to > protect our sensitive > > information if SQL server is down? > > > > Youri > > > > -- > > 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 >

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

    attached mail follows:


    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

    Editor, VB Web ================== Web - http://www.vbweb.co.uk Email - jamesvbweb.co.uk ICQ# - 60612011 Fax - +44(0)8707052859 ==================

    attached mail follows:


    Hi,

    Can anybody tell me what the code to close the browser is?

    attached mail follows:


    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 >

    attached mail follows:


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

    attached mail follows:


    Hello, I am trying to make a script that automates domain name registration. What I need my script to do is send information to a script that opensrs runs to activate a pending order. But I don't want to redirect the user there. I only want to send information there and then take the user to a friendly pretty place. I have some reason to believe has to do with cURL, but not sure. I hope you understand what I am saying. Thanks Brandon