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: Thu Aug 16 2001 - 07:49:49 CDT

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

    php-general Digest 16 Aug 2001 12:49:49 -0000 Issue 819

    Topics (messages 62924 through 63016):

    Re: bold current menu item
            62924 by: David Robley

    "Search" code finds ANYTHING
            62925 by: Raphael Pirker
            62934 by: Hugh Bothwell
            62939 by: Raphael Pirker

    Re: Date function
            62926 by: David Robley
            62938 by: Don Read

    I will not eat them Sam-I-Am
            62927 by: Justin
            62935 by: Hugh Bothwell

    Re: php_value in htaccess, internal server error
            62928 by: David Robley

    Compiling with Imlib2
            62929 by: Chris Aitken
            62937 by: David Robley
            62940 by: Chris Aitken
            62941 by: David Robley

    Parse Error
            62930 by: Michael L
            62931 by: Jason Murray

    Re: How to find out which function caused an error
            62932 by: Justin Finkelstein
            62933 by: Jason Murray
            62936 by: Justin Finkelstein
            62947 by: Richard Lynch

    Re: Need open source community help!
            62942 by: pierre-yves
            62961 by: Jay Paulson
            62976 by: Maxim Maletsky

    Uploading Image to Database
            62943 by: Tim Thorburn

    Re: need real expert (geting outer files) *english/german*
            62944 by: Richard Lynch
            62982 by: Tribun
            63003 by: hassan el forkani

    Re: compression help
            62945 by: Richard Lynch

    Re: Looking for the cookies a site sends.
            62946 by: Richard Lynch

    Re: Running PHP as CGI under apache
            62948 by: Richard Lynch

    Re: HTTP Authentication
            62949 by: Richard Lynch

    Re: Is this a bug?
            62950 by: Richard Lynch

    Re: Templates???
            62951 by: Richard Lynch

    Re: `pwd` - what does this mean?
            62952 by: Richard Lynch

    Re: PHP and serving streaming media
            62953 by: Richard Lynch
            62959 by: Greg Beaver

    Re: Security in PHP+MYSQL
            62954 by: Richard Lynch

    Re: PHP and Java InputStream object
            62955 by: Richard Lynch

    Simulate Cron/PHP in Win2k?
            62956 by: Jeff Oien
            62957 by: Raphael Pirker

    Addtype command in htaccess
            62958 by: Jack
            62989 by: Pavel Jartsev

    Imlib Errors Still
            62960 by: Chris Aitken
            62962 by: Rasmus Lerdorf

    record each page
            62963 by: Andrew Austin
            62965 by: Kunal Jhunjhunwala

    Ldap package.
            62964 by: Johan Vikerskog (ECS)
            62966 by: Rasmus Lerdorf
            62978 by: Johan Vikerskog (ECS)
            63015 by: Heiko Maiwald

    to set file tye at apache module using htaccess
            62967 by: Jack
            62968 by: Jason Murray
            62970 by: Jack
            62973 by: Rasmus Lerdorf
            62975 by: Jack
            62977 by: Rasmus Lerdorf
            62979 by: Jack
            62980 by: Maxim Maletsky
            62983 by: Jack

    AW:How can I unsubscribe?
            62969 by: Phil
            62971 by: Phil

    newbie installation help needed - LinuxPPC
            62972 by: George Pitcher

    to richard lynch
            62974 by: lolodev news php

    ISO-8859-2 to Windows-1250
            62981 by: Tomá¹ Kubi¹

    Re: Eval error
            62984 by: Pavel Jartsev

    Re: could i get a clue?
            62985 by: Renze Munnik

    .htaccess username
            62986 by: Tribun
            62987 by: Pavel Jartsev
            62991 by: Stig-Ørjan Smelror

    Re: MYSQL_SOCKET
            62988 by: Rasmus Lerdorf

    Fussy logic...
            62990 by: Tribun
            62995 by: Renze Munnik
            62998 by: Tribun
            62999 by: Renze Munnik

    Re: Creating a javascript array from database data
            62992 by: Tim Ward
            62996 by: Neil Freeman

    Re: Creating a javascript array from database data (Off-List)
            62993 by: Neil Freeman

    Re: session security issue
            62994 by: Renze Munnik

    Installation failed ! Please Help!
            62997 by: Jack

    DOM XML module
            63000 by: Anders Östling

    Re: [PHP-WIN] Installation failed ! Please Help!
            63001 by: Phil Driscoll

    How to Read a URL dynamically generated by a server with POST method ?
            63002 by: chris.4Ur.net

    script execution stops after mail()
            63004 by: Vincent
            63007 by: Mukul Sabharwal
            63016 by: Mukul Sabharwal

    Online Psychology Tests
            63005 by: MindHunter

    Re: *THANKS* [PHP] need real expert (geting outer files) *english/german*
            63006 by: Tribun

    "FileSize" --> fread($fd, 7000)
            63008 by: Augusto Cesar Castoldi
            63009 by: Mukul Sabharwal
            63014 by: Mukul Sabharwal

    PHP on client-side
            63010 by: Tom Malone
            63012 by: Bruin, Bolke de

    Try to get PHP to read the content from MS Word
            63011 by: Jack
            63013 by: Mukul Sabharwal

    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:


    On Thu, 16 Aug 2001 03:50, Jason Dulberg wrote:
    > I am dynamically creating a menu based on a "title" field from a
    > database.
    >
    > ie
    > item1
    > item2 etc.
    >
    > Is it possible that when I'm on the "item1" page to bold the title in
    > the menu?
    >
    > Any suggestions are appreciated.
    >

    Presumably there is a corresponding filed for filename, or URL, or
    somesusch? If so, just check whether the current script name matches, and
    if so add the <STRONG> tags where needed.

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

    If at first you don't succeed, work for Microsoft.

    attached mail follows:


    Hi,

    function search_the_array($array) { global $search_tmp; $result = array_search($search_tmp, $array, TRUE); reset($array); while (!($result === FALSE) && (list($k, $v) = each($array))) { // Or maybe you wanted ereg($search_tmp, $v) here... $result = ereg($v, $search_tmp) ? $k : FALSE; } return ' '.$result; // extra space needed before the "key" }

    This code immediately returns a result, no matter what I type in there and what the array consists of. I even tried searching "Singapore" for "I will get a result no matter what I search for" and BANG... PHP fires back a result. I didn't write the code myself so I have no idea what's going on there... but I'd be glad if someone could help me. This code is supposed to search an array until it finds "$search_tmp" inside it...

    TIA,

    Raphael

    attached mail follows:


    "Raphael Pirker" <raphaelpnr1webresource.com> wrote in message news:20010816011955.66880.qmailpb1.pair.com...

    > function search_the_array($array) { > global $search_tmp; > $result = array_search($search_tmp, $array, TRUE); > reset($array); > while (!($result === FALSE) && (list($k, $v) = each($array))) > { > // Or maybe you wanted ereg($search_tmp, $v) here... > $result = ereg($v, $search_tmp) ? $k : FALSE; > } > return ' '.$result; // extra space needed before the "key" > }

    This is a bit screwy...

    First, array_search returns an array of keys where the values are exact matches... while you want to match a substring (I think);

    Then, it searches through the array again using regular expressions, and each time it finds something, it over-writes all previous values... and if there were any matches to begin with, it WILL find them again.

    And why is the search-string passed as a global while the array is passed by value?! This makes no sense to me.

    Finally, result is passed back as a string after being munged so it can't be used as a key - and if nothing was found, it returns a string consisting of a single space.

    Try one of these instead:

    // util function: case-sensitive search for substring, // returns true if found, else false function findSameCase($haystack, $needle) { return (strpos($haystack, $needle) !== false); }

    // util function: case-insensitive search for substring, // returns true if found, else false function findAnyCase($haystack, $needle) { return (strpos(strtolower($haystack), strtolower($needle)) !== false); }

    // return the key of the first array member containing the search string, // or false if there are no matches. function findFirst($arr, $string, $caseSensitive=false) {

    if ($caseSensitive) $find = "findSameCase"; else $find = "findAnyCase";

    foreach($arr as $key => $val) if ($find($val, $string)) return $key;

    return false; }

    // return an array of all keys to members containing the search // string (if there are no matches, the array is empty). function findAll($arr, $string, $caseSensitive=false) {

    if ($caseSensitive) $find = "findSameCase"; else $find = "findAnyCase";

    $result = array();

    foreach($arr as $key => $val) if ($find($val, $string)) $result[] = $key;

    return $result; }

    attached mail follows:


    Hi Hugh,

    > First, array_search returns an array of keys where the values are > exact matches... while you want to match a substring (I think); Yes, but exact matches are better :))

    > Then, it searches through the array again using regular expressions, > and each time it finds something, it over-writes all previous values... > and if there were any matches to begin with, it WILL find them again. Problem is not the overwriting part.. problem is it doesn't really "search", it "finds" something instantly, whether it's inside the string or not

    > And why is the search-string passed as a global while the > array is passed by value?! This makes no sense to me. I'm searching a number of arrays (3 to be exact) for only one search string... $array is different all the time while $search_tmp is the same

    But thanks a lot for the scripts, I will be trying them out immediately!

    Regards,

    Raphael

    attached mail follows:


    On Thu, 16 Aug 2001 00:38, Mike Mike wrote: > Hello, > I'm pulling a date out of MySQL as 2001-10-18. > How do I make it print October 18 in php? > Thanks much > --Mike

    You could use the Mysql date functions to format it for you. If your date field is called date and is a date type:

    SELECT CONCAT(MONTHNAME(date), ' ', DAYOFMONTH(date)) AS newdate

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

    I'm Not Schizophrenic, And Neither Am I.

    attached mail follows:


    On 16-Aug-2001 David Robley wrote: > On Thu, 16 Aug 2001 00:38, Mike Mike wrote: >> Hello, >> I'm pulling a date out of MySQL as 2001-10-18. >> How do I make it print October 18 in php? >> Thanks much >> --Mike > > You could use the Mysql date functions to format it for you. If your date > field is called date and is a date type: > > SELECT CONCAT(MONTHNAME(date), ' ', DAYOFMONTH(date)) AS newdate >

    Ghaakk ... SELECT DATE_FORMAT(date, '%M %d') as newdate from ...

    Regards,

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

    attached mail follows:


    If I dump something out from phpMyAdmin like this:

    INSERT INTO database VALUES( 'bill's bowtie');

    and then I want to feed it back into phpMyAdmin it gives me an error. Basically, it's confused by the middle apostrophe. So how can I dump this statement back into phpMyAdmin other than by manually adding a slash before each apostrophe that will confuse it?

    attached mail follows:


    "Justin" <kgbgraffitilandscape.com> wrote in message news:NFBBLLHMALGFBKEPPKHAGEOLCEAA.kgbgraffitilandscape.com... > INSERT INTO database VALUES( 'bill's bowtie');

    Bad syntax: try INSERT INTO database ( fieldname ) VALUES ( 'this string' )

    > and then I want to feed it back into phpMyAdmin it gives me an error. > Basically, it's confused by the middle apostrophe. So how can I dump this > statement back into phpMyAdmin other than by manually adding a slash before > each apostrophe that will confuse it?

    AddSlashes()

    NOTE that MySQL will interpret these and turn the string back to the original internally, so there is no need to StripSlashes() when retrieving the string.

    attached mail follows:


    On Thu, 16 Aug 2001 03:08, Egan wrote: > I need to set some PHP values like: > > php_value session.save_path /a_more_secure_dir > > > in my .htaccess file. But the main Apache httpd.conf file has: > > AllowOverride AuthConfig FileInfo Indexes > > > and php_value in .htaccess causes Apache internal server error! > > > Now if I change httpd.conf to say: > > AllowOverride All > > > then php_value works in .htaccess, with no error! > > > But as you know, using "AllowOverride All" in httpd.conf is BAD! How > do I allow php_value in .htaccess, without it? I tried: > > AllowOverride php_value > > > but Apache rejects it as a configuration error. :-( > > Help, please! > > > Egan

    Yuo might try allowovveride options

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

    He who places head in sand, will get kicked in the end!

    attached mail follows:


    Hey all,

    Just a quick one which is driving me a tad mad at the moment.... Im trying to compile PHP 4.0.6 to have imlib2 in it, and in the php_imlib doco, it tells me to add the following flag to it the ./configure

    --with-imlib[=/path/to/Imlib2]

    Now the problem is, I dont know what to put in as the path to Imlib2 here. Im installing it on a FreeBSD 4.3 box, with apache 1.3.20

    can anyone point me in the right direction ?

    Thanks

    Chris

    --
         Chris Aitken - Administration/Database Designer - IDEAL Internet
      email: chrisideal.net.au  phone: +61 2 4628 8888  fax: +61 2 4628 8890
                  __-----------------------------------------__
                               *** Big Brother ***
    It just shows that the dull will rule the world. And we will be watching it.
    

    attached mail follows:


    On Thu, 16 Aug 2001 11:17, Chris Aitken wrote: > Hey all, > > Just a quick one which is driving me a tad mad at the moment.... Im > trying to compile PHP 4.0.6 to have imlib2 in it, and in the php_imlib > doco, it tells me to add the following flag to it the ./configure > > --with-imlib[=/path/to/Imlib2] > > Now the problem is, I dont know what to put in as the path to Imlib2 > here. Im installing it on a FreeBSD 4.3 box, with apache 1.3.20 > > can anyone point me in the right direction ? > > > Thanks > > > Chris

    Presumably you'll need to install inmlib then point to where-ever you installed it?

    > *** Big Brother *** > It just shows that the dull will rule the world. And we will be > watching it.

    ^^ Speak for yourself :-)

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

    Bugs are Sons of Glitches!

    attached mail follows:


    At 11:49 AM 16/08/2001, David Robley wrote:

    >Presumably you'll need to install inmlib then point to where-ever you >installed it?

    Okay... my bad... I probably should have mentioned ive already installed imlib2 from ports and after rebuilding the locate database, shows the entries for imlib2 as follows

    /usr/X11R6/bin/imlib2-config /usr/X11R6/include/Imlib2.h /usr/X11R6/lib/libImlib2.a /usr/X11R6/lib/libImlib2.so /usr/X11R6/lib/libImlib2.so.1

    And thats it as far as files with 'imlib2' or 'Imlib2'

    Which is why im confused about the location of imlib2 for the compile of php.

    Chris

    --
         Chris Aitken - Administration/Database Designer - IDEAL Internet
      email: chrisideal.net.au  phone: +61 2 4628 8888  fax: +61 2 4628 8890
                  __-----------------------------------------__
                               *** Big Brother ***
    It just shows that the dull will rule the world. And we will be watching it.
    

    attached mail follows:


    On Thu, 16 Aug 2001 11:57, Chris Aitken wrote: > At 11:49 AM 16/08/2001, David Robley wrote: > >Presumably you'll need to install inmlib then point to where-ever you > >installed it? > > Okay... my bad... I probably should have mentioned ive already > installed imlib2 from ports and after rebuilding the locate database, > shows the entries for imlib2 as follows > > /usr/X11R6/bin/imlib2-config > /usr/X11R6/include/Imlib2.h > /usr/X11R6/lib/libImlib2.a > /usr/X11R6/lib/libImlib2.so > /usr/X11R6/lib/libImlib2.so.1 > > And thats it as far as files with 'imlib2' or 'Imlib2' > > Which is why im confused about the location of imlib2 for the compile > of php. >

    Well, I would use /usr/X11R6 presuming that the php configure/compile process will look under the specified directory for the include and lib directories, wherein it (hopefully) finds what it wants.

    Cheers

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

    Multitasking: Reading in the bathroom

    attached mail follows:


    Hi !

    I have recently install php4 on Red Hat Linux with Apache, i try to connect to MySql Database but i have a parse error (on line 2) , why ? ( i have tried mysql_connect but it still doesn't work too )

    <?php $link = mysql_pconnect ("kron", "jutta", "geheim") { or die ("Connexion impossible"); } if (mysql_create_db ("my_db")) { print ("Base de données créée\n"); } else { printf ("Erreur lors de la création de la base: %s\n", mysql_error()); } ?>

    attached mail follows:


    > <?php > $link = mysql_pconnect ("kron", "jutta", "geheim") { > or die ("Connexion impossible"); > }

    ^ ^

    Those two {}'s aren't needed for an "or dosomething" operation.

    Jason

    attached mail follows:


    The error I get is filtered by the getQuery function. It spits out:

    Unable to execute query in getQuery: insert into textblocks (id, language, textitem) values (max(id)+1, 'en', '') Error: Unknown column 'textitem' in 'field list'

    The code for the function (for reference) is:

    function getQuery($sqlquery) // executes an arbitrary SQL query and returns the result { global $connID;

    // check for connection state if (!$connID) getConnection();

    // execute it $result = mysql_query($sqlquery, $connID) or die("Unable to execute query in getQuery: $sqlquery\n<br>Error: ".mysql_error());

    return $result; }

    Any suggestions?

    j.

    ----- Original Message ----- From: "Tyler Longren" <tylercaptainjack.com> To: "Justin Finkelstein" <justinkeytwo.net>; "php-general" <php-generallists.php.net> Sent: Wednesday, August 15, 2001 6:46 PM Subject: Re: [PHP] How to find out which function caused an error

    Can you post the error so we can have a look at it? If it didn't provide a function, it's probably a parse error (missing semi-colon, missing quote).

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

    On Wed, 15 Aug 2001 18:43:49 +0100 "Justin Finkelstein" <justinkeytwo.net> wrote:

    > Hi kids > > I have a function in one of my includes: db.inc.php::getQuery which does > most of my mySQL calling for me. > > However, when the mySQL call fails, I get a nice error which is useful > except one thing. It doesn't tell me which function called it. > > Does anyone know how to find to do the equivalent of: > > function myFunc() > { > echo "myFunc was called by the function $calling_function"; > } > > Any ideas? > > j. > > > > > -- > 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:


    > Unable to execute query in getQuery: insert into textblocks > (id, language, > textitem) values (max(id)+1, 'en', '') > Error: Unknown column 'textitem' in 'field list'

    I daresay that your table "textblocks" doesn't have a column called "textitem".

    Jason

    attached mail follows:


    Yes, that I know.

    That wasn't the point though. What I wanted was to find out which function called getQuery.

    j.

    ----- Original Message ----- From: "Jason Murray" <Jason.Murraymelbourneit.com.au> To: "'Justin Finkelstein'" <justinkeytwo.net>; "Tyler Longren" <tylercaptainjack.com>; "php-general" <php-generallists.php.net> Sent: Thursday, August 16, 2001 3:05 AM Subject: RE: [PHP] How to find out which function caused an error

    > Unable to execute query in getQuery: insert into textblocks > (id, language, > textitem) values (max(id)+1, 'en', '') > Error: Unknown column 'textitem' in 'field list'

    I daresay that your table "textblocks" doesn't have a column called "textitem".

    Jason

    attached mail follows:


    > I have a function in one of my includes: db.inc.php::getQuery which does > most of my mySQL calling for me. > > However, when the mySQL call fails, I get a nice error which is useful > except one thing. It doesn't tell me which function called it. > > Does anyone know how to find to do the equivalent of: > > function myFunc() > { > echo "myFunc was called by the function $calling_function"; > }

    AFAIK, the internal functions to walk the stack are not yet available in user-land PHP. They do exist, at some level, since the Zend IDE and others are using them for debugging, I think.

    Meanwhile, about all you can do is:

    Consider passing __FILE__ and __LINE__ into your getQuery function.

    Stop using a class wrapper. :-)

    There may also be some fancy combination of http://php.net/assert and the apparently undocumented (unsupported?) set_error_handler() function that *MIGHT* allow the reporting of the true function call line and script, but my gut says "No".

    You may want to investigate using an IDE which does provide facilities that are an alternative. http://zend.com and Active State's Komodo are two options. There are many, many, many more, and we don't really need another thread on them all, do we?... Go find that UK guy's site that lists all PHP Editors with relative merits.

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

    attached mail follows:


    I was once in your situation, fortunately, my boss understood that it is better to have an application that has less features but never shuts down. The linux/php/mysql app was up for 283 days when they review it. The full featured NT/ASP/SQL 6.5 was shut down an average of 1 full day for every 3 weeks. The reliability will win and make you happy in the long run, it's too bad people realized this when they need to spend to many evenings rebuilding the server from scratch!

    py

    ----- Original Message ----- From: "Jay Paulson" <jpaulsonlbjs.com> To: "Michael Kimsal" <michaeltapinternet.com> Cc: "php" <php-generallists.php.net> Sent: Wednesday, August 15, 2001 6:14 PM Subject: Re: [PHP] Need open source community help!

    > Well I know they aren't going to want to spend $11k on all that new stuff.. > when what I have cost them nothing at all.. :) however, the company I'm > talking to is willing to deal and since I work for 6 radio stations they > would probably be willing to trade some advertisement on the air for their > software and SQL 7 etc.. however, I don't know if my bosses would be willing > to do that since mine doesn't have as many features (but will in the > future).. the big thing here is how much is it going to cost.. that's the > bottom line.. I'll just have to talk to them but I did want to get the input > of the open source community first so I could have something to back up why > we could use what I have developed instead of the other company's software. > > Thanks for all your help! > Jay Paulson > Internet Program Director > LBJS > jpaulsonlbjs.com > > ----- Original Message ----- > From: "Michael Kimsal" <michaeltapinternet.com> > To: "Jay Paulson" <jpaulsonlbjs.com> > Cc: "php" <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 4:54 PM > Subject: Re: [PHP] Need open source community help! > > > > Why would people move away from a package they paid for already? > > Especially > > if it's backed up by another company - I'm guessing there's probably > > some maintenance > > contracts they will be signing. > > > > I'd suggest you (Jay) look at some other OS projects which may be more > > full-featured > > already, and show those. Chris is right - it depends somewhat on a > > timeline. But there's > > going to have to be some custom work to get things "just right", OR they > > will need to > > adapt the business to the software, instead of the software to the > > business. > > (which costs more in the long run?) > > > > re: Windows - I think you're being a bit hard on it. As much as I > > support Linux, etc., after > > a few weeks of teething a Windows setup, we've had it up and running > > without > > any major incidents in over a year. (SQL7) > > > > re: featureset - what kind of features do you not have that this other > > package has? > > > > Do you already have SQL7 in house? If not, you'll need to purchase > > SQL2000, which > > "seems" to be $5k. If you do named licensing, it may be a bit cheaper - > > depends on your > > company size. Plus the cost of the Win machine, if you don't already > > have that. Figure > > an extra $6k on top of the cost of the software. Is it worth $6k to > > have something > > next week, or can they wait another month while you feverishly add the > > missing features - > > "exactly to spec" - for a custom fit? > > > > > > --------------------------------------- > > Michael Kimsal > > http://www.tapinternet.com/php/ > > PHP Training Courses > > 734-480-9961 > > > > > > > > PHP List wrote: > > > > >IMO > > >I would have to say it depends on the Timeline of your Boss. > > >Releasing the app to the open source community would be great, the more > > >there is, the more reason for people to stop using MS, but you can't > demand > > >a schedule of when new features will be added. > > >You may have to go with the MS for now, and wait for your app to be > > >developed with the new features, then convince your boss on moving to > your > > >software. You should be able to move all the data from one to the other > > >without to much trouble. > > > > > >Chris > > > > > > > > > > > > > > -- > > 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:


    that's EXACTLY what i'm going to throw at them.. also for the money they are going to spend on the win2k and sql db etc.. they could hire someone part time to take some of this load off my back and then i could add all the features that this other company has.. i'll just have to talk to them.. :) thanks again for all your help!

    ----- Original Message ----- From: "pierre-yves" <pylemsympatico.ca> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 9:46 PM Subject: Re: [PHP] Need open source community help!

    > I was once in your situation, fortunately, my boss understood that it is > better to have an application that has less > features but never shuts down. The linux/php/mysql app was up for 283 days > when they review it. The full featured > NT/ASP/SQL 6.5 was shut down an average of 1 full day for every 3 weeks. The > reliability will win and make you happy > in the long run, it's too bad people realized this when they need to spend > to many evenings rebuilding the server from scratch! > > py > > ----- Original Message ----- > From: "Jay Paulson" <jpaulsonlbjs.com> > To: "Michael Kimsal" <michaeltapinternet.com> > Cc: "php" <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 6:14 PM > Subject: Re: [PHP] Need open source community help! > > > > Well I know they aren't going to want to spend $11k on all that new > stuff.. > > when what I have cost them nothing at all.. :) however, the company I'm > > talking to is willing to deal and since I work for 6 radio stations they > > would probably be willing to trade some advertisement on the air for their > > software and SQL 7 etc.. however, I don't know if my bosses would be > willing > > to do that since mine doesn't have as many features (but will in the > > future).. the big thing here is how much is it going to cost.. that's the > > bottom line.. I'll just have to talk to them but I did want to get the > input > > of the open source community first so I could have something to back up > why > > we could use what I have developed instead of the other company's > software. > > > > Thanks for all your help! > > Jay Paulson > > Internet Program Director > > LBJS > > jpaulsonlbjs.com > > > > ----- Original Message ----- > > From: "Michael Kimsal" <michaeltapinternet.com> > > To: "Jay Paulson" <jpaulsonlbjs.com> > > Cc: "php" <php-generallists.php.net> > > Sent: Wednesday, August 15, 2001 4:54 PM > > Subject: Re: [PHP] Need open source community help! > > > > > > > Why would people move away from a package they paid for already? > > > Especially > > > if it's backed up by another company - I'm guessing there's probably > > > some maintenance > > > contracts they will be signing. > > > > > > I'd suggest you (Jay) look at some other OS projects which may be more > > > full-featured > > > already, and show those. Chris is right - it depends somewhat on a > > > timeline. But there's > > > going to have to be some custom work to get things "just right", OR they > > > will need to > > > adapt the business to the software, instead of the software to the > > > business. > > > (which costs more in the long run?) > > > > > > re: Windows - I think you're being a bit hard on it. As much as I > > > support Linux, etc., after > > > a few weeks of teething a Windows setup, we've had it up and running > > > without > > > any major incidents in over a year. (SQL7) > > > > > > re: featureset - what kind of features do you not have that this other > > > package has? > > > > > > Do you already have SQL7 in house? If not, you'll need to purchase > > > SQL2000, which > > > "seems" to be $5k. If you do named licensing, it may be a bit cheaper - > > > depends on your > > > company size. Plus the cost of the Win machine, if you don't already > > > have that. Figure > > > an extra $6k on top of the cost of the software. Is it worth $6k to > > > have something > > > next week, or can they wait another month while you feverishly add the > > > missing features - > > > "exactly to spec" - for a custom fit? > > > > > > > > > --------------------------------------- > > > Michael Kimsal > > > http://www.tapinternet.com/php/ > > > PHP Training Courses > > > 734-480-9961 > > > > > > > > > > > > PHP List wrote: > > > > > > >IMO > > > >I would have to say it depends on the Timeline of your Boss. > > > >Releasing the app to the open source community would be great, the more > > > >there is, the more reason for people to stop using MS, but you can't > > demand > > > >a schedule of when new features will be added. > > > >You may have to go with the MS for now, and wait for your app to be > > > >developed with the new features, then convince your boss on moving to > > your > > > >software. You should be able to move all the data from one to the other > > > >without to much trouble. > > > > > > > >Chris > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Show them some facts, Jay.

    Go to check some articles on the net from reliable websites such as ZDnet or (if damn lucky) MSN. That could work. Also, get a real evaluation of their needs and say: This is exactly what I've done and intend to extend the functionality of. The MS software apart from being expensive is not much expandable either. Since you develop it you are having an extra card - you adapt it better to the company needs. And, you'll have time for it since there would be less trouble with maintenance.

    A subsidiary of our company have passed through that once. They've been running a 400.000 pv/mon site on PHP/PostgreSQL. When, after some TV commercials and other ad campaigns the traffic increased to 3.5 millions pv/mon the server started going down each 5 hours. The response time became 8-15 seconds.

    I told them: upgrade your hardware, do load balancing, get the db off the web server to it's own, let us improve the PHP software and add some own caching systems, plus few more minimal improvements. Expenses would be up to $12-15k for the machines and faster hosting and $9 for our work on this all. Time - 21 day.

    You know what they did?

    They have paid way more money for couple of new servers and a useless Oracle database. Hired 3 Java programmers and two p/t guys who waited for these 'three genius' rewriting all the thing in Java (the job of p/t's consisted of just making sure the site goes down a bit less).

    Result? Yeah, it's running. They still are keeping the programmers busy improving the site.

    Now, after that lesson it is easier for me to talk about our own sites here. But at client sites it's hard to convince. I noticed that real-life examples and testimonials are often working.

    Cheers, Maxim Maletsky

    -----Original Message----- From: Jay Paulson [mailto:jaydvdfuture.com] Sent: Thursday, August 16, 2001 2:30 PM To: pierre-yves; php-generallists.php.net Subject: Re: [PHP] Need open source community help!

    that's EXACTLY what i'm going to throw at them.. also for the money they are going to spend on the win2k and sql db etc.. they could hire someone part time to take some of this load off my back and then i could add all the features that this other company has.. i'll just have to talk to them.. :) thanks again for all your help!

    ----- Original Message ----- From: "pierre-yves" <pylemsympatico.ca> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 9:46 PM Subject: Re: [PHP] Need open source community help!

    > I was once in your situation, fortunately, my boss understood that it is > better to have an application that has less > features but never shuts down. The linux/php/mysql app was up for 283 days > when they review it. The full featured > NT/ASP/SQL 6.5 was shut down an average of 1 full day for every 3 weeks. The > reliability will win and make you happy > in the long run, it's too bad people realized this when they need to spend > to many evenings rebuilding the server from scratch! > > py > > ----- Original Message ----- > From: "Jay Paulson" <jpaulsonlbjs.com> > To: "Michael Kimsal" <michaeltapinternet.com> > Cc: "php" <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 6:14 PM > Subject: Re: [PHP] Need open source community help! > > > > Well I know they aren't going to want to spend $11k on all that new > stuff.. > > when what I have cost them nothing at all.. :) however, the company I'm > > talking to is willing to deal and since I work for 6 radio stations they > > would probably be willing to trade some advertisement on the air for their > > software and SQL 7 etc.. however, I don't know if my bosses would be > willing > > to do that since mine doesn't have as many features (but will in the > > future).. the big thing here is how much is it going to cost.. that's the > > bottom line.. I'll just have to talk to them but I did want to get the > input > > of the open source community first so I could have something to back up > why > > we could use what I have developed instead of the other company's > software. > > > > Thanks for all your help! > > Jay Paulson > > Internet Program Director > > LBJS > > jpaulsonlbjs.com > > > > ----- Original Message ----- > > From: "Michael Kimsal" <michaeltapinternet.com> > > To: "Jay Paulson" <jpaulsonlbjs.com> > > Cc: "php" <php-generallists.php.net> > > Sent: Wednesday, August 15, 2001 4:54 PM > > Subject: Re: [PHP] Need open source community help! > > > > > > > Why would people move away from a package they paid for already? > > > Especially > > > if it's backed up by another company - I'm guessing there's probably > > > some maintenance > > > contracts they will be signing. > > > > > > I'd suggest you (Jay) look at some other OS projects which may be more > > > full-featured > > > already, and show those. Chris is right - it depends somewhat on a > > > timeline. But there's > > > going to have to be some custom work to get things "just right", OR they > > > will need to > > > adapt the business to the software, instead of the software to the > > > business. > > > (which costs more in the long run?) > > > > > > re: Windows - I think you're being a bit hard on it. As much as I > > > support Linux, etc., after > > > a few weeks of teething a Windows setup, we've had it up and running > > > without > > > any major incidents in over a year. (SQL7) > > > > > > re: featureset - what kind of features do you not have that this other > > > package has? > > > > > > Do you already have SQL7 in house? If not, you'll need to purchase > > > SQL2000, which > > > "seems" to be $5k. If you do named licensing, it may be a bit cheaper - > > > depends on your > > > company size. Plus the cost of the Win machine, if you don't already > > > have that. Figure > > > an extra $6k on top of the cost of the software. Is it worth $6k to > > > have something > > > next week, or can they wait another month while you feverishly add the > > > missing features - > > > "exactly to spec" - for a custom fit? > > > > > > > > > --------------------------------------- > > > Michael Kimsal > > > http://www.tapinternet.com/php/ > > > PHP Training Courses > > > 734-480-9961 > > > > > > > > > > > > PHP List wrote: > > > > > > >IMO > > > >I would have to say it depends on the Timeline of your Boss. > > > >Releasing the app to the open source community would be great, the more > > > >there is, the more reason for people to stop using MS, but you can't > > demand > > > >a schedule of when new features will be added. > > > >You may have to go with the MS for now, and wait for your app to be > > > >developed with the new features, then convince your boss on moving to > > your > > > >software. You should be able to move all the data from one to the other > > > >without to much trouble. > > > > > > > >Chris > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    -- 
    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'm trying to get a script working that will upload an image to a MySQL database ... the script seems to be working, in that its not giving errors - but it does nothing ... it doesn't add the image to the database at all.

    Can someone take a look at this script and let me know where I've gone wrong?

    Thanks

    Here is the script I'm using:

    <?php

    if ($submit) {

    MYSQL_CONNECT("localhost","user","pass"); mysql_select_db("binary_date");

    $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));

    $result=MYSQL_QUERY("INSERT INTO binary_date (description,bin_data,filename,filesize,filetype) ". "VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')");

    $id= mysql_insert_id(); print "<p>This file has the following Database ID: <b>$id</b>";

    MYSQL_CLOSE();

    } else {

    // else show the form to submit new data: ?>

    <form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data"> File Description:<br> <input type="text" name="form_description" size="40"> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form>

    <?php

    }

    ?>

    attached mail follows:


    Subject: [PHP] need real expert (geting outer files) *english/german*

    > the problem is, that this is very good restricted by serverside.

    If you've worked around that, you're probably now seeing something silly in your fread() code...

    > But now I already get the file, and no more the error-message, > but the problem is, that the file will not completly load. > > this means, I receive the file, but only the first 4188 bytes from > 11988 bytes.

    You'd have to show us your source code for how you're dynamically downloading only half the file.

    We can't just guess at what you've done to make it stop...

    It's extremely unliked for the server to decide halfway through a file download that you were not a valid user and to quit sending you stuff...

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

    attached mail follows:


    OK... here are more details...

    my trying was to get the content from this url : http://www29.gmx.net/v4/register?FILE_POS_OLD=0&ADDR_CHECK=&t=&COMPANY=&TITL E=Herr&FIRSTNAME=Aaaa&MIDINITIAL=A&LASTNAME=Aaaa&STREET=Strandener Str. 1&ZIPCODE=51079&CITY=koeln&COUNTRYISO=DE&STATE=Nordrhein-Westfalen&LANGUAGES =,de&PHONE=&MOBILEPHONE=&FAX=&HOMEPAGE=&GENDER=M&BIRTHDAY=01&BIRTHMONTH=1&BI RTHYEAR=1901&MARRISTAT=S&HOUSEHOLDPERS=1&INCOME=0&EDUCATIONLEVEL=HSA&EMPLOYS TAT=SC&COMPUTEROWN=0&INTERNETUSE=Private&MPHONE=0

    (one line!) into a variable.

    every other link succeed, but NOT this one.

    I've tried to do that with fopen and fsockopen.

    may be, i've made something wrong...

    I HOPE, u know an answer, how to do that...

    and please test it out, what you mean, and if it doesnt work, report anyway your tryings.

    ;)

    thanks!

    Tribun (Patrick Lehnen)

    PS: I've tried to solve this problem the hole day... I would like to, but I cant believe, that someone knows the right solution.... lets hope ;)

    "Richard Lynch" <ceol-i-e.com> schrieb im Newsbeitrag news:00a801c12603$0ccb6c20$6401a8c0Lynchux100... > Subject: [PHP] need real expert (geting outer files) *english/german* > > > > the problem is, that this is very good restricted by serverside. > > If you've worked around that, you're probably now seeing something silly in > your fread() code... > > > But now I already get the file, and no more the error-message, > > but the problem is, that the file will not completly load. > > > > this means, I receive the file, but only the first 4188 bytes from > > 11988 bytes. > > You'd have to show us your source code for how you're dynamically > downloading only half the file. > > We can't just guess at what you've done to make it stop... > > It's extremely unliked for the server to decide halfway through a file > download that you were not a valid user and to quit sending you stuff... > > -- > 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 > >

    attached mail follows:


    hi

    that url is 445 characters long; the maximum (i believe) is 255 characters, maybe that's why your file is truncated; just a guess;

    regards

    At 09:26 16/08/01, you wrote: >http://www29.gmx.net/v4/register?FILE_POS_OLD=0&ADDR_CHECK=&t=&COMPANY=&TITL >E=Herr&FIRSTNAME=Aaaa&MIDINITIAL=A&LASTNAME=Aaaa&STREET=Strandener Str. >1&ZIPCODE=51079&CITY=koeln&COUNTRYISO=DE&STATE=Nordrhein-Westfalen&LANGUAGES >=,de&PHONE=&MOBILEPHONE=&FAX=&HOMEPAGE=&GENDER=M&BIRTHDAY=01&BIRTHMONTH=1&BI >RTHYEAR=1901&MARRISTAT=S&HOUSEHOLDPERS=1&INCOME=0&EDUCATIONLEVEL=HSA&EMPLOYS >TAT=SC&COMPUTEROWN=0&INTERNETUSE=Private&MPHONE=0

    attached mail follows:


    I dunno if zlib can do it, but you should be able to http://php.net/exec with tar (man tar) to do what you want.

    --
    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: Kiat Kin <return78yahoo.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Wednesday, August 15, 2001 3:03 AM
    Subject: compression help
    

    > It is possible for me to use the zlib library to compress multiple files in > a gz file and after get the original files by decompress it? > > What i can do now is just compress / decompress a single file only with zlib > library. > > TIA > kin > >

    attached mail follows:


    > Does anyone know of a tool that lets me see the cookies a site sends my > browser?

    Change the settings in your browser to "ask me before accepting cookies", and you'll see them in real-time.

    If you need to look at old cookies, figure out where the browser stores them (not rocket science) and use, errr, Notepad to look at them. They're just text files.

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

    attached mail follows:


    > If you put this script into a file (.cgi) and give it executable > permissions, you can run it from the command line > > ------------PHP CODE START------------ > #!/usr/bin/php > > <?php > print "Hello"; > ?> > ------------PHP CODE END------------ > > and the Content-Type header is added by PHP. But when I put it in my > cgi-bin directory it would not execute from a browser - I got internal > server error. > > The error log said "Premature end of script headers." > > Has anybody been able to find a way round this problem? Running PHP NOT as > a module?

    You will need to use:

    AddType application/php-cgi .phpcgi Alias phpdir "/path/to/phpdirectory/" Action application/php-cgi "phpdir/php"

    Alter your file to end in .phpcgi, not .cgi .cgi is probably already taken by, errr, Perl?, and you'll just screw that up if you leave it.

    This definitely can be done -- I've used it to run 4 or 5 different versions of PHP simultaneously to track down a bug, using extensions like .php305 .php306 .php307 and matching AddType/Action lines. I didn't actually use Alias, but I think it's cleaner to do that.

    You definitely need a unique mime-type as well. You'll confuse Apache no end if you assign the same mime-types to both Module and CGI PHP.

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

    attached mail follows:


    > I am using PHP to send a header to the browser requestiing authentication. > On a successful login i am tracking inactivity by the client and want to > expire the login once a timeout period is reached. Problem is if the session > expires and the user just refreshes then the orignal login details are > passed to the script. How do I get the client to forget the previous login > details?

    You can't. It's just not part of the HTTP spec, and you'd have to convince Microsoft, Netscape, Opera, etc to implement.

    I believe you can use a different REALM after the the user is expired, and then the username/password presented will not be valid.

    This requires that you have a scheme for tracking various REALMs to present to browser in your HTTP Authentication, so you never re-present the same one twice to any given user.

    Getting this right can be a bit tricky, but it's been done, and it's been posted at least once, so it's in the archives...

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

    attached mail follows:


    > I have this code, which is a cooked down code of something bigger. So don't > ask what it's for. > The problem is that I can't get this script working the way I like it at > all. Maybe it's a bug. Maybe you have another suggestion? > Somewhere in the middle section i have wrote test1 and test2 as a comment. > If you activate test2 instead of test1, then you will have some output(not > the expected output), else I just see a page saying:"The page cannot be > displayed". > > I think it's very strange, any ideas? > Try inserting this into a file and try yourself. > > /Stig > > <? > $side = 1; > > function grabkeys ($felt, $key, $side) { > global $newarray; > $stopkey = array ("A","Z");//De key-navne som den ikke skal gemme. > If (!in_array($key , $stopkey)) { > if ($felt == $side) { $newarray[] = $key;}; > }; > };

    Get rid of ; after } They are silly.

    You could probably make $stopkey 'static', since it never seems to change.

    > function showkeys ($felt, $key) { > global $newarray; > echo count($newarray) . "-count newarray<br>"; // > echo "<pre>" . $newarray[0] . "</pre>-newarray<br>"; //test2 > echo $newarray[0] . "-newarray<br>"; //test1 > }; > > $row = array > ("A"=>"1","B"=>"1","C"=>"1","D"=>"1","E"=>"1","F"=>"1","Z"=>"1"); > array_walk ($row, 'grabkeys', $side); > array_walk ($row, 'showkeys'); > ?>

    Hrm... I seem to be getting sensible output *EXCEPT* that $newarray[0] seems to take on 'A' through 'Z' as you walk through $row with 'showkeys'... Seems pretty broken to me...

    But I'm using 4.0.2-dev on this machine...

    Is this the output you are getting with a current release? http://bugs.php.net may be the place to go...

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

    attached mail follows:


    PHPLib, Smarty, FastTemplates, and about 10,000 more...

    --
    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: Georgie <georgiecaseye-merge.ie>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Wednesday, August 15, 2001 7:05 PM
    Subject: Templates???
    

    > Can anyone direct me to some sample PHP code that extracts HTML from a > template file and replaces the, say, "%field%" tags in the HTML with > variables from the PHP file. > > Just like what Gossamer Threads Links program does with Perl. So, any 1 have > any links?? > >

    attached mail follows:


    For all of these linux commands (a few thousand) you can use:

    man xxx

    So, to answer your question for yourself, use:

    man man man grep

    The | bit is used to "pipe" the output of the command on the left into the command on the right for further processing.

    --
    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: Scott Mebberson <scottredbluedesign.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Wednesday, August 15, 2001 2:23 AM
    Subject: Re: [PHP] `pwd` - what does this mean?
    

    > Thanks for your reply but what does this (man -k "" | grep "(1)") do? > > Thanks > > > "Don Read" <dreadtexas.net> wrote in message > news:XFMail.20010815021557.dreadtexas.net... > > > > On 15-Aug-2001 Scott Mebberson wrote: > > > Hi Guys, > > > > > > I actually know what it means. Well, I think it means the current > directory? > > > > It executes the Unix command pwd. > > pwd - print working (current) directory. > > > > > Anyway... what exactly is it and where can I find some more information > > > about it? I couldn't find much on php.net > > > > man pwd > > > > > - also, is there any other > > > ones(whatever it is) like this? > > > > man -k "" | grep "(1)" > > > > Regards, > > -- > > Don Read dreadtexas.net > > -- It's always darkest before the dawn. So if you are going to > > steal the neighbor's newspaper, that's the time to do it. > >

    attached mail follows:


    > I'm working on a website for my quartet, The Chiara String Quartet.

    You wouldn't happen to be Chicago-based, would you?... :-)

    > This works fine in netscape, but IE 5 does not work. Investigating further, > I found a basic difference between the way Apache streams straight .wax and > ram files vs. the php filtered one. Find below:

    For the link within the actual HTML, instead of using links like:

    http://chiaraquartet.net/streaming.php?fileid=42

    Try using links like this:

    http://chiaraquartet.net/streaming.php/bartok4_1.ram?fileid=42

    While that extra bartok4_1.ram looks real goofy to us humans, IE thinks that's the name and type of file it is downloading, regardless of the Content-type: header it *OUGHT* to be looking at because Microsoft sucks.

    > HTTP/1.1 200 OK > Date: Wed, 15 Aug 2001 05:41:11 GMT > Server: Apache/1.3.17 (Unix) mod_bwlimited/0.8 PHP/4.0.4pl1 > mod_log_bytes/0.2 mod_frontpage/3.0.4.3 mod_ssl/2.8.0 OpenSSL/0.9.5a > X-Powered-By: PHP/4.0.4pl1 > Set-Cookie: PHPSESSID=a90d719b158c9275ba42b86571df2149; path=/ > Expires: Thu, 19 Nov 1981 08:52:00 GMT > Cache-Control: no-store, no-cache, must-revalidate, post-check=0, > pre-check=0 > Pragma: no-cache > Connection: close > Transfer-Encoding: chunked > Content-Type: audio/x-pn-realaudio > > 36 > http://music.chiaraquartet.net/bartok4/g2/bartok4_1.rm > 0 > > As you can see, the contents are encased by the length of the file and an > ending 0, like a normal html file. You can also see the extra headers PHP > adds in. > > How do I get rid of the 36 and the 0?

    You'd have to show us the source code that generates this output... The headers is internal PHP stuff, but you can over-ride by sending your own.

    The 36 and 0 are almost certainly *YOUR* PHP script being not quite right...

    attached mail follows:


    Good news:

    I found a solution. Microsoft was choking on the session headers. I designed a toolkit to interface with MySQL transparently that relies on sessions to keep things accurate from page to page as information is changed in a database. I added a variable called (oddly enough) $no_session, that if set prevents session_start or session_register from being accessed.

    I also needed to add headers for Content-Length, and Accept-Range: bytes

    As an example, the code I use for g2 is:

    $a = "http://music.chiaraquartet.net/".$this->parent->root->table->fieldsbyname[r ootname]->value."/g2/".$this->cliproot().".rm"; header("Accept-Range: bytes"); header("Content-Length: ".strlen($a)); header("Content-Type: audio/x-pn-realaudio"); print $a;

    $a is set to the location of the realmedia file.

    Yay!

    Greg

    "Richard Lynch" <ceol-i-e.com> wrote in message news:00a401c12603$0bd8cec0$6401a8c0Lynchux100... > > I'm working on a website for my quartet, The Chiara String Quartet. > > You wouldn't happen to be Chicago-based, would you?... :-) > > > This works fine in netscape, but IE 5 does not work. Investigating > further, > > I found a basic difference between the way Apache streams straight .wax > and > > ram files vs. the php filtered one. Find below: > > For the link within the actual HTML, instead of using links like: > > http://chiaraquartet.net/streaming.php?fileid=42 > > Try using links like this: > > http://chiaraquartet.net/streaming.php/bartok4_1.ram?fileid=42 > > While that extra bartok4_1.ram looks real goofy to us humans, IE thinks > that's the name and type of file it is downloading, regardless of the > Content-type: header it *OUGHT* to be looking at because Microsoft sucks. > > > HTTP/1.1 200 OK > > Date: Wed, 15 Aug 2001 05:41:11 GMT > > Server: Apache/1.3.17 (Unix) mod_bwlimited/0.8 PHP/4.0.4pl1 > > mod_log_bytes/0.2 mod_frontpage/3.0.4.3 mod_ssl/2.8.0 OpenSSL/0.9.5a > > X-Powered-By: PHP/4.0.4pl1 > > Set-Cookie: PHPSESSID=a90d719b158c9275ba42b86571df2149; path=/ > > Expires: Thu, 19 Nov 1981 08:52:00 GMT > > Cache-Control: no-store, no-cache, must-revalidate, post-check=0, > > pre-check=0 > > Pragma: no-cache > > Connection: close > > Transfer-Encoding: chunked > > Content-Type: audio/x-pn-realaudio > > > > 36 > > http://music.chiaraquartet.net/bartok4/g2/bartok4_1.rm > > 0 > > > > As you can see, the contents are encased by the length of the file and an > > ending 0, like a normal html file. You can also see the extra headers PHP > > adds in. > > > > How do I get rid of the 36 and the 0? > > You'd have to show us the source code that generates this output... The > headers is internal PHP stuff, but you can over-ride by sending your own. > > The 36 and 0 are almost certainly *YOUR* PHP script being not quite right... > >

    attached mail follows:


    > I have a security-question that I hope someone can answer, my question is: > Will the DROP+TABLE+TBL_TEST-part in > http://www.foo.bar/page.php?id=1;DROP+TABLE+TBL_TEST; be executed?

    I don't think it will in CURRENT versions of MySQL.

    Really *OLD* versions, maybe, if I recall correctly...

    But you ought to be using: http://php.net/mysql_escape_string which may (or may not -- it's a little self-referential in the docs) detect this inside a custom sanitize function.

    Actually, for an id, you don't even need mysql_escape_string:

    function sanitize_id($id){ $result = false; $id_int = (int) $id; $id_str = (string) $id_int; if ($id_int && $id === $id_str){ $result = $id_int; } else{ $result = false; } return $result; }

    $id = sanitize_id($id) or error_log(date("Y/m/d h:i:s - " . __FILE__ . ": " . _LINE__ . " hack attempt using \$id: $id"); if (!$id){ # Do whatever you want to tell the user you caught them (or not) here... }

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

    attached mail follows:


    > Is it possible use php to read a file and then using it to construct a > java.InputStream object?

    Probably. Try it and see.

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

    attached mail follows:


    I would like to automatically run a PHP script at regular intervals during the day. I looked through the archives and found this:

    "c:/path/to/php.exe -q c:/path/to/your/script.php"

    I was going to use Scheduled Tasks but that will only run programs. Is there a way I can do this? I use Apache and PHP4 on Windows 2000 Professional. Thanks. Jeff Oien

    attached mail follows:


    Hi,

    You can create a .bat file which says the commands you want to run and then schedule the .bat...

    HTH,

    Raphael

    attached mail follows:


    Hi people this may be off this list a bit, But I want to make the apache webserver believe that a "html" file is my server is actually a "php4" file, Is this syntax correct to add in the .htaccess file?

    AddType application/x-httpd-php4 .html

    Open for all suggestions. Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    Jack wrote: > > Hi people > this may be off this list a bit, But I want to make the apache webserver believe that a "html" file is my server is actually a "php4" file, Is this syntax correct to add in the .htaccess file? > > AddType application/x-httpd-php4 .html

    Just remove the '4' from this line and it's ok.

    -- 
    Pavel a.k.a. Papi
    

    attached mail follows:


    Okay,

    Im really having a hard time with imlib2 and php. There is so little documentation on this so I dont know what im doing....

    Firstly.... When Imlib2 is compiled into PHP, how do I know (like should there be an entry in phpinfo() )

    Secondly.... Whats the easiest way people have installed imlib2 into PHP. Im trying the way the (very small) INSTALL file says that comes with php_imlib but doesnt seem to want to make it work.

    Any help would be greatly appreciated.

    Chris

    --
         Chris Aitken - Administration/Database Designer - IDEAL Internet
      email: chrisideal.net.au  phone: +61 2 4628 8888  fax: +61 2 4628 8890
                  __-----------------------------------------__
                               *** Big Brother ***
    It just shows that the dull will rule the world. And we will be watching it.
    

    attached mail follows:


    > Firstly.... When Imlib2 is compiled into PHP, how do I know (like should > there be an entry in phpinfo() )

    Of course. For an example see http://conf.php.net/info.php

    > Secondly.... Whats the easiest way people have installed imlib2 into PHP. > Im trying the way the (very small) INSTALL file says that comes with > php_imlib but doesnt seem to want to make it work.

    Yes, there is something funky with that extension lately. I haven't quite figured out why the shared library version of the extension stopped working. Works fine as a static extension though.

    Just copy the imlib directory into php4/ext and in the php4/ directory run ./buildconf. You will need the appropriate versions of autoconf, automake and libtool installed. Then add --with-imlib to your ./configure flags and if you Imlib2 library is installed correctly it should just work.

    -Rasmus

    attached mail follows:


    If i select a group of records from a mysql db is there a way to place each record on a separate page. Could I put them in an array which is connected to a session object?

    Andrew

    attached mail follows:


    Why not use the mysql limit function? Kunal ----- Original Message ----- From: "Andrew Austin" <plant-techxtra.co.nz> To: "Php Lists (E-mail)" <php-generallists.php.net> Sent: Thursday, August 16, 2001 11:24 AM Subject: [PHP] record each page

    If i select a group of records from a mysql db is there a way to place each record on a separate page. Could I put them in an array which is connected to a session object?

    Andrew

    --
    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 am going to install a LDAP package for my apache-mysql-php web interface. The question is. What ldap package to use and how to do it.

    Is there anything else i should de except for: --with-ldap="ldap directory"

    Thanks for any help i can get.

    //Johan

    attached mail follows:


    Install OpenLDAP (www.openldap.org)

    On Thu, 16 Aug 2001, Johan Vikerskog (ECS) wrote:

    > I am going to install a LDAP package for my apache-mysql-php web interface. > The question is. > What ldap package to use and how to do it. > > Is there anything else i should de except for: > --with-ldap="ldap directory" > > Thanks for any help i can get. > > //Johan > > >

    attached mail follows:


    Another problem. when i try to run the configure for ldap i get the following error message: checking configure arguments... configure: error: bad value yes for --with-ldbm_module

    What is the appropriate configure settings for the ldbm? If i try ti disable it i get the message: backend needed for slapd.

    //Johan

    -----Original Message----- From: Rasmus Lerdorf [mailto:rasmusphp.net] Sent: den 16 augusti 2001 08:10 To: Johan Vikerskog (ECS) Cc: 'php-generallists.php.net' Subject: Re: [PHP] Ldap package.

    Install OpenLDAP (www.openldap.org)

    On Thu, 16 Aug 2001, Johan Vikerskog (ECS) wrote:

    > I am going to install a LDAP package for my apache-mysql-php web interface. > The question is. > What ldap package to use and how to do it. > > Is there anything else i should de except for: > --with-ldap="ldap directory" > > Thanks for any help i can get. > > //Johan > > >

    attached mail follows:


    "Johan Vikerskog (ECS)" wrote: > Another problem. > when i try to run the configure for ldap i get the following error message: > checking configure arguments... configure: error: bad value yes for --with-ldbm_module > > What is the appropriate configure settings for the ldbm? If i try ti disable it i get the message: > backend needed for slapd. > > //Johan > all you need is the option --with-ldap=/usr/local. Of course you have to replace '/usr/local' with the directory where you have installed the openldap package. Heiko

    attached mail follows:


    Hi people this may be off this list a bit, But I want to make the apache webserver believe that a "html" file is my server is actually a "php4" file. I used the syntax below to set Apache module in file .htaccess and did not work still, as I wrote some php script to print text in an html file and did not do anything yet.

    ********************** AddType application/x-httpd-php4 .html **********************

    What is the correct way to do this? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    > I used the syntax below to set Apache module in file > .htaccess and did not work still, as I wrote some php script > to print text in an html file and did not do anything yet. > > ********************** > AddType application/x-httpd-php4 .html > ********************** > > What is the correct way to do this?

    In order to have a .htaccess file work, you need to have AllowOverride set appropriately in the configuration file - it may be off.

    Jason

    attached mail follows:


    How do I check that out? and how do I turn it on? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: Jason Murray <Jason.Murraymelbourneit.com.au> To: 'Jack' <jackyactivelifestyle.com>; <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:19 AM Subject: RE: [PHP] to set file tye at apache module using htaccess

    > > I used the syntax below to set Apache module in file > > .htaccess and did not work still, as I wrote some php script > > to print text in an html file and did not do anything yet. > > > > ********************** > > AddType application/x-httpd-php4 .html > > ********************** > > > > What is the correct way to do this? > > In order to have a .htaccess file work, you need to have AllowOverride > set appropriately in the configuration file - it may be off. > > Jason >

    attached mail follows:


    If you just want to set this for a single file, just use a

    <Location /path/filename> ForceType application/x-httpd-php </Location>

    in your httpd.conf file. .htaccess files are generally evil and should be avoided if you have control over your httpd.conf file.

    Note that the mime-type. There is no '4' on the end of it.

    -Rasmus

    On Thu, 16 Aug 2001, Jack wrote:

    > Hi people > this may be off this list a bit, But I want to make the apache webserver believe that a "html" file is my server is actually a "php4" file. > I used the syntax below to set Apache module in file .htaccess and did not work still, as I wrote some php script to print text in an html file and did not do anything yet. > > ********************** > AddType application/x-httpd-php4 .html > ********************** > > What is the correct way to do this? > Jack > jackyactivelifestyle.com > "Love your enemies, it will drive them nuts" >

    attached mail follows:


    In response to Rasmus, I need to make this for all html files under a domain, not just one file. Is there anyway to do this? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: Rasmus Lerdorf <rasmusphp.net> To: Jack <jackyactivelifestyle.com> Cc: <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:27 AM Subject: Re: [PHP] to set file tye at apache module using htaccess

    > If you just want to set this for a single file, just use a > > <Location /path/filename> > ForceType application/x-httpd-php > </Location> > > in your httpd.conf file. .htaccess files are generally evil and should be > avoided if you have control over your httpd.conf file. > > Note that the mime-type. There is no '4' on the end of it. > > -Rasmus > > On Thu, 16 Aug 2001, Jack wrote: > > > Hi people > > this may be off this list a bit, But I want to make the apache webserver believe that a "html" file is my server is actually a "php4" file. > > I used the syntax below to set Apache module in file .htaccess and did not work still, as I wrote some php script to print text in an html file and did not do anything yet. > > > > ********************** > > AddType application/x-httpd-php4 .html > > ********************** > > > > What is the correct way to do this? > > Jack > > jackyactivelifestyle.com > > "Love your enemies, it will drive them nuts" > > > >

    attached mail follows:


    > In response to Rasmus, I need to make this for all html files under a > domain, not just one file. Is there anyway to do this?

    Sure, in your httpd.conf file look for your <VirtualHost> block for the dmain and add:

    AddType application/x-httpd-php .html

    -Rasmus

    attached mail follows:


    In response to Rasmus again, please bare with me a sec, where can I find the file https.conf? I am only able to log in to server viw ftp at this stage, so I am not sure if I will have access to that file yet. Alternatively, can I do the same to .htaccess? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: Rasmus Lerdorf <rasmusphp.net> To: Jack <jackyactivelifestyle.com> Cc: <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:34 AM Subject: Re: [PHP] to set file tye at apache module using htaccess

    > > In response to Rasmus, I need to make this for all html files under a > > domain, not just one file. Is there anyway to do this? > > Sure, in your httpd.conf file look for your <VirtualHost> block for the > dmain and add: > > AddType application/x-httpd-php .html > > -Rasmus > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Yes, you can.

    Maxim Maletsky

    -----Original Message----- From: Jack [mailto:jackyactivelifestyle.com] Sent: Friday, August 17, 2001 3:33 AM Cc: php-generallists.php.net Subject: Re: [PHP] to set file tye at apache module using htaccess

    In response to Rasmus again, please bare with me a sec, where can I find the file https.conf? I am only able to log in to server viw ftp at this stage, so I am not sure if I will have access to that file yet. Alternatively, can I do the same to .htaccess? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: Rasmus Lerdorf <rasmusphp.net> To: Jack <jackyactivelifestyle.com> Cc: <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:34 AM Subject: Re: [PHP] to set file tye at apache module using htaccess

    > > In response to Rasmus, I need to make this for all html files under a > > domain, not just one file. Is there anyway to do this? > > Sure, in your httpd.conf file look for your <VirtualHost> block for the > dmain and add: > > AddType application/x-httpd-php .html > > -Rasmus > > > -- > 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:


    In response to Maxim and Rasmus, I got it work out now. Many thanks for this open source code community :-) Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: Maxim Maletsky <maximjapaninc.com> To: 'Jack' <jackyactivelifestyle.com> Cc: <php-generallists.php.net> Sent: Thursday, August 16, 2001 2:01 AM Subject: RE: [PHP] to set file tye at apache module using htaccess

    > Yes, you can. > > Maxim Maletsky > > > -----Original Message----- > From: Jack [mailto:jackyactivelifestyle.com] > Sent: Friday, August 17, 2001 3:33 AM > Cc: php-generallists.php.net > Subject: Re: [PHP] to set file tye at apache module using htaccess > > > In response to Rasmus again, please bare with me a sec, where can I find the > file https.conf? I am only able to log in to server viw ftp at this stage, > so I am not sure if I will have access to that file yet. Alternatively, can > I do the same to .htaccess? > Jack > jackyactivelifestyle.com > "Love your enemies, it will drive them nuts" > ----- Original Message ----- > From: Rasmus Lerdorf <rasmusphp.net> > To: Jack <jackyactivelifestyle.com> > Cc: <php-generallists.php.net> > Sent: Thursday, August 16, 2001 1:34 AM > Subject: Re: [PHP] to set file tye at apache module using htaccess > > > > > In response to Rasmus, I need to make this for all html files under a > > > domain, not just one file. Is there anyway to do this? > > > > Sure, in your httpd.conf file look for your <VirtualHost> block for the > > dmain and add: > > > > AddType application/x-httpd-php .html > > > > -Rasmus > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Hey, I deleted the instruction mail... content was besides other topics how I unsubscribe a mailing list...

    Knows anybody the code?

    attached mail follows:


    Hey, I deleted the instruction mail... content was besides other topics how I unsubscribe a mailing list...

    Knows anybody the code?

    attached mail follows:


    Hi all,

    I've been playing around a little with php/mysql/apache on my NT box but I have just set up one of my Macs as a LinuxPPC machine. I have downloaded PHP-4.0.6 but now I want to install it to work with the apache server software already installed.

    I'm a complete newbie as far as linux is concerned so can someone give me simple step by step instructions on how to do this.

    I also need a little help getting started with MySQL. I have somehow managed to set it up with my username and password (I think) but I don't know how to get it stated. Any help there?

    MTIA

    George, Edinburgh, learning something new every day

    attached mail follows:


    on response to a question about variable $PATH_INFO , you said me:

    Is Apache configured to pass that variable on?

    Did you compile as CGI -- IE, are you using "Action" in your httpd.conf or LoadModule/AddModule? --------

    but how to configure to pass that variable ?

    what is action ? i'm using LoadModule/AddModule for php4

    attached mail follows:


    Hi, is there any function which can converts strings from ISO-8859-2 to Windows-1250?

    Thanks for your answers. Tomas

    attached mail follows:


    Felipe Coury wrote: > > Hi, > > I am a beginner in PHP and I am trying to do the following: I have a form in > a page that has 3 fields: email_1, email_2 and email_3. I am trying to send > e-mail to those people, if the fields are filled. Relevant part of code: > > <?php > for ($i = 1; $i <= 6; $i++) { > $eval = '\$email = \$email_' + $i + ';'; > eval( $eval ); > echo $email; > } > ?> > > The code complains about an error in line eval( $eval );: > > Parse error: parse error in > /home/httpd/htdocs/hthcombr/cgi-local/envia.php(19) : eval()'d code on line > 1 > > Can anyone please help me? >

    Use arrays, it's much easier. Set name of fields like this: email[0], email[1] and email[2]. Now after submitting the form you have array $email. And for-loop will be: <? for($i=0; $i < sizeof($email); $i++) { echo $email[$i]; } ?>

    Hope this helps.

    -- 
    Pavel a.k.a. Papi
    

    attached mail follows:


    Robert V. Zwink wrote: > This particular application is designed to assist someone working on data > entry, and is currently in production. She inputs 100's of mail-in reply > cards into a database using a php webpage. The first field of the form is > for the email address listed on the reply card. If the email address is > already in the database, the person doing data entry will see an image of a > red light, if the email address is not in the database the person doing data > entry will see an image of a green light. Kind of weird, true, but exactly > what she wanted. Why should the person doing data entry have to type in > email address, mailing address, first name, last name, etc. just to get an > error saying duplicate entry found? This way she can choose to replace the > record or just skip it depending on the results (red or green). The > changing image increases her productivty by decreasing time spent inputing > duplicate data. > > And also is one possible answer to the question, "How do I access php from > JavaScript". > > I fail to see how this is a "horrible construction". Solves a problem with > minimal input from user, quickly, and completely. How is this horrible? > Its a functional tool, that is used ever day with 0 complaints. > > Horrible? > Inigo: "You keep using that word. I do not think it means what you think it > means."

    Michael Geier wrote: > No it's not. > First one is changing the address of the current window. > Second one is a popup window leaving the first one intact. > > Just semantics.

    A question for the both a you: Did either one of you actually _READ_ my message completely? No.

    Michael... I said "same _KIND_OF_ construction". I didn't say it's exactly the same. Kind of you to tell me thing I already know, but it doesn't change anything. It still is the same _kind_of_ construction. Like I wrote before; you redirect someone to a different page. And whether you do that in the same window or in a window that pops up makes no change to that. The user still goes to a different page for the result of the referenced PHP-script.

    And Robert... Seems like a pretty cool application you got there and for what you're doing there, the images _are_ a good solution. You want the 'light' to switch from green to red depending on a db-query in a different PHP-script. And it does, without the user having to leave the page. Smart! But like a wrote before; if you're not using any images on your page, it's not a nice solution. Then one should put images on a page where he/she doesn't want any images. And, like I wrote, then you get the Sitestat/Nedstat kind of constructions where you have to put a transparent image from 1x1 pixel on the page. That's not the way to do it. And why wouldn't I know what horrible means? Because I keep using that word? Wow... then you must have absolutely no clue of what words like 'is' and 'the' mean. Yes, I know... this doesn't make sense... Neither does your remark (...)

    --
    

    * R&zE:

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

    attached mail follows:


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

    attached mail follows:


    Tribun wrote: > > ...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? ;) >

    $PHP_AUTH_USER and $PHP_AUTH_PW.

    -- 
    Pavel a.k.a. Papi
    

    attached mail follows:


    Pavel Jartsev wrote: > Tribun wrote: > >>...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? ;) >> >> > > $PHP_AUTH_USER and $PHP_AUTH_PW. > >

    It's also possible to use $REMOTE_USER. I don't know of any $REMOTE_PASS, so the suggestion above it good ;)

    -- 
    Stig-Ørjan Smelror
    Systemutvikler
    

    Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway

    tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/

    attached mail follows:


    > the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i need it to > be /var/lib/mysql/mysql.sock is there anyway i can set this variable > in php?

    From http://php.net/mysql_connect :

    resource mysql_connect ([string hostname[:port][:/path/to/socket] [, string username [, string password]]])

    The reason you have this discrepancy is that you didn't compile PHP against a version of the MySQL client library that matches the version of the MySQL server you are talking to. Probably because you didn't specify --with-mysql=/usr when you built PHP.

    -Rasmus

    attached mail follows:


    Moin!

    Has anybody already thought about the problematic conditional on adding an automatic "BACK" Link?

    It seems to be very easy... just Link to basename($HTTP_REFERER);

    BUT if you CLICK on this Link, and come to a prior site, the BACK-Link THERE appears NOT to the PAGE, witch was prior this, but is linked to the Site you come from... so the link should better be called "FORWARD".

    Do U C the problem???

    ;)

    Has someone an idea to solve it?

    Sincerely yours, Patrick Lehnen (alias: Tribun)

    attached mail follows:


    On Thu, Aug 16, 2001 at 10:01:36AM +0200, Tribun wrote: > Moin! > > Has anybody already thought about the problematic conditional on adding an > automatic "BACK" Link? > > It seems to be very easy... just Link to basename($HTTP_REFERER); > > BUT if you CLICK on this Link, and come to a prior site, the BACK-Link THERE > appears NOT to the PAGE, witch was prior this, but is linked to the Site you > come from... > so the link should better be called "FORWARD". > > Do U C the problem??? > > ;) > > Has someone an idea to solve it? > > > Sincerely yours, > Patrick Lehnen (alias: Tribun)

    Patrick,

    It's pretty obvious that after using it once it becomes a forward link because the HTTP_REFERER is the page you last came from. And after using the back-button once, the last page was the 'next'. The HTTP_REFERER isn't some kind of history-list. If you realy want to go Back, why not use: JS: history.back(...);

    That way you really use the history-list of the browser. So after using it once, it's still a Back-button instead of a Forward-button.

    Besides that, using the $HTTP_REFERER isn't really something to rely on. $HTTP_REFERER doesn't always have to be set. In that case you can't go either Back nor Forward.

    -- 
    

    * R&zE:

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

    attached mail follows:


    yapp.

    I know the JS-function, but I was curious if someone knows an beautifuller solution.

    something neater ;)

    "Renze Munnik" <renzedatalink.nl> schrieb im Newsbeitrag news:20010816102612.Q15317pro-pain.telemediair.nl... > On Thu, Aug 16, 2001 at 10:01:36AM +0200, Tribun wrote: > > Moin! > > > > Has anybody already thought about the problematic conditional on adding an > > automatic "BACK" Link? > > > > It seems to be very easy... just Link to basename($HTTP_REFERER); > > > > BUT if you CLICK on this Link, and come to a prior site, the BACK-Link THERE > > appears NOT to the PAGE, witch was prior this, but is linked to the Site you > > come from... > > so the link should better be called "FORWARD". > > > > Do U C the problem??? > > > > ;) > > > > Has someone an idea to solve it? > > > > > > Sincerely yours, > > Patrick Lehnen (alias: Tribun) > > > Patrick, > > It's pretty obvious that after using it once it becomes a forward > link because the HTTP_REFERER is the page you last came from. And > after using the back-button once, the last page was the 'next'. The > HTTP_REFERER isn't some kind of history-list. > If you realy want to go Back, why not use: > JS: history.back(...); > > That way you really use the history-list of the browser. So after > using it once, it's still a Back-button instead of a Forward-button. > > Besides that, using the $HTTP_REFERER isn't really something to rely > on. $HTTP_REFERER doesn't always have to be set. In that case you > can't go either Back nor Forward. > > -- > > * R&zE: > > -- »»»»»»»»»»»»»»»»»»»»»»»» > -- Renze Munnik > -- DataLink BV > -- > -- E: renzedatalink.nl > -- W: +31 23 5326162 > -- F: +31 23 5322144 > -- M: +31 6 21811143 > -- H: +31 23 5516190 > -- > -- Stationsplein 82 > -- 2011 LM HAARLEM > -- > -- http://www.datalink.nl > -- ««««««««««««««««««««««««

    attached mail follows:


    On Thu, Aug 16, 2001 at 10:38:56AM +0200, Tribun wrote: > yapp. > > I know the JS-function, but I was curious if someone knows an beautifuller > solution. > > something neater ;)

    Okay... Well... then you should store the history yourself (eg. in a session or db). But then again... the $HTTP_REFERER isn't something to rely on. So then you'll need to store the current page in the history session/db. That way you always have the correct URL because it's the URL of the page the user is using. How much can go wrong with that? I think that's the best way. Actually I think it's even (a lot) better then the JS solution I mentioned.

    -- 
    

    * R&zE:

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

    attached mail follows:


    I'm not sure if this is the problem but it is an important point. print "\"$text\""; does not output anything to screen, as with all prints and echos it outputs it to html (in this case within a js function definition). Try viewing the source produced.

    Tim

    ---------- From: Neil Freeman [SMTP:neil.freemanasa.co.uk] Sent: 15 August 2001 18:10 To: Sheridan Saint-Michel Cc: php-general Subject: Re: [PHP] Creating a javascript array from database data

    Thanks a lot for your help Sheridan,

    This now appears to work ok :) but if I remove the:

    print "\"$text\"";

    line (as it is not required), I receive errors complaining about a syntax error (related to what?) and that 'text' is undefined. As this line simply outputs the value to screen why should this cause a problem if it is removed? Or could it be some other problem?

    Neil

    PS: Here is my updated code:

    -------------------------- <html> <head> <title>Menus test</title>

    </head> <body bgcolor="white">

    <?php $dbhost = 'localhost'; $dbuser = 'guest'; $dbpass = 'guest'; $dbname = 'IFE'; $dbtable = 'menus';

    //------ DATABASE CONNECTION --------// mysql_connect($dbhost,$dbuser,$dbpass) or die ("Unable to connect to database");

    mysql_select_db($dbname) or die ("Unable to select database");

    $sql = "SELECT * FROM $dbtable"; $result = mysql_query($sql);

    $number = mysql_numrows($result);

    $i = 0;

    if ($number == 0) print "Error - No records found"; elseif ($number > 0) { echo "<Script Language=\"JavaScript\">\n"; echo "text = new Array("; while ($i < $number) { $text = mysql_result($result, $i, "name");

    $i++;

    if ($i < $number) print ","; else print ")\n"; } echo "</Script>\n"; }

    mysql_free_result($result); mysql_close(); ?>

    </body> </html> --------------------------

    Sheridan Saint-Michel wrote:

    > *************************************************************** > This message was virus checked with: SAVI 3.48 > last updated 14th August 2001 > *************************************************************** > > The thing to ALWAYS remember when working with both PHP and > JavaScript is that PHP is Server-Side and JavaScript is Client-Side. > > What this mean is practical terms is that when going from JavaScript > to PHP you have to submit or redirect back to the server... and when > going from PHP to JavaScript (Like you are trying to do here) you > have to make sure your PHP outputs JavaScript. > > So instead of printing $text you need to actually print the JavaScript... > > So in your case change the middle of your script to something like: > > $number = mysql_numrows($result); > > $i = 0; > > if ($number == 0) > print "Error - No records found"; > else > { > echo "<Script Language=\"JavaScript\">\n"; > echo "text = new Array("; > while ($i < $number) > { > $text = mysql_result($result, $i, "name"); > print "\"$text\""; > $i++; > if ($i < $number) > print ","; > else > print ")\n"; > } > echo "</Script>\n"; > } > > } > > Note: This is my quick *untested* fix done by modifying > your code as little as possible. I would suggest you use > mysql_fetch_row and use your loop to parse it rather than > making several calls to mysql_result (especially if you are > ever going to have more than a few entries in the DB). > > Sheridan Saint-Michel > Website Administrator > FoxJet, an ITW Company > www.foxjet.com > > ----- Original Message ----- > From: Neil Freeman <neil.freemanasa.co.uk> > To: PHP General <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 11:16 AM > Subject: [PHP] Creating a javascript array from database data > > > Hi there, > > > > Well after a few hours roaming around various websites I am at a loss. > > Here is what I am trying to do: > > > > 1) Access a MySQL database which contains 1 table > > 2) Read the records from this table > > 3) Store the values returned from this table into javascript array > > elements, ie, if I get the values "dog", "cat" and "cow" back I want > > these stored in an array as such: > > myArray[0] = valueReturned1 > > myArray[1] = valueReturned2 > > myArray[2] = valueReturned3 > > > > You get the idea. > > > > Problem being that I cannot work out how to implement the javascript > > section of this. At the moment my php script writes the values returned > > from the database to screen but I require these to be stored in a > > javascript array. Please can someone help me before I go mad :) > > > > Here is my current .php script: > > > > ---------------------------------------------- > > <html> > > <head> > > <title>Menus test</title> > > </head> > > <body bgcolor="white"> > > > > <?php > > $dbhost = 'localhost'; > > $dbuser = 'guest'; > > $dbpass = 'guest'; > > $dbname = 'IFE'; > > $dbtable = 'menus'; > > > > file://------ DATABASE CONNECTION --------// > > mysql_connect($dbhost,$dbuser,$dbpass) > > or die ("Unable to connect to database"); > > > > mysql_select_db($dbname) > > or die ("Unable to select database"); > > > > > > $sql = "SELECT * FROM $dbtable"; > > $result = mysql_query($sql); > > > > $number = mysql_numrows($result); > > > > $i = 0; > > > > if ($number == 0) > > print "Error - No records found"; > > elseif ($number > 0) > > { > > while ($i < $number) > > { > > $text = mysql_result($result, $i, "name"); > > print "$text"; > > > > $i++; > > } > > } > > > > mysql_free_result($result); > > mysql_close(); > > ?> > > > > </body> > > </html> > > ---------------------------------------------- > > > > Thanks, Neil

    -- -------------------------------- Email: neil.freemanasa.co.uk neil_freemanyahoo.com --------------------------------

    attached mail follows:


    Yeah thanks Tim. 5:30 in the afternoon does bad things to my logical thinking. Not the best time to try and learn PHP :)

    Neil

    Tim Ward wrote:

    > I'm not sure if this is the problem but it is an important point. print > "\"$text\""; does not output anything to screen, as with all prints and > echos it outputs it to html (in this case within a js function definition). > Try viewing the source produced. > > Tim > > ---------- > From: Neil Freeman [SMTP:neil.freemanasa.co.uk] > Sent: 15 August 2001 18:10 > To: Sheridan Saint-Michel > Cc: php-general > Subject: Re: [PHP] Creating a javascript array from database data > > Thanks a lot for your help Sheridan, > > This now appears to work ok :) but if I remove the: > > print "\"$text\""; > > line (as it is not required), I receive errors complaining about a > syntax > error (related to what?) and that 'text' is undefined. As this line > simply > outputs the value to screen why should this cause a problem if it is > removed? > Or could it be some other problem? > > Neil > > PS: Here is my updated code: > > -------------------------- > <html> > <head> > <title>Menus test</title> > > </head> > <body bgcolor="white"> > > <?php > $dbhost = 'localhost'; > $dbuser = 'guest'; > $dbpass = 'guest'; > $dbname = 'IFE'; > $dbtable = 'menus'; > > //------ DATABASE CONNECTION --------// > mysql_connect($dbhost,$dbuser,$dbpass) > or die ("Unable to connect to database"); > > mysql_select_db($dbname) > or die ("Unable to select database"); > > $sql = "SELECT * FROM $dbtable"; > $result = mysql_query($sql); > > $number = mysql_numrows($result); > > $i = 0; > > if ($number == 0) > print "Error - No records found"; > elseif ($number > 0) > { > echo "<Script Language=\"JavaScript\">\n"; > echo "text = new Array("; > while ($i < $number) > { > $text = mysql_result($result, $i, "name"); > > $i++; > > if ($i < $number) > print ","; > else > print ")\n"; > } > echo "</Script>\n"; > } > > mysql_free_result($result); > mysql_close(); > ?> > > </body> > </html> > -------------------------- > > Sheridan Saint-Michel wrote: > > > *************************************************************** > > This message was virus checked with: SAVI 3.48 > > last updated 14th August 2001 > > *************************************************************** > > > > The thing to ALWAYS remember when working with both PHP and > > JavaScript is that PHP is Server-Side and JavaScript is > Client-Side. > > > > What this mean is practical terms is that when going from > JavaScript > > to PHP you have to submit or redirect back to the server... and > when > > going from PHP to JavaScript (Like you are trying to do here) you > > have to make sure your PHP outputs JavaScript. > > > > So instead of printing $text you need to actually print the > JavaScript... > > > > So in your case change the middle of your script to something > like: > > > > $number = mysql_numrows($result); > > > > $i = 0; > > > > if ($number == 0) > > print "Error - No records found"; > > else > > { > > echo "<Script Language=\"JavaScript\">\n"; > > echo "text = new Array("; > > while ($i < $number) > > { > > $text = mysql_result($result, $i, "name"); > > print "\"$text\""; > > $i++; > > if ($i < $number) > > print ","; > > else > > print ")\n"; > > } > > echo "</Script>\n"; > > } > > > > } > > > > Note: This is my quick *untested* fix done by modifying > > your code as little as possible. I would suggest you use > > mysql_fetch_row and use your loop to parse it rather than > > making several calls to mysql_result (especially if you are > > ever going to have more than a few entries in the DB). > > > > Sheridan Saint-Michel > > Website Administrator > > FoxJet, an ITW Company > > www.foxjet.com > > > > ----- Original Message ----- > > From: Neil Freeman <neil.freemanasa.co.uk> > > To: PHP General <php-generallists.php.net> > > Sent: Wednesday, August 15, 2001 11:16 AM > > Subject: [PHP] Creating a javascript array from database data > > > > > Hi there, > > > > > > Well after a few hours roaming around various websites I am at a > loss. > > > Here is what I am trying to do: > > > > > > 1) Access a MySQL database which contains 1 table > > > 2) Read the records from this table > > > 3) Store the values returned from this table into javascript > array > > > elements, ie, if I get the values "dog", "cat" and "cow" back I > want > > > these stored in an array as such: > > > myArray[0] = valueReturned1 > > > myArray[1] = valueReturned2 > > > myArray[2] = valueReturned3 > > > > > > You get the idea. > > > > > > Problem being that I cannot work out how to implement the > javascript > > > section of this. At the moment my php script writes the values > returned > > > from the database to screen but I require these to be stored in > a > > > javascript array. Please can someone help me before I go mad :) > > > > > > Here is my current .php script: > > > > > > ---------------------------------------------- > > > <html> > > > <head> > > > <title>Menus test</title> > > > </head> > > > <body bgcolor="white"> > > > > > > <?php > > > $dbhost = 'localhost'; > > > $dbuser = 'guest'; > > > $dbpass = 'guest'; > > > $dbname = 'IFE'; > > > $dbtable = 'menus'; > > > > > > file://------ DATABASE CONNECTION --------// > > > mysql_connect($dbhost,$dbuser,$dbpass) > > > or die ("Unable to connect to database"); > > > > > > mysql_select_db($dbname) > > > or die ("Unable to select database"); > > > > > > > > > $sql = "SELECT * FROM $dbtable"; > > > $result = mysql_query($sql); > > > > > > $number = mysql_numrows($result); > > > > > > $i = 0; > > > > > > if ($number == 0) > > > print "Error - No records found"; > > > elseif ($number > 0) > > > { > > > while ($i < $number) > > > { > > > $text = mysql_result($result, $i, "name"); > > > print "$text"; > > > > > > $i++; > > > } > > > } > > > > > > mysql_free_result($result); > > > mysql_close(); > > > ?> > > > > > > </body> > > > </html> > > > ---------------------------------------------- > > > > > > Thanks, Neil > > -- > -------------------------------- > Email: neil.freemanasa.co.uk > neil_freemanyahoo.com > -------------------------------- > >

    --
    --------------------------------
     Email:  neil.freemanasa.co.uk
             neil_freemanyahoo.com
    --------------------------------
    

    attached mail follows:


    Thanks for the clarification Sheridan - I think it must have been end of day madness on my part :) I see what's going on now with the 'print' line.

    Cheers,

    Neil

    Sheridan Saint-Michel wrote:

    > *************************************************************** > This message was virus checked with: SAVI 3.48 > last updated 14th August 2001 > *************************************************************** > > Think in terms of output... The JavaScript is literally going to > try and run the output of the PHP (It doesn't even know PHP > exists). PHP is outputting the source code for the HTML and > JavaScript. So what you are trying to do is get PHP to take > dog,cat,cow from MySQL and output: > > <Script Language="JavaScript"> > text = new Array("dog","cat","cow") > </Script> > > This block of code does exactly that, with the print"\"$text\""; > filling in dog cat and cow. I've added comments so you can > see how each line produces the above (I am using C-Style > comments as the // gets mucked up in e-mail) > > The parts in [] are comments within comments to show flow > control and are not output. > > else > { > /* <Script Language="JavaScript"> */ > echo "<Script Language=\"JavaScript\">\n"; > /* text=new Array( */ > echo "text = new Array("; > while ($i < $number) > > $text = mysql_result($result, $i, "name"); > /* "dog" [first time] */ > /* "cat" [second time] */ > /* "cow" [third time] */ > print "\"$text\""; > $i++; > if ($i < $number) > /* , [first time] */ > /* , [second time] */ > print ","; > else > /* ) [third time] */ > print ")\n"; > } > /* </Script> */ > echo "</Script>\n"; > } > > So if you can follow that (just walk all the way through > the loop for each of the three passes) you can see that > no part of the code (including the print "\"$text\"";) is > unnecessary > > Hope this helps > > Sheridan Saint-Michel > Website Administrator > FoxJet, an ITW Company > www.foxjet.com > > ----- Original Message ----- > From: Neil Freeman <neil.freemanasa.co.uk> > To: Sheridan Saint-Michel <webmasterfoxjet.com> > Cc: php-general <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 12:09 PM > Subject: Re: [PHP] Creating a javascript array from database data > > > Thanks a lot for your help Sheridan, > > > > This now appears to work ok :) but if I remove the: > > > > print "\"$text\""; > > > > line (as it is not required), I receive errors complaining about a syntax > > error (related to what?) and that 'text' is undefined. As this line simply > > outputs the value to screen why should this cause a problem if it is > removed? > > Or could it be some other problem? > > > > Neil > > > > PS: Here is my updated code: > <Snip>

    --
    --------------------------------
     Email:  neil.freemanasa.co.uk
             neil_freemanyahoo.com
    --------------------------------
    

    attached mail follows:


    On Wed, Aug 15, 2001 at 10:52:33PM -0300, Christian Dechery wrote: > >$HTTP_SERVER_VARS{"SSL_SESSION_ID"} > > > >Another thing I found with phpinfo() is > >$HTTP_SERVER_VARS{"UNIQUE_ID"}. I don't know (yet) was it is, but it > >sounds usable, doesn't it? > > sure it does... but first we need to know exactly what it is.... anyone?

    Well.... I don't... but I _do_ know it's _really_ unique. It's never the same. So actually I don't really know what to do with it. Although probably at some time something will come up where one would need it. I think. To be short... FAIK it's exactly what's called: a unique ID.

    -- 
    

    * R&zE:

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

    attached mail follows:


    Dear all

    I had download the PHP 4 and was trying to get it work! Well actally i had get it work in my IIS Server!! But the Strange thing is, i had create serval different website inside IIS4.0, and i want all of them can work with PHP. So i created a site and i get it work with PHP, which it runs the script and the ISAPI filter shows that the PHP was loaded.

    Existing Setting for the Sucessful Website that can work with PHP: ISAPI Filter = PHP (c:\php\sapi\php4isapi.dll) Application Extension = C:\php\php.exe %s%s

    So i do the same setting as the other new create Website, but all of the other doesn't work! I even had changed the Application Extension point to the same file as the ISAPI Filter (Which is php4isapi.dll), the php status still remain not loaded!

    I had read a book which it ask me to point both ISAPI and APP Extension to "php4isapi.dll", but when i read some article from internet, some of them say that the Application Extension should point to "php.exe", so could anyone tell me which is the truth! and pls help me with that, because i got to get to other website working with PHP as well!!

    Thx Jack jacknedcor.com

    attached mail follows:


    Hi

    I need to use the DOMXML functions on a PHP 4.0.4 (Mandrake 8.0) page, but the module is not there by default. Having downloaded the sources and tried to rebuild from scratch, I get a bunch of new dependency problems. Looks like building a full featured PHP is not that easy,,,

    So my question is; is there an available domxml.so module somewhere that fits Mandrake 8.0/PHP 4.0.4. I have tried a prebuilt module that I found on rpmfind but that module did not worked since it required 4.0.6 (Polished distribution something).

    Best regards Anders

    attached mail follows:


    > I had read a book which it ask me to point both ISAPI and APP Extension to > "php4isapi.dll", but when i read some article from internet, some of them > say that the Application Extension should point to "php.exe", so could > anyone tell me which is the truth! and pls help me with that, because i got > to get to other website working with PHP as well!! Your suffering from a mixture of truths!

    First of all, the ISAPI module is not stable. It will just cause you grief so remove it from your filters list.

    Second, make the application extensions point to php.exe (you don't need the %s %s stuff).

    If you do this to the master web site properties and tell it to override other script map extensions then all your web sites will map onto php. If you have different settings for each of the websites then you will have to configure each one individually.

    Cheers

    -- 
    Phil Driscoll
    

    attached mail follows:


    The PHP function fopen() can read a URL generated by a server with the GET method. In that case, the arguments of this server's script are part of the the URL. Unfortunately, I have to read & parse the result of a form using POST method. Is there another function than fopen() that can be used ? I cannot use curl.

    Christophe LAURENT chris4Ur.net www.4Ur.net

    attached mail follows:


    Hi,

    I've been skipping a night over this strange error: after execution of a mail() command, de rest of the script just gets ignored and my browser displays a "Cannot find server or DNS Error" page instead.

    Ideas about how to make this baby work would be very welcome; thanks in advance.

    I'm using PHP 4.0.6 on Apache/1.3.20 and sendmail -t -i. Just in case that helps.

    Vincent

    attached mail follows:


    Hi,

    Well the PHP script is timing out after it executes a no. of (or all the mail() commands). So what you got todo is either set the PHP's timeout limit to 0 or infinite.

    set_time_limit(0);

    Or you could invoke another program in the background disconnect PHP (terminal) from it, and voila. But if you want the mail command to be executed before anything else you will have to set the execution limit to infinite, or increase it to a very big limit, and also use ignore_user_abort(1);

    --- Vincent <vincentsmedinga.nl> wrote: > Hi, > > I've been skipping a night over this strange error: > after execution of a mail() command, de rest of the > script just gets ignored and my browser displays a > "Cannot find server or DNS Error" page instead. > > Ideas about how to make this baby work would be > very welcome; thanks in advance. > > I'm using PHP 4.0.6 on Apache/1.3.20 and > sendmail -t -i. Just in case that helps. > > Vincent > > > -- > 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 >

    ===== ********************************* http://www.geocities.com/mimodit *********************************

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

    attached mail follows:


    Hey,

    It can be issues that PHP doesn't have control over for example if your systems' sendmail is being used by 100's of users, maybe it's taking for your request to be processed. So it could be more than just PHP, but you should basically when sending mail just but the mail in background.

    --- Vincent <vincentsmedinga.nl> wrote: > Thanks, but for now the mail()-function is only > used once. I already found the timeout-issue in > the manual and will use your tip when I expand > it to serve a mailing list. > > Have you ever heard of this problem before, so > it could be a bug? Or is there something special > with the quotes to do? I remember an earlier > website I built that had problems too, but they > were solved when I replaced single quotes by > doubles. Back then, the error-page didn't > appear also. > > Vincent > > > -----Original Message----- > From: Mukul Sabharwal > [mailto:mukulsabharwalyahoo.com] > Sent: donderdag 16 augustus 2001 13:57 > To: Vincent; php-generallists.php.net > Subject: Re: [PHP] script execution stops after > mail() > > > Hi, > > Well the PHP script is timing out after it executes > a > no. of (or all the mail() commands). So what you got > todo is either set the PHP's timeout limit to 0 or > infinite. > > set_time_limit(0); > > Or you could invoke another program in the > background > disconnect PHP (terminal) from it, and voila. But if > you want the mail command to be executed before > anything else you will have to set the execution > limit > to infinite, or increase it to a very big limit, and > also use ignore_user_abort(1); > > --- Vincent <vincentsmedinga.nl> wrote: > > Hi, > > > > I've been skipping a night over this strange > error: > > after execution of a mail() command, de rest of > the > > script just gets ignored and my browser displays a > > "Cannot find server or DNS Error" page instead. > > > > Ideas about how to make this baby work would be > > very welcome; thanks in advance. > > > > I'm using PHP 4.0.6 on Apache/1.3.20 and > > sendmail -t -i. Just in case that helps. > > > > Vincent > > > > > > -- > > 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 > > > > > ===== > ********************************* > http://www.geocities.com/mimodit > ********************************* > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute > with Yahoo! Messenger > http://phonecard.yahoo.com/ >

    ===== ********************************* http://www.geocities.com/mimodit *********************************

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

    attached mail follows:


    Does anyone know of online psychology tests where the answers are interpreted by a php script? Does anyone use php for this purpose?

    Tx BK

    attached mail follows:


    THAAAAAAAAAAAAANKS!

    my best thanks to Richard Lynch !

    He advised me to the solution.

    It was simply an URLencode missing ;)

    (I've guessed that I do that allready but the var-name has changed, and so the function has taken no effect...)

    regards, Tribun

    "Tribun" <mailtribun.de> schrieb im Newsbeitrag news:20010815151330.93596.qmailpb1.pair.com... > Hi all. > > I habe a strange problem! > > I try to get a URL like: www.server.com?var=xyz > > the problem is, that this is very good restricted by serverside. > > But now I already get the file, and no more the error-message, > but the problem is, that the file will not completly load. > > this means, I receive the file, but only the first 4188 bytes from > 11988 bytes. > > If I call the site with a BROWSER, I'll get the full file, but it > is nessessary to have this page into a string, to read out a specific > position. > > what could that be..? > where is the problem? > > does anybody know such a problem??? > > please help me. > > If someone believes to have an answer, feel free to > mail me any detailer questions. > > thanks for all help. > > Tribun (Patrick Lehnen) > --- > mp3o.net > >

    attached mail follows:


    Hi.

    instead use "7000" in "fread($fd, 7000)", i'd like to use the size of the file opened. How can I know the size of the fopen?

    thanks.

    Augusto

    attached mail follows:


    Hi,

    fread($fd, filesize("somefile.txt"));

    --- Augusto Cesar Castoldi <Augusto.Castoldiuol.com.br> wrote: > Hi. > > instead use "7000" in "fread($fd, 7000)", i'd like > to use the size of the > file opened. How can I know the size of the fopen? > > thanks. > > Augusto > > > -- > 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 >

    ===== ********************************* http://www.geocities.com/mimodit *********************************

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

    attached mail follows:


    Hi,

    It doesnt' matter what you're doing, filesize will give you what it reads from the particular file.

    --- Augusto Cesar Castoldi <Augusto.Castoldiuol.com.br> wrote: > ops. > > I forgot to say. > > but I'm calling a script, so I get diferents > filesizes > > $fd = fopen("http://localhost/script.php", "r"); > $aux = fread($fd, 700000); > fclose($fd); > > Can I now the size of "$fd"? Well, I need to ready > all $fd. > thanks. > > Augusto > ----- Original Message ----- > From: Mukul Sabharwal <mukulsabharwalyahoo.com> > To: Augusto Cesar Castoldi > <Augusto.Castoldiuol.com.br>; > <php-generallists.php.net> > Sent: Thursday, August 16, 2001 9:08 AM > Subject: Re: [PHP] "FileSize" --> fread($fd, 7000) > > > > Hi, > > > > fread($fd, filesize("somefile.txt")); > > > > --- Augusto Cesar Castoldi > > <Augusto.Castoldiuol.com.br> wrote: > > > Hi. > > > > > > instead use "7000" in "fread($fd, 7000)", i'd > like > > > to use the size of the > > > file opened. How can I know the size of the > fopen? > > > > > > thanks. > > > > > > Augusto > > > > > > > > > -- > > > 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 > > > > > > > > > ===== > > ********************************* > > http://www.geocities.com/mimodit > > ********************************* > > > > __________________________________________________ > > Do You Yahoo!? > > Make international calls for as low as $.04/minute > with Yahoo! Messenger > > http://phonecard.yahoo.com/ > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > php-general-unsubscribelists.php.net > > For additional commands, e-mail: > php-general-helplists.php.net > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > >

    ===== ********************************* http://www.geocities.com/mimodit *********************************

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

    attached mail follows:


    Wouldn't it be nice if there was a way develop client-side (browser-based) applications for PHP? I see so many posts about using PHP to interact with JavaScript - wouldn't it be cool if you could just tell your PHP code where to run - server or client (similar to what ASP does with VBScript)? I know I can't be the first person to think about this, but I've searched and can't find anything about it. Any ideas/suggestions/resources?

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

    attached mail follows:


    Euhum what about PHPGTK?

    Bolke

    -----Oorspronkelijk bericht----- Van: Tom Malone [mailto:tomtom-malone.com] Verzonden: Thursday, August 16, 2001 2:13 PM Aan: PHP Users Onderwerp: [PHP] PHP on client-side

    Wouldn't it be nice if there was a way develop client-side (browser-based) applications for PHP? I see so many posts about using PHP to interact with JavaScript - wouldn't it be cool if you could just tell your PHP code where to run - server or client (similar to what ASP does with VBScript)? I know I can't be the first person to think about this, but I've searched and can't find anything about it. Any ideas/suggestions/resources?

    Tom Malone Web Designer http://www.tom-malone.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:


    Dear all I'm trying to get PHP to read the content which created by MS Word.But when php runs, and it just return Nothing (Blank ) to the browser!! Actually , i was thinking to make a HTML Page which can let user to type in the content, then the content will copy to a file and finally a php will pick the content of that file and display it to browser! I had tried to use "fput" and "fgets" before, which it work, but the second time i type in something again from the input HTML, it doesn't change the content of that file. actually it remain the same as i last type in!!!

    IS there any good suggestion for performing this task??? User Input ---> Copy content to a file ---> Read content & display to browser!

    Thx jack jacknedcor.com

    attached mail follows:


    Hi,

    MS Word encodes it's contents, so you'll need to use the COM interface to access MS Word Files.

    A tutorial is available http://www.xeru.com on COM with PHP4.

    --- Jack <jacknedcor.com> wrote: > Dear all > I'm trying to get PHP to read the content which > created by MS Word.But when > php runs, and it just return Nothing (Blank ) to the > browser!! > Actually , i was thinking to make a HTML Page which > can let user to type in > the content, then the content will copy to a file > and finally a php will > pick the content of that file and display it to > browser! > I had tried to use "fput" and "fgets" before, which > it work, but the second > time i type in something again from the input HTML, > it doesn't change the > content of that file. actually it remain the same as > i last type in!!! > > IS there any good suggestion for performing this > task??? > User Input ---> Copy content to a file ---> Read > content & display to > browser! > > Thx > jack > jacknedcor.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 >

    ===== ********************************* http://www.geocities.com/mimodit *********************************

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