OSEC

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

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

    php-general Digest 15 Aug 2001 12:36:00 -0000 Issue 817

    Topics (messages 62720 through 62814):

    Re: inserting a remote html file
            62720 by: CGI GUY

    Re: PUT method support
            62721 by: David Robley

    Re: Earn $235 - $760 Or More Weekly At Home.
            62722 by: R.A.

    something like SSI ?
            62723 by: Martin
            62725 by: Philip Murray
            62736 by: Daniel Adams
            62737 by: Michael Kimsal
            62771 by: Richard Lynch

    PHP Mail() Problem
            62724 by: Mahmoud Kassem

    Re: session security issue
            62726 by: Christian Dechery
            62790 by: Renze Munnik
            62811 by: speedboy

    javascript reference (slightly ot)
            62727 by: Christian Dechery
            62733 by: Evan Nemerson

    "searching" arrays
            62728 by: Raphael Pirker
            62729 by: CC Zona
            62730 by: Inércia Sensorial
            62731 by: Raphael Pirker
            62734 by: Evan Nemerson
            62742 by: Raphael Pirker
            62770 by: Richard Lynch
            62775 by: Raphael Pirker
            62788 by: David Robley

    Segmentation fault (11) : mcrypt
            62732 by: Robert Mena

    Re: Loop error?
            62735 by: Daniel Adams

    to include php file into html file
            62738 by: Jack
            62741 by: Lawrence.Sheed.dfait-maeci.gc.ca
            62743 by: Jack
            62744 by: Raphael Pirker
            62745 by: Lawrence.Sheed.dfait-maeci.gc.ca
            62746 by: Alnisa Allgood
            62799 by: Robert Hennig

    Replace custom INCLUDE template tag with contents of a file
            62739 by: Obi Nwosu

    Re: saving the client's file upload location
            62740 by: Bob
            62765 by: Richard Lynch

    Re: Classes and performance bottlenecks
            62747 by: Richard Lynch

    Re: The secrecy of PHP code
            62748 by: Richard Lynch

    Re: Mail() not setting MIME TYPE
            62749 by: Richard Lynch

    Re: Sessions in older browsers
            62750 by: Richard Lynch

    Re: Regular Expression Problem and PHP 4 (urgent)
            62751 by: Richard Lynch

    Re: SQL script ---------any help
            62752 by: Richard Lynch

    Re: nav buttons not working correctly
            62753 by: Richard Lynch

    Re: PHP or SSI -- What's faster?
            62754 by: Richard Lynch

    Re: How dynamically create objects
            62755 by: Richard Lynch

    Re: could i get a clue?
            62756 by: Richard Lynch

    Big Words (RE: [PHP] Classes and performance bottlenecks)
            62757 by: Jason Murray

    Comparing Variables
            62758 by: Mindblender
            62759 by: Mindblender

    cURL and XML?
            62760 by: Petras Virzintas

    Re: popen returns true whether script exists or not?
            62761 by: Richard Lynch

    Re: array intersection problem
            62762 by: Richard Lynch

    Re: insertion question
            62763 by: Richard Lynch

    Re: Web page authentications
            62764 by: Richard Lynch

    Re: php upload on MAC
            62766 by: Richard Lynch
            62779 by: Herouth Maoz

    Re: PHP Shopping Carts ??
            62767 by: Richard Lynch

    Re: Code works fine on Apache, but not on PWS.
            62768 by: Richard Lynch

    Re: Foreach loop syntax
            62769 by: Richard Lynch

    PHP and serving streaming media
            62772 by: Greg Beaver

    Problem: Sybase, PHP and multiple result sets
            62773 by: Herouth Maoz
            62782 by: Warren Vail
            62784 by: Herouth Maoz

    `pwd` - what does this mean?
            62774 by: Scott Mebberson
            62776 by: Raphael Pirker
            62777 by: Joseph Blythe
            62778 by: Lawrence.Sheed.dfait-maeci.gc.ca
            62780 by: Scott Mebberson
            62781 by: Joseph Blythe
            62783 by: Don Read
            62785 by: Scott Mebberson
            62787 by: David Robley

    urgant reply soon
            62786 by: ashok sundaram
            62791 by: David Robley

    compression help
            62789 by: Kiat Kin

    PHP and Java InputStream object
            62792 by: Kiat Kin

    a bit off the list but should be easy
            62793 by: Jack
            62794 by: Lawrence.Sheed.dfait-maeci.gc.ca
            62795 by: Jack

    Income on the Net!
            62796 by: Noel Hadfield

    button on PHP page
            62797 by: Michael McNeice
            62801 by: Robert Hennig

    important linuxtoday article: Will Open Source Lose the Battle for the web?
            62798 by: Vinny
            62808 by: B. van Ouwerkerk

    select problem
            62800 by: Roman

    Onclick and PhP
            62802 by: Flugel
            62803 by: Renze Munnik
            62804 by: Flugel
            62806 by: Renze Munnik
            62807 by: Morten Winkler Jørgensen
            62813 by: Flugel

    Explode Your Business!
            62805 by: Customer Service

    a bottle in the sea...
            62809 by: rashkatsa

    error
            62810 by: Eduardo Kokubo
            62812 by: Alexander Wagner
            62814 by: Renze Munnik

    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:


    As long as you have sendmail configured on your
    server, and you're working with a standard php
    install, it should be working properly.

    mail() needs to see things happen in this fashion and
    order:

    mail("nameemail.com", "subject", "body", "headers")

    The headers are optional, and you can concatenate as
    needed. None of the email addresses need to be on the
    domain local to the server.

    Not sure about this html mail mime class thing you're
    talking about, and would have to know what the server
    error message was to get a better idea of what's going
    on with the script...
    --- Boaz Amit <boazunwind.co.il> wrote:
    >
    > <cannelltravishotmail.com> wrote:
    > >hi all,
    >
    > >I cant seem to get my mail function to work. OK so
    > i am a noob, that might
    > >have something to do with it. I am using a script
    > I found called the HTML
    > >Mime Mail Class, which does everything i need
    > except actually send the mail.
    > >I am guessing that there is some config problems,
    > but i am not sure. Even
    > >when i try and use the mail() function i get a
    > server error. So i guess
    > >that my problem is that my return address is messed
    > up. Does it have to be
    > >my own domain, or the domain that the server is
    > running on? Can i set the
    > >return address as a hotmail account, or do i need
    > my own server mail
    > >program? And is there anything that i need to
    > config in the php.ini file?
    > >
    > >Thanks for helping,
    > >
    > >T P K Cannell
    >
    > This article by the most helpful Julie Meloni
    > answers your question:
    >
    http://www.zdnet.com/devhead/stories/articles/0,4413,2802264,00.html
    >
    >
    > ---
    > Regards,
    > Boaz Amit
    >
    > --
    > PHP General Mailing List (http://www.php.net/)
    > To unsubscribe, e-mail:
    > php-general-unsubscribelists.php.net
    > For additional commands, e-mail:
    > php-general-helplists.php.net
    > To contact the list administrators, e-mail:
    > php-list-adminlists.php.net
    >

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

    attached mail follows:


    On Tue, 14 Aug 2001 18:43, Rukhiya wrote:
    > Hi!
    >
    > How do I use a PUT method support to upload files from the client to
    > the WEB server? Can anyone pls. help me out to find a solution to these
    > problems. It's very urgent!!!!
    >
    >
    > regards
    > Rukhiya

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

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

    Disinformation is not as good as datinformation.

    attached mail follows:


    Earn $235 - $760 Or More Weekly

    Hundreds of Companies Are Hiring People Like You to Work from Home.

    *Set Your Own Hours *Work PT or FT *Stay At Home *Make the Extra Money You Want

    Imagine spending a quite evening at home with your family watching TV and earning money at the same time.

    It's possible!

    Home Workers are urgently needed for enjoyable and profitable telecommute positions.

    Reputable and researched companies are offering good pay for services such as the ones below:

    *Data Entry

    *Claims Processors

    *Customer Service

    *Hotline Counselors

    *Typists

    *Medical Billing

    *Account Management

    *Sales

    *Telephone Operators

    *Telemarketers

    *Researchers

    These work at home jobs are perfect for anyone wanting a good side income.

    Email Us at outsource4uearthlink.net with "Work At Home" in the subject heading for complete.

    Best Wishes Home Workers Directory

    P.S. Opportunity available only to U.S. Residents over the age of 18

    attached mail follows:


    Ok, this may seem like a dumb newbie question...

    Is there an function like ASP's Server Side Include in PHP ? Or what is best to use instead, fread ?

    /marco

    attached mail follows:


    Quoting Martin <martin.sandinplus.idg.se>: > Ok, this may seem like a dumb newbie question... > > Is there an function like ASP's Server Side Include in PHP ? Or what is best > to use instead, fread ? >

    Check out

    include(); require(); include_once(); require_once();

    It's all in the manual

    -- 
    

    -------------------------------- - -- - - - Philip Murray - webmasteropen2view.com http://www.open2view.com - Open2View.com ------------- - -- - -

    attached mail follows:


    check out the require, include, and require_once functions in the manual on php.net - Dan :-)

    On Wed, 15 Aug 2001, Martin wrote:

    > Ok, this may seem like a dumb newbie question... > > Is there an function like ASP's Server Side Include in PHP ? Or what is best > to use instead, fread ? > > /marco > > > >

    -- 
    

    attached mail follows:


    I didn't see this was answered yet, so:

    SSI and ASP are different things that happen to live on the same server. The ASP designers thought it would be easier to simply use the SSI engine rather than write that functionality into ASP itself (to let VBScript and others 'hook' into it).

    You notice there's no VBScript command to 'include' anything. It's just not there. In PHP, which is a language, it's there in the form of 'include'. Go to http://www.php.net/include to learn more about it.

    One of the truly cool things you can do with include() in PHP is include() something dynamically (HTML, text files, or other PHP pages).

    $file = "cow.php"; include($file);

    This will include() whatever the variable $file points to, and it'll process/parse and display it accordingly.

    Because ASP and SSI are separate engines, and SSI gets processed before ASP processes things, you can not do this in ASP. Well, *sort of*, now, in ASP3, in the form of Server.Execute(), but it's not really the same feel. (and it took them long enough to catch up!) :)

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

    On Wed, 15 Aug 2001, Martin wrote:

    > Ok, this may seem like a dumb newbie question... > > Is there an function like ASP's Server Side Include in PHP ? Or what is best > to use instead, fread ? > > /marco > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    > Ok, this may seem like a dumb newbie question... > > Is there an function like ASP's Server Side Include in PHP ? Or what is best > to use instead, fread ?

    If it has PHP code in it, or might some day, use http://php.net/include or one of its See Also's If not, use http://php.net/passthru or one of the See Also's

    Oh yeah: SSI is not ASP's, I don't think. They just stole the idea. Try doing something like PHP's include() in ASP some time... :-)

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


    When I send an email using mail() I can the emails from nobody (using outlook) and in some programs like AOL from Unknown and in Web Based Emails like Yahoo I get it Correct and in Outlook Express also correct

    How can I fix this problem ?

    After some tests I found out

    Nobody <nobodyservername> on behalf of myemail appears in Outlook

    Unknownunknownserver appears in AOL

    My email appears correctly in

    Hotmail Yahoo Outlook Express and some others Web Based Clients ..

    The headers I rec. is :

    ----------------------------------------------------------------------------

    ----
    

    Return-Path: <nobodyhost14.hrwebservices.net> To: mahmoudabkareno.com Subject: Test for Mail Function from AOL From: mahmoudabkareno.com Message-Id: <E15WosW-0007cw-00host14.hrwebservices.net> Sender: Nobody <nobodyhost14.hrwebservices.net> Date: Tue, 14 Aug 2001 20:49:48 -0400 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host14.hrwebservices.net X-AntiAbuse: Original Domain - abkareno.com X-AntiAbuse: Originator/Caller UID/GID - [99 99] / [99 99] X-AntiAbuse: Sender Address Domain - host14.hrwebservices.net

    How can I fix this problem ?

    attached mail follows:


    I guess it is... but read the replys to my email, the solution is quite simple and effective.

    At 16:49 14/8/2001 +0100, you wrote: >what about registering a var called loggedin with the session and then >testing on each script to see if it's set to 1 or something ? > >then base the access on that ? that's what i use and then register uid with >the session as well so you can use it througout your site ... > >ok you've got me worried now, are there any problems with security doing it >that way ???? > >Steve > >"Christian Dechery" <cdecherybrfree.com.br> wrote in message >news:5.0.0.25.2.20010814084143.027c69e0pop.brfree.com.br... > > I have pages that uses session for security that looks something like >this: > > > > <?php > > session_start(); > > > > if( !isset($uid) ) > > { > > include("include/auth.inc.php"); > > auth_user(); > > } > > > > more code... > > ?> > > > > so $uid tells me if the user is logged on or not... > > > > but what if somebody calls the script directly from the address bar like > > this: http://server/script.php?uid=10 > > > > wouldn't this be a security problem? > > ____________________________ > > Christian Dechery (lemming) > > http://www.tanamesa.com.br > > Gaita-L Owner / Web Developer > > > > > >-- >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

    ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer

    attached mail follows:


    On Tue, Aug 14, 2001 at 02:32:03PM -0700, David Price wrote: > Sean, > > That is a very interesting suggestion. How would you call that using PHP? > > Thanks, > > David Price

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

    -- 
    

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


    You need to check against a value that was registered as a session variable. There is no use in checking if some SSL variable is set. Here's a simplified version of my check_session function that I run at the top of every page that requires a session to be established.

    I also write to the session file on every click. This lets me know howmany sessions are "actually" active. I have a session deletion script that runs every minute to check the date of the session file, if it's older than a defined time it will remove the session file.

    The session deletion script is available at http://database.sf.net/

    Any other ideas to make a session more secure?

    function check_session() { session_start();

    if (session_is_registered(user_id)) { return TRUE; } else { header("Location: login.php"); exit; } }

    attached mail follows:


    Sorry for the OT but, but I'm struggling to get my forms to have a good validation in JavaScript.

    Does anyone know a complete reference to JavaScript, like, with all objects, it's functions, parameters and etc...

    that would help a lot..

    Thanks... ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer

    attached mail follows:


    I used Netscape's javascript reference when I started, but I also found that looking at source code (javascripts.com used to be good) helped alot.

    http://developer.netscape.com/docs/manuals/communicator/jsref/index.htm

    On Tuesday 14 August 2001 18:58, you wrote: > Sorry for the OT but, but I'm struggling to get my forms to have a good > validation in JavaScript. > > Does anyone know a complete reference to JavaScript, like, with all > objects, it's functions, parameters and etc... > > that would help a lot.. > > Thanks... > ____________________________ > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer

    attached mail follows:


    Hi,

    Is there a possibility to search arrays in PHP? For example I'd like to find out the index-number of

    $countries["singapore"];

    but only if that country exists in the array.

    TIA,

    Raphael

    attached mail follows:


    In article <20010815021046.62647.qmailpb1.pair.com>, raphaelpnr1webresource.com (Raphael Pirker) wrote:

    > Is there a possibility to search arrays in PHP?

    Yes, and you'll never guess what it's called! (Hint: see <http://php.net/manual/en/function.array-search.php>).

    -- 
    CC
    

    attached mail follows:


    in_array();

    --
    

    Julio Nobrega.

    2B||!BB - That's the question.

    "Raphael Pirker" <raphaelpnr1webresource.com> wrote in message news:20010815021046.62647.qmailpb1.pair.com... > Hi, > > Is there a possibility to search arrays in PHP? For example I'd like to find > out the index-number of > > $countries["singapore"]; > > but only if that country exists in the array. > > TIA, > > Raphael > >

    attached mail follows:


    hehe, oops! :) thanks by the way,it worked! :))

    attached mail follows:


    Try something like this

    if(isset($countries["singapore"])) { do something... };

    or, alternatively, if(!isset($countries["singapore"])) { echo "Not a country" };

    On Tuesday 14 August 2001 19:12, you wrote: > Hi, > > Is there a possibility to search arrays in PHP? For example I'd like to > find out the index-number of > > $countries["singapore"]; > > but only if that country exists in the array. > > TIA, > > Raphael

    attached mail follows:


    is there also a way to search for, let's say '*china*' because in my array it would say "Republic of China" and when searching for "china" I get no result from the array...

    attached mail follows:


    > is there also a way to search for, let's say '*china*' because in my array > it would say "Republic of China" and when searching for "china" I get no > result from the array...

    You'd have to walk through the array and use strstr or ereg for that.

    You could maybe use PHP's array_walk function, but that might be a bit tricky for a beginner, unless you've programmed before...

    function my_array_search($needle, $haystack){ # Go ahead and use the built-in one, in case it's a perfect match: $result = array_search($needle, $haystack); reset($haystack); while (!($result === FALSE) && (list($k, $v) = each($haystack)){ # Or maybe you wanted ereg($needle, $v) here... $result = ereg($v, $needle) ? $k : FALSE; } return $result; }

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

    Thanks a lot for your prompt reply!! I get a parse-error, however, on line 77 (marked below):

    function search_the_array($array) { global $search_tmp; $result = array_search($search_tmp, $array, TRUE); reset($array); Line77: 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" }

    Any idea as to how this could be solved?

    TIA,

    Raphael

    attached mail follows:


    On Wed, 15 Aug 2001 16:17, Raphael Pirker wrote: > Hi Richard, > > Thanks a lot for your prompt reply!! I get a parse-error, however, on > line 77 (marked below): > > function search_the_array($array) { > global $search_tmp; > $result = array_search($search_tmp, $array, TRUE); > reset($array); > Line77: 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" > } > > Any idea as to how this could be solved? > > TIA, > > Raphael

    A quick count seems to show a different number of left and right parentheses in that line. Match your brackets and you should be OK.

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

    "I only have diamonds, clubs and spades," said Tom heartlessly.

    attached mail follows:


    Hi, I've trying to use mcrypt and php (4.06 or 4.07-dev) with no luck. Everytime I use I got a [notice] child pid 16630 exit signal Segmentation fault (11) in my apache's error.log.

    I am using the latest libmcrypt-2.4.15 and php (a hour ago cvs update).

    Is this a known bug ?

    './configure' '--with-apxs' '--with-ttf' '--with-xml' '--with-gd' '--with-ftp' '--enable-session' '--enable-trans-sid' '--with-zlib' '--enable-inline-optimization' '--with-pgsql' '--with-openssl' '--with-imap=../imap' '--with-gettext' '--with-mcrypt=/usr/local'

    <?php $cipher=MCRYPT_TripleDES ; $mode=MCRYPT_MODE_ECB ; $td = mcrypt_module_open ($cipher, "", $mode, ""); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND); mcrypt_generic_init ($td, $key, $iv); $encrypted_data = mcrypt_generic ($td, $valor); mcrypt_generic_end ($td); ?>

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

    attached mail follows:


    because you have a semicolon after while ($count > $i) so that it never increments $i. :-) oops

    On Tue, 14 Aug 2001, PHP List wrote:

    > Hi, > Can anyone tell me why this is a never ending loop? > > $i=0; > $count = 1; > while ($count > $i); > { > echo "$i <br>"; > $i++; > } > Chris >

    -- 
    

    attached mail follows:


    Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page?

    ******************* <html> <body> <script language='JavaScript' src='/include/adjs.php></script> </body> </html> ******************* Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    Try

    <?php include "/include/adjs.php"; ?>

    in your html file to include some php code in there

    [1]Javascript is a rather sh*tty client side language, it doesn't parse php very well. [2]<script language='JavaScript' src='/include/adjs.php></script> ^^^^^^^^^^^^^^^^^^^^^ Warning unterminated tag...

    Cheers,

    Lawrence.

    -----Original Message----- From: Jack [mailto:jackyactivelifestyle.com] Sent: August 15, 2001 11:00 PM To: php-generallists.php.net Subject: [PHP] to include php file into html file

    Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page?

    ******************* <html> <body> <script language='JavaScript' src='/include/adjs.php></script> </body> </html> ******************* Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    I also tried <?php include "myphp.php;"?> into my html page, and it appears that nothing happen at all,. Looks like the html page does not recognize the php tag. Is there any other way that one can include a php file into a html file? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: <Lawrence.Sheeddfait-maeci.gc.ca> To: <jackyactivelifestyle.com>; <php-generallists.php.net> Sent: Tuesday, August 14, 2001 10:04 PM Subject: RE: [PHP] to include php file into html file

    > Try > > <?php include "/include/adjs.php"; ?> > > in your html file to include some php code in there > > > [1]Javascript is a rather sh*tty client side language, it doesn't parse php > very well. > [2]<script language='JavaScript' src='/include/adjs.php></script> > ^^^^^^^^^^^^^^^^^^^^^ > Warning unterminated tag... > > > Cheers, > > Lawrence. > > -----Original Message----- > From: Jack [mailto:jackyactivelifestyle.com] > Sent: August 15, 2001 11:00 PM > To: php-generallists.php.net > Subject: [PHP] to include php file into html file > > > Hi people > I have tried to include php file into html page using the syntax below and > it said syntax error at this part when the page is loaded. What is wrong > with calling php file this way? Or is there any other way to call php file > from html page? > > ******************* > <html> > <body> > <script language='JavaScript' src='/include/adjs.php></script> > </body> > </html> > ******************* > Jack > jackyactivelifestyle.com > "Love your enemies, it will drive them nuts" >

    attached mail follows:


    Yes, but you've got to trick your HTTP-software into believing that a .html (or .htm respecitvely) is actually a PHP file. I can't quite remember the tag to do so, but you should find it at www.apache.org somewhere. It's called file mapping.

    attached mail follows:


    Well,

    It seems your web server is setup not to parse .html files as php If you are running apache, then add configure it to correctly parse the <?php in all files. php.net has ample doc's about that, as does apache.

    If you are running IIS or PWS, then get any of the millions of people with root access to fix the extension parsing for you.

    Or

    Either rename your html with a .php extension.

    Do whatever is simpler for you.

    -----Original Message----- From: Jack [mailto:jackyactivelifestyle.com] Sent: August 15, 2001 11:20 PM To: Lawrence.Sheeddfait-maeci.gc.ca; php-generallists.php.net Subject: Re: [PHP] to include php file into html file

    I also tried <?php include "myphp.php;"?> into my html page, and it appears that nothing happen at all,. Looks like the html page does not recognize the php tag. Is there any other way that one can include a php file into a html file? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: <Lawrence.Sheeddfait-maeci.gc.ca> To: <jackyactivelifestyle.com>; <php-generallists.php.net> Sent: Tuesday, August 14, 2001 10:04 PM Subject: RE: [PHP] to include php file into html file

    > Try > > <?php include "/include/adjs.php"; ?> > > in your html file to include some php code in there > > > [1]Javascript is a rather sh*tty client side language, it doesn't parse php > very well. > [2]<script language='JavaScript' src='/include/adjs.php></script> > ^^^^^^^^^^^^^^^^^^^^^ > Warning unterminated tag... > > > Cheers, > > Lawrence. > > -----Original Message----- > From: Jack [mailto:jackyactivelifestyle.com] > Sent: August 15, 2001 11:00 PM > To: php-generallists.php.net > Subject: [PHP] to include php file into html file > > > Hi people > I have tried to include php file into html page using the syntax below and > it said syntax error at this part when the page is loaded. What is wrong > with calling php file this way? Or is there any other way to call php file > from html page? > > ******************* > <html> > <body> > <script language='JavaScript' src='/include/adjs.php></script> > </body> > </html> > ******************* > Jack > jackyactivelifestyle.com > "Love your enemies, it will drive them nuts" >

    attached mail follows:


    At 10:20 AM -0500 8/15/01, Jack wrote: >I also tried ><?php include "myphp.php;"?> >into my html page, and it appears that nothing happen at all,. Looks like >the html page does not recognize the php tag. Is there any other way that >one can include a php file into a html file? >Jack

    set html as a php application in a .htaccess file. Something like:

    AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3 .php AddType application/x-httpd-php3 .phtml AddType application/x-httpd-php3 .html

    If set at the root level it should effect all files and folders.

    Alnisa

    -- 
       .........................................
        Alnisa  Allgood
        Executive Director
        Nonprofit Tech
        (ph) 415.337.7412  (fx) 415.337.7927
        (url)  http://www.nonprofit-techworld.org
        (url)  http://www.nonprofit-tech.org
        (url)  http://www.tech-library.org
       .........................................
        Nonprofit Tech E-Update
        mailto:nonprofit-tech-subscribeegroups.com
       .........................................
        applying technology to transform
       .........................................
    

    attached mail follows:


    Hi Jack!

    There you must have missunderstod something. PHP is not JavaScript.

    PHP is only interpreted if used in a file with the depending suffix. (php3, php, asp.....) If you want to include a php-file into another file this destination-file also has to be a php-file. JavaScript can´t use PHP. To include one php-file into another use "include()" or "requires()". Examples and hints to this functions could be found in the PHP-Manual.

    Robert

    "Jack" <jackyactivelifestyle.com> schrieb im Newsbeitrag news:02ff01c1259a$ebec2e80$6400a8c0activelifestyle.com... Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page?

    ******************* <html> <body> <script language='JavaScript' src='/include/adjs.php></script> </body> </html> ******************* Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    I am writing code to read in a template and parse it's values.

    One of the values is an Include tag of the following form:-

    <!-- INCLUDE : /relative/path/to/file.txt -->

    I want this to be replaced with the content of /relative/path/to/file.txt

    This tag will appear in multiple places in the template with different values for the the file to open.

    Can anyone you help? I can't figure out how to do it

    attached mail follows:


    But what is the name of the variable when you are uploading a file????

    --
    

    On the form processing page, register the variable on a session. And put

    session_start(); on the form's page, so the value is remembered and echo()ed on the field.

    --

    Julio Nobrega.

    2B||!BB - That's the question.

    "Bob" <whyisityou2yahoo.com> wrote in message news:3B79713B.517F11B9yahoo.com... > i have people upload a file from their computer but if my form comes > back with an error then they have to go select their file location > again. is there any way of saving that location so they don't have to

    > pick it again??? ====> upload file [ c:/temp/picture.jpg ] > > <input type=File name=picture size=25 value="<? echo $file_location ?>"> > > > _________________________________________________________ > Do You Yahoo!? > Get your free yahoo.com address at http://mail.yahoo.com >

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    > i have people upload a file from their computer but if my form comes > back with an error then they have to go select their file location > again. is there any way of saving that location so they don't have to > pick it again??? ====> upload file [ c:/temp/picture.jpg ]

    Not really. As a measure of security, you aren't told the original path on their hard drive of the file, so you can't use that tiny scrap of knowledge to try and hack their system.

    As a matter of privacy, you're told nothing more about their system than you need to know.

    You *CAN* have them hit the back button and click "upload" again, and that works in most browsers, if you aren't expiring the pages.

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


    > <?php > require_once("Smarty.class.php"); > require_once("DB.php"); > ?>

    I used to think that require_once() was quite slow, and that doing your own: if (!defined('smarty_class')){ define('smarty_class'); class Smarty{ ... } }

    was way more better.

    It might depend on how *MANY* things you've already included...

    So, you can paste that exact same code into your files, and it goes fast? Don't Smary and DB do a lot of includes of their own?

    And is DB using pconnect? If not, *THAT* will be your biggest bottle-neck of all. Change that, and ab again.

    Or, put it this way -- Move your pg_connect() into a connect.inc, and require() that, and ab the joke page.

    Your pg_connect() should be in a separate file not in your web-tree anyway.

    > can process about 25 requests per second. > > My applications use Smarty, Pear DB and my own classes from several include > files. Thus, they can hardly handle 10 requests per second. I tried to > benchmark them in many different ways and I figured out that *including* a > class takes a lot of time. Using those classes doesn't seem to change > anything dramatically. > Is it an inherent problem of using classes with PHP or is there something I > can do about it?

    Bottom line: Loading in files from the disk on a busy server with multiple users (IE, 200 different web-sites' index.htm files to clog up the cache) can get very slow unless your file cache can hold them all.

    Zend cache will ameliorate this to a great extent -- as the file is loaded once into RAM and left there.

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


    > Of course the absolute safest way besides encryting > your PHP is to just store your state secrets in files > outside the web server's document tree. > > i.e. > if your web server's document root is /var/www > > <?php > require("/var/super-secret/super-functions.php"); > if ($theanswer == 42) > { > echo (findthequestion($theanwer)); > } > ?> > > then even if you screw up the web server config > and .php files are sent back unrendered all you > expose is what's in the file above but not what was > included/required statements. > > This is an excellent way to protect sensitive info > like database passwords too.

    Actually... On a shared server, this *STILL* leaves all those files readable by "nobody", IE anybody else who can write PHP (or Perl, or JSP, or shell script) on the server.

    So while this is a good answer, and the "stock" answer, there *ARE* safer alternatives, depending on what you can afford in time/resources.

    #1. Compile PHP with the same settings *EXCEPT* not --with-apxs (nor --with-apache) and add another, different AddType with another, different mime-type and extension, along with an Alias and Action directive to httpd.conf, along with suExec for Apache (http://apache.org) to wrap around PHP. Whew. You can then create files ending in your new extension which will run AS YOU. Yes, *YOU*, the *REAL* user will be running PHP and have all the power and flexibility you have when you login. THIS HAS INHERENT SEVERE RISK IF YOU DO IT WRONG!!! You need to be damn sure that these directives *ONLY* apply in *YOUR* <Directory > directive in httpd.conf. Otherwise, *ANY* other user of Apache could make a new file with your nifty new extension and do *ANYTHING* to your account. You'll also want to test this setup under load as you need the PHP CGI to run "fast enough"

    #2. Buy the Zend encoder. http://www.zend.com This will make your PHP as readable as word.exe Of course, anybody with enough time and intelligence will be able to reverse-engineer *ANYTHING*... But they'd probably be able to reverse-engineer your web-site just by looking at its behaviour faster than dis-assembling Zend Encoded files.

    #3. Convert the *REALLY* sensitive bits of your PHP into C code to be compiled directly into PHP itself. Or maybe as PHP modules you can load in with that new-fangled stuff Rasmus has been presenting lately... http://conf.php.net

    #4. If it's just database username/password, you can set vars in httpd.conf or something... Never did it, never saw it done, it's just a rumor I heard. You're on your own for this one, kid :-)

    There are undoubtably *other* options beyond my ken, but there's a few.

    NOTE: Don't over-estimate the value of the intellectual property of your source code. There just isn't that much most of us are doing that is "all that". Your primary concern should probably be that somebody find your database passwords within your source, nor snag your whole site's PHP code and totally rip you off.

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


    > $mail = mail("$address", "$subject", "$body", "$headers \nContent-Type:

    This line break isn't in the actual source, is it?... That would do what you describe...

    > text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" ); > ?>

    Email was not originally designed for sending anything but text. Everything else has been grafted on afterwards.

    In fact, sending html email is generally a Bad Idea unless recipients can opt out of it -- Many recipients can't read html email, others throw it away immediately for security reasons, etc.

    I believe you need to send the HTML as an attachment.

    See Manuel Lemos' mail class at upperdesign.com (?) to see how that's done.

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


    Show us source code.

    Test your site in IE 4.0 and set preferences to "notify me before accepting cookies"

    See what you get for cookies, and what IE stores, and what comes back to your PHP code.

    --
    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: Sheni R. Meledath <shenicyber-gear.com>
    Newsgroups: php.general
    To: PHP Masters <php-generallists.php.net>
    Sent: Tuesday, August 14, 2001 2:04 AM
    Subject: Sessions in older browsers
    

    > Hello: > > I am using Sessions for user authentication in one of our sites. The > problem is now so many users are calling us saying that they are not able > to access the site. They have got IE v 4.0 . Are there any problems with > sessions in older browser versions. Could anybody please suggest a way to > solve this issue. > > Many thanks > > Sheni R Meledath > shenicyber-gear.com >

    attached mail follows:


    > blah blah blah blah blah <Link> blah blah blah blah <Link> > > I think I need to use eregi_replace to make the line look like this: > blah blah blah blah blah <a href='#'><Link></a> blah blah blah blah <a > href='#'><Link></a>

    Depending on how accurately you have stated the problem, this may work:

    $text = 'blah blah blah blah blah <Link> blah blah blah blah <Link>'; $text = str_replace('<', "<a href='#'XXXXXX<", $text); $text = str_replace('>', "></a>", $text); $text = str_replace('XXXXXX', '>', $text);

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


    >In MS SQL server, table data can be uploaded on webserver by using the >Enterprise Manager by using the export option. > >Is there any feature in Mysql to upload the data on webserver?

    http://mysql.com Search for LOAD DATA INFILE

    I'm also willing to bet the MySQL FAQ has something about importing files in it...

    >I understand that it can be done with the help of SQL script file. This is >the only way or some another way also is there?

    If you have SQL statements to execute rather than mysql_dump data, it might be easier to do: cat yourfile.sql | mysql yourdatabase

    You may need to add -u=yourusername -p after the mysql and type your username/password blindly...

    >Also, Pl. let me know: >1. How to create SQL script file, with what extension it is to be saved? >The format?

    It's just a text file with SQL statements in it. I usually use .sql, but you can use any extension you like.

    >2. How to call/execute/run that file using php?

    There's no real need to involve PHP, unless your client needs to do this repeatedly... Even then, phpMyAdmin or some other tools probably exist for you to research to find one that imports the data you have in whatever format your client can handle creating...

    --
    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 a book- MySQL/PHP Database Applications by Greenspan & Bulger -

    I think I've seen that book before :-)

    > (some lines will undoubtedly wrap and make it all look real ugly)

    We're used to that :-)

    > function authenticate ($realm="Secure Area",$errmsg="Please enter a usename and password") > { > header("WWW-Authenticate: Basic realm=\"$realm\""); > header("HTTP/1.0 401 Unauthorized"); > die($errmsg); > }

    Indent between { and } or you'll go crazy.

    > $query = "select name from users where password = ('$PHP_AUTH_PW') and name = > ('$PHP_AUTH_USER')";

    No parens are needed here. Not sure SQL will care much, but they look a bit silly...

    > <table summary="" border="0" cellpadding="5" align="center" width="90%"> > <? > $db = mysql_connect("localhost", "root"); > mysql_select_db("bulletins", $db); > > if ($orderby == 'date'):

    You probably should use { and } exclusively instead of ":" here, since that's what you used above... Mostly for consistency sake, but most new code is being written with { and } style syntax.

    > $sql = "select * from dbulletins order by 'bulletin_date'"; > elseif ($orderby == 'date2'): > $sql = "select * from dbulletins order by 'bulletin_date' desc"; > elseif ($orderby == 'vlad'): > $sql = "select * from dbulletins where bulletin_from1 like '%Vlad%' order by 'bulletin_number' desc"; > elseif ($orderby == 'burke'): > $sql = "select * from dbulletins where bulletin_from1 like '%Burke%' order by 'bulletin_number' desc"; > elseif ($orderby == 'hillers'): > $sql = "select * from dbulletins where bulletin_from1 like '%Hillers%' order by 'bulletin_number' desc"; > elseif (isset($submit)): > $sql = "select * from dbulletins where match (body) against ('%$search%')";

    Probably don't need parens, but I've never seen MATCH sql...

    > else: > $sql = "select * from dbulletins order by 'bulletin_date' desc"; > endif; >

    What happened to the LIMIT clause in your SQL?

    The paging stuff works by using "LIMIT $offset, 5" to tell MySQL to only give you records 1 through 5, or 6 through 10, or...

    As you click on the link, a different $offset is passed in to your PHP script -- You need to use that $offset in your SQL to get the right records.

    > $result2 = mysql_query($sql); > > while ( $row = mysql_fetch_array($result2)) > { > if ($orderby == 'vlad' || $orderby == 'burke' || $orderby == 'hillers' || $orderby =='date' || $orderby == 'date2' || $search > == 'orderby'): > { > print("<tr>\n<td colspan=\"2\">\n<img src=\"1pixb5e4f9.gif\" alt=\"\" height=\"20\" width=\"1\">\n</td>\n</tr>");

    Use ?> to switch out of PHP mode and just type this as HTML. The hair you save, may be your own. :-)

    > print("<tr>\n<td bgcolor=\"white\" colspan=\"2\">\n<strong>\n"); > printf("<font color=\"blue\">%s</font>\n</strong>\n</td>\n</tr>\n", $row["bulletin_number"]); > print("<tr>\n<td valign=\"top\">\n<h2 class=\"c1\">\n<br />Dealer Bulletin</h2>"); > printf("<strong>Date:</strong> %s\n", $row["bulletin_date"]); > printf("<br />\n<strong>Number:</strong> %s\n", $row["bulletin_number"]); > printf("<br />\n<strong>Subject:</strong> %s\n", $row["bulletin_subject"]); > printf("<br />\n<strong>From:</strong> %s<br />%s\n", $row["bulletin_from1"], $row["bulletin_from2"]); > print("</td>\n<td valign=\"top\" align=\"left\">\n"); > print("<font face=\"Arial Black\" size=\"+6\">SIMRAD</font>\n"); > print("<br />\n<font size=\"3\">&nbsp;&nbsp;&nbsp;A <strong>KONGSBERG</strong> Company</font>\n</center>\n"); > print("<br />Simrad Inc.\n"); > print("<br />19210-33<sup>rd</sup> Avenue West, Suite A\n"); > print("<br />Lynnwood, WA 98036\n"); > print("<br />U.S.A.\n"); > print("<br />Telephone: 1-425-778-8821\n"); > print("<br />Telefax: 1-425-771-7211\n"); > print("<br />\n<br />\n</td>\n</tr>"); > printf("<tr>\n<td colspan=2>%s\n", $row["body"]); > print("<br />\n<hr width=\"75%\" />\n"); > } > else: > printf("<tr><td>* <a href='bulletin_out.php?news_id=$row[news_id]'>%s</a>&nbsp;&nbsp;&nbsp;%s<br />&nbsp;&nbsp;&nbsp;%s</td></tr>", $row > ["bulletin_subject"], $row["bulletin_date"], $row["bulletin_from1"]); > endif; > } > function nav($offset=0,$this_script="bulletin_sorter.php") > { > global $php_self; > $page_limit = 5; > if (empty($this_script)) { $this_script = $php_self; }

    That should be $PHP_SELF

    > if (empty($offset)) { $offset = 0; } > $result3 = mysql_query("select count(*) from dbulletins"); > list($total_rows) = mysql_fetch_array($result3); > print "<p>\n"; > if ($offset > 0 ) > { > print "<a href=\"$this_script?offset=".($offset-page_limit)."\">&lt;&lt;Previous</a> &nbsp; "; > } > if ($offset+page_limit < $total_rows) > { > print "<a href=\"$this_script?offset=".($offset+page_limit)."\">Next&gt;&gt;</a> &nbsp; "; > } > print "</p>\n"; > } > > ?> > </table> > <? > nav(); > ?> > </body> > </html> > ---------------------------------------------------------------------- > Thanks for any help you all can provide, > > Chip Wiegand > Computer Services > www.simradusa.com > chip.wiegandsimrad.com > Simrad, Inc > Lynnwood, WA > 425-712-1138 > > "There is no reason anyone would want a computer in their home." > --Ken Olson, president, chairman and founder of Digital Equipment Corp., > 1977 > (-- Then why do I have nine? Somebody help me!) >

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


    Depends on too many things. Try it on your system and see...

    Wild Guess: PHP as a Module probably beats out SSI, but SSI probably beats out PHP as CGI.

    --
    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: Christopher Raymond <christopheroasisnetworks.com>
    Newsgroups: php.general
    To: PHP List <php-generallists.php.net>
    Sent: Tuesday, August 14, 2001 10:19 AM
    Subject: PHP or SSI -- What's faster?
    

    > > > > PHPers: > > So if I was just going to need includes on a few pages, what's faster PHP or > SSI on Linux/Apache? > > > Christopher Raymond >

    attached mail follows:


    $foo->bar = 42;

    Whether bar is defined or not, it will work, last I heard.

    --
    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: Bret R. Zaun <bretrzaunhotmail.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Tuesday, August 14, 2001 10:50 AM
    Subject: How dynamically create objects
    

    > Hello, > I would like to create an object from a db result like MySQL does in > mysql_fetch_object > How can I create an object with members which names are set at runtime ? > > Regards > Bret > >

    attached mail follows:


    > ok a basic question. perhaps I dont know enough about javascript but > anyway.. > > I want to call a php script from javascript. Anybody have any hints for me? > A link to a useful website would work as well. thanks mates

    You first need to realize that this will *require* opening up a whole new connection to the server, which can be rather slow...

    PHP lives on the web-server, JavaScript lives in the browser, and the PHP that generated your current JavaScript is long gone by the time the JavaScript runs.

    That said, you could do any of: document.location = "http://yourserver.com/whatever.php";

    Also, almost for sure, JavaScript has some way of asking a web-server to respond to a GET or POST. Search your fave JavaScript site for functions named "GET" and "POST", and see what you get.

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


    > Zend cache will ameliorate this to a great extent -- as the > file is loaded once into RAM and left there. ^^^^^^^^^^

    Wow, not often I see a new word like *that* around :)

    And for those of us who don't know:

    http://www.dictionary.com/wordoftheday/archive/1999/07/16.html

    ;)

    Jason

    attached mail follows:


    I'm sure that this is a simple fix, but I can't figure it out. I am trying to setup a sign-up screen that requires the user to type in their password twice to verify that they typed it in correctly. My problem is, how do I compare the two entries?

    In my HTML form I have two fields, password and password_check.

    My PHP looks like this: <? if ($password != $password_check) { $error_msg .= "Passwords do not match!<br>"; $continue = "no"; } ?>

    When I try to enter two different values in the HTML fields, my php does not return anything. Its as if it doesn't see it.

    Any help would be great.

    Thanks, Jeff

    attached mail follows:


    Disregard the previous message.....

    I found the problem, I was overwriting the variable later in my script.

    Thanks anyway....

    Jeff

    "Mindblender" <noonenowhere.com> wrote in message news:20010815051605.72811.qmailpb1.pair.com... > I'm sure that this is a simple fix, but I can't figure it out. > I am trying to setup a sign-up screen that requires the user to type in > their password twice to verify that they typed it in correctly. My problem > is, how do I compare the two entries? > > In my HTML form I have two fields, password and password_check. > > My PHP looks like this: > <? > if ($password != $password_check) { > $error_msg .= "Passwords do not match!<br>"; > $continue = "no"; > } > ?> > > When I try to enter two different values in the HTML fields, my php does not > return anything. Its as if it doesn't see it. > > Any help would be great. > > Thanks, > Jeff > >

    attached mail follows:


    Hi, has anyone successfully posted an XML data file to a "https" URL using the PHP cURL functions? If so, could you please send an example of the "curl_setopt" function names used.

    Thanks in advance Petras

    attached mail follows:


    It may be returning a negative number which is an error code rather than a process pointer... What is $p really?

    If it's < 0, use 'man errno' to see what it means.

    --
    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: Tom Hodder <t.hodderglobalgold.co.uk>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Tuesday, August 14, 2001 1:15 PM
    Subject: popen returns true whether script exists or not?
    

    > > > Hi, > > I'm trying to popen a cgi script that was designed to be open via a SSI > include, but cannot because of passing variable restrictions. > > I'm popening a cgi script and it is returning a process pointer regardless > of whether the string passed to it points to anything. > Is this the expected response? > > <? > $p = popen( "/web/guide/myfiles/bannerzzzzz.cgi","r" ); > ?> > > this returns a process pointer even though bannerzzzzz.cgi doesn't exist > > I then need to read the results of the cgi script and dump them to the > screen like so; > > <? > while (!feof ($p)) { > $buffer = fgets($p, 4096); > echo $buffer; > } > pclose ($p); > ?> > > but this is not functioning, does anyone have any ideas? > > Regards > > Tom Hodder >

    attached mail follows:


    > $invalid = array("1","3","9"); > $questions = array("1","2","3","4","5","6","7","8","9"); > > $new_questions = array("<font color=red>1</font>", > "2", > "<font color=red>3</font>", > "4","5","6","7","8", > "<font color=red>4</font>");

    There's no one-line built-in array_xxx function to do that, AFAIK. This isn't Lisp, after all :-)

    reset($questions); while (list($index, $qid) = each($questions)){ if (in_array($qid, $invalid)){ $new_questions[$index] = "<font color=red>$qid</font>"; } else{ $new_questions[$index] = $qid; } }

    --
    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 to store a whole lot of text files into a database, each one > containing 3 columns containing numbers and about 2500 lines. I was > wondering if anyone knew which would be the best way to store these files, > having one big table with each row containing the contents of the files, or > making one table for each file and inserting each line of the file into its > respective row in the database. The database will probably become pretty > big and I'm looking for the option that won't slow it down too much.

    Will you need to search/sort on individual columns? In what ways will you need to get the data out? Does the file a row came from have any significance? Will it need to "go back" into that file if it changes? Are these numbers integers, or floating point? How big/small do the numbers get?

    Best Guess: The three columns are significant, and you'll need to sort/search on them individually. In that case, there's really no question: One table, three columns, each column indexed individually.

    Define "pretty big"... How many rows do you expect: 10K, 100K, 1M, 10M, 100M, ...? Anything up to 1 million isn't really considered "big" for MySQL or PostgreSQL :-) Epecially if the numbers are within ranges that make built-in data-types "int" or "float" acceptable. :-)

    Is adding text files an ongoing process that needs to happen quickly, or a one-time load-up, and then the database stays fairly static? If this is a one-time load-up, you needn't worry as much about the speed of your import routine. You still might want to whip up something to keep track of which files have been "done" and automate the process so you just turn it on and go away for a day or two. :-)

    What's more important to you: SPEED or HARD DRIVE space? You could not do the indices on the columns if you're really short on hard drive space, and search/sort speed is not important... This seems pretty unlikely, or you wouldn't be putting these in a database in the first place.

    --
    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 new to PHP and am confused on HTTP authentications. I have read that > section in the manual and still have questions. Where does PHP look to see > if the user is valid or if the passward matches the user.

    You can set it up to look where-ever you see fit.

    Most users probably create a table in a MySQL database with login and password columns.

    I'm willing to bet there are more complete sample scripts in the code archives on tutorials linked from: http://php.net/links.php

    > How do you use > PHP to set up user registration so users can input their information for > authentication. Can anyone point me in the right direction to read more on > this and help clear my confusion.

    You'll need to have at least one page where you *DON'T* use the authentication code -- That page is where you let new users input their information, and then you decide to add them or not.

    Or, if you want to, you could design it so that *YOU* add each user manually in an "admin" page. You can add a column to the database with login/password that also has "admin" as a column, and only you (and/or whomever) have that column set to "TRUE". Then, you can require slightly different authentication code on the admin pages to reject non-admin users.

    It really all depends on how you want it to work, more than anything else...

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


    "none" means they didn't pick a file to upload at all...

    Or that it was too large for your size limit.

    --
    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: Jason Radley <phpstreamlineinternet.com>
    Newsgroups: php.general
    To: Erik H. Mathy <erikbutlerandco.com>; <php-generallists.php.net>
    Sent: Tuesday, August 14, 2001 4:20 PM
    Subject: RE: [PHP] php upload on MAC
    

    > Hey Erik, > well I checked the userfile_type and if it was a word document I added the > doc extension to it. The other mac programs that add the extension to the > filename work fine. If you were to make a photo shop file and > upload it it fail. Warning: Unable to open "none" for reading. No such > file blah blah. What do you think? > Thanks, > Jason > > -----Original Message----- > From: Erik H. Mathy [mailto:erikbutlerandco.com] > Sent: Tuesday, August 14, 2001 2:01 PM > To: php-generallists.php.net > Subject: RE: [PHP] php upload on MAC > > > Hi! > > > Mac users can't upload all of their files. > > "all" of their files? Out of curiousity, how many files do they seem to be > able to send up before the script falters? What error messages or behavior > does PHP show when it does falter? > > Just looking for alittle additional info, > - Erik > > > -- > 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:


    Jason wrote:

    > I wrote a script that clients can upload files to our server and > download files but there is one small problem. Mac users can't > upload all of their files. I am guess there is no file extensions. > Anyone have any ideas? > Jason

    Well, in Mac, there are indeed no mandatory file extensions. The file type is kept in a record in the filesystem, as four bytes of information. This information is not passed along as the file is uploaded.

    However, the file upload mechanism requires that the browser should send the MIME type of the uploaded file. This information is available to PHP, and, depending on the fidelity of the browsers your users use, it can give you useful information.

    Herouth

    attached mail follows:


    http://l-i-e.com/compare/

    --
    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: Christopher Raymond <christopheroasisnetworks.com>
    Newsgroups: php.general
    To: PHP List <php-generallists.php.net>
    Sent: Tuesday, August 14, 2001 2:22 PM
    Subject: PHP Shopping Carts ??
    

    > > > > Could anyone point me in the direction of some PHP shopping cart scripts? > > > Thanks, > > Christopher Raymond >

    attached mail follows:


    > http://www.phpbuilder.com/columns/bealers20000904.php3?page=1

    if (!ereg("^4",phpversion())) { function in_array($needle,$haystack) { # we have this function in PHP4, so for you PHP3 people for ($i=0; $i < count($haystack); $i++) { if ($haystack[$i] == $needle)

    return true; } } } }

    This assumes the array is numerically-indexed, and his $registered_types ain't. Dunno if it matters, but if you are using PHP3, you should change the for() line to:

    while (list($i,) = each($haystack)){

    Also, I dunno what he's thinking with all those ugly print statements... Ugh! :-)

    Other than that, you'd have to be more specific about what "doesn't work"...

    --
    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, I asked a similar question more than a year ago, so I apologize for > being a little redundant :) > > Why was PHP's foreach loop syntax chosen to be > > foreach($dogs as $dog){} > > instead of something more common (Python, Javascript, can't think what else > right now) and, to me, more intuitive, like > > foreach($dog in $dogs){} > > Just wondering what the reasoning was. Thanks.

    Wild Speculation: Well, we needed the variant of:

    foreach($dogs as $index=>$dog){}

    and we already had the perfectly fine:

    while (list($index, $dog) = each($dogs)){}

    and if we did it your way, it wouldn't be all that different from that :-)

    [asbestos on] Disclaimer: I haven't even figured out why anybody wanted the damn thing in the first place. Clutters up the language and provides no new functionality. :-) [asbestos off]

    If you really wanna know, go read the source and find out who added it, and ask them, or check the PHP-DEV archives where I'm betting it was argued at length how to do it.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    Hi,

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

    One of our primary goals is to present audio clips, and we have many of them. Because of our diverse audience, we need to stream many file formats of identical clips. I'm trying to do this through php-mysql, recording information common to each clip in a database, and then streaming the files through a central PHP file using the header function to output "Content-type: audio/x-ms-wax" or "Content-type: audio/x-pn-realaudio"

    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:

    Here's the headers from a straight .ram file:

    HTTP/1.1 200 OK Date: Wed, 15 Aug 2001 05:39:59 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 Last-Modified: Wed, 31 Jan 2001 18:41:50 GMT ETag: "29b3d8-28-3a785c6e" Accept-Ranges: bytes Content-Length: 40 Connection: close Content-Type: audio/x-pn-realaudio

    http://chiaraquartet.net/real/b133_2s.rm

    The contents of the file are the hypertext link.

    Now, here's the php version of the headers:

    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?

    Thanks.

    As my first career is the cellist of the quartet, I don't have the time to check, so I would appreciate a direct response to the email address greg at chiaraquartet dot net, replacing at with and dot with .

    Greg Beaver

    --
    The Chiara String Quartet
    http://www.chiaraquartet.net
    The most advanced PHP/MySQL-based quartet scheduling system in the world, at
    http://calendar.chiaraquartet.net
    

    attached mail follows:


    I have started working with Sybase lately, and it has come to my knowledge that a single query can return multiple result sets in Sybase, especially when using stored procedures.

    Now, in ASP (sorry...), there are calls that allow retrieving the next result set from the current result set. So in effect the result sets are a linked list and you can access all of them.

    In PHP, however, the result set returned is the first one, and I don't see any method for retrieving the next result set. Does anybody know of such a method? Does anybody have a suggestion for workaround?

    Basically, in most of these cases, the important result set is actually the last one, not the first, as the intermediate result sets are mostly temporary results.

    Herouth

    attached mail follows:


    The ability to select a set from a previously selected set is possible in Sybase because the database supports creation of temporary tables and the select insert.

    PHP (which is often packaged with MySQL) does not attempt to mix database (SQL) with it's own scripting language (unless someone is working on this). ASP on the other hand will sell you anything that consumes resources thereby encouraging you to buy the bigger software, requiring bigger hardware (An old IBM marketing plan, and my personal opinion). When you talk about a result set in PHP you must be referring to what is returned by MySQL, not PHP. Perhaps someday MySQL will have temp tables and SELECT INSERT capability.

    On the other had PHP does a very nice job of looping thru the result set.

    Warren Vail

    -----Original Message----- From: Herouth Maoz [mailto:herouthitouch.co.il] Sent: Tuesday, August 14, 2001 11:35 PM To: php-generallists.php.net Subject: [PHP] Problem: Sybase, PHP and multiple result sets

    I have started working with Sybase lately, and it has come to my knowledge that a single query can return multiple result sets in Sybase, especially when using stored procedures.

    Now, in ASP (sorry...), there are calls that allow retrieving the next result set from the current result set. So in effect the result sets are a linked list and you can access all of them.

    In PHP, however, the result set returned is the first one, and I don't see any method for retrieving the next result set. Does anybody know of such a method? Does anybody have a suggestion for workaround?

    Basically, in most of these cases, the important result set is actually the last one, not the first, as the intermediate result sets are mostly temporary results.

    Herouth

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

    attached mail follows:


    On Wednesday 15 August 2001 10:07, Warren Vail wrote: > The ability to select a set from a previously selected set is > possible in Sybase because the database supports creation of > temporary tables and the select insert.

    No, you seem to have missed my point entirely. So I'll explain in a little more detail.

    I run a stored procedure. Let's assume I run it from the interactive utility and not from PHP for the moment.

    > SP_SOMETHING_OR_OTHER PARAM1 PARAM2 PARAM3

    The database returns:

    foo bar === === 10 20 30 40

    field1 field2 field3 ====== ====== ====== string bla 15 nothing bla 12

    As you can see, it returns TWO result sets. One with two numeric columns. The next with three columns, the first two string and the last numeric.

    This is, of course, just an example.

    Now back to the web interface.

    If I use PHP, I get only the first result set. That is, I write something along the lines of:

    $rs = sybase_query( "SP_SOMETHING_OR_OTHER PARAM1 PARAM2 PARAM3", $conn );

    while ( $row = sybase_fetch_row( $rs ) ) {

    echo $row[0]; // and so on

    }

    This will only display the results of the first result set - the one with the two fields, foo and bar.

    There is no way for me to reach the second table generated by the query. This is supposed to be the significant table.

    Now, in ASP, there is something like

    set rs = rs.NextResultSet

    Which sets the rs to the second result set, the one with the three fields of mixed types, at which point you loop, just like above, and retrieve the new information. This method or an equivalent of it is not in the PHP documented set of Sybase functions.

    I hope I made myself clearer. And by the way, you don't have to sell me on the uselessness of ASP, the general uselessness of Microsoft etc. - I don't use any Microsoft products, even at work.

    Herouth

    attached mail follows:


    Hi Guys,

    I actually know what it means. Well, I think it means the 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 - also, is there any other ones(whatever it is) like this?

    Thanks.

    Scott.

    attached mail follows:


    my guess would be Parent Working Directory, but i'm not sure...

    attached mail follows:


    how about typing "man pwd" on a unix box?

    -----Original Message----- From: Scott Mebberson [mailto:scottredbluedesign.com] Sent: Wednesday, 15 August 2001 4:08 PM To: php-generallists.php.net Subject: [PHP] `pwd` - what does this mean?

    Hi Guys,

    I actually know what it means. Well, I think it means the 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 - also, is there any other ones(whatever it is) like this?

    Thanks.

    Scott.

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


    pass working directory [or] path to working directory.

    PWD is a unix command

    See man pwd for more details.

    eg

    http://campuscgi.princeton.edu/man?pwd#toc3

    -----Original Message----- From: Raphael Pirker [mailto:raphaelpnr1webresource.com] Sent: August 15, 2001 2:49 PM To: php-generallists.php.net Subject: [PHP] Re: `pwd` - what does this mean?

    my guess would be Parent Working Directory, but i'm not sure...

    -- 
    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 typed it on my server (SunOS 5.7) and it said, it returns the current working directory.

    So this is a unix command executed from PHP?

    Is there any other useful unix commands which can be executed from PHP? Does anybody have a list?

    "Scott Mebberson" <scottredbluedesign.com> wrote in message news:20010815063919.28727.qmailpb1.pair.com... > Hi Guys, > > I actually know what it means. Well, I think it means the 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 - also, is there any other > ones(whatever it is) like this? > > Thanks. > > Scott. > >

    attached mail follows:


    actually says: "pwd - print name of current/working directory" in the man page (c:

    -----Original Message----- From: Lawrence.Sheeddfait-maeci.gc.ca [mailto:Lawrence.Sheeddfait-maeci.gc.ca] Sent: Wednesday, 15 August 2001 4:18 PM To: php-generallists.php.net Subject: RE: [PHP] Re: `pwd` - what does this mean?

    pass working directory [or] path to working directory.

    PWD is a unix command

    See man pwd for more details.

    eg

    http://campuscgi.princeton.edu/man?pwd#toc3

    -----Original Message----- From: Raphael Pirker [mailto:raphaelpnr1webresource.com] Sent: August 15, 2001 2:49 PM To: php-generallists.php.net Subject: [PHP] Re: `pwd` - what does this mean?

    my guess would be Parent Working Directory, but i'm not sure...

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

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

    attached mail follows:


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


    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:


    On Wed, 15 Aug 2001 16:25, Scott Mebberson wrote: > I typed it on my server (SunOS 5.7) and it said, it returns the current > working directory. > > So this is a unix command executed from PHP? > > Is there any other useful unix commands which can be executed from PHP? > Does anybody have a list? >

    Well there's the Read Manual command, rm :-)

    But seriously, you can execute _any_ operating system command (that the webserver user has rights to) with exec(), system() or backticks.

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

    "I wish I had something to write with," Tom said pensively.

    attached mail follows:


    hi, i am facing problem while using the following code even the socket dosent work i am using php 4... web server xitami os min ME note :- what is GD . how to check it exist or not in the below code i am get fatel error(function imagecreate() not found) //************************************// <?php header("Content-type: image/gif"); $im = ImageCreate(100,20);

    $red=ImageColorAllocate($im,255,0,0); $white=ImageColorAllocate($im,255,255,255);

    ImageString($im,3,3,3,"Ashok",$white); ImageGif($red);

    ImageDestroy($im); ?> //************************************//

    _________________________________________________________ For Rs. 2,000,000 worth of Aptech scholarships click below http://clients.rediff.com/clients/aptechsch/index1.htm

    attached mail follows:


    On Wed, 15 Aug 2001 17:13, ashok sundaram wrote: > hi, > i am facing problem while using the following code > even the socket dosent work > i am using php 4... > web server xitami > os min ME > note :- what is GD . > how to check it exist or not > in the below code i am get fatel error(function imagecreate() not > found) //************************************// > <?php > header("Content-type: image/gif"); > $im = ImageCreate(100,20); > > $red=ImageColorAllocate($im,255,0,0); > $white=ImageColorAllocate($im,255,255,255); > > ImageString($im,3,3,3,"Ashok",$white); > ImageGif($red); > > ImageDestroy($im); > ?> > //************************************//

    Check the settings in your php.ini file in the section Windows Extensions and make sure the line

    extension=php_gd.dll

    exists - remove the ; at the beginning of the line if it is there. Check you have the dll and restart your server. To tell what features your installation has, use phpinfo()

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

    Useless Invention: Strap-on portable chairs.

    attached mail follows:


    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:


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

    TIA Kiat Kin

    attached mail follows:


    Hi people It is about html, that when I go to some sites that ask me to download their font like Japanese or chinese font, in order to read their language, what do they put in the page for that kind of detection? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    Most people do it like this

    Specify the charset in the document.

    e.g.

    Simplified Chinese <meta http-equiv="content-type" content="text/html; charset=gb2312">

    Traditional Chinese <meta http-equiv="content-type" content="text/html; charset g5">

    You can also specify the language type in the web server - have a look at your apache settings. Doing it via the charset= method is better though imho.

    Note that the download font thing is Internet Exploder Specific. Internet Exploder also has a few issues with different charsets. Also note that *all* html documents should have a specified charset - even the plain english ones. Most of the html on the internet is coded wrongly, this does not make it correct.

    I do a lot of simplified chinese development, being located in Shanghai, China.

    Cheers,

    Lawrence. -----Original Message----- From: Jack [mailto:jackyactivelifestyle.com] Sent: August 16, 2001 4:21 AM To: php-generallists.php.net Subject: [PHP] a bit off the list but should be easy

    Hi people It is about html, that when I go to some sites that ask me to download their font like Japanese or chinese font, in order to read their language, what do they put in the page for that kind of detection? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    Thanks :-) that is really helpful. Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts" ----- Original Message ----- From: <Lawrence.Sheeddfait-maeci.gc.ca> To: <jackyactivelifestyle.com>; <php-generallists.php.net> Sent: Wednesday, August 15, 2001 3:33 AM Subject: RE: [PHP] a bit off the list but should be easy

    > Most people do it like this > > > Specify the charset in the document. > > e.g. > > Simplified Chinese > <meta http-equiv="content-type" content="text/html; charset=gb2312"> > > Traditional Chinese > <meta http-equiv="content-type" content="text/html; charset=big5"> > > You can also specify the language type in the web server - have a look at > your apache settings. > Doing it via the charset= method is better though imho. > > > Note that the download font thing is Internet Exploder Specific. Internet > Exploder also has a few issues with different charsets. > Also note that *all* html documents should have a specified charset - even > the plain english ones. Most of the html on the internet is coded wrongly, > this does not make it correct. > > I do a lot of simplified chinese development, being located in Shanghai, > China. > > Cheers, > > Lawrence. > -----Original Message----- > From: Jack [mailto:jackyactivelifestyle.com] > Sent: August 16, 2001 4:21 AM > To: php-generallists.php.net > Subject: [PHP] a bit off the list but should be easy > > > Hi people > It is about html, that when I go to some sites that ask me to download their > font like Japanese or chinese font, in order to read their language, what do > they put in the page for that kind of detection? > Jack > jackyactivelifestyle.com > "Love your enemies, it will drive them nuts" > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    Here is an opportunity that you can take up FREE. If you join as an affiliate, we'll teach you how to build a profitable business on the Internet, using our system to create an income stream and earn income globally, 24 hours a day.

    Don't let this opportunity slip past you - our organization is already well over 2 million strong and growing at around 6,000 each day! Join us and let's work together to get a share of all those members.

    Just hit:

    mailto:9junemail.com?Subject=Opportunity

    To be removed from this list, hit:

    mailto:9junemail.com?Subject=Remove

    attached mail follows:


    Hi

    How do i use a form button to call a php function?

    Thanks

    attached mail follows:


    Hi Michael,

    If you use a form then all elements of the form (text-boxes, checkboxex etc.) automatically exist as variables in the file which ist specified as action of the form. To use it in the way you want it might be the right way to specifiy the file, which contains the form, itself as action ( e.g. <form action=<?php echo $PHP_SELF ?>>)

    Robert "Michael McNeice" <MMcNeicehotmail.com> schrieb im Newsbeitrag news:20010815090739.41449.qmailpb1.pair.com... > Hi > > How do i use a form button to call a php function? > > Thanks > > > >

    attached mail follows:


    hmm just read the controversial linuxtoday article http://linuxtoday.com/news_story.php3?ltsn=2001-08-13-009-20-OP

    an excerpt:

    "but when will PHP grow to become something more than a web scripting language? Where is the PHP enterprise component architecture? What about clustering and failover? Where are the WSDL and UDDI implementations? Don't show me bits and pieces here and there. Show me a framework. Show me a reference implementation."

    Comments on the article?

    -- 
    Vincent Stoessel-vinnyblendermania.com
    Xaymaca Studios http://www.blendermania.com
    

    attached mail follows:


    >hmm just read the controversial linuxtoday article >http://linuxtoday.com/news_story.php3?ltsn=2001-08-13-009-20-OP

    SNIP

    >Comments on the article?

    A few. But I saw you can give comments below the article mentioned above. Please please please leave this discussion there. It's endless and pretty useless. Might attract A LOT of traffic on this list. I don't intend to spend any more time on it.

    Bye,

    B.

    attached mail follows:


    I have mysql in redhat linux and apache 1.3.20 with module php 4.0.6 but I have error in my select, connect to the database is ok. In apache and mysql uder windows working this script OK but no in linux. What's wrong ?

    $spojenie = mysql_connect("localhost","user","password"); if (!$spojenie) : echo "Chyba pri konektne na databazu !!!"; exit; endif; mysql_select_db("Patenty",$spojenie);

    $podmienka = "Cislo_dokumentu BETWEEN 238000 AND 238023"; $tried = "Cislo_dokumentu";

    if ($podmienka !="") $vysledok = mysql_query("SELECT * FROM patent WHERE $podmienka ORDER BY $tried",$spojenie); else $vysledok = mysql_query("SELECT * FROM patent ORDER BY $tried",$spojenie);

    if (!$vysledok): echo "Error.<BR>\n"; exit; endif;

    attached mail follows:


    When a page is loaded the php code is being executed, is this also possible for an onclick event? If so how do I do that?

    tnx!

    attached mail follows:


    On Wed, Aug 15, 2001 at 11:45:03AM +0200, Flugel wrote: > When a page is loaded the php code is being executed, is this also possible > for an onclick event? If so how do I do that? > > tnx!

    No. PHP is server-side, not client-side like onclick (JS). The only way to do things like that is:

    onclick="window.location.href='blahblahblah.php';"

    -- 
    

    * R&zE:

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

    attached mail follows:


    Is it also possible for the output of that php-page (MySQL query) to be displayed in a layer on the page where the button is located?

    "Renze Munnik" <renzedatalink.nl> wrote in message news:20010815115732.G15317pro-pain.telemediair.nl... > On Wed, Aug 15, 2001 at 11:45:03AM +0200, Flugel wrote: > > When a page is loaded the php code is being executed, is this also possible > > for an onclick event? If so how do I do that? > > > > tnx! > > > No. PHP is server-side, not client-side like onclick (JS). The only > way to do things like that is: > > onclick="window.location.href='blahblahblah.php';" > > -- > > * R&zE: > > -- »»»»»»»»»»»»»»»»»»»»»»»» > -- Renze Munnik > -- DataLink BV > -- > -- E: renzedatalink.nl > -- W: +31 23 5326162 > -- F: +31 23 5322144 > -- M: +31 6 21811143 > -- H: +31 23 5516190 > -- > -- Stationsplein 82 > -- 2011 LM HAARLEM > -- > -- http://www.datalink.nl > -- ««««««««««««««««««««««««

    attached mail follows:


    On Wed, Aug 15, 2001 at 11:56:42AM +0200, Flugel wrote: > Is it also possible for the output of that php-page (MySQL query) to be > displayed in a layer on the page where the button is located?

    Should be... But unfortunately I don't have enough time to figure it out for you at the moment. Sorry!

    -- 
    

    * R&zE:

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

    attached mail follows:


    Try this page. It is a hack but I think it does what you want it to.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> </HEAD>

    <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">

    <? function theAnswer($action) { if($action == "show") return "42"; return ""; } ?>

    This is a page with a button on it. When you press it you willget something in the layer. <BR> <INPUT TYPE="button" VALUE="Show" onClick="location.href='<? echo $PHP_SELF; ?>?action=show'">

    <DIV STYLE="position : absolute; left : 150px; top; 250px; width : 200px; height : 200px; background : #FF0000; color : #FFFFFF"> <? echo theAnswer($action); ?> </DIV>

    </BODY> </HTML>

    -- 
    Kind regards,
      Morten Winkler
    

    attached mail follows:


    Wow you're good!! Tnx that was exactly what I needed!!

    Thumbs up for Morten Winkler Jørgensen

    tnx again!

    "Orv î?÷inklÏ ²ørÏkîskî" <madmaxmip.sdu.dk> wrote in message news:349821323.20010815125122mip.sdu.dk... > Try this page. It is a hack but I think it does what you want it to. > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> > <HTML> > <HEAD> > </HEAD> > > <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?"> > > <? > function theAnswer($action) { > if($action == "show") return "42"; > return ""; > } > ?> > > > > > This is a page with a button on it. When you press it you willget something in the layer. > <BR> > <INPUT TYPE="button" VALUE="Show" onClick="location.href='<? echo $PHP_SELF; ?>?action=show'"> > > <DIV STYLE="position : absolute; left : 150px; top; 250px; width : 200px; height : 200px; background : #FF0000; color : #FFFFFF"> > <? echo theAnswer($action); ?> > </DIV> > > </BODY> > </HTML> > > > -- > Kind regards, > Morten Winkler > >

    attached mail follows:


    attached mail follows:


    Hello !

    I've read a lot of web, news and archives for two days and i've not resolve my problem. Here it is :

    Configuration : Apache 1.3.20 (Win32) / PHP 4.0.5 / MySQL 3.23.39 / Windows 2000 Pro (SP2 and update ok). Services : Apache and MySQL runs as services under 'toto' account. Note : i use apache with php module

    As written in http://www.mysql.com/doc/A/c/Access_denied.html, i've checked all my mySQL configuration and it seems good. I can log on my database with >mysql -u toto -p12345 titi and it works fine. as they said : "If you are able to connect using the mysql client, there is a problem with your program and not with the access privileges." Note : * select host,user from mysql.user gives (localhost,root) and (localhost,toto) * select host,db,user from db gives (localhost,toto,titi) [I've removed anonymous users and hosts that are not 'localhost']

    So look at the (very simple !) HTML/PHP : <html><head><title>try</title></head> <body> <?php $dbhost="localhost"; $dbuser="toto"; $dbpass="12345"; $dbname="titi"; $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die("bad Connection"); mysql_select_db($dbname,$conn) or die("titi database not found"); mysql_close($conn); ?> </body></html>

    and i have this message : "Warning: MySQL Connection Failed: Access denied for user: 'totolocalhost' (Using password: NO)"

    the only way to match this warning is to connect with mysql client without the password : >mysql -u toto titi "ERROR 1045: Access denied for user: 'dnd3elocalhost' (Using password: NO)" [If it was a password that doesn't match i should find at the end (Using password: YES), isn't it ? and with same parameters, the mysql client connect without problems]

    I conclude that PHP script connect without the password argument ! As it seems impossible, i ask on this list some help

    thanks for your help

    regards,

    rashkatsa

    attached mail follows:


    Hi, How can I change this error message to my own message? Warning: fopen("publico/d/bibliografia.html","w+") - No such file or directory

    attached mail follows:


    Eduardo Kokubo wrote: > Hi, > How can I change this error message to my own message? > Warning: fopen("publico/d/bibliografia.html","w+") - No such file or > directory

    There are two possibilities: 1) Use fopen() instead of fopen(). This will supress the error-output. If fopen returns false, you still know something went wrong. You don't know what went wrong, though (permission, file doesn't exist...). 2) Use output-buffering. This way, the error-message will not be sent to the browser but remain in the buffer. Just look into the buffer if there is an error and react. Also, you should erase the error-message from the buffer.

    regards Wagner

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

    attached mail follows:


    On Wed, Aug 15, 2001 at 02:08:39PM +0200, Alexander Wagner wrote: > Eduardo Kokubo wrote: > > Hi, > > How can I change this error message to my own message? > > Warning: fopen("publico/d/bibliografia.html","w+") - No such file or > > directory > > There are two possibilities: > 1) Use fopen() instead of fopen(). This will supress the error-output. > If fopen returns false, you still know something went wrong. You don't > know what went wrong, though (permission, file doesn't exist...). > 2) Use output-buffering. This way, the error-message will not be sent > to the browser but remain in the buffer. Just look into the buffer if > there is an error and react. Also, you should erase the error-message > from the buffer.

    3) Write your own error-handler: http://www.php.net/set_error_handler

    -- 
    

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