OSEC

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

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

    php-general Digest 22 Aug 2001 17:49:26 -0000 Issue 831

    Topics (messages 63854 through 63943):

    Re: Why lynx don't work with cron?
            63854 by: Dave
            63894 by: Augusto Cesar Castoldi

    Re: Unable to use fopen to read a URL - DNS Problem?
            63855 by: Dave

    Re: if statement and imageline()
            63856 by: Hugh Danaher
            63877 by: Hugh Danaher

    array
            63857 by: Chris Herring
            63859 by: David Robley

    COM
            63858 by: Paul S.

    transfer tables to another database?
            63860 by: nafiseh saberi
            63862 by: David Robley
            63867 by: speedboy

    time
            63861 by: nafiseh saberi
            63865 by: speedboy
            63866 by: Raphael Pirker
            63869 by: David Robley

    mySQL Query - comparing multiple values with one field
            63863 by: Niklas Lampén
            63870 by: David Robley
            63876 by: James Holloway

    re:transfer tables to another database?
            63864 by: nafiseh saberi

    thanks
            63868 by: nafiseh saberi

    Problems benchmarking php Scripts
            63871 by: Jens Kisters

    Header Nightmare...
            63872 by: David Bouw

    Re: Strings with Spaces in URLS
            63873 by: Christian Reiniger

    Concept of Templates
            63874 by: Navid Yar

    Move recordset to first record problems...
            63875 by: Veniamin Goldin

    imagemagick and file size
            63878 by: Ben-Nes Michael

    Where do I get the DLL php_mssql70.dll?? Please help...
            63879 by: Phil
            63880 by: Raphael Pirker

    socket function
            63881 by: Boris
            63891 by: Steve Brett

    Re: PHP based auth -----------------
            63882 by: Alex Sofronie

    How can I insert the data into the begining of a text file
            63883 by: Zenith
            63884 by: Niklas Lampén
            63890 by: Steve Brett
            63927 by: Zenith

    parsing .php files not only under root dir
            63885 by: helmutott

    Regex help
            63886 by: Stefen Lars
            63901 by: Robin Vickery

    Cant load dynamic library.... whats up?
            63887 by: Phil

    Re: our country
            63888 by: _lallous

    someone please explain weird getforeignkeys
            63889 by: alvarez.sto13.st-oneline.de

    Web fetching script
            63892 by: Ben Quinn
            63896 by: Dave
            63900 by: Andrey Hristov

    Re: [PHP-DB] Move recordset to first record problems...
            63893 by: Miles Thompson

    Re: register_globals odd behaviour?
            63895 by: Sean C. McCarthy

    convert 12:12:00 to seconds
            63897 by: nafiseh saberi
            63898 by: Chris Lambert
            63899 by: Andrey Hristov
            63928 by: rm

    Re: PHP/Apache configuration for Win NT
            63902 by: paul.eaton.globalgraphics.com
            63903 by: Julie Meloni

    Cannot get uploaded file by PUT request vith PHP4 and Apache1.3
            63904 by: Martin
            63907 by: Andrey Hristov

    Re: problem with $HTTP_POST_FILES
            63905 by: bill

    resource xh in xslt functions
            63906 by: Jean-Charles Preaux

    Convert to int...?
            63908 by: Seb Frost
            63912 by: Michael Geier, CDM Systems Admin
            63913 by: Andrey Hristov

    Re: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure Vulnerability
            63909 by: Kurth Bemis
            63926 by: Tom Malone
            63929 by: Kurth Bemis

    column_name
            63910 by: Jeremy Morano

    MySQL read only?
            63911 by: Jay Paulson
            63942 by: Gabe da Silveira

    Re: Mem and variables
            63914 by: scott [gts]
            63941 by: rm

    phpMyAdmin install error
            63915 by: Tom Beidler
            63919 by: Jay Paulson
            63922 by: Kurth Bemis

    HTTP headers and include()
            63916 by: Casteele/ShadowLord
            63921 by: Andy

    php-counter
            63917 by: Gert Mellak
            63918 by: John Meyer
            63923 by: Sheridan Saint-Michel
            63924 by: Andrey Hristov

    Script timeout
            63920 by: Julian Wood

    help with php mysql and images...
            63925 by: Mike
            63932 by: John Meyer

    how to disable the automated "userID/password" in Internet Explor er
            63930 by: Zhu George-CZZ010
            63940 by: Gabe da Silveira

    Training Course Update - October 1-5
            63931 by: Michael Kimsal

    restoring mysql db after mysqldump
            63933 by: Jay Paulson

    Newsgroup?
            63934 by: Christopher Raymond
            63936 by: CC Zona
            63939 by: Gabe da Silveira

    functions and quotes
            63935 by: Kurth Bemis
            63937 by: Gabe da Silveira

    Re: [PHP-DB] restoring mysql db after mysqldump
            63938 by: Rick Emery

    Re: Need "Working..." pop up dialog (repost)
            63943 by: Ray Clouse

    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:


    you are talking about two completely different applications(as mentioned in
    post)...

    one is a cron job to do something (unspecified) which requires executable PHP (a
    la CGI) to point the file to

    the other (recent post) discusses using lynx to parse a site which is IMO a bad
    move in either case...
    better off opening a socket to the site you are wanting to parse, dumping the
    contents directly into a variable, and dealing with your content from there.

    Dave

    >I was waiting for someone to answer this question but it hasn't happened yet.
    > I was using this a couple years ago to get a weather page from http after
    >the ftp site with the raw text disappeared. Rest assured this has NOTHING to
    >do with php and everything to do with lynx.
    >On Tuesday 21 August 2001 05:50 am, you wrote:
    >> Hi, I'm trying the command "lynx -dump -nolog
    >> http://localhost/script.php > /dev/null" on crontab
    >> but I (httpd) receive an e-mail from "Cron Daemon"
    >> saying that:
    >> "Your terminal lacks the ability to clear the screen
    >> or position the cursor."
    >>
    >> what should I do run my script with cron?

    attached mail follows:


    Hi Rob,

    I gave up of lynx.

    Now I'm using "wget" and it's working great!

    try this with cron: "wget -q
    http://domain.com/script.php"

    the "-q" option is to run on "quiet" mode.

    see you.

    Augusto

     --- Rob Hardowa <roblionofzion.com> escreveu: >
    Hiya,
    >
    > I was waiting for someone to answer this question
    > but it hasn't happened yet.
    > I was using this a couple years ago to get a
    > weather page from http after
    > the ftp site with the raw text disappeared. Rest
    > assured this has NOTHING to
    > do with php and everything to do with lynx.
    >
    > I ran my script fine, then after I upgraded my
    > system (I believe it was
    > redhat 6.2) I started getting the error msg you got.
    > After doing 'man lynx'
    > and reading what I could, I gave up really fast and
    > just reinstalled an older
    > version of lynx cause let's face it, it was just a
    > weather script that didn't
    > warrant more than 20 minutes on.
    >
    > The message is basically saying "Hey, you're running
    > me from a cron job and I
    > can't find an ncurses terminal to output to!" I am
    > assuming that's what it
    > is but don't quote me :) You may want to spend a
    > little time in the lynx
    > docs, and then let us know when you find out :)
    > Also, I'm not 100% sure that
    > the script itself isn't running.....try redirecting
    > that from dev/null to
    > writing to a file like /home/user/TEST.PHP and
    > examine the contents.....
    >
    > On Tuesday 21 August 2001 05:50 am, you wrote:
    > > Hi, I'm trying the command "lynx -dump -nolog
    > > http://localhost/script.php > /dev/null" on
    > crontab
    > > but I (httpd) receive an e-mail from "Cron Daemon"
    > > saying that:
    > > "Your terminal lacks the ability to clear the
    > screen
    > > or position the cursor."
    > >
    > > what should I do run my script with cron?
    > >
    > > thanks,
    > >
    > > Augusto
    > >
    > >
    >
    ___________________________________________________________________________
    > >____________________ Yahoo! GeoCities
    > > Tenha seu lugar na Web. Construa hoje mesmo sua
    > home page no Yahoo!
    > > GeoCities. É fácil e grátis!
    > http://br.geocities.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
    >

    _______________________________________________________________________________________________
    Yahoo! GeoCities
    Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis!
    http://br.geocities.yahoo.com/

    attached mail follows:


    check that apache is doing name resolution?? stab in the dark there.

    can you do includes from other locations using names?

    dns on the Ip address that apache/php is sitting on resolving correctly?

    >-----Original Message-----
    >From: Brian White [mailto:bwhitesteptwo.com.au]
    >Sent: Tuesday, August 21, 2001 11:20 PM
    >To: php-generallists.php.net
    >Cc: php-generallists.php.net
    >Subject: [PHP] Unable to use fopen to read a URL - DNS Problem?
    >
    >
    >This is a repost.
    >
    >To summarise: My installtion of PHP is unable to resolve names. I can't use
    >fopen
    > to open a URL which uses a name, but if I manually calculate
    >the IP
    > address, I can read in the page OK. ( see example below ).
    >
    >I need some tips on where to start looking to solve this problem.
    >
    >If it helps, my config options when I built PHP were:
    >
    >--with-gd=/usr/local/src/gd-1.8.4/
    >--enable-gd-imgstrttf
    >--with-ttf=/usr/local/freetype/
    >--enable-calendar
    >--disable-short-tags
    >--with-mysql=/usr/local/mysql/
    >--with-jpeg-dir=/usr/local/src/jpeg-6b/
    >--with-apxs=/usr/local/apache/bin/apxs
    >
    >and I am running PHP 4.0.4pl1 under Debian "Potato" Linux and Apache 1.3
    >
    >Regs
    >
    >Brian White
    >
    >At 16:28 14/08/2001 +1000, Brian White wrote:
    >>The following code:
    >>
    >> $url = "http://www.php.net/";
    >> print ( implode( "", file( $url ) ));
    >>
    >>causes my browser to sit and twiddle it's thumbs for ages and then produce:
    >>
    >> Warning: file("http://www.php.net/") - Bad file descriptor in
    >> myfile.php on line 33
    >>
    >> Warning: Bad arguments to implode() in myfile.php on line 33
    >>
    >>If, however, I explictly use the IP address:
    >>
    >> $url = "http://208.247.106.187/";
    >> print ( implode( "", file( $url ) ));
    >>
    >>it will successfully dump a copy of the php front page.
    >>
    >>This says to me that PHP can't resolve names. It is not a problem
    >>with the linux box it's running on, given that I ran "ping www.php.net"
    >>on that particular box to find the IP address.
    >>
    >>Can anyone tell me what I need to do to make it work?
    >>
    >>Regs
    >>
    >>Brian White
    >>-------------------------
    >>Brian White
    >>Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
    >>Phone: +612-93197901
    >>Web: http://www.steptwo.com.au/
    >>Email: bwhitesteptwo.com.au
    >>
    >>
    >>--
    >>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
    >
    >-------------------------
    >Brian White
    >Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
    >Phone: +612-93197901
    >Web: http://www.steptwo.com.au/
    >Email: bwhitesteptwo.com.au
    >
    >
    >--
    >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:


    Richard,

    Without the code below, I get a good .jpg file and it displays nicely. But,
    with the IF statement in, I get a time out error message "Execute time
    exceeds 30 seconds..." I think it is because two of the variables are
    declared after the IF statement, even though they aren't being used on the
    first loop. I'll try to declare them before the FOR loop and see if that
    works.

    As you might tell from my code, the only software course I ever had, was in
    college 20 years ago, and it was in BASIC language (with line numbers!).
    However, I find php easy to work with, and have done some amazing things
    with it in the last 2 months. With your help and the help of others, I'll
    certainly make progress.

    Thanks,
    Hugh
    ----- Original Message -----
    From: Richard Lynch <ceol-i-e.com>
    To: <php-generallists.php.net>
    Sent: Tuesday, August 21, 2001 5:16 PM
    Subject: [PHP] Re: if statement and imageline()

    > What are you getting? An image at all? Broken image?
    >
    > Try getting rid of the header("image/jpeg") or whatever, and see if you
    have
    > some error message.
    >
    > --
    > WARNING richardzend.com address is an endangered species -- Use
    > ceol-i-e.com
    > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
    > Volunteer a little time: http://chatmusic.com/volunteer.htm
    > ----- Original Message -----
    > From: Hugh Danaher <hdanaherearthlink.net>
    > Newsgroups: php.general
    > To: Php-General <php-generallists.php.net>
    > Sent: Tuesday, August 21, 2001 1:16 AM
    > Subject: if statement and imageline()
    >
    >
    > help,
    >
    > I am trying to set up a .jpg file to graph the earnings per year of a
    > company. I can generate a log-normal graph, can get it to display the
    > earnings per year as circles on the graph, but I can't get the " if () "
    > statement to work. I know I am setting two of the variables in the if
    > statement after the if statement executes once, but these variables won't
    be
    > used until after the " for () " loops once, and therefore should be
    > available for use in " imageline() " on the second loop (where
    > $year>$startyear). Somehow, I think my logic is correct but it mustn't be
    > so.
    >
    >
    > $startyear=1996;
    > $chart_start_year=1992;
    > for ($year=$startyear;$year<=$startyear+7;$year++)
    > {
    > $x=(($year-$chart_start_year)*20)+20;
    > $y=420-log(${"earnings_".$year})*75;
    > if ($year>$startyear)
    > {
    > imageline($image,$first_x,$first_y,$x,$y,$blue);
    > }
    > $first_x=$x;
    > $first_y=$y;
    >
    imagettftext($image,9,0,$x_distance-4,$y_distance+3,$blue,$font2,"m");
    > }
    >
    >
    >
    > --
    > 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:


    Richard,
    No, the code was cut from the php file and displayed as is in my e-mail. I
    also tried to see if I could declare the two suspect variables in another
    IF() statement before the IF() statement that's fouling the execution of the
    .jpg construct, but no luck there too. Could I just be overburdening the
    program? I've got a lot of code (about 150 lines) in the .jpg construct.
    Cheers,
    Hugh
    ----- Original Message -----
    From: Richard Lynch <ceol-i-e.com>
    To: Hugh Danaher <hdanaherearthlink.net>
    Sent: Wednesday, August 22, 2001 12:18 AM
    Subject: Re: [PHP] Re: if statement and imageline()

    > Hmmmmmm.
    >
    > Are you sure you didn't have:
    >
    > if ($year = $startyear)
    >
    > *THAT* would assign 1996 over and over to $year, after the ++, so it would
    > never move forward, and the script would time out...
    >
    > Not sure what else could be wrong, if it's *JUST* the if part you are
    > adding...
    >
    > --
    > WARNING richardzend.com address is an endangered species -- Use
    > ceol-i-e.com
    > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
    > Volunteer a little time: http://chatmusic.com/volunteer.htm
    > ----- Original Message -----
    > From: Hugh Danaher <hdanaherearthlink.net>
    > To: Richard Lynch <ceol-i-e.com>
    > Cc: Php-General <php-generallists.php.net>
    > Sent: Wednesday, August 22, 2001 1:05 AM
    > Subject: Re: [PHP] Re: if statement and imageline()
    >
    >
    > > Richard,
    > >
    > > Without the code below, I get a good .jpg file and it displays nicely.
    > But,
    > > with the IF statement in, I get a time out error message "Execute time
    > > exceeds 30 seconds..." I think it is because two of the variables are
    > > declared after the IF statement, even though they aren't being used on
    the
    > > first loop. I'll try to declare them before the FOR loop and see if
    that
    > > works.
    > >
    > > As you might tell from my code, the only software course I ever had, was
    > in
    > > college 20 years ago, and it was in BASIC language (with line numbers!).
    > > However, I find php easy to work with, and have done some amazing things
    > > with it in the last 2 months. With your help and the help of others,
    I'll
    > > certainly make progress.
    > >
    > > Thanks,
    > > Hugh
    > > ----- Original Message -----
    > > From: Richard Lynch <ceol-i-e.com>
    > > To: <php-generallists.php.net>
    > > Sent: Tuesday, August 21, 2001 5:16 PM
    > > Subject: [PHP] Re: if statement and imageline()
    > >
    > >
    > > > What are you getting? An image at all? Broken image?
    > > >
    > > > Try getting rid of the header("image/jpeg") or whatever, and see if
    you
    > > have
    > > > some error message.
    > > >
    > > > --
    > > > WARNING richardzend.com address is an endangered species -- Use
    > > > ceol-i-e.com
    > > > Wanna help me out? Like Music? Buy a CD:
    http://l-i-e.com/artists.htm
    > > > Volunteer a little time: http://chatmusic.com/volunteer.htm
    > > > ----- Original Message -----
    > > > From: Hugh Danaher <hdanaherearthlink.net>
    > > > Newsgroups: php.general
    > > > To: Php-General <php-generallists.php.net>
    > > > Sent: Tuesday, August 21, 2001 1:16 AM
    > > > Subject: if statement and imageline()
    > > >
    > > >
    > > > help,
    > > >
    > > > I am trying to set up a .jpg file to graph the earnings per year of a
    > > > company. I can generate a log-normal graph, can get it to display the
    > > > earnings per year as circles on the graph, but I can't get the " if
    ()
    > "
    > > > statement to work. I know I am setting two of the variables in the if
    > > > statement after the if statement executes once, but these variables
    > won't
    > > be
    > > > used until after the " for () " loops once, and therefore should be
    > > > available for use in " imageline() " on the second loop (where
    > > > $year>$startyear). Somehow, I think my logic is correct but it
    mustn't
    > be
    > > > so.
    > > >
    > > >
    > > > $startyear=1996;
    > > > $chart_start_year=1992;
    > > > for ($year=$startyear;$year<=$startyear+7;$year++)
    > > > {
    > > > $x=(($year-$chart_start_year)*20)+20;
    > > > $y=420-log(${"earnings_".$year})*75;
    > > > if ($year>$startyear)
    > > > {
    > > > imageline($image,$first_x,$first_y,$x,$y,$blue);
    > > > }
    > > > $first_x=$x;
    > > > $first_y=$y;
    > > >
    > > imagettftext($image,9,0,$x_distance-4,$y_distance+3,$blue,$font2,"m");
    > > > }
    > > >
    > > >
    > > >
    > > > --
    > > > 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 trying to get an array to read the text from a file, and so far it isn't working. If you can help me, respond.

    <snippet>
    $fp = fopen ("./file.txt", "r");
    $text = array ($fp);
    sort ($text);
    reset ($text);
    while (list ($key, $val) = each ($text)) {
        echo "[".$key."] ".$val;
        echo "<br>";
    }
    fclose ($fp);
    </snippet>

    Currently all that does is print out "[0] Resource id #1"
    Any help is GREATLY appreciated. Thanks in advance.

    attached mail follows:


    On Wed, 22 Aug 2001 15:34, Chris Herring wrote:
    > I'm trying to get an array to read the text from a file, and so far it
    > isn't working. If you can help me, respond.
    >
    > <snippet>
    > $fp = fopen ("./file.txt", "r");
    > $text = array ($fp);
    > sort ($text);
    > reset ($text);
    > while (list ($key, $val) = each ($text)) {
    > echo "[".$key."] ".$val;
    > echo "<br>";
    > }
    > fclose ($fp);
    > </snippet>
    >
    > Currently all that does is print out "[0] Resource id #1"
    > Any help is GREATLY appreciated. Thanks in advance.

    Well, $fp is not the contents of the file, but just a pointer. What you
    really want is file()

    $text = file('./file.txt');

    will give you an array $file, where each element is a line in the file,
    with the newline attached.

    To do the same thing after fopen()ing the file you would need to use
    fgets() or fread(). The examples in the docs will be a bit more
    enlightening.

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

    A camel is a horse planned by committee.

    attached mail follows:


    I heard refs on using the COM interface to access MS Word files.

    Is this a procedure an interface that only works on Windows systems (as that is where Word runs)?

    attached mail follows:


    hi. I want to transfer tables to another database. how??

    thanks.

    attached mail follows:


    On Thu, 23 Aug 2001 16:07, nafiseh saberi wrote: > hi. > I want to transfer tables to another database. > how?? > > thanks.

    Without knowing what DB package you are using - use whatever tool you have (in mysql it's mysqldump) to dump the data, then use ? to reload it into the new database; assuming that you are staying with the same DB package.

    Alternatively, you could use PHP (just to keep on topic) to read records from the tables in the 'old' database and write to the 'new' database.

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

    Time was invented by an Irish guy named O'Clock.

    attached mail follows:


    > hi. > I want to transfer tables to another database. > how??

    Have you read the documentation on backing up and restoring databases/tables in postgresql?

    http://www.ca.postgresql.org/users-lounge/docs/7.1/admin/backup.html

    attached mail follows:


    hi. how do I can wrk with time:

    11:56:23 - 10:00:45 =????

    thanks.

    attached mail follows:


    > hi. > how do I can wrk with time: > > 11:56:23 - 10:00:45 =????

    Don't ask this again.

    Date: Mon, 20 Aug 2001 19:14:41 +1000 (EST) From: speedboy <speedboynomicrosoft.org> To: php-generallists.php.net Subject: Re: [PHP] time in php

    > hi. > how I compare two times with php? > 12:23:50 - 13:12:00 = ???

    Convert them to timestamps (unix timestamps) and subtract the two.

    attached mail follows:


    convert both to a timestamp... check http://www.php.net/manual/en/function.mktime.php for more info

    attached mail follows:


    On Thu, 23 Aug 2001 16:11, nafiseh saberi wrote: > hi. > how do I can wrk with time: > > 11:56:23 - 10:00:45 =???? > > thanks.

    Have a look at the date and time functions - convert the time to seconds and do the calculation (mktime) then turn it back to whatever format you like.

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

    REALITY.SYS corrupted: Reboot universe? (Y/N/A)

    attached mail follows:


    What I need to do is to compare if one field matches a value from a huge list of values.

    Do I need to query like "SELECT * FROM table WHERE field LIKE '%value1%' || field LIKE '%value2%'" or can I do it something like this "SELECT * FROM table WHERE field LIKE ('%value1%' || '%value2%')"?

    Niklas Lampén

    attached mail follows:


    On Wed, 22 Aug 2001 16:21, Niklas Lampén wrote: > What I need to do is to compare if one field matches a value from a > huge list of values. > > Do I need to query like > "SELECT * FROM table WHERE field LIKE '%value1%' || field LIKE > '%value2%'" or can I do it something like this > "SELECT * FROM table WHERE field LIKE ('%value1%' || '%value2%')"? > > > Niklas Lampén

    The first will work. If you are doing exact comparisons, the mysql comparison operator IN may prove useful.

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

    It's as easy as 3.14159265358979323846264338327950...

    attached mail follows:


    Hi Niklas,

    You can use || or OR.

    Secondly, huge list of values you say? Can this list be exploded by a common denominator, like a space or comma? If so, consider this:

    $list = // Huge list of words (array), separated by a comma. $words = explode(",", $list); $query = "SELECT * FROM table WHERE ";

    for($i = 0; $i <= sizeof($words); $i++) { $query .= "field LIKE '%" . $words[$i] . "%' OR "; }

    $query = substr($query, 0, -4); // need to take out: [[:space:]]OR[[:space:]] from the end $do_query = mysql_query($query);

    Cheers, James

    > What I need to do is to compare if one field matches a value from a huge > list of values. > > Do I need to query like > "SELECT * FROM table WHERE field LIKE '%value1%' || field LIKE '%value2%'" > or can I do it something like this > "SELECT * FROM table WHERE field LIKE ('%value1%' || '%value2%')"? > > > Niklas Lampén >

    attached mail follows:


    hi and thanks.

    I work with postgres with php.

    best regards. love your enemies that cause to work harder. I am from IRAN. thanks again.

    attached mail follows:


    thanks for time and pg_dump.

    nafiseh.

    attached mail follows:


    Hello together,

    I have been trying to benchmark the backend scripting for a flash online game, for this purpose i wrote another PHP Script that uses fopen to make exactly the same requests the flash movie would make with the same timing, and writes a log of the game session into a database. I run this script from the shell of a linux box using the php CGI binary, and start it for a couple of times, but somehow i rarely get more than 66 of those benchmark scripts started simultaneously, neither on one machine, nor on two machines together, so i guessed it has sth to do with my apache confguration, i set startservers and min and maxspare childs to a high value to prevent the httpds from crashing when there are more than 20 to be started in very short time and set maxrequests per child to 256, but none of these changes seem to affect the total number of scripts i can run. The mysql keeps spawning processes of itself and i can still connect to the database when i get to the max of running benchmark scripts, so there does not seem to be a limit of some kind there either.

    Sometime i get to start a hundred scripts or more, but they disappear in very short time. i have the outputs pointed to /dev/null when putting the scripts into the background (start with &), when i start a single one with output there are no error messages displayed.

    I also noticed when looking at the output of 'top' i see few httpd processes crashing saying <defunct>, this happens more rarely when i heve enough httpds started before i start running the benchmark, but some still crash, i can't find any messages in log files saying what happened there.

    The benchmark scripts should log errors if there was no response from the server but i dont get any of those errors in the logs.

    thanks in advance Jens

    --
    Grüße aus dem schönen Kleve
    Jens Kisters
    

    rosomm et partner Agentur für neue Medien GmbH Dienstleistungszentrum am Weißen Tor - Eingang B Gocher Landstrasse 2 47551 Kleve / Bedburg-Hau

    Telefon: 02821 - 97856-20 Telefax: 02821 - 97856-77 j.kistersrosomm-partner.de http://www.rosomm-partner.de

    attached mail follows:


    Who can crack the following nut for me..? Or is it uncrackable...?

    I have some files stored in a MySQL database... I encoded this data using base64_encode.. These files can be anything from .pdf files to .jpg or even a Word document...

    To make these files visible I made the following code:

    include ("config/database.cfg"); //config file to connect to database etc etc... $result = mysql ($databasename, "select * from image_table where id = '$admin[file]'"); $nrrows = mysql_numrows($result); if ($nrrows == 1) {$row = mysql_fetch_array($result); header("Content-type: $row[type]"); header("Content-Disposition: inline; filename=$row[originalname]"); echo (base64_decode($row[data])); exit; }

    O.K, heres the problem... Basically the above example works for all documents which Explorer 5.5 (which I am testing on) has got built-in support for.. All documents which use an external application/plugin are giving problems! On the moment I am experimenting with .PDF files...

    My problems is binary data (of the pdf) showing up in my browser.. (E.g... It looks as if the normal html/text tag is used for the content... I need explorer to start Acrobat to view this page... The idea that I get, is that I named the above script: retrieve_date.htm I have got a feeling that Explorer 5.5 is still very buggy with the headers, especially when the filename you retrieve hasn't got the same extension as the filename will original be...

    Does anyone see any mistakes which I am making... ?

    With kind regards David Bouw

    attached mail follows:


    On Wednesday 22 August 2001 03:05, Chris Aitken wrote: > I have come up with a bit of a problem.... > > I have a little funky search form on a page, and when I send the search > data on as a URL, anything with a space is screwed up.... example > > $search = "This is a test"; > echo "<a href=http://www.blah.com/foo.php?search=$search>"; > > and when the link is clicked (or even when the mouse is put over the > link), the URL in the browser is - > > http://www.blah.com/foo.php?search=This > > leaving out all words after the first space.

    http://php.net/urlencode http://php.net/rawurlencode

    -- 
    Christian Reiniger
    LGDC Webmaster (http://lgdc.sunsite.dk/)
    

    The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.

    - Edsger W. Dijkstra

    attached mail follows:


    Hello everyone,

    I have a simple question, and I hope I ask it correctly without any confusion. I want to build my own template scheme without using any 3rd party, ready-made freeware template codes. But I am confused about one thing. I am building a content driven website. The templates (such as html headers, footers, style sheets, etc) will be placed in text files and called in as includes, but the content will be placed in a database. The thing I'm confused about is the concept behind linking these articles together in a main TOC (table of contents) page. When one clicks on a topic from a main TOC page, how does the server know which article to pull from the database and place into a particular template? Does the link itself send any information someplace that tells the server what information is needed and how it has to be performed or placed?

    I hope this doesn't sound too confusing. If anyone needs me to clear it up a bit more, please let me know and I'll try my best. For those of you who know what I'm talking about, what is the concept behind templates, especially the links to those templates? Thanks in advance...

    attached mail follows:


    Please help me !

    How to move recordset to the first record (i use to connect to database using ODBC).

    Thank you !

    attached mail follows:


    Hi

    I decrease image size using imagemagick with the following command: function example() { $convert = "cat $userfile | /usr/X11R6/bin/convert - $type:-"; return `$convert`; }

    the returned binary value is uploaded to the DB.

    My main problem is that I don't know how to measure the decreased image size while its stored in the variable.

    -------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------

    attached mail follows:


    Hey everybody,

    I'm trying to connect a mssql db, but cant't even load the extension for mssql....

    Where do I get the file php_mssql70.dll (php4)?

    Thanks everybody!

    Phil

    attached mail follows:


    it should be inside C:\PHP\extensions

    if the file is not in there, then you should download the package again. also remember to specify the extension in your php.ini!!

    cheers

    raphael

    attached mail follows:


    Does socket() function works on windows or not?

    Thanks Boris

    attached mail follows:


    it does indeed.

    open and treat like a file.

    Steve "Boris" <borisepisteme.no> wrote in message news:20010822093847.74189.qmailpb1.pair.com... > Does socket() function works on windows or not? > > Thanks > Boris > > >

    attached mail follows:


    Thanks a lot. And sorry about ------------ in my subject message but at a prior post on this list I managed to skip some responses due to the volume of this list. Thanks again,

    Alex Sofronie maxxmail.dntis.ro ----- Original Message ----- From: "Sheridan Saint-Michel" <webmasterfoxjet.com> To: "Alex Sofronie" <maxxmail.dntis.ro>; "php-general" <php-generallists.php.net> Sent: Tuesday, August 21, 2001 4:53 PM Subject: Re: [PHP] Re: PHP based auth -----------------

    > What you are trying to do is covered in the manual here: > http://www.php.net/manual/en/features.http-auth.php > > I think you specifically was the section: > Both Netscape Navigator and Internet Explorer will clear the local browser > window's authentication cache for the realm upon receiving a server response > of 401. This can effectively "log out" a user, forcing them to re-enter > their username and password. Some people use this to "time out" logins, or > provide a "log-out" button. > > All the details of this are in the manual. > > Sheridan Saint-Michel > Website Administrator > FoxJet, an ITW Company > www.foxjet.com > > > ----- Original Message ----- > From: "Alex Sofronie" <maxxmail.dntis.ro> > To: "PHP General" <php-generallists.php.net> > Sent: Monday, August 20, 2001 4:12 PM > Subject: [PHP] Re: PHP based auth ----------------- > > > > No, I'm just using PHP_AUTH_USER and PHP_AUTH PW and i am trying to > > logout... The session_destroy() is not working. > > > > > > > > -- > > 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 orginal have a function like the following...

    $fp = fopen ( $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt", "a" ); fputs ( $fp, "\nDebug message from : $PHP_SELF\n" ); fputs ( $fp, "\t$message\n\n" ); fclose ( $fp );

    But I found that, the result is, all message is append to the end of a file. Can I insert the text into the begining of the file??

    I think read all the text from the file first, arrang the string variable, so that the new message can insert, would be a solution. But is it stupid to do so??

    attached mail follows:


    Use $fp = fopen($file, "r+");

    PHP Manual would have told you this.

    Niklas

    -----Original Message----- From: Zenith [mailto:nixstylehongkong.com] Sent: 22. elokuuta 2001 12:39 To: php-generallists.php.net Subject: [PHP] How can I insert the data into the begining of a text file

    I orginal have a function like the following...

    $fp = fopen ( $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt", "a" ); fputs ( $fp, "\nDebug message from : $PHP_SELF\n" ); fputs ( $fp, "\t$message\n\n" ); fclose ( $fp );

    But I found that, the result is, all message is append to the end of a file. Can I insert the text into the begining of the file??

    I think read all the text from the file first, arrang the string variable, so that the new message can insert, would be a solution. But is it stupid to do so??

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


    or rewind() if the file is already open

    Steve

    "Niklas lampén" <niklas.lampenpublico.fi> wrote in message news:NPEFKEPHNLKEPEOLHPKNIENPCCAA.niklas.lampenpublico.fi... > Use $fp = fopen($file, "r+"); > > PHP Manual would have told you this. > > > Niklas > > -----Original Message----- > From: Zenith [mailto:nixstylehongkong.com] > Sent: 22. elokuuta 2001 12:39 > To: php-generallists.php.net > Subject: [PHP] How can I insert the data into the begining of a text > file > > > I orginal have a function like the following... > > $fp = fopen $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt", > "a" ); > fputs ( $fp, "\nDebug message from : $PHP_SELF\n" ); > fputs ( $fp, "\t$message\n\n" ); > fclose ( $fp ); > > But I found that, the result is, all message is append to the end of a file. > Can I insert the text into the begining of the file?? > > I think read all the text from the file first, arrang the string variable, > so that the new message can insert, would be a solution. But is it stupid to > do so?? > > > > > -- > 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 have try this but, PHP just overwrite the prevoius content, and write the new message into the file. But I want to INSERT the new message into the head of a file. Or , I did a wrong thing again?? My code is like now. $fp = fopen ( $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt", "r+" ); fputs ( $fp, "\nDebug message from : $PHP_SELF at ".strftime("%T on %D")."\n" ); fputs ( $fp, "$message\n\n" ); fclose ( $fp );

    "Niklas lampén" <niklas.lampenpublico.fi> ????? news:NPEFKEPHNLKEPEOLHPKNIENPCCAA.niklas.lampenpublico.fi... > Use $fp = fopen($file, "r+"); > > PHP Manual would have told you this. > > > Niklas > > -----Original Message----- > From: Zenith [mailto:nixstylehongkong.com] > Sent: 22. elokuuta 2001 12:39 > To: php-generallists.php.net > Subject: [PHP] How can I insert the data into the begining of a text > file > > > I orginal have a function like the following... > > $fp = fopen $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt", > "a" ); > fputs ( $fp, "\nDebug message from : $PHP_SELF\n" ); > fputs ( $fp, "\t$message\n\n" ); > fclose ( $fp ); > > But I found that, the result is, all message is append to the end of a file. > Can I insert the text into the begining of the file?? > > I think read all the text from the file first, arrang the string variable, > so that the new message can insert, would be a solution. But is it stupid to > do so?? > > > > > -- > 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 would like the server on win2K to parse .php files whereever on the computer they are located. The server should run as service. What server allows this?

    Helmut

    attached mail follows:


    Hello all

    In the Apache config file, we have the following directive:

    SetEnvIfNoCase Referer "^http://www.oursite.com/" local_ref

    <FilesMatch ".(gif|jpg)"> Order Allow,Deny Allow from env=local_ref </FilesMatch>

    We use this to prevent people from directly linking to .gif and .jpg files. This technique is covered here:

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

    However, we have to add more and more file types to the FilesMatch directive. Currently it looks like this:

    <FilesMatch ".(doc|zip|xls|exe|jpg|gif|png|psd|tif|tif)">

    However, this list continues to grow. And we can never be sure that every file type is included.

    It occurred to me that it would be better to say "do not serve any files except .htm, .html and .php files.".

    I have spent quite a long time with several regexes, but I am unable to create a regex that archives this seemingly simple talk.

    If anyone could help, I would be really happy….

    S

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

    attached mail follows:


    stefenlarshotmail.com (Stefen Lars) writes:

    > In the Apache config file, we have the following directive: > > SetEnvIfNoCase Referer "^http://www.oursite.com/" local_ref=1 > > <FilesMatch ".(gif|jpg)"> > Order Allow,Deny > Allow from env=local_ref > </FilesMatch> > > We use this to prevent people from directly linking to .gif and .jpg > files. > > However, we have to add more and more file types to the FilesMatch > directive. Currently it looks like this: > > <FilesMatch ".(doc|zip|xls|exe|jpg|gif|png|psd|tif|tif)"> > > However, this list continues to grow. And we can never be sure that > every file type is included. > > It occurred to me that it would be better to say "do not serve any > files except .htm, .html and .php files.". > > > I have spent quite a long time with several regexes, but I am unable > to create a regex that archives this seemingly simple talk. >

    How about this approach?

    SetEnvIfNoCase Referer "^http://www.oursite.com/" local_ref=1

    Order Allow,Deny

    Allow from env=local_ref

    <FilesMatch "\.(php|html?)$"> Allow from all </FilesMatch>

    I'd tighten up your regex slightly too. As it was it would match pretty much any filename with those letters in it; The '.' matches any character and it's not anchored to the end of the string.

    -robin

    attached mail follows:


    Hey everybody,

    Im trying to tell php to search my extensions... I tried everything but it doesnt work... does anybody has an idea???

    c:\windows\php.ini says:

    - extension=php_mssql.dll - extension=php_oci8.dll - extension=php_openssl.dll

    and

    - extension_dir = "c:\windows\system\"

    I even placed the dlls for all the extensions in:

    - c:\programs\php - c:\programs\extensions - c:\windows\ - c:\windows\system

    But ist doesn't work.....

    Thanks everybody!

    Phil

    attached mail follows:


    Why LEBANON isn't listed?

    "Richard Lynch" <ceol-i-e.com> wrote in message news:036b01c12aa4$51b7fce0$6401a8c0Lynchux100... > Check at http://www.phpusergroups.org to see if there's a User Group in your > area. > > -- > WARNING richardzend.com address is an endangered species -- Use > ceol-i-e.com > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > ----- Original Message ----- > From: Nafiseh Saberi <nsaberiiraninfocenter.net> > Newsgroups: php.general > To: <php-generallists.php.net> > Sent: Wednesday, August 22, 2001 8:52 AM > Subject: our country > > > > > > hi. > > > > I want to know how many of people in php group are IRANIAN?? > > > > I am IRANIAN too. > > how about yours?? > > thanks. >

    attached mail follows:


    I need to look up a table's foreign keys using the unified ODBC-functions. 'odbc_foreignkeys()' requires me to pass seven parameters, each of them being mandatory, to archive this.

    Because the approach is not intuitive anyhow and there is no documentation available except of the PHP-manual's prototype, neither me nor my co-workers have any idea of how to apply the function.

    The manual states that three of the arguments are superfluous, depending on the application; but the prototype contradicts this, declaring them mandatory.

    Can anyone please point me to a working code example or provide one?

    Thanks, D. Alvarez Arribas <alvarezst-oneline.net>

    Btw, how are the inter-table relationships defined at all? I cannot think of a way to determine foreign keys without complete knowledge of all joins and subqueries potentially run against the database.

    attached mail follows:


    Hi all

    I have a web fetching script that fetches text from an external URL and I would like to grab two lots of text at the same time - can anyone tell me why this isn't working?

    <?

    $GrabURL = "http://grabfile.html"; $GrabStart = "start"; $GrabEnd = "stop";

    $file = fopen("$GrabURL", "r");

    $rf = fread($file, 20000);

    $grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing);

    echo $printing;

    rewind($rf);

    $grab2 = eregi("$GrabStart(.*)$GrabEnd", $rf, $printingb);

    echo $printingb;

    fclose($file);

    ?>

    attached mail follows:


    What response are you expecting, and what response are you getting?

    assuming your regex is working as expected, you are running it twice to receive the same result into 2 different variables??? why not just copy the variable after

    additionally, $printing is filled with the matches of your regex(10 of them according to manual) as such you have to specify which element of $printing you are wanting to print, or you will get the lovely "array" output

    I don't understand why the grab variables are there unless you need them later. Without accounting for your regex...

    eregi("$GrabStart(.*)$GrabEnd", $rf, $printing); echo $printing[1]; $printingb=$printing; echo $printingb[1];

    >I have a web fetching script that fetches text from an external URL and I >would like to grab two lots of text at the same time - can anyone tell me >why this isn't working? > ><? > >$GrabURL = "http://grabfile.html"; >$GrabStart = "start"; >$GrabEnd = "stop"; > >$file = fopen("$GrabURL", "r"); > >$rf = fread($file, 20000); > >$grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing); > >echo $printing; > >rewind($rf); > >$grab2 = eregi("$GrabStart(.*)$GrabEnd", $rf, $printingb); > >echo $printingb; > >fclose($file); > >?> > >

    attached mail follows:


    Try this: http://www.php.net/manual/en/ref.curl.php ----- Original Message ----- From: "Ben Quinn" <benquinnoptushome.com.au> To: <php-generallists.php.net> Sent: Wednesday, August 22, 2001 2:35 PM Subject: [PHP] Web fetching script

    > Hi all > > I have a web fetching script that fetches text from an external URL and I > would like to grab two lots of text at the same time - can anyone tell me > why this isn't working? > > <? > > $GrabURL = "http://grabfile.html"; > $GrabStart = "start"; > $GrabEnd = "stop"; > > $file = fopen("$GrabURL", "r"); > > $rf = fread($file, 20000); > > $grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing); > > echo $printing; > > rewind($rf); > > $grab2 = eregi("$GrabStart(.*)$GrabEnd", $rf, $printingb); > > echo $printingb; > > fclose($file); > > ?> > > > > > > > -- > 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 guess it depends on the ODBC driver. If it lets you pass commands directly to the database, something like s SQL_PASSTHRU, use that faciity. Otherwise use the SELECT command to fetch the first record. Normally this is a two step process: execute the select, then use a while loop to step through the returned records.

    For examples and instruction on the mechanics of this you can check tutorials at www.thickbook.com, or on the Devshed, Webmonkey, PHP_Builder and Zend sites. Most examples use the MySQL database, so you will have to modify them a bit for use with ODBC. (Alternately, do it first with MySQL, so that you know how it is supposed to work, then shift to ODBC and your own database.

    That's pretty general, but it should steer you in the right direction.

    Miles Thompson

    At 10:22 AM 8/22/01 +0200, Veniamin Goldin wrote:

    >Please help me ! > > >How to move recordset to the first record (i use to connect to database >using ODBC). > > >Thank you ! > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-db-unsubscribelists.php.net >For additional commands, e-mail: php-db-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Hi,

    Internally I use variables but I use the array to update the value since I have problems with the scope inside classes. So I update the value on the array just at the end of the script by registering an update function with register_shutdown_function().

    What is the reason that I should not use the array? Is there any problem doing it that way?

    Thanks in advance.

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

    PS: By the way I couldn't find this bug in the bug database.

    Richard Lynch wrote: > > I think you should still use $count++ > > The array is just there for you to *READ* data, not to alter it. > > -- > WARNING richardzend.com address is an endangered species -- Use > ceol-i-e.com > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > ----- Original Message ----- > From: Sean C. McCarthy <smccarthysci-spain.com> > Newsgroups: php.general > To: PHP General List <php-generallists.php.net> > Sent: Tuesday, August 21, 2001 1:00 AM > Subject: register_globals odd behaviour? > > > Hi All, > > > > I just come across and odd behaviour with the register_globals and > > session handling. The problem is that when I set the register globals to > > on I cannot access the session_variables through the associative array > > HTTP_SESSION_VARS. The manual says explicitly that with track_vars and > > register_globals both on the array and the vars will point to the same. > > > > It just doesn't happen the vars are not written at the end of the > > script. I mean with register_globals ON: > > > > <? > > session_register("count"); > > $HTTP_SESSION_VARS["count"]++; > > ?> > > > > this does not work. My php is PHP Version 4.0.3pl1 running on Linux > > 2.2.18 and Apache1.3.9 . Does this bogus behaviour happen with higher > > versions too? > > > > Thanks in advance. > > > > Sean C. McCarthy > > SCI, S.L. (www.sci-spain.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. how do I covert convert 12:12:00 to seconds ? I want to get time from system and covert it to seconds to do arithmetic work on it. thanks.

    attached mail follows:


    $seconds = explode(":", $time); $seconds = $seconds[0] * 3600 + $seconds[1] * 60 + $seconds[2];

    Or use www.php.net/mktime

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

    ----- Original Message ----- From: nafiseh saberi <nsaberiiraninfocenter.net> To: <php-generallists.php.net> Sent: Thursday, August 23, 2001 9:30 AM Subject: [PHP] convert 12:12:00 to seconds

    | | hi. | how do I covert convert 12:12:00 to seconds ? | I want to get time from system and covert it to seconds to do | arithmetic work on it. | 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:


    Use gmmktime() or mktime() example : <?php echo gmmktime(12,12,0,1,1,1970); // format(hour,minute,second,month,day,year) // counting starts from 1/1/1970 so if you set this day you will receive the secongs // gmmktime accoring GMT or mktime() accoring you local time (mine is GMT+3) // so 12:12:00 used with gmmktime will give me how many seconds there are in 9:12:00h ?> ----- Original Message ----- From: "nafiseh saberi" <nsaberiiraninfocenter.net> To: <php-generallists.php.net> Sent: Thursday, August 23, 2001 4:30 PM Subject: [PHP] convert 12:12:00 to seconds

    > > hi. > how do I covert convert 12:12:00 to seconds ? > I want to get time from system and covert it to seconds to do > arithmetic work on it. > 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:


    maybe....

    $time=12:12:00

    $x=explode(":",$time);

    $sec=($x[0]*3600)+($x[1]*60)=$x[2];

    rm

    --- nafiseh saberi <nsaberiiraninfocenter.net> wrote: > > hi. > how do I covert convert 12:12:00 to seconds ? > I want to get time from system and covert it to > seconds to do > arithmetic work on it. > 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 >

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

    attached mail follows:


    Hi Julie,

    I realised that I had a case sensitivity issue with my script alias and corrected it.

    So far so good.

    I then retried it and got the following error message:-

    Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, paul.eatonglobalgraphics.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    and then:-

    Fatal error: Call to undefined function: info() in C:\Program Files\Apache Group\Apache\htdocs/phpinfo.php on line 3

    when I tried the phpinfo test.

    Well I just completely confused, everything is exactly as you said it should be (I think)

    Can anyone offer any further suggestions,

    Thanks,

    Paul Eaton.

    Julie Meloni <juliethickbook.com> on 08/21/2001 05:09:56 PM

    Please respond to Julie Meloni <juliethickbook.com>

    To: Paul Eaton/HarlequinHarlequin cc: php-generallists.php.net Subject: Re: [PHP] PHP/Apache configuration for Win NT

    pegc> ScriptAlias /php/ "C:/Php/"

    pegc> AddType application/x-httpd-php .php .phtml .html pegc> AddType application/x-httpd-php-source .phps

    pegc> Action application/x-httpd-php /Php/php.exe

    Check for mismatched cases in httpd.conf.

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

    attached mail follows:


    pegc> I then retried it and got the following error message:-

    pegc> Internal Server Error pegc> The server encountered an internal error or misconfiguration and was unable to pegc> complete your request. pegc> Please contact the server administrator, paul.eatonglobalgraphics.com and pegc> inform them of the time the error occurred, and anything you might have done pegc> that may have caused the error.

    pegc> More information about this error may be available in the server error log.

    What does the error log say, then?

    pegc> and then:-

    pegc> Fatal error: Call to undefined function: info() in C:\Program Files\Apache pegc> Group\Apache\htdocs/phpinfo.php on line 3

    pegc> when I tried the phpinfo test.

    The function is phpinfo()

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

    attached mail follows:


    I wanted to make a script to allow publishing from Netscape Composer using PUT request on my Apache server with PHP4. I have tried the example from manual. But i can not get the uploaded file. The $PHP_UPLOADED_FILE_NAME is not set and the $PHP_PUT_FILENAME allso is not set. Vhen I send the HTTP/1.0 404 Error header (so I could see the results)and dysplaied all the variables using phpinfo(INFO_VARIABLES) i found there is no variable containing any information about uploaded file. Now I have Apache 1.3.20 with PHP 4.0.6. But i have tried it with the same httpd.conf and php.ini on earlier version (Igess 1.3.13 and 4.0.2) and it did not work as well.

    attached mail follows:


    <form ENCTYPE="multipart/form-data" method="post" name="form" action="<?php echo $PHP_SELF;?>"> <input type="file" name="new_file" class="textfield"> </form>

    -=-=-=-=-=-=-=-=-=- <?php var_dump($HTTP_POST_FILES);?>

    or: <?php if (preg_match('/(http:\/\/.*)/', $HTTP_POST_FILES['new_file']['name'], $matches)){ echo $some_array[$HTTP_POST_VARS['f_newfilename']]['URL']=$matches[1]; } ?> ----- Original Message ----- From: "Martin" <Sloukagsgpraha.cz> To: <php-generallists.php.net> Sent: Wednesday, August 22, 2001 5:26 PM Subject: [PHP] Cannot get uploaded file by PUT request vith PHP4 and Apache1.3

    > I wanted to make a script to allow publishing from Netscape Composer using > PUT request on my Apache server with PHP4. I have tried the example from > manual. But i can not get the uploaded file. The > $PHP_UPLOADED_FILE_NAME is not set and the > $PHP_PUT_FILENAME allso is not set. Vhen I send the HTTP/1.0 404 > Error header (so I could see the results)and dysplaied all the variables using > phpinfo(INFO_VARIABLES) i found there is no variable containing any > information about uploaded file. Now I have Apache 1.3.20 with PHP 4.0.6. > But i have tried it with the same httpd.conf and php.ini on earlier version > (Igess 1.3.13 and 4.0.2) and it did not work as well. > > -- > 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:


    If they're empty but phpinfo displays them you're probably inside a function and haven't declared HTTP_POST_FILES as global.

    Jason Dulberg wrote:

    > I am working on an image upload script and I've tried to use the variables > from $HTTP_POST_FILES however it seems that no matter how I try to get the > variables, they are always empty -- even though they are populated when > checking phpinfo(); > > HTTP_POST_FILES["binFile"] > Array > ( > [name] => arrow-block.gif > [type] => image/gif > [tmp_name] => /var/tmp/phph60272 > [size] => 857 > ) > > I got some info on it from php.net and attempt to echo as they have on their site however it displays nothing. > > echo $HTTP_POST_FILES['binFile']['name']."<br>"; > > I am attempting to get size/extension of the file to determine if its a valid extension and within the valid filesize range. > > Is this a server issue or just my php newbie-ness? If anyone has any ideas on how I can get this working, please let me know. > > Thanks. > > __________________ > Jason Dulberg > Extreme MTB > http://extreme.nas.net

    attached mail follows:


    Hello

    i'm using Sablotron as a PHP module to generate XSLT transformation. (Debian "potato" release, Apache-1.3.20, sablot0.60, Expat-1.95.2, libxml2, Libc6) Have seen in main.c that the "ressource xh" returned by the xsl_create() functions is not implemented in another XSLT functions as xslt_error()... I want to kniw how i can do to ?

    Thx

    Jean-Charles Preaux

    attached mail follows:


    I didn't think php was this fussy, but the following code seems to not work because the numbers are floats. round() doesn't seem to help either:

    $siz=(72/160)*GetImageWidth($fileID); $offx=(8/160)*GetImageWidth($fileID); $offy=(1/2)*GetImageHeight($fileID);

    ImageTTFText ($im, $siz, 0, $offx, $offy, $red, "cour.ttf", "PROOF");

    Works fine if I just put "$siz=72;" etc

    - seb

    -----Original Message----- From: Tribun [mailto:mailtribun.de] Sent: 16 August 2001 08:30 To: php-generallists.php.net Subject: [PHP] .htaccess username

    ...hmmm, I would guess there is a way, but I dont know why...

    Can I read out the active username, which has just logged in through a .htaccess authentication???

    Like the access data.. user: patrick pass: linux

    can PHP reads out the usersname "patrick" ??

    (and if ,... how? ;)

    10x 4 U'r time.

    Patrick

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


    (int)$siz will give you what you are looking for. although with the math below, you are going to end up with 0.

    $siz = 72 / 160; //returns 0.45 echo round($siz); //returns 0 echo (int)$siz; //returns 0

    -----Original Message----- From: Seb Frost [mailto:sebraceshoot.com] Sent: Wednesday, August 22, 2001 10:07 AM To: php-generallists.php.net Subject: [PHP] Convert to int...?

    I didn't think php was this fussy, but the following code seems to not work because the numbers are floats. round() doesn't seem to help either:

    $siz=(72/160)*GetImageWidth($fileID); $offx=(8/160)*GetImageWidth($fileID); $offy=(1/2)*GetImageHeight($fileID);

    ImageTTFText ($im, $siz, 0, $offx, $offy, $red, "cour.ttf", "PROOF");

    Works fine if I just put "$siz=72;" etc

    - seb

    -----Original Message----- From: Tribun [mailto:mailtribun.de] Sent: 16 August 2001 08:30 To: php-generallists.php.net Subject: [PHP] .htaccess username

    ...hmmm, I would guess there is a way, but I dont know why...

    Can I read out the active username, which has just logged in through a .htaccess authentication???

    Like the access data.. user: patrick pass: linux

    can PHP reads out the usersname "patrick" ??

    (and if ,... how? ;)

    10x 4 U'r time.

    Patrick

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


    ----- Original Message ----- From: "Andrey Hristov" <ahristovicygen.com> To: "Seb Frost" <sebraceshoot.com> Sent: Wednesday, August 22, 2001 6:20 PM Subject: Re: [PHP] Convert to int...?

    > Try > <?php > $a=7.50; > $a=(int) floor($a); > var_dump($a); > ?> > This returns on my machine: > int(7) > > Andrey Hristov > http://www.icygen.com > > ----- Original Message ----- > From: "Seb Frost" <sebraceshoot.com> > To: <php-generallists.php.net> > Sent: Wednesday, August 22, 2001 6:07 PM > Subject: [PHP] Convert to int...? > > > > I didn't think php was this fussy, but the following code seems to not > work > > because the numbers are floats. round() doesn't seem to help either: > > > > $siz=(72/160)*GetImageWidth($fileID); > > $offx=(8/160)*GetImageWidth($fileID); > > $offy=(1/2)*GetImageHeight($fileID); > > > > ImageTTFText ($im, $siz, 0, $offx, $offy, $red, "cour.ttf", "PROOF"); > > > > Works fine if I just put "$siz=72;" etc > > > > - seb > > > > -----Original Message----- > > From: Tribun [mailto:mailtribun.de] > > Sent: 16 August 2001 08:30 > > To: php-generallists.php.net > > Subject: [PHP] .htaccess username > > > > > > ...hmmm, I would guess there is a way, but I dont know why... > > > > Can I read out the active username, which has just logged in through a > > .htaccess authentication??? > > > > Like the access data.. > > user: patrick > > pass: linux > > > > can PHP reads out the usersname "patrick" ?? > > > > (and if ,... how? ;) > > > > 10x 4 U'r time. > > > > Patrick > > > > > > > > > > -- > > 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:


    Thought this may be of interest to somebody.

    ~kurth

    >Delivered-To: kurthusaexpress.net >Mailing-List: contact vuln-dev-helpsecurityfocus.com; run by ezmlm >List-Id: <vuln-dev.list-id.securityfocus.com> >List-Post: <mailto:vuln-devsecurityfocus.com> >List-Help: <mailto:vuln-dev-helpsecurityfocus.com> >List-Unsubscribe: <mailto:vuln-dev-unsubscribesecurityfocus.com> >List-Subscribe: <mailto:vuln-dev-subscribesecurityfocus.com> >Delivered-To: mailing list vuln-devsecurityfocus.com >Delivered-To: moderator for vuln-devsecurityfocus.com >From: "acz [iSecureLabs]" <aurelien.cabezoniSecureLabs.com> >To: <vuln-devsecurityfocus.com>, <nt-securiteossir.org> >Cc: <supportbadblue.com> >Subject: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code >Disclosure Vulnerability >Date: Wed, 22 Aug 2001 11:11:28 +0200 >X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) >Importance: Normal > >-- [ iSecureLabs BadBlue v1.02 beta for Windows 98, ME and 2000 >Advisory ] -- > >BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure >Vulnerability >Problem discovered: 22/08/2001 > >-- [ Overview ] -- > >BadBlue http://badblue.com/ is a tiny, free download that lets you share >files, search other >PCs and even run powerful web applications. >Badblue support .php extension. >It is possible to retrieve full .php source code. > >-- [ Description ] -- > >Badblue contains an input validation vulnerability which may lead to >download the full source code of .php pages. >This is due to a lack of checks for NULL bytes. > >Exemple: >http://myBadBlue.com/test.php%00 > >Note: It is possible too to download .dll file used by BadBlue. > >Exmeple: >http://myBadBlue.com/ext.dll%00 > >-- [ Tested Version ] -- > >BadBlue v1.02 beta for Windows 98, ME and 2000 > >-- [ Discovered by ] -- > >Cabezon Aurelien | aurelien.cabezoniSecureLabs.com >http://www.iSecureLabs.com | French Security portal >http://www.isecurelabs.com/advisory/badblue.html

    attached mail follows:


    This is not an issue if you're site is using Apache, correct?

    Tom Malone Web Designer http://www.tom-malone.com

    -----Original Message----- From: Kurth Bemis [mailto:kurthusaexpress.net] Sent: Wednesday, August 22, 2001 11:13 AM To: php-generallists.php.net Subject: [PHP] Fwd: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure Vulnerability

    Thought this may be of interest to somebody.

    ~kurth

    >Delivered-To: kurthusaexpress.net >Mailing-List: contact vuln-dev-helpsecurityfocus.com; run by ezmlm >List-Id: <vuln-dev.list-id.securityfocus.com> >List-Post: <mailto:vuln-devsecurityfocus.com> >List-Help: <mailto:vuln-dev-helpsecurityfocus.com> >List-Unsubscribe: <mailto:vuln-dev-unsubscribesecurityfocus.com> >List-Subscribe: <mailto:vuln-dev-subscribesecurityfocus.com> >Delivered-To: mailing list vuln-devsecurityfocus.com >Delivered-To: moderator for vuln-devsecurityfocus.com >From: "acz [iSecureLabs]" <aurelien.cabezoniSecureLabs.com> >To: <vuln-devsecurityfocus.com>, <nt-securiteossir.org> >Cc: <supportbadblue.com> >Subject: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code >Disclosure Vulnerability >Date: Wed, 22 Aug 2001 11:11:28 +0200 >X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) >Importance: Normal > >-- [ iSecureLabs BadBlue v1.02 beta for Windows 98, ME and 2000 >Advisory ] -- > >BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure >Vulnerability >Problem discovered: 22/08/2001 > >-- [ Overview ] -- > >BadBlue http://badblue.com/ is a tiny, free download that lets you share >files, search other >PCs and even run powerful web applications. >Badblue support .php extension. >It is possible to retrieve full .php source code. > >-- [ Description ] -- > >Badblue contains an input validation vulnerability which may lead to >download the full source code of .php pages. >This is due to a lack of checks for NULL bytes. > >Exemple: >http://myBadBlue.com/test.php%00 > >Note: It is possible too to download .dll file used by BadBlue. > >Exmeple: >http://myBadBlue.com/ext.dll%00 > >-- [ Tested Version ] -- > >BadBlue v1.02 beta for Windows 98, ME and 2000 > >-- [ Discovered by ] -- > >Cabezon Aurelien | aurelien.cabezoniSecureLabs.com >http://www.iSecureLabs.com | French Security portal >http://www.isecurelabs.com/advisory/badblue.html

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

    attached mail follows:


    At 12:10 PM 8/22/2001, Tom Malone wrote:

    read the advisory - everything is explained.....

    ~kurth

    >This is not an issue if you're site is using Apache, correct? > >Tom Malone >Web Designer >http://www.tom-malone.com > >-----Original Message----- >From: Kurth Bemis [mailto:kurthusaexpress.net] >Sent: Wednesday, August 22, 2001 11:13 AM >To: php-generallists.php.net >Subject: [PHP] Fwd: BadBlue v1.02 beta for Windows 98, ME and 2000 .php >Source Code Disclosure Vulnerability > > >Thought this may be of interest to somebody. > >~kurth > > > >Delivered-To: kurthusaexpress.net > >Mailing-List: contact vuln-dev-helpsecurityfocus.com; run by ezmlm > >List-Id: <vuln-dev.list-id.securityfocus.com> > >List-Post: <mailto:vuln-devsecurityfocus.com> > >List-Help: <mailto:vuln-dev-helpsecurityfocus.com> > >List-Unsubscribe: <mailto:vuln-dev-unsubscribesecurityfocus.com> > >List-Subscribe: <mailto:vuln-dev-subscribesecurityfocus.com> > >Delivered-To: mailing list vuln-devsecurityfocus.com > >Delivered-To: moderator for vuln-devsecurityfocus.com > >From: "acz [iSecureLabs]" <aurelien.cabezoniSecureLabs.com> > >To: <vuln-devsecurityfocus.com>, <nt-securiteossir.org> > >Cc: <supportbadblue.com> > >Subject: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code > >Disclosure Vulnerability > >Date: Wed, 22 Aug 2001 11:11:28 +0200 > >X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) > >Importance: Normal > > > >-- [ iSecureLabs BadBlue v1.02 beta for Windows 98, ME and 2000 > >Advisory ] -- > > > >BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure > >Vulnerability > >Problem discovered: 22/08/2001 > > > >-- [ Overview ] -- > > > >BadBlue http://badblue.com/ is a tiny, free download that lets you share > >files, search other > >PCs and even run powerful web applications. > >Badblue support .php extension. > >It is possible to retrieve full .php source code. > > > >-- [ Description ] -- > > > >Badblue contains an input validation vulnerability which may lead to > >download the full source code of .php pages. > >This is due to a lack of checks for NULL bytes. > > > >Exemple: > >http://myBadBlue.com/test.php%00 > > > >Note: It is possible too to download .dll file used by BadBlue. > > > >Exmeple: > >http://myBadBlue.com/ext.dll%00 > > > >-- [ Tested Version ] -- > > > >BadBlue v1.02 beta for Windows 98, ME and 2000 > > > >-- [ Discovered by ] -- > > > >Cabezon Aurelien | aurelien.cabezoniSecureLabs.com > >http://www.iSecureLabs.com | French Security portal > >http://www.isecurelabs.com/advisory/badblue.html > > >-- >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 was wondering if there was a way to retreive a column_name instead of a value in a query?

    For example if my table has the field firstname, lastname, telephone, movie1, movie2, movie3......

    And my first record is John Doe 555-5555 good bad bad My second record is Jane Doe 555-6666 good good bad

    I would like to know which movies Jane Doe rated "good"'...............Is this possible and if so how?

    attached mail follows:


    Anyone know why a MySQL table is set to read only? I'm logged in as the root user of MySQL and I have checked the privalages of the root user in the MySQL table and everything is set to "Yes" and I'm able to add and delete users in the MySQL table.

    Here's what I did... I had a database on my Win2k machine and I just ftp'ed those files over to MySQL running on RedHat. I noticed that the permissions of the files on the RedHat box were different than the MySQL database so I changed the permissions on those files I ftp'ed over. But to no evail it still doesn't work correctly.

    Would it make a difference if I was using a earlier version of MySQL on my Win2k machine than on the RedHat machine?

    Anyway, I'm at a total lost here so any help would be great!

    Thanks, Jay

    attached mail follows:


    This would probably be a better question for a MySQL newsgroup...

    Anyway, I am just talking off the top of myhead since I never did anything like this, but i don't think copying DB files is the proper way to move databases. I believe there is some MySQL dump utility you need to create one transferable file that you can then import on the other machine.

    In article <00da01c12b1d$6fefb170$6e00a8c0webdesign>, jpaulsonlbjs.com (Jay Paulson) wrote:

    > Anyone know why a MySQL table is set to read only? I'm logged in as the > root user of MySQL and I have checked the privalages of the root user in the > MySQL table and everything is set to "Yes" and I'm able to add and delete > users in the MySQL table. > > Here's what I did... I had a database on my Win2k machine and I just ftp'ed > those files over to MySQL running on RedHat. I noticed that the permissions > of the files on the RedHat box were different than the MySQL database so I > changed the permissions on those files I ftp'ed over. But to no evail it > still doesn't work correctly. > > Would it make a difference if I was using a earlier version of MySQL on my > Win2k machine than on the RedHat machine? > > Anyway, I'm at a total lost here so any help would be great! > > Thanks, > Jay >

    -- 
    __________________________________
    Gabe da Silveira, Web Designer
    Twin Cities Student Unions
    University of Minnesota
    http://www.coffman.umn.edu
    

    wFone: (612)624-7270 eMail: jibletvisi.com hPage: http://www.visi.com/~jiblet

    attached mail follows:


    amen. :-)

    > -----Original Message----- > From: Richard Lynch [mailto:ceol-i-e.com] > Subject: [PHP] Re: Mem and variables > > At any rate -- The right way to worry about perforance is to figure out > where your code is spending 90% of its time, and to optimize that. I'm > betting it ain't in variable lookups for most of us :-)

    attached mail follows:


    point taken...thanks

    > At any rate -- The right way to worry about > perforance is to figure out > where your code is spending 90% of its time, and to > optimize that. I'm > betting it ain't in variable lookups for most of us

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

    attached mail follows:


    I'm getting the following error with phpMyAdmin;

    Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/web/isp.com/public_html/dloc/admin/lib.inc.php on line 308 Error

    Any ideas where to start looking. All I've set in the config.inc.php is userid, password and database name. Works on every other ISP I've used but this one is barking.

    attached mail follows:


    I had the EXACT same problem... what you need to do is find where the 'mysql.sock' file is on your computer (sometimes it's at /var/lib/mysql.sock or some place like that).. then what you need to do is create the mysql.sock file in the /tmp directory (for some reason it wouldn't let me copy over the file to the /tmp directory once i found it).. then you can create a symbolic link using the ln command.. and if you need help with the ln (i believe that's it if not let me know) you can just type "man ln" in the command prompt if you are running on a linux box....

    hope that helps.. jay

    ----- Original Message ----- From: "Tom Beidler" <tomorbittechservices.com> To: "php list" <php-generallists.php.net> Sent: Wednesday, August 22, 2001 10:39 AM Subject: [PHP] phpMyAdmin install error

    > I'm getting the following error with phpMyAdmin; > > Warning: MySQL Connection Failed: Can't connect to local MySQL server > through socket '/tmp/mysql.sock' (2) in > /home/web/isp.com/public_html/dloc/admin/lib.inc.php on line 308 > Error > > Any ideas where to start looking. All I've set in the config.inc.php is > userid, password and database name. Works on every other ISP I've used but > this one is barking. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    At 11:58 AM 8/22/2001, Jay Paulson wrote:

    the socket has to be made by the mysql deamon. Read the mysql docs on mysql.org search for mysql.sock. mysql will not work if that files is deleted....if you run redhat or other distros make sure that /tmp and /var/tmp aren't cleaned at each reboot or you'll have a bitch of a time because you'll have to create a new socket each time.

    ~kurth

    >I had the EXACT same problem... what you need to do is find where the >'mysql.sock' file is on your computer (sometimes it's at /var/lib/mysql.sock >or some place like that).. then what you need to do is create the mysql.sock >file in the /tmp directory (for some reason it wouldn't let me copy over the >file to the /tmp directory once i found it).. then you can create a symbolic >link using the ln command.. and if you need help with the ln (i believe >that's it if not let me know) you can just type "man ln" in the command >prompt if you are running on a linux box.... > >hope that helps.. >jay > >----- Original Message ----- >From: "Tom Beidler" <tomorbittechservices.com> >To: "php list" <php-generallists.php.net> >Sent: Wednesday, August 22, 2001 10:39 AM >Subject: [PHP] phpMyAdmin install error > > > > I'm getting the following error with phpMyAdmin; > > > > Warning: MySQL Connection Failed: Can't connect to local MySQL server > > through socket '/tmp/mysql.sock' (2) in > > /home/web/isp.com/public_html/dloc/admin/lib.inc.php on line 308 > > Error > > > > Any ideas where to start looking. All I've set in the config.inc.php is > > userid, password and database name. Works on every other ISP I've used but > > this one is barking. > > > > > > -- > > 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:


    I've written a separate function library for a cluster of web pages, and I then include("slib.php") in each of the web pages, instead of copying 12k of code to each page individually. Some of the pages require (simple) authentication or redirection headers, which some of the code in the library is supposed to handle.

    Problem is, when I include the library, even though there's no other output to be processed, it still generates the linefeed that triggers sending all the current headers, so if(!headers_sent) {...} fails.

    Is it possible to include php code without sending headers? I've tried exit() within the library, but that fails to work. Instead, exit causes generation of HTML code (a content type metatag) that is neither in the main page nor the library. I've also tried a simple return() (per the documentation), but that generates a parse error.

    I'm using Apache 1.3.12, PHP 4.0.2 and Slackware Linux (Not sure which kernel version).

    Thanks Cas

    PS: Please CC replies to casteeleinnocent.com, since I'm not officially subscribed to this list. Thanks.

    attached mail follows:


    See if is there some kind of echo before header()s, or HTML sent to browser. You cannot do this <html> <head> Bla bla <?php header("Location : any_script.php\n\n");?> </head> <body> .... </body> </html> Why? Because there is already content sent to the browser. If some code uses header() place it before any output. As I said sometimes a simple echo() breaks all.

    Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%

    > ----- Original Message ----- > From: "Casteele/ShadowLord" <casteeleinnocent.com> > To: <php-generallists.php.net> > Sent: Wednesday, August 22, 2001 6:52 PM > Subject: [PHP] HTTP headers and include() > > > > I've written a separate function library for a cluster of web pages, and I > > then include("slib.php") in each of the web pages, instead of copying 12k > > of code to each page individually. Some of the pages require (simple) > > authentication or redirection headers, which some of the code in the > > library is supposed to handle. > > > > Problem is, when I include the library, even though there's no other > output > > to be processed, it still generates the linefeed that triggers sending all > > the current headers, so if(!headers_sent) {...} fails. > > > > Is it possible to include php code without sending headers? I've tried > > exit() within the library, but that fails to work. Instead, exit causes > > generation of HTML code (a content type metatag) that is neither in the > > main page nor the library. I've also tried a simple return() (per the > > documentation), but that generates a parse error. > > > > I'm using Apache 1.3.12, PHP 4.0.2 and Slackware Linux (Not sure which > > kernel version). > > > > Thanks > > Cas > > > > PS: Please CC replies to casteeleinnocent.com, since I'm not officially > > subscribed to this list. 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:


    hi!

    do you know an easy-to-use-php-counter, which uses mysql to store the data?

    gert

    attached mail follows:


    At 05:49 PM 8/22/01 +0200, you wrote: >hi! > >do you know an easy-to-use-php-counter, which uses mysql to store the data? > >gert

    Not off hand, but I could probably program one within the day.

    attached mail follows:


    No, but I could throw one together in 10 minutes.

    Here is some 5 minute untested code to get you started where int count is in table counter.

    <?php $dblink = mysql_pconnect("localhost","username","password"); mysql_select_db("DB"); ?>

    <!-- HTML PAGE -->

    <?php $query = "Select count from counter"; if( !($dbq = mysql_query($query,$dblink))) { echo "Error reading database. Please Contact <A HREF=\"mailto:webmasteryoursite.com\">Administrator</A>"; exit; }

    $count = mysql_result($dbq,0) echo "This page has been visited $count times!";

    $query = "Update counter set count = count + 1"; if( !($dbq = mysql_query($query,$dblink))) { echo "Error updating database. Please Contact <A HREF=\"mailto:webmasteryoursite.com\">Administrator</A>"; exit; } ?>

    Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com

    ----- Original Message ----- From: "Gert Mellak" <gert.mellakutanet.at> To: <php-generallists.php.net> Sent: Wednesday, August 22, 2001 10:49 AM Subject: [PHP] php-counter

    > hi! > > do you know an easy-to-use-php-counter, which uses mysql to store the data? > > gert > > > > -- > 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:


    Here goes a sample code. The db interaction is throurh db abstraction layer but easily can be translated to used directly mysql_* functions. <?php include 'db.lib.php'; include 'webstats.lib.php'; class ClientBrowser{//-=-=-=-=-=--==-=-=-=--==-=-=-=-=-=-=-=-=-=-=-=-class ClientBrowser-=-=-==-=- var $browser='unknown'; var $mozilla=''; var $major='0.0'; var $minor='0.0'; var $build=''; var $platform=''; var $windowses=array( 'win95'=>'windows 95', 'windows 95'=>'windows 95', 'win98'=>'windows 98', 'windows 98'=>'windows 98', 'winnt'=>'windows nt 4.0', 'windows nt'=>'windows nt 4.0', 'windows'=>'windows 95', 'windows 3.1'=>'windows 3.1', 'win16' => 'windows 3.1', 'win32' => 'windows 95', 'windows'=> 'win-unknown', 'windows nt 4.0'=>'windows nt 4.0', 'windows nt 5.0'=>'windows 2000', 'windows 2000' => 'windows 2000', 'win2k' => 'windows 2000', 'windows millennium'=>'windows me', 'windows ce' => 'windows ce', 'windows ce 2.0' => 'windows ce 2.0', 'windows ce 3.0' => 'windows ce 3.0' );

    function ClientBrowser($http_agent='none'){ if ($http_agent=='none') $http_agent=$GLOBALS['HTTP_USER_AGENT']; if($cap = $this-> _client_is_MSIE($http_agent)){ $this->browser='MSIE'; }elseif($cap = $this->_client_is_MSPIE($http_agent)){ $this->browser='MSPIE'; }elseif($cap = $this->_client_is_Opera($http_agent)){ $this->browser='OPERA'; }elseif($cap = $this->_client_is_NS($http_agent)){ $this->browser='NAVIGATOR'; } if ($this->browser!='unknown'){ $this->mozilla=$cap['mozilla']; $this->major=$cap['major']; $this->minor=$cap['minor']; $this->build=$cap['build']; $this->platform=$cap['platform']; } }

    function _client_is_MSIE($s){ $to_return = FALSE; if(preg_match('~^Microsoft Internet Explorer/([^ ]+) \\(([^)]+)\\)~i', $s, $a)){ $to_return = array('mozilla' => '', 'major' => '1', 'minor' => '0', 'build' => $a[1]); if (strpos(' '.strtolower($a[2]),'win')){ $to_return['platform'] = isset($this->windowses[strtolower($a[2])]) ? $this->windowses[strtolower($a[2])]:'win-unknown'; }else{ $to_return['platform'] = strtolower($a[2]); } return $to_return; } if(preg_match('~^Mozilla/([^ ]+) \\(compatible;.* MSIE ([^.]+)\\.([\d.]+)([^; )]*).*? ((Win|Windows|Mac_PowerPC|Mac_68000|Mac_68K|Mac_PPC|OS/2|SUNOS|sunos 4|sunos 5|i86|irix|irix 6|irix 5|hp-ux|aix|aix1|aix2|aix3|aix4|linux|unix_system_v|ncr|reliantunix|bsd)[^); ]*)~i', $s, $a)){ $to_return = array('mozilla' => $a[1], 'major' => $a[2], 'minor' => $a[3], 'build' => $a[4]); if (strpos(' '.strtolower($a[5]),'win')){ $to_return['platform'] = isset($this->windowses[strtolower($a[5])]) ? $this->windowses[strtolower($a[5])]:'win-unknown'; }else{ $to_return['platform'] = strtolower($a[5]); } return $to_return; } if(preg_match('~^Mozilla/([^ ]+) \\(compatible;.* MSIE ([^.]+)\\.([\d.]+)([^; )]*)~i', $s, $a)){ $to_return = array('mozilla' => $a[1], 'major' => $a[2], 'minor' => $a[3], 'build' => $a[4], 'platform' => ''); return $to_return; } return $to_return; }

    function _client_is_MSPIE($s){ $to_return = FALSE; if(preg_match('~^Microsoft Pocket Internet Explorer/([^.]+)\\.([\d.]+)(.*)~i', $s, $a)){ $to_return = array('mozilla' => '', 'major' => $a[1], 'minor' => $a[2], 'build' => $a[3], 'platform' => 'windows ce'); return $to_return; } if(preg_match('~^Mozilla/([^ ]+) \\(compatible;.* MSPIE ([^.]+)\\.([\d.]+)([^; )]*).*? ((Win|Windows|Mac_PowerPC|Mac_68000|Mac_68K|Mac_PPC|OS/2|SUNOS|sunos 4|sunos 5|i86|irix|irix 6|irix 5|hp-ux|aix|aix1|aix2|aix3|aix4|linux|unix_system_v|ncr|reliantunix|bsd)[^); ]*)~i', $s, $a)){ $to_return = array('mozilla' => $a[1], 'major' => $a[2], 'minor' => $a[3], 'build' => $a[4]); if (strpos(' '.strtolower($a[5]),'win')){ $to_return['platform'] = isset($this->windowses[strtolower($a[5])]) ? $this->windowses[strtolower($a[5])]:'wince-unknown'; }else{ $to_return['platform'] = strtolower($a[5]); } return $to_return; } return $to_return; }

    function _client_is_NS($s){ $to_return = FALSE; if(preg_match('~^Mozilla/([^.]+)\\.([\d.]+)([^ ]*).*?\\(([^;)]+)~i', $s, $a)){ if(strtolower($a[4]) == 'compatible') return FALSE; if(strtolower($a[4]) == 'macintosh'){ if(strpos($s, '68K')) $a[4] = 'Mac_68K'; elseif(strpos($s, 'PPC')) $a[4] = 'Mac_PPC'; } $to_return = array('mozilla' => $a[1] . "." . $a[2] . $a[3], 'major' => $a[1], 'minor' => $a[2], 'build' => $a[3]); if (strpos(' '.strtolower($a[4]),'win')){ // heading space added because specific return value of strpos() $to_return['platform'] = isset($this->windowses[strtolower($a[4])]) ? $this->windowses[strtolower($a[4])]:'win-unknown'; }else{ $to_return['platform'] = strtolower($a[4]); } return $to_return; } return $to_return; }

    function _client_is_Opera($s){ $to_return = FALSE; if(preg_match('~Mozilla/([^ ]+) \\(((Win|Windows|Mac_PowerPC|Mac_68000|Mac_68K|Mac_PPC)[^);]*).*Opera ([^.]+)\\.([\d.]+)([^; )]*)~i', $s, $a)){ $to_return = array('mozilla' => $a[1], 'major' => $a[4], 'minor' => $a[5], 'build' => $a[6]); if (strpos(' '.strtolower($a[2]),'win')){ $to_return['platform'] = isset($this->windowses[strtolower($a[2])]) ? $this->windowses[strtolower($a[2])]:'win-unknown'; }else{ $to_return['platform'] = strtolower($a[2]); } return $to_return; } if(preg_match('~Opera/([^.]+)\\.([\d.]+)([^; )]*) \\(((Win|Windows|Mac_PowerPC|Mac_68000|Mac_68K|Mac_PPC|OS/2|SUNOS|sunos 4|sunos 5|i86|irix|irix 6|irix 5|hp-ux|aix|aix1|aix2|aix3|aix4|linux|unix_system_v|ncr|reliantunix|bsd)[^); ]*)~i', $s, $a)){ $to_return = array('mozilla' => '', 'major' => $a[1], 'minor' => $a[2], 'build' => $a[3]); if (strpos(' '.strtolower($a[5]),'win')){ $to_return['platform'] = isset($this->windowses[strtolower($a[4])]) ? $this->windowses[strtolower($a[4])]:'win-unknown'; }else{ $to_return['platform'] = strtolower($a[4]); } return $to_return; } return $to_return; } } // -=-=-=-=-=--==-=-=-=--==-=-=-=-=-=-=-=-=-=-=-=-class ClientBrowser-=-=-==-=-

    // -=--==-=-=-=-=-=--==-=-=-=-=--==-=-MAIN--==-=-=--==-=--==-=-=-=-// $client = new ClientBrowser($HTTP_USER_AGENT); $page_name = $HTTP_GET_VARS['page']; $screen_width = $HTTP_GET_VARS['scr_w']+0; $screen_height = $HTTP_GET_VARS['scr_h']+0; $screen_color = $HTTP_GET_VARS['scr_c']+0; if (preg_match('/^([0-9\.]+)$/',$screen_width.''.$screen_height.''.$screen_colo r)==0){ exit; } if ($WEBSTATS_pages[$page_name]['collecting']==1){ // You must have the $WEBSTATS_pages array in the included file webstats.lib.php . Collecting shows if we collect info about this page db_connect(); $res = db_exec('SELECT COUNT(*) FROM webPages WHERE webpage_name="'.$page_name.'";'); list($is_there)=db_fetch_array($res); if ($is_there==0){ db_free_result($res); db_exec('INSERT INTO webPages VALUES("","'.$page_name.'");'); }else{ db_free_result($res); }

    $res = db_exec('SELECT webpage_id FROM webPages WHERE webpage_name="'.$page_name.'";'); list($webpage_id) = db_fetch_array($res); db_free_result($res);

    $sql_to_exec = "SELECT COUNT(*) FROM webStats WHERE webpage_id=$webpage_id AND os_name='".$client->platform. "' AND browser='".$client->browser." ".$client->major.".".$client->minor. "' AND screen_w=$screen_width AND screen_h=$screen_height AND screen_c=$screen_color;"; $res = db_exec($sql_to_exec); $is_there = 0; list($is_there) = db_fetch_array($res); db_free_result($res);

    if ($is_there==1){ $update_sql = "UPDATE webStats set counter=counter+1 WHERE webpage_id=$webpage_id AND os_name='".$client->platform. "' AND browser='".$client->browser." ".$client->major.".".$client->minor. "' AND screen_w=$screen_width AND screen_h=$screen_height AND screen_c=$screen_color;"; db_exec($update_sql); }else{ $insert_sql = "INSERT INTO webStats (webpage_id, os_name, browser, screen_w, screen_h, screen_c, counter) ". "VALUES($webpage_id,'".$client->platform."','".$client->browser." ".$client->major.".".$client->minor."',". "$screen_width, $screen_height, $screen_color, 1);"; db_exec($insert_sql); } } ?>

    Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%

    ----- Original Message ----- From: "Gert Mellak" <gert.mellakutanet.at> To: <php-generallists.php.net> Sent: Wednesday, August 22, 2001 6:49 PM Subject: [PHP] php-counter

    > hi! > > do you know an easy-to-use-php-counter, which uses mysql to store the data? > > gert > > > > -- > 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 have a script which has to do a *lot* of work. In fact, it times out after 300 seconds, but is only about half done at that point. So I tried using set_time_limit(0) to no avail (php is *not* running in safe mode). So next I tried this directive in the apache config file: php_value max_execution_time 12000 (and various other values too). Now this changed the value of the constant correctly as reported by phpinfo(), but not as reported by get_cfg_var(max_execution_time), which still reported the default 30s. Empirically, the script would still time out at exactly 300 seconds, as before. So, any idea what is going on? Why timeout at 300s instead of the 30s or the 12000s which are the only two values reported? Any other workarounds? This is php 4.0

    Thanks, J

    --
    Julian Wood
    

    Programmer/Analyst University of Calgary

    attached mail follows:


    Don't know if this is the place to ask this, but I'll find out soon. I'm trying to create a database in mysql that will hold information About users, it will hold the path to a picture, and it will resize Images on a page... sorry that's a really blunt description.

    A user will goto this certain page... they bring up the page and the page it self, coded in php, will pull out of the database, the names of everyone that is registered to this certain page. It will list it all in alphabetical order.

    For anyone interested... the page I'm working on is here... http://www.hypoparathyroidism.com/gallery.asp I am having trouble figuring out how to do it, I'm new to mysql And php actually... I just started learning it about a month ago But I've done some pretty impressive stuff for php. I guess I just need some ideas on how to go about doing this project.

    Going to that page will help you figure out what I have to do. You see the guy that programmed that page before, did it all In asp. And I don't know anything about asp, and I was told Not to learn anything about asp because it is "dumb" (no offense To anyone intended)

    Any help appreciated... mike

    attached mail follows:


    A couple of things:

    1. ASP is not dumb. It was just written by Microsoft. Seriously, though I'd learn both, it would make you much more marketable. 2. First off, create the database. Then ask yourself what are the steps that you have to go through. What your probably looking at right now is selecting the information off of the database and reporting it.

    I'd _definitely_ think about sitting down with the MySQL manual and the PHP manual, both of which are availible free. Also, look for a good MySQL/PHP book (my favorite is "MySQL/PHP Database Applications", by Jay Greenspan and Brad Bulger). You have some work ahead of you, but not a lot.

    At 10:09 AM 8/22/01 -0700, you wrote: >Don't know if this is the place to ask this, but I'll find out soon. >I'm trying to create a database in mysql that will hold information >About users, it will hold the path to a picture, and it will resize >Images on a page... sorry that's a really blunt description. > >A user will goto this certain page... >they bring up the page and the page it self, coded in php, will >pull out of the database, the names of everyone that is registered >to this certain page. It will list it all in alphabetical order. > >For anyone interested... the page I'm working on is here... >http://www.hypoparathyroidism.com/gallery.asp >I am having trouble figuring out how to do it, I'm new to mysql >And php actually... I just started learning it about a month ago >But I've done some pretty impressive stuff for php. I guess >I just need some ideas on how to go about doing this project. > >Going to that page will help you figure out what I have to do. >You see the guy that programmed that page before, did it all >In asp. And I don't know anything about asp, and I was told >Not to learn anything about asp because it is "dumb" (no offense >To anyone intended) > >Any help appreciated... >mike > > > > >-- >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.

    Sorry, I know there is out of the topic, but you are highly possible to help on this. My browser --Internet Exporer will remember my userID and password, and the next time, after I type the first char of my user ID, it will automatically fill in the userID and password. Is there a way to disablt it?

    Thanks.

    attached mail follows:


    Just look through the preferences, disable forms auto-complete. That should take care of it for forms, I don't know about dialog boxes.

    In article <1FA6C7249817D4119B9800D0B73E99A6050A79D9il02exm27.comm.mot.com>, George.Z.Zhumotorola.com (Zhu George-Czz010) wrote:

    > Hi, all. > > Sorry, I know there is out of the topic, but you are highly possible to > help on this. > My browser --Internet Exporer will remember my userID and password, and the > next time, after I type the first char of my user ID, it will automatically > fill in the userID and password. Is there a way to disablt it? > > Thanks.

    -- 
    __________________________________
    Gabe da Silveira, Web Designer
    Twin Cities Student Unions
    University of Minnesota
    http://www.coffman.umn.edu
    

    wFone: (612)624-7270 eMail: jibletvisi.com hPage: http://www.visi.com/~jiblet

    attached mail follows:


    Hello all:

    Just a quick reminder about our upcoming PHP training course.

    We'll be holding a 5 day, hands-on, instructor-led PHP training course October 1-5 in Ann Arbor, Michigan. We're gearing this more to newbies and medium-level PHPers than high-end advanced PHPers, because our previous class (and phone conversations with prospective students) has shown that they'd rather spend more time covering some 'basics' in depth than skimming over a lot of stuff (5 days ends up being not that long when trying to cover PDFs, graphics, DB abstraction and more).

    More info is at http://www.tapinternet.com/php/ and we're also available to take any questions by email (michaeltapinternet.com to get me directly) or 734-480-9961 (1-866-745-3660 tollfree) or even AIM (screen name "phptraining").

    October may be a ways off, but many of you may need to plan that far in advance to schedule time off, get the boss to expense the trip, etc. :)

    Thanks!

    --------------------------------- Michael Kimsal http://www.tapinternet.com/php PHP Training Courses 734-480-9961

    attached mail follows:


    Hello everyone-

    I have done the mysqldump function and got the db in a all_database.sql file. Now I am running this command at the shell prompt of my Linux machine:

    mysql -u root -p -e 'all_databases.sql'

    When I do that it works fine until it starts to insert the information into the database. I get the error that the table it is trying to read the information into is 'read only'... Is there anyway around this problem?

    Thanks, Jay

    attached mail follows:


    Is this PHP listserve available as a newsgroup? I'm getting tired of managing this much mail everyday. I'd like it a bit simpler.

    If this list is not available, are there other equally busy newsgroups for PHP?

    Thanks,

    Christopher Raymond

    attached mail follows:


    In article <B7A94A88.1021%christopheroasisnetworks.com>, christopheroasisnetworks.com (Christopher Raymond) wrote:

    > Is this PHP listserve available as a newsgroup? I'm getting tired of > managing this much mail everyday. I'd like it a bit simpler.

    news.php.net

    -- 
    CC
    

    attached mail follows:


    Yup, connect your news client to news.php.net.

    In article <B7A94A88.1021%christopheroasisnetworks.com>, christopheroasisnetworks.com (Christopher Raymond) wrote:

    > Is this PHP listserve available as a newsgroup? I'm getting tired of > managing this much mail everyday. I'd like it a bit simpler. > > If this list is not available, are there other equally busy newsgroups for > PHP? > > > Thanks, > > Christopher Raymond >

    -- 
    __________________________________
    Gabe da Silveira, Web Designer
    Twin Cities Student Unions
    University of Minnesota
    http://www.coffman.umn.edu
    

    wFone: (612)624-7270 eMail: jibletvisi.com hPage: http://www.visi.com/~jiblet

    attached mail follows:


    i'm working on a site that is going to require some fancy image switching based on URL called...thats part isn't a problem...the problem comes in the way that i'm passing the HTML from the function.

    My main concern here is speed with the second being workload on the server.

    right now the function looks like this.

    function tab($section){

    $hmenav = "<a href=\"/index.php\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('document.Nav2','document.Nav2','/images/nav/home_hi.gif','#931914015883')\"><img src=\"/images/nav/home_off.gif\" width=\"62\" height=\"16\" border=\"0\" name=\"Nav2\" alt=\"\"></a>";

    $comnav = "<a href=\"/company/index.php\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('document.Nav3','document.Nav3','/images/nav/com_hi.gif','#931914051666')\"><img src=\"/images/nav/com_off.gif\" width=\"79\" height=\"16\" border=\"0\" name=\"Nav3\" alt=\"\"></a>";

    $curnav = "<a href=\"/listings.php\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('document.Nav4','document.Nav4','/images/nav/cur_hi.gif','#931914075550')\"><img src=\"/images/nav/cur_off.gif\" width=\"113\" height=\"16\" border=\"0\" name=\"Nav4\" alt=\"\"></a>";

    $llsnav = "<a href=\"/lls\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('document.Nav5','document.Nav5','/images/nav/lls_hi.gif','#931914098883')\"><img src=\"/images/nav/lls_off.gif\" width=\"168\" height=\"16\" border=\"0\" name=\"Nav5\" alt=\"land mark land services\"></a>";

    $navspc = "<img src=\"/images/spacer_blank.gif\" width=\"125\" height=\"10\" border=\"0\" alt=\"\">";

    if ($section == "root"){ $hmenav = "<a href=\"/index.php\"><img src=\"/images/nav/home_on.gif\" width=\"62\" height=\"16\" border=\"0\" name=\"Nav2\" alt=\"\"></a>"; }elseif ($section == "company"){ $comnav = "<a href=\"/company/index.php\"><img src=\"/images/nav/com_on.gif\" width=\"79\" height=\"16\" border=\"0\" name=\"Nav3\" alt=\"\"></a>"; } print "$navspc$hmenav$comnav$curnav$llsnav"; }

    section is passed to the function and the function returns the correct tab. IS there a better and faster way?

    ~kurth

    attached mail follows:


    Well, just off the top of my head, you seem to be mostly storing data. None of the strings you are storing contain any variable values, so they don't need to be double quoted. I would even take it a step further, and move all your HTML data into raw text files, then use the readfile() function to insert them where needed. This would make your program logic clearer and allow easier editing of the data since they would no longer need to have quotes escaped. It would also be faster because it doesn't need to parse through all the data, it simply echoes what you need to the screen. The overhead for printing multiple files is negligible in comparison... especially if you are calling this function from multiple pages...

    In article <4.3.2.7.2.20010822125256.01bfc7a0mail.usaexpress.net>, kurthusaexpress.net (Kurth Bemis) wrote:

    > i'm working on a site that is going to require some fancy image switching > based on URL called...thats part isn't a problem...the problem comes in the > way that i'm passing the HTML from the function. > > My main concern here is speed with the second being workload on the server. > > right now the function looks like this. > > function tab($section){ > > $hmenav = "<a href=\"/index.php\" onMouseOut=\"MM_swapImgRestore()\" > onMouseOver=\"MM_swapImage('document.Nav2','document.Nav2','/images/nav/home_h > i.gif','#931914015883')\"><img > src=\"/images/nav/home_off.gif\" width=\"62\" height=\"16\" border=\"0\" > name=\"Nav2\" alt=\"\"></a>"; > > $comnav = "<a href=\"/company/index.php\" > onMouseOut=\"MM_swapImgRestore()\" > onMouseOver=\"MM_swapImage('document.Nav3','document.Nav3','/images/nav/com_hi > .gif','#931914051666')\"><img > src=\"/images/nav/com_off.gif\" width=\"79\" height=\"16\" border=\"0\" > name=\"Nav3\" alt=\"\"></a>"; > > $curnav = "<a href=\"/listings.php\" onMouseOut=\"MM_swapImgRestore()\" > onMouseOver=\"MM_swapImage('document.Nav4','document.Nav4','/images/nav/cur_hi > .gif','#931914075550')\"><img > src=\"/images/nav/cur_off.gif\" width=\"113\" height=\"16\" border=\"0\" > name=\"Nav4\" alt=\"\"></a>"; > > $llsnav = "<a href=\"/lls\" onMouseOut=\"MM_swapImgRestore()\" > onMouseOver=\"MM_swapImage('document.Nav5','document.Nav5','/images/nav/lls_hi > .gif','#931914098883')\"><img > src=\"/images/nav/lls_off.gif\" width=\"168\" height=\"16\" border=\"0\" > name=\"Nav5\" alt=\"land mark land services\"></a>"; > > $navspc = "<img src=\"/images/spacer_blank.gif\" width=\"125\" > height=\"10\" border=\"0\" alt=\"\">"; > > if ($section == "root"){ > $hmenav = "<a href=\"/index.php\"><img src=\"/images/nav/home_on.gif\" > width=\"62\" height=\"16\" border=\"0\" name=\"Nav2\" alt=\"\"></a>"; > }elseif ($section == "company"){ > $comnav = "<a href=\"/company/index.php\"><img > src=\"/images/nav/com_on.gif\" width=\"79\" height=\"16\" border=\"0\" > name=\"Nav3\" alt=\"\"></a>"; > } > print "$navspc$hmenav$comnav$curnav$llsnav"; > } > > section is passed to the function and the function returns the correct > tab. IS there a better and faster way? > > ~kurth >

    -- 
    __________________________________
    Gabe da Silveira, Web Designer
    Twin Cities Student Unions
    University of Minnesota
    http://www.coffman.umn.edu
    

    wFone: (612)624-7270 eMail: jibletvisi.com hPage: http://www.visi.com/~jiblet

    attached mail follows:


    Are your privileges in MySQL set correctly? If ROOT doesn't have read/write access, the script will crash.

    rick

    -----Original Message----- From: Jay Paulson [mailto:jpaulsonlbjs.com] Sent: Wednesday, August 22, 2001 11:29 AM To: php-dblists.php.net; php-generallists.php.net Subject: [PHP-DB] restoring mysql db after mysqldump

    Hello everyone-

    I have done the mysqldump function and got the db in a all_database.sql file. Now I am running this command at the shell prompt of my Linux machine:

    mysql -u root -p -e 'all_databases.sql'

    When I do that it works fine until it starts to insert the information into the database. I get the error that the table it is trying to read the information into is 'read only'... Is there anyway around this problem?

    Thanks, Jay

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

    attached mail follows:


    That's exactly what I needed! Thanks!

    Richard Lynch wrote:

    >You may just need a flush() call after the Starting UNZIP. > >http://php.net/flush > >PHP (Apache, actually) sends data to the browser when there's enough to >send, not right away. > >-- >WARNING richardzend.com address is an endangered species -- Use >ceol-i-e.com >Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm >Volunteer a little time: http://chatmusic.com/volunteer.htm >----- Original Message ----- >From: Ray Clouse <ray.clouseboeing.com> >Newsgroups: php.general >To: <justinindent.com.au> >Cc: php <php-generallists.php.net>; <heiko.jonesboeing.com> >Sent: Tuesday, August 21, 2001 10:10 AM >Subject: Re: [PHP] Need "Working..." pop up dialog (repost) > > >>It's due to space restrictions on the server. We have 300GB available >>on the server, but the compressed data takes up 200GB, and we're adding >>new data (several GB) every month or so. >> >>So we need to keep as much compressed as possible, but we have to >>uncompress the data for the webpages to use it. The PHP webpages on the >>server use the uncompressed data to generate plots. The data is never >>sent to the user, just the plots. >> >>The main problem I'm having is with page resolution. If I say: >> >> print("<SCRIPT>jsPopupWindow('Starting UNZIP');</SCRIPT>\n"); >> >> $gunzipcmdline = "gunzip /PATHTO/MYDATA"; >> $result = exec("$gunzipcmdline", $execout, $execretval); >> >> print("<SCRIPT>jsPopupWindow('Finished UNZIP');</SCRIPT>\n"); >> >>the 'Starting UNZIP' popup appears at the same time as the 'Finished >>UNZIP' one. The page hasn't resolved until after the gunzip is done, so >>it doesn't execute the Javascript the way I want it to. I've tried >>popping up a window, getting the handle, passing the handle to the >>gunzip code, then closing the handle when the gunzip is done, but that >>hasn't worked either. >>

    -- 
    -------------------------------------------------------------------------
    Ray Clouse                         |             Don't fear the penguins.
    Engineer Scientist/Specialist      |              
    Boeing Expendable Launch Vehicles  |  Ray.Clouse AT boeing.com
    Huntington Beach, CA               |  clouse AT rayclouse.org