OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Thu Feb 15 2001 - 03:01:00 CST

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

    php-general Digest 15 Feb 2001 09:01:00 -0000 Issue 513

    Topics (messages 39740 through 39857):

    Re: gettimeofday() question
            39740 by: James Moore
            39791 by: CC Zona

    Re: Structuring large PHP programs
            39741 by: Ben Peter
            39743 by: Michael McGlothlin
            39751 by: Scott Mebberson
            39784 by: Joe Stump
            39787 by: Jonathan Sharp
            39792 by: Joe Stump
            39794 by: Michael Kimsal
            39811 by: Ben Peter
            39835 by: Joe Stump

    Re: XML parsing without the PHP4 XML functions
            39742 by: Michael McGlothlin

    PHP scripts in HTML
            39744 by: Don
            39748 by: Scott Mebberson
            39761 by: Brian V Bonini
            39842 by: Ankur Verma

    Re: Bad Practices
            39745 by: szii.sziisoft.com

    Up & Downloading
            39746 by: Steve Haemelinck
            39844 by: Ankur Verma

    Security...
            39747 by: John Vanderbeck

    uploading files
            39749 by: Scott Mebberson

    email.. (check this one out!)
            39750 by: FredrikAT
            39752 by: FredrikAT
            39754 by: Balak, Frank
            39759 by: Scott Mebberson
            39760 by: CC Zona

    Re: [PHP-DB] Passing vars
            39753 by: Tanya Brethour

    Re: PDF Functions
            39755 by: Mike Tuller
            39764 by: Chris Carbaugh
            39766 by: Tim Livers
            39770 by: Michael Stearne
            39776 by: Mike Tuller
            39781 by: Chris Carbaugh
            39783 by: Mike Tuller
            39802 by: Chris Carbaugh
            39837 by: Michael Stearne

    PHP 4 sessions and PHPLIB
            39756 by: Martin A. Marques

    Re: Environment Variables ???
            39757 by: Scott Mebberson

    Remote Connection
            39758 by: John Monfort

    Re: PHP Editors
            39762 by: John Hinsley

    help make less ugly?
            39763 by: Andrew
            39847 by: Ankur Verma

    (roberto)Standar of modules of PHP3 ...how i can make a extension in C/c++ for this version?
            39765 by: Celestino Roberto Alejandro

    Forms
            39767 by: Brandon Feldhahn
            39768 by: Augusto Cesar Castoldi

    Re: mcrypt!
            39769 by: Phillip Bow

    list only checkbox-marked records on a new page
            39771 by: Helmut Ott

    Restrict access per IP Address
            39772 by: Karl J. Stubsjoen
            39773 by: Michael Stearne
            39774 by: Mark Green
            39775 by: Alexander Wagner

    Re: Paging results
            39777 by: David Robley
            39841 by: Ankur Verma

    Re: PHP and Java (CVS version)
            39778 by: Alex Akilov

    Re: re:linebreak
            39779 by: Steve Werby

    Array question
            39780 by: Chris

    Re: need better solution
            39782 by: Christian Dechery

    error handling
            39785 by: Patrick Brown
            39788 by: David Robley
            39790 by: CC Zona
            39796 by: Patrick Brown

    Re: OOP in web development
            39786 by: Nold, Mark

    uploading files with just a string c:\temp\whatever.txt
            39789 by: Scott Mebberson
            39808 by: Scott Mebberson
            39809 by: Jason Murray
            39810 by: Timothy Aslat
            39812 by: Jason Murray
            39813 by: Scott Mebberson
            39823 by: Philip Olson
            39843 by: Christopher Ostmo

    Can I launch an external program from a php script?
            39793 by: Wyatt Earp
            39807 by: David Robley
            39814 by: Wyatt Earp

    Re: concatenating strings and \n's for mail...
            39795 by: 'Larry Rosenman'
            39797 by: CC Zona
            39806 by: 'Larry Rosenman'
            39840 by: Ankur Verma

    A little code here? :)
            39798 by: Dallas Kropka
            39799 by: Philip Olson
            39800 by: Dallas Kropka
            39848 by: Ankur Verma

    SELECT BLAH WHERE BLAH LIKE BLAH not working
            39801 by: Peter Houchin
            39805 by: CC Zona
            39815 by: Ben Peter
            39817 by: Peter Houchin
            39827 by: Ben Peter

    recommended PHP/MySQL host
            39803 by: Freemail
            39804 by: Timothy Aslat
            39826 by: Joe Sheble (Wizaerd)

    Re: apache & php
            39816 by: Ankur Verma

    Re: Help Work with files
            39818 by: Ankur Verma

    Re: date maniplations
            39819 by: Ankur Verma

    Re: Why???
            39820 by: Ankur Verma
            39821 by: Ankur Verma

    Re: Qoute problem
            39822 by: Ankur Verma
            39833 by: Ankur Verma
            39846 by: Terrence Wong

    php vs perl
            39824 by: Jeff
            39830 by: Jason Brooke
            39850 by: Scott Mebberson

    automatic php execution
            39825 by: Jeff
            39828 by: Philip Olson
            39853 by: Ankur Verma

    Re: how do I do file maintenance with PHP?
            39829 by: Ankur Verma

    deleting cart items on session expire
            39831 by: Joseph H Blythe
            39838 by: Jason Brooke
            39845 by: Christopher Ostmo
            39849 by: Jason Brooke
            39854 by: Ankur Verma

    Re: Access my script
            39832 by: Ankur Verma

    Re: Passing vars
            39834 by: Ankur Verma

    currency conversion
            39836 by: christian

    Re: Upload moves the file doesn't copy it..
            39839 by: Ankur Verma

    HTTP authentication
            39851 by: Thomas Edison Jr.

    Re: realpath() problem
            39852 by: Ankur Verma

    realpath() problem....
            39855 by: Dhaval Desai

    Re: Undocumented Socket functions?
            39856 by: Daniel Grace

    Specific PHP/JSP questions
            39857 by: Gerald Gutierrez

    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:


    > I need to be able to create files with unique names. One thought
    > I had was
    > to use the date functions. In windows API you can call a function that
    > returns the number of milliseconds since, I think its January 1,
    > 1970. That
    > number would pretty much be garunteed to be unuquie (although it could be
    > long, noone has to read these names).
    >
    > if I use the PHP gettimeofday() function and get the "usec" value, would
    > this be the same thing? The manual is unclear about what the usecs is in
    > reference to.

    Up until PHP 4.0.5 gettimeofday under windows is unreliable as a timing
    mechanism although this has now been fixed. Before PHP 4.0.5 PHP does return
    some sort of contrived usec value for the time, after PHP 4.0.5 it will
    return a value accurate to the nearest millisecond rather than microsecond.
    This should not really affect the randomness of the function that much and
    the interface from the PHP end is identical (usec value will be milliseconds
    not microseconds). I would suggest using somthing like

    srand((double)microtime()*1000000);
    $unique_id = md5(rand(0,32000));

    which is very effective for creating unique id's.

    James

    attached mail follows:


    In article <PJEKIAAHHNOGHIGKKJFDEEGHCGAA.jamesphpuk.org>, jamesphpuk.org
    ("James Moore") wrote:

    > I would suggest using somthing like
    >
    > srand((double)microtime()*1000000);
    > $unique_id = md5(rand(0,32000));
    >
    > which is very effective for creating unique id's.

    Or use uniqid()

    -- 
    CC
    

    attached mail follows:


    John,

    part of this is a matter of taste - I would personally rather split this into functions.

    BUT: even if you _are_ using functions, you should only include() the file with the function when you need it, IF this part of the code is getting large. This way, php will not need to parse code that it won't need anyway.

    Ben

    John McCreesh wrote: > > What is the best practice for structuring a PHP program which is > becoming too large to manage as a single file? Should it be broken into > a number of includes, e.g.: > > switch ($whatever) { > case 0: > include('case0.php'); > break; > case 1: > include('case1.php'); > break; > case 2: > include('case2.php'); > break; > } > > or a number of functions: > > require('mylib'); > switch ($whatever) { > case 0: > case0(); > break; > case 1: > case1(); > break; > case 2: > case3(); > break; > } > > Any thoughts, references to articles (couldn't find anything in > PHPBuilder), etc gratefully received... > > Thanks - John > > -- > 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'd go w/ functions. You can split the functions into as many files as needed but I wouldn't embed their inclusions in a switch statement. I'm not quite sure what you need the switch statement for so am assuming it's part of your applications logic. I'd never write a program as one giant clump of code. It should always be broken down into functions for easy growth and porting. :)

    John McCreesh wrote:

    > What is the best practice for structuring a PHP program which is > becoming too large to manage as a single file? Should it be broken into > a number of includes, e.g.: > > switch ($whatever) { > case 0: > include('case0.php'); > break; > case 1: > include('case1.php'); > break; > case 2: > include('case2.php'); > break; > } > > or a number of functions: > > require('mylib'); > switch ($whatever) { > case 0: > case0(); > break; > case 1: > case1(); > break; > case 2: > case3(); > break; > } > > Any thoughts, references to articles (couldn't find anything in > PHPBuilder), etc gratefully received... > > Thanks - John >

    attached mail follows:


    I would use a combination of both,

    Have all of your backend settings (including db info) in one include, and all of your user customisable settings (if you have any) in another include and finally another include for all your functions, so that any function is aviable at anytime.

    But this doesn't mean that you need to have three include() statements at the top of your page. Simply make refference to require('settings.inc'); then in this settings.inc file maintain all of your other includes to files. This way if you want to create another include, all you have to do is add it to settings.inc and then it is inlcuded in everyfile that settings.inc is included in!

    Scott Mebberson Redblue Design

    "John McCreesh" <john.mccreeshnospam.cwcom.net> wrote in message news:eNY9OHApmui6EwjKharlawroad.freeserve.co.uk... > What is the best practice for structuring a PHP program which is > becoming too large to manage as a single file? Should it be broken into > a number of includes, e.g.: > > switch ($whatever) { > case 0: > include('case0.php'); > break; > case 1: > include('case1.php'); > break; > case 2: > include('case2.php'); > break; > } > > or a number of functions: > > require('mylib'); > switch ($whatever) { > case 0: > case0(); > break; > case 1: > case1(); > break; > case 2: > case3(); > break; > } > > Any thoughts, references to articles (couldn't find anything in > PHPBuilder), etc gratefully received... > > Thanks - John > > -- > 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:


    The way I normally do it is I have ONE main include (usually init.inc) and then all files that I might need throught my page I put in init.inc

    I works nicely for me.

    --Joe

    On Wed, Feb 14, 2001 at 09:15:35PM +0100, Ben Peter wrote: > John, > > part of this is a matter of taste - I would personally rather split this > into functions. > > BUT: even if you _are_ using functions, you should only include() the > file with the function when you need it, IF this part of the code is > getting large. This way, php will not need to parse code that it won't > need anyway. > > Ben > > > John McCreesh wrote: > > > > What is the best practice for structuring a PHP program which is > > becoming too large to manage as a single file? Should it be broken into > > a number of includes, e.g.: > > > > switch ($whatever) { > > case 0: > > include('case0.php'); > > break; > > case 1: > > include('case1.php'); > > break; > > case 2: > > include('case2.php'); > > break; > > } > > > > or a number of functions: > > > > require('mylib'); > > switch ($whatever) { > > case 0: > > case0(); > > break; > > case 1: > > case1(); > > break; > > case 2: > > case3(); > > break; > > } > > > > Any thoughts, references to articles (couldn't find anything in > > PHPBuilder), etc gratefully received... > > > > Thanks - John > > > > -- > > 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

    -- 
    

    ------------------------------------------------------------------------------- Joe Stump, PHP Hacker, joestump98yahoo.com -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V -------------------------------------------------------------------------------

    attached mail follows:


    do you include EVERY file in init.inc even if that script doesn't use it? So if you have a db.inc and it doesn't use the db at all...is it included?

    -Jonathan

    > -----Original Message----- > From: Joe Stump [mailto:jstumpzebulon.miester.org] > Sent: Wednesday, February 14, 2001 5:11 PM > To: Ben Peter > Cc: John McCreesh; php-generallists.php.net > Subject: Re: [PHP] Structuring large PHP programs > > > The way I normally do it is I have ONE main include (usually init.inc) > and then all files that I might need throught my page I put in init.inc > > I works nicely for me. > > --Joe > > On Wed, Feb 14, 2001 at 09:15:35PM +0100, Ben Peter wrote: > > John, > > > > part of this is a matter of taste - I would personally rather split this > > into functions. > > > > BUT: even if you _are_ using functions, you should only include() the > > file with the function when you need it, IF this part of the code is > > getting large. This way, php will not need to parse code that it won't > > need anyway. > > > > Ben > > > > > > John McCreesh wrote: > > > > > > What is the best practice for structuring a PHP program which is > > > becoming too large to manage as a single file? Should it be > broken into > > > a number of includes, e.g.: > > > > > > switch ($whatever) { > > > case 0: > > > include('case0.php'); > > > break; > > > case 1: > > > include('case1.php'); > > > break; > > > case 2: > > > include('case2.php'); > > > break; > > > } > > > > > > or a number of functions: > > > > > > require('mylib'); > > > switch ($whatever) { > > > case 0: > > > case0(); > > > break; > > > case 1: > > > case1(); > > > break; > > > case 2: > > > case3(); > > > break; > > > } > > > > > > Any thoughts, references to articles (couldn't find anything in > > > PHPBuilder), etc gratefully received... > > > > > > Thanks - John > > > > > > -- > > > 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 > > -- > > ------------------------------------------------------------------ > ------------- > Joe Stump, PHP Hacker, joestump98yahoo.com > -o) > http://www.miester.org http://www.care2.com > /\\ > "It's not enough to succeed. Everyone else must fail" -- Larry > Ellison _\_V > ------------------------------------------------------------------ > ------------- > > > -- > 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:


    Normally, yes. The chances of a page NOT accessing the db is slim at best. I generally keep them there because the speed lost on parsing function definitions is minute and I don't have to worry about including numerous files in each page - or worse going through 100's of pages and adding an include I need when I add new functionality!

    --Joe

    On Wed, Feb 14, 2001 at 05:16:52PM -0800, Jonathan Sharp wrote: > do you include EVERY file in init.inc even if that script doesn't use it? So > if you have a db.inc and it doesn't use the db at all...is it included? > > -Jonathan > > > -----Original Message----- > > From: Joe Stump [mailto:jstumpzebulon.miester.org] > > Sent: Wednesday, February 14, 2001 5:11 PM > > To: Ben Peter > > Cc: John McCreesh; php-generallists.php.net > > Subject: Re: [PHP] Structuring large PHP programs > > > > > > The way I normally do it is I have ONE main include (usually init.inc) > > and then all files that I might need throught my page I put in init.inc > > > > I works nicely for me. > > > > --Joe > > > > On Wed, Feb 14, 2001 at 09:15:35PM +0100, Ben Peter wrote: > > > John, > > > > > > part of this is a matter of taste - I would personally rather split this > > > into functions. > > > > > > BUT: even if you _are_ using functions, you should only include() the > > > file with the function when you need it, IF this part of the code is > > > getting large. This way, php will not need to parse code that it won't > > > need anyway. > > > > > > Ben > > > > > > > > > John McCreesh wrote: > > > > > > > > What is the best practice for structuring a PHP program which is > > > > becoming too large to manage as a single file? Should it be > > broken into > > > > a number of includes, e.g.: > > > > > > > > switch ($whatever) { > > > > case 0: > > > > include('case0.php'); > > > > break; > > > > case 1: > > > > include('case1.php'); > > > > break; > > > > case 2: > > > > include('case2.php'); > > > > break; > > > > } > > > > > > > > or a number of functions: > > > > > > > > require('mylib'); > > > > switch ($whatever) { > > > > case 0: > > > > case0(); > > > > break; > > > > case 1: > > > > case1(); > > > > break; > > > > case 2: > > > > case3(); > > > > break; > > > > } > > > > > > > > Any thoughts, references to articles (couldn't find anything in > > > > PHPBuilder), etc gratefully received... > > > > > > > > Thanks - John > > > > > > > > -- > > > > 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 > > > > -- > > > > ------------------------------------------------------------------ > > ------------- > > Joe Stump, PHP Hacker, joestump98yahoo.com > > -o) > > http://www.miester.org http://www.care2.com > > /\\ > > "It's not enough to succeed. Everyone else must fail" -- Larry > > Ellison _\_V > > ------------------------------------------------------------------ > > ------------- > > > > > > -- > > 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 > > > > >

    -- 
    

    ------------------------------------------------------------------------------- Joe Stump, PHP Hacker, joestump98yahoo.com -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V -------------------------------------------------------------------------------

    attached mail follows:


    Any particular reason you don't do something like:

    $whatever="blah"; include($whatever);

    This eliminates the need for potentially dozens of case/switch statements.

    If you're interested, we're developing a more structured way of handling this with classes, and I could demonstrate some of this to you and/or send you code examples.

    John McCreesh wrote:

    > What is the best practice for structuring a PHP program which is > becoming too large to manage as a single file? Should it be broken into > a number of includes, e.g.: > > switch ($whatever) { > case 0: > include('case0.php'); > break; > case 1: > include('case1.php'); > break; > case 2: > include('case2.php'); > break; > } > > or a number of functions: > > require('mylib'); > switch ($whatever) { > case 0: > case0(); > break; > case 1: > case1(); > break; > case 2: > case3(); > break; > } > > Any thoughts, references to articles (couldn't find anything in > PHPBuilder), etc gratefully received... > > Thanks - John > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Hi Joe,

    the reason I changed to 'include on demand' was a rather large application which would not work, as the memory limit that my isp had set wouldn't suffice.

    I have files that are included all the way, yes: DB connection, some common helpers, etc. But I would not include files that the current state of an application (or part of the site) does not need to keep things small. This is especially true for some classes which before included both user access and 'admin' function (for, say, user authentication and administration). I split all of these up into two classes, so that the part that is accessed when a regular user hits the site is minimal, and the administrative functions won't be loaded in that case.

    Ben

    Joe Stump wrote: > > Normally, yes. The chances of a page NOT accessing the db is slim at best. I > generally keep them there because the speed lost on parsing function > definitions is minute and I don't have to worry about including numerous > files in each page - or worse going through 100's of pages and adding an > include I need when I add new functionality! > > --Joe > > On Wed, Feb 14, 2001 at 05:16:52PM -0800, Jonathan Sharp wrote: > > do you include EVERY file in init.inc even if that script doesn't use it? So > > if you have a db.inc and it doesn't use the db at all...is it included? > > > > -Jonathan > > > > > -----Original Message----- > > > From: Joe Stump [mailto:jstumpzebulon.miester.org] > > > Sent: Wednesday, February 14, 2001 5:11 PM > > > To: Ben Peter > > > Cc: John McCreesh; php-generallists.php.net > > > Subject: Re: [PHP] Structuring large PHP programs > > > > > > > > > The way I normally do it is I have ONE main include (usually init.inc) > > > and then all files that I might need throught my page I put in init.inc > > > > > > I works nicely for me. > > > > > > --Joe > > > > > > On Wed, Feb 14, 2001 at 09:15:35PM +0100, Ben Peter wrote: > > > > John, > > > > > > > > part of this is a matter of taste - I would personally rather split this > > > > into functions. > > > > > > > > BUT: even if you _are_ using functions, you should only include() the > > > > file with the function when you need it, IF this part of the code is > > > > getting large. This way, php will not need to parse code that it won't > > > > need anyway. > > > > > > > > Ben > > > > > > > > > > > > John McCreesh wrote: > > > > > > > > > > What is the best practice for structuring a PHP program which is > > > > > becoming too large to manage as a single file? Should it be > > > broken into > > > > > a number of includes, e.g.: > > > > > > > > > > switch ($whatever) { > > > > > case 0: > > > > > include('case0.php'); > > > > > break; > > > > > case 1: > > > > > include('case1.php'); > > > > > break; > > > > > case 2: > > > > > include('case2.php'); > > > > > break; > > > > > } > > > > > > > > > > or a number of functions: > > > > > > > > > > require('mylib'); > > > > > switch ($whatever) { > > > > > case 0: > > > > > case0(); > > > > > break; > > > > > case 1: > > > > > case1(); > > > > > break; > > > > > case 2: > > > > > case3(); > > > > > break; > > > > > } > > > > > > > > > > Any thoughts, references to articles (couldn't find anything in > > > > > PHPBuilder), etc gratefully received... > > > > > > > > > > Thanks - John > > > > > > > > > > -- > > > > > 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 > > > > > > -- > > > > > > ------------------------------------------------------------------ > > > ------------- > > > Joe Stump, PHP Hacker, joestump98yahoo.com > > > -o) > > > http://www.miester.org http://www.care2.com > > > /\\ > > > "It's not enough to succeed. Everyone else must fail" -- Larry > > > Ellison _\_V > > > ------------------------------------------------------------------ > > > ------------- > > > > > > > > > -- > > > 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 > > > > > > > > > > -- > > ------------------------------------------------------------------------------- > Joe Stump, PHP Hacker, joestump98yahoo.com -o) > http://www.miester.org http://www.care2.com /\\ > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V > ------------------------------------------------------------------------------- > > -- > 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:


    Declaring the functions is minimal. Either your ISP has the memory allocations set unbearably low or you aren't coding things very well ...

    --Joe

    On Thu, Feb 15, 2001 at 04:16:22AM +0100, Ben Peter wrote: > Hi Joe, > > the reason I changed to 'include on demand' was a rather large > application which would not work, as the memory limit that my isp had > set wouldn't suffice. > > I have files that are included all the way, yes: DB connection, some > common helpers, etc. But I would not include files that the current > state of an application (or part of the site) does not need to keep > things small. > This is especially true for some classes which before included both user > access and 'admin' function (for, say, user authentication and > administration). I split all of these up into two classes, so that the > part that is accessed when a regular user hits the site is minimal, and > the administrative functions won't be loaded in that case. > > Ben > > Joe Stump wrote: > > > > Normally, yes. The chances of a page NOT accessing the db is slim at best. I > > generally keep them there because the speed lost on parsing function > > definitions is minute and I don't have to worry about including numerous > > files in each page - or worse going through 100's of pages and adding an > > include I need when I add new functionality! > > > > --Joe > > > > On Wed, Feb 14, 2001 at 05:16:52PM -0800, Jonathan Sharp wrote: > > > do you include EVERY file in init.inc even if that script doesn't use it? So > > > if you have a db.inc and it doesn't use the db at all...is it included? > > > > > > -Jonathan > > > > > > > -----Original Message----- > > > > From: Joe Stump [mailto:jstumpzebulon.miester.org] > > > > Sent: Wednesday, February 14, 2001 5:11 PM > > > > To: Ben Peter > > > > Cc: John McCreesh; php-generallists.php.net > > > > Subject: Re: [PHP] Structuring large PHP programs > > > > > > > > > > > > The way I normally do it is I have ONE main include (usually init.inc) > > > > and then all files that I might need throught my page I put in init.inc > > > > > > > > I works nicely for me. > > > > > > > > --Joe > > > > > > > > On Wed, Feb 14, 2001 at 09:15:35PM +0100, Ben Peter wrote: > > > > > John, > > > > > > > > > > part of this is a matter of taste - I would personally rather split this > > > > > into functions. > > > > > > > > > > BUT: even if you _are_ using functions, you should only include() the > > > > > file with the function when you need it, IF this part of the code is > > > > > getting large. This way, php will not need to parse code that it won't > > > > > need anyway. > > > > > > > > > > Ben > > > > > > > > > > > > > > > John McCreesh wrote: > > > > > > > > > > > > What is the best practice for structuring a PHP program which is > > > > > > becoming too large to manage as a single file? Should it be > > > > broken into > > > > > > a number of includes, e.g.: > > > > > > > > > > > > switch ($whatever) { > > > > > > case 0: > > > > > > include('case0.php'); > > > > > > break; > > > > > > case 1: > > > > > > include('case1.php'); > > > > > > break; > > > > > > case 2: > > > > > > include('case2.php'); > > > > > > break; > > > > > > } > > > > > > > > > > > > or a number of functions: > > > > > > > > > > > > require('mylib'); > > > > > > switch ($whatever) { > > > > > > case 0: > > > > > > case0(); > > > > > > break; > > > > > > case 1: > > > > > > case1(); > > > > > > break; > > > > > > case 2: > > > > > > case3(); > > > > > > break; > > > > > > } > > > > > > > > > > > > Any thoughts, references to articles (couldn't find anything in > > > > > > PHPBuilder), etc gratefully received... > > > > > > > > > > > > Thanks - John > > > > > > > > > > > > -- > > > > > > 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 > > > > > > > > -- > > > > > > > > ------------------------------------------------------------------ > > > > ------------- > > > > Joe Stump, PHP Hacker, joestump98yahoo.com > > > > -o) > > > > http://www.miester.org http://www.care2.com > > > > /\\ > > > > "It's not enough to succeed. Everyone else must fail" -- Larry > > > > Ellison _\_V > > > > ------------------------------------------------------------------ > > > > ------------- > > > > > > > > > > > > -- > > > > 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 > > > > > > > > > > > > > > > -- > > > > ------------------------------------------------------------------------------- > > Joe Stump, PHP Hacker, joestump98yahoo.com -o) > > http://www.miester.org http://www.care2.com /\\ > > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V > > ------------------------------------------------------------------------------- > > > > -- > > 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

    -- 
    

    ------------------------------------------------------------------------------- Joe Stump, PHP Hacker, joestump98yahoo.com -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V -------------------------------------------------------------------------------

    attached mail follows:


    I haven't done this in PHP as PHP comes w/ XML support but times past when I needed a fast way to parse something like that and knew the format would be simple I'd usually do something like make a function that knows all the possible splits w/in a layer (ie items are w/in the faq layer if they can occur inside faq tags) and then just recursively explode the string parts based on all know tags for that layer and build a nested array or prehaps nested objects. That is probably the simplist way if you don't want to mess w/ real parsing.

    If you have Unix access you might see if you can use Perl or a helper app to parse it into an easier to work w/ format.

    Stefen Lars wrote:

    > Hello all > > I have recently been assigned the task of parsing an xml file and > format the contents of the file in HTML. The xml file lies on another > server. Our web space provider does not provide the XML functions (nor > is he willing to install them) :-gr. > > I am sure that I am not the only who has come across this problem. > > Would someone have already created a few functions to parse xml that > they are willing to share? > > I have the following structure to deal with: > > <faq> > <item> > <product>ProductName</product> > <question>Why does it not work</question> > <answer>Because it is not turned on<answer> > <item> > </faq> > > There are whole load of <item>s in the file. > > I then want to display the contents a bit like this: > > echo $product; > echo $question; > > etc (of course with some HTML formatting, like a bulleted list). > > Any help would be really VERY appreciated! > > Thanks > > S > > > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > >

    attached mail follows:


    I would like to know if there is a way to accomplish the following: In my HTML file, I have the following:

    <script language="php" src="/phpscript/testscript.php"></script>

    In the testscript.php file, I have:

    <?PHP echo "Hello Don"; echo "What is up?"; ?>

    When I run the html file, I do not see the PHP code but if I place the above code directly in my HTML file, it displays.

    attached mail follows:


    Hi Don,

    This wont work as PHP is a server side scripting language. So by the time your page gets displayed in a browser, php has already packed up and gone home. It has done it's job and exited your page.

    For your webserver to recognise php it must be incompessed in <?php ?> tags, or <? ?>. This is so your webserver knows when to start up php (so to speak).

    Inserting the <script...> statement like you did is to late, because all of the information has already be passed to the browser and php can't write any more information to the page.

    Hope this helps.

    "Don" <donlclcan.com> wrote in message news:3A8AF881.D6F3406Flclcan.com... > I would like to know if there is a way to accomplish the following: > In my HTML file, I have the following: > > <script language="php" src="/phpscript/testscript.php"></script> > > In the testscript.php file, I have: > > <?PHP > echo "Hello Don"; > echo "What is up?"; > ?> > > When I run the html file, I do not see the PHP code but if I place the > above code directly in my HTML file, it displays. > > > -- > 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:


    Don,

    Why don't you just rename your .html file to .php and use 'include' to call an external php script.

    -brian ********* > -----Original Message----- > From: Scott Mebberson [mailto:scottredbluedesign.com] > Sent: Wednesday, February 14, 2001 4:47 PM > To: php-generallists.php.net > Subject: Re: [PHP] PHP scripts in HTML > > > Hi Don, > > This wont work as PHP is a server side scripting language. So by the time > your page gets displayed in a browser, php has already packed up and gone > home. It has done it's job and exited your page. > > For your webserver to recognise php it must be incompessed in > <?php ?> tags, > or <? ?>. This is so your webserver knows when to start up php (so to > speak). > > Inserting the <script...> statement like you did is to late, > because all of > the information has already be passed to the browser and php > can't write any > more information to the page. > > Hope this helps. > > > "Don" <donlclcan.com> wrote in message > news:3A8AF881.D6F3406Flclcan.com... > > I would like to know if there is a way to accomplish the following: > > In my HTML file, I have the following: > > > > <script language="php" src="/phpscript/testscript.php"></script> > > > > In the testscript.php file, I have: > > > > <?PHP > > echo "Hello Don"; > > echo "What is up?"; > > ?> > > > > When I run the html file, I do not see the PHP code but if I place the > > above code directly in my HTML file, it displays. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    you should use include() function instead of the javascript style includes

    refer to the php manual for more details

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Don" <donlclcan.com> To: "php list" <php-generallists.php.net> Sent: Thursday, February 15, 2001 2:58 AM Subject: [PHP] PHP scripts in HTML

    > I would like to know if there is a way to accomplish the following: > In my HTML file, I have the following: > > <script language="php" src="/phpscript/testscript.php"></script> > > In the testscript.php file, I have: > > <?PHP > echo "Hello Don"; > echo "What is up?"; > ?> > > When I run the html file, I do not see the PHP code but if I place the > above code directly in my HTML file, it displays. > > > -- > 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 told Apache to deny all .inc requets, ala .htaccess-style stuff in the httpd.conf

    -Szii

    ----- Original Message ----- From: Sebastian Stadtlich <Stadtlichmediaworx.com> To: 'Rick Hodger' <rickdomainsbuy.com>; 'Php-General (E-Mail) <php-generallists.php.net> Sent: Wednesday, February 14, 2001 4:45 AM Subject: AW: [PHP] Bad Practices

    > OR you could tell apache to parse everything that ends with .inc with php. > you can name it .inc .linux .linuxsucks .microsoftsucks > > (you'll need to have access to http.conf or .htaccess+right to override ...) > > sebastian > > > -----Ursprüngliche Nachricht----- > > Von: Rick Hodger [mailto:rickdomainsbuy.com] > > Gesendet: Mittwoch, 14. Februar 2001 09:51 > > An: php-generallists.php.net > > Betreff: Re: [PHP] Bad Practices > > > > > > > > "Jeff Oien" <jeffwebdesigns1.com> wrote in message > > news:NDBBJKNCILKDCEGAJBAOAEADDDAA.jeffwebdesigns1.com... > > > Would people like to list bad practices and also point us > > > newbies to any articles online dealing with syntax, correct > > > use of single and double quotes etc.? > > > > People who create scripts that include a need for access to a > > SQL database, > > meaning you need to give it a username and password then > > making the damn > > configuration file be called something stupid like config.inc. > > > > When you are scripting, using anything with a .inc extension > > is just asking > > for trouble. If someone requests that file, it'll get passed > > straight to > > them. It's a .inc, which means that PHP does not know to > > parse it. Which > > means, that person can see your usernames and passwords. And > > because it's a > > public package, they're far more likely to know the path to said file. > > > > -- > > Rick Hodger > > > > > > > > -- > > 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:


    Dos anybody has an idea how I can monitor uploads (Time, Size) and Downloads to and From my server with PHP ?

    Steve

    attached mail follows:


    take a look at the php file managers at hotscripts.com

    http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/

    they might have the functionality that you are looking for. if not, it should be easy enough to make the changes so as to support the desired functionality.

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Steve Haemelinck" <steve.haemelinckpandora.be> To: "PHP Mailing Listl (E-mail)" <php-generallists.php.net> Sent: Thursday, February 15, 2001 3:05 AM Subject: [PHP] Up & Downloading

    > Dos anybody has an idea how I can monitor uploads (Time, Size) and Downloads > to and From my server with PHP ? > > Steve > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Can someone point me to an url where I can read up and learn about how to be sure my back-end admin scripts will all be secure? My site isn't even open yet and I am already seeing access atempts to non-existant CGI scripts. A good friend of mine says it looks like the pattern hackers use to try and gain access. And i'm not even open yet! So I want to make SURE my PHP back-end will be as secure as I can make it.

    - John Vanderbeck - Admin, GameDesign

    attached mail follows:


    Hi Guys,

    From your experiences, please answer my questions relating to uploading files.

    Can you get php to upload an image if you have the direct location of the file (ie. c:\bar\foo\bar\foobar.jpg), but the only thing is that I am not getting this from a form file input with the ENCTYPE of the form set to "multipart/form-data". I am getting the location from a string that is open from a file.

    Is it still possbile? Also, is there anyway around this??

    Thanks

    Scott Mebberson scottredbluedesign.com

    attached mail follows:


    Hi!

    I want to send a email usin' email() (plain text!), but I have a problem.

    What i want to send! $email_body = "This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, ";

    I want to output it something like this: This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing,

    (Can I do that without using HTML? Is there a php-function to set width?)

    --------------------------------- Fredrik A. Takle fredriktakle.net

    attached mail follows:


    I explained my problem badly in the last message... What I want to send is written without <br> and \n...

    I want to set like a column width or something.... but without using HTML in my email...

    Anyone?

    ""FredrikAT"" <ftakleonline.no> skrev i melding news:96eu04$uef$1toye.p.sourceforge.net... > Hi! > > I want to send a email usin' email() (plain text!), but I have a problem. > > What i want to send! > $email_body = "This is just nothing, This is just nothing, This is just > nothing, This is just nothing, This is just nothing, This is just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, This is just nothing, This is just nothing, This is just > nothing, This is just nothing, This is just nothing, This is just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, This is just nothing, This is just nothing, This is just > nothing, This is just nothing, "; > > I want to output it something like this: > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > > (Can I do that without using HTML? Is there a php-function to set width?) > > --------------------------------- > Fredrik A. Takle > fredriktakle.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:


    use a \n (newline character) in your string where you want the break.

    Frank ------------------------------ Franklin J. Balak Jr. Quality Assurance Data Analyst Brown Printing Company Waseca Division Waseca, MN. 56093 Voice: 507-835-0253 Fax: 507-835-0293 ------------------------------

    -----Original Message----- From: FredrikAT [mailto:ftakleonline.no] Sent: Wednesday, February 14, 2001 15:45 To: php-generallists.php.net Subject: [PHP] email.. (check this one out!)

    Hi!

    I want to send a email usin' email() (plain text!), but I have a problem.

    What i want to send! $email_body = "This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, ";

    I want to output it something like this: This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing, This is just nothing,

    (Can I do that without using HTML? Is there a php-function to set width?)

    --------------------------------- Fredrik A. Takle fredriktakle.net

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

    attached mail follows:


    Try to write some substr loop thats get the line and splits it up into 100 words then concenates all of the value you split with a \n in between

    ""FredrikAT"" <ftakleonline.no> wrote in message news:96eu04$uef$1toye.p.sourceforge.net... > Hi! > > I want to send a email usin' email() (plain text!), but I have a problem. > > What i want to send! > $email_body = "This is just nothing, This is just nothing, This is just > nothing, This is just nothing, This is just nothing, This is just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, This is just nothing, This is just nothing, This is just > nothing, This is just nothing, This is just nothing, This is just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, This is just nothing, This is just nothing, This is just > nothing, This is just nothing, "; > > I want to output it something like this: > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > This is just nothing, This is just nothing, This is just nothing, This is > just nothing, > > (Can I do that without using HTML? Is there a php-function to set width?) > > --------------------------------- > Fredrik A. Takle > fredriktakle.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    In article <96euan$6g8$1toye.p.sourceforge.net>, ftakleonline.no ("FredrikAT") wrote:

    > I want to set like a column width or something.... but without using HTML in > my email...

    There's a wordwrap() function--is that what you mean?

    <http://php.net/manual/en/function.wordwrap.php>

    -- 
    CC
    

    attached mail follows:


    Yes.. the problem with the hidden method.. is the following.

    Let says I use the string "Testing the \"waters\" "

    Now.. if I do a <input type=hidden value="<?echo $var?>"> the qoutes in my string do not escape correctly. So when you look at the source in netscape.. it ends the string at \ ... just before the first qoute.

    So.. is there any other way besides those two methods? Can I pass a object through the URL?

    -Tanya

    On Wed, 14 Feb 2001, Maureen wrote:

    > I may be totally wrong or missing something, (if so, someone please let > me know) but ... > > 1. One way would be to use the variables and urlencode them before > passing them. > $var1=urlencode($var1) > then you have test.php?cheese="<?echo $var1?>" > > OR > > 2. Another way would be to use a form: > <form method=post action="test.php"> > > and then add the 6 variables as > > <input type=hidden name="var1" value="<?echo $var1?>"> > <input type=hidden name="var2" value="<?echo $var2?>"> > <input type=hidden name="var3" value="<?echo $var3?>"> > <input type=hidden name="var4" value="<?echo $var4?>"> > <input type=hidden name="var5" value="<?echo $var5?>"> > <input type=hidden name="var6" value="<?echo $var6?>"> > > and then have a submit button to take you to the next page. > > Tanya Brethour wrote: > > > Quick question.. > > > > If I have like 6 variables to pass to another PHP script... and some of > > the vars are actually multiple lines of text (lets say over 30 lines). > > What is the best way of doing this? > > > > I would like to avoid doing something like test.php?cheese=(30 lines of > > stuff) > > > > Thanks in advance! > > -Tanya >

    attached mail follows:


    The reason why I needed the RPM is because no matter what I tried, I couldn't get PHP to compile for the Apache rpm on Redhat 7. If at all possible, I like to use the rpms so that they can be easily updated.

    I have done everything everyone has suggested, and I still get an error. I have even compiled PHP and still I can't use PDFlib. What next?

    Here is the updated config script that I used.

    ./configure --prefix=/usr --with-config-file-path=/etc --disable-debug --enable-pic --enable-shared --enable-inline-optimization --with-apxs=/usr/sbin/apxs --with-exec-dir=/usr/bin --with-regex=system --with-gettext --with-gd --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm --enable-debugger --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-yp --enable-ftp --enable-wddx --with-mysql --with-xml --with-pdflib=/usr/local/lib --with-tiff

    > From: Chris Carbaugh <cjtech2000yahoo.com> > Reply-To: cjtech2000yahoo.com > Date: Wed, 14 Feb 2001 15:08:02 EST > To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > <php-generallists.php.net> > Subject: Re: [PHP] PDF Functions > > > How about in /etc/ld.so.conf you make sure /usr/lib is in there. > > Then run /sbin/ldconfig. > > Also, why bother with the source RPM? I would rather just get the > source tarball direct from PHP.net and run with it. > > Chris > > On Wed, 14 Feb 2001, Mike Tuller wrote: >> Date: Wed, 14 Feb 2001 12:07:50 -0600 >> To: php mailing list <php-generallists.php.net> >> From: Mike Tuller <mitull01willy.wsc.edu> >> Subject: [PHP] PDF Functions >> >> I finally got everything to install on RedHat 7, but I can't do >> anything >> with pdflib like I had expected. >> >> I get back Fatal error: Call to undefined function: pdf_new() in >> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = PDF_new(); >> >> This is rather frustrating that every time I try to install PHP on a >> machine >> it takes me a week to get it going. >> >> Here is what I have for the config from the srpm after modification >> as >> instructed earlier. >> >> ../configure \ >> --prefix=%{_prefix} \ >> --with-config-file-path=%{_sysconfdir} \ >> --disable-debug \ >> --enable-pic \ >> --enable-shared \ >> --enable-inline-optimization \ >> $* \ >> --with-exec-dir=%{_bindir} \ >> --with-regex=system \ >> --with-gettext \ >> --with-gd \ >> --with-jpeg-dir=%{_prefix} \ >> --with-png \ >> --with-zlib \ >> --with-gdbm \ >> --enable-debugger \ >> --enable-magic-quotes \ >> --enable-safe-mode \ >> --enable-sockets \ >> --enable-sysvsem \ >> --enable-sysvshm \ >> --enable-track-vars \ >> --enable-yp \ >> --enable-ftp \ >> --enable-wddx \ >> --with-mysql \ >> --with-xml \ >> --with-pdflib=/usr/lib/lipdf.so.0 \ >> --with-tiff >> >> Can someone look at this and tell me what else I need to put in to >> get this >> to work? >> >> Mike >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >> For additional commands, e-mail: php-general-helplists.php.net >> To contact the list administrators, e-mail: >> php-list-adminlists.php.net >> > > -- > 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's the steps I would take:

    ditch all those configure options except the ones needed to keep PDF functions working.

    Maybe even just ./configure --with-pdflib=/usr/local/lib, and test it out as a stand alone exec.

    If that fails, ditch the RPMs. Get the source for apache, php, pdflib, and whatever else you need.

    I have had problems in the past with RedHat's RPMs. They seem to put things in weird places. And just removing them and starting fresh with source always seems to work. Besides, once you have built from source a few times, it's really a piece of cake, and much less frustrating than screwing with RPMs.

    Chris

    On Wed, 14 Feb 2001, Mike Tuller wrote: > Date: Wed, 14 Feb 2001 15:49:44 -0600 > To: <cjtech2000yahoo.com>, php mailing list > <php-generallists.php.net> > From: Mike Tuller <mitull01willy.wsc.edu> > Subject: Re: [PHP] PDF Functions > > The reason why I needed the RPM is because no matter what I tried, I > couldn't get PHP to compile for the Apache rpm on Redhat 7. If at all > possible, I like to use the rpms so that they can be easily updated. > > I have done everything everyone has suggested, and I still get an > error. I > have even compiled PHP and still I can't use PDFlib. What next? > > Here is the updated config script that I used. > > ./configure --prefix=/usr --with-config-file-path=/etc > --disable-debug --enable-pic --enable-shared > --enable-inline-optimization --with-apxs=/usr/sbin/apxs > --with-exec-dir=/usr/bin --with-regex=system --with-gettext > --with-gd > --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm > --enable-debugger --enable-magic-quotes --enable-safe-mode > --enable-sockets --enable-sysvsem --enable-sysvshm > --enable-track-vars > --enable-yp --enable-ftp --enable-wddx --with-mysql > --with-xml > --with-pdflib=/usr/local/lib --with-tiff > > > > From: Chris Carbaugh <cjtech2000yahoo.com> > > Reply-To: cjtech2000yahoo.com > > Date: Wed, 14 Feb 2001 15:08:02 EST > > To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > > <php-generallists.php.net> > > Subject: Re: [PHP] PDF Functions > > > > > > How about in /etc/ld.so.conf you make sure /usr/lib is in there. > > > > Then run /sbin/ldconfig. > > > > Also, why bother with the source RPM? I would rather just get the > > source tarball direct from PHP.net and run with it. > > > > Chris > > > > On Wed, 14 Feb 2001, Mike Tuller wrote: > >> Date: Wed, 14 Feb 2001 12:07:50 -0600 > >> To: php mailing list <php-generallists.php.net> > >> From: Mike Tuller <mitull01willy.wsc.edu> > >> Subject: [PHP] PDF Functions > >> > >> I finally got everything to install on RedHat 7, but I can't do > >> anything > >> with pdflib like I had expected. > >> > >> I get back Fatal error: Call to undefined function: pdf_new() in > >> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = PDF_new(); > >> > >> This is rather frustrating that every time I try to install PHP on > a > >> machine > >> it takes me a week to get it going. > >> > >> Here is what I have for the config from the srpm after > modification > >> as > >> instructed earlier. > >> > >> ../configure \ > >> --prefix=%{_prefix} \ > >> --with-config-file-path=%{_sysconfdir} \ > >> --disable-debug \ > >> --enable-pic \ > >> --enable-shared \ > >> --enable-inline-optimization \ > >> $* \ > >> --with-exec-dir=%{_bindir} \ > >> --with-regex=system \ > >> --with-gettext \ > >> --with-gd \ > >> --with-jpeg-dir=%{_prefix} \ > >> --with-png \ > >> --with-zlib \ > >> --with-gdbm \ > >> --enable-debugger \ > >> --enable-magic-quotes \ > >> --enable-safe-mode \ > >> --enable-sockets \ > >> --enable-sysvsem \ > >> --enable-sysvshm \ > >> --enable-track-vars \ > >> --enable-yp \ > >> --enable-ftp \ > >> --enable-wddx \ > >> --with-mysql \ > >> --with-xml \ > >> --with-pdflib=/usr/lib/lipdf.so.0 \ > >> --with-tiff > >> > >> Can someone look at this and tell me what else I need to put in to > >> get this > >> to work? > >> > >> Mike > >> > >> > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >> For additional commands, e-mail: php-general-helplists.php.net > >> To contact the list administrators, e-mail: > >> php-list-adminlists.php.net > >> > > > > -- > > 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:


    Here are the directions I used to configure PHP with pdflib. These worked for me.

    http://www.phpbuilder.net/columns/perugini20001026.php3?page=2

    Tim

    Mike Tuller wrote:

    > I finally got everything to install on RedHat 7, but I can't do anything > with pdflib like I had expected. > > I get back Fatal error: Call to undefined function: pdf_new() in > /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = PDF_new(); > > This is rather frustrating that every time I try to install PHP on a machine > it takes me a week to get it going. > > Here is what I have for the config from the srpm after modification as > instructed earlier. > > ./configure \ > --prefix=%{_prefix} \ > --with-config-file-path=%{_sysconfdir} \ > --disable-debug \ > --enable-pic \ > --enable-shared \ > --enable-inline-optimization \ > $* \ > --with-exec-dir=%{_bindir} \ > --with-regex=system \ > --with-gettext \ > --with-gd \ > --with-jpeg-dir=%{_prefix} \ > --with-png \ > --with-zlib \ > --with-gdbm \ > --enable-debugger \ > --enable-magic-quotes \ > --enable-safe-mode \ > --enable-sockets \ > --enable-sysvsem \ > --enable-sysvshm \ > --enable-track-vars \ > --enable-yp \ > --enable-ftp \ > --enable-wddx \ > --with-mysql \ > --with-xml \ > --with-pdflib=/usr/lib/lipdf.so.0 \ > --with-tiff > > Can someone look at this and tell me what else I need to put in to get this > to work? > > Mike > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Chris Carbaugh wrote:

    > > > I have had problems in the past with RedHat's RPMs. They seem to put > things in weird places. And just removing them and starting fresh with > source always seems to work. Besides, once you have built from source > a few times, it's really a piece of cake, and much less frustrating > than screwing with RPMs. >

    I am in the same situation except I have compiled from all the sources (not RPMS) and I still get hung up when I try to include PDF. My system is a new install of RH 7 with the updates that up2date suggests (gcc, etc.). I have compiled and installed PHP with PDF no problem on RH 6.2. I think the issue is something specific to RH7. I hope RH 7.1 fixes it. I think at this point I am going back to 6.2

    Michael

    > > Chris > > On Wed, 14 Feb 2001, Mike Tuller wrote: > > Date: Wed, 14 Feb 2001 15:49:44 -0600 > > To: <cjtech2000yahoo.com>, php mailing list > > <php-generallists.php.net> > > From: Mike Tuller <mitull01willy.wsc.edu> > > Subject: Re: [PHP] PDF Functions > > > > The reason why I needed the RPM is because no matter what I tried, I > > couldn't get PHP to compile for the Apache rpm on Redhat 7. If at all > > possible, I like to use the rpms so that they can be easily updated. > > > > I have done everything everyone has suggested, and I still get an > > error. I > > have even compiled PHP and still I can't use PDFlib. What next? > > > > Here is the updated config script that I used. > > > > ./configure --prefix=/usr --with-config-file-path=/etc > > --disable-debug --enable-pic --enable-shared > > --enable-inline-optimization --with-apxs=/usr/sbin/apxs > > --with-exec-dir=/usr/bin --with-regex=system --with-gettext > > --with-gd > > --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm > > --enable-debugger --enable-magic-quotes --enable-safe-mode > > --enable-sockets --enable-sysvsem --enable-sysvshm > > --enable-track-vars > > --enable-yp --enable-ftp --enable-wddx --with-mysql > > --with-xml > > --with-pdflib=/usr/local/lib --with-tiff > > > > > > > From: Chris Carbaugh <cjtech2000yahoo.com> > > > Reply-To: cjtech2000yahoo.com > > > Date: Wed, 14 Feb 2001 15:08:02 EST > > > To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > > > <php-generallists.php.net> > > > Subject: Re: [PHP] PDF Functions > > > > > > > > > How about in /etc/ld.so.conf you make sure /usr/lib is in there. > > > > > > Then run /sbin/ldconfig. > > > > > > Also, why bother with the source RPM? I would rather just get the > > > source tarball direct from PHP.net and run with it. > > > > > > Chris > > > > > > On Wed, 14 Feb 2001, Mike Tuller wrote: > > >> Date: Wed, 14 Feb 2001 12:07:50 -0600 > > >> To: php mailing list <php-generallists.php.net> > > >> From: Mike Tuller <mitull01willy.wsc.edu> > > >> Subject: [PHP] PDF Functions > > >> > > >> I finally got everything to install on RedHat 7, but I can't do > > >> anything > > >> with pdflib like I had expected. > > >> > > >> I get back Fatal error: Call to undefined function: pdf_new() in > > >> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = PDF_new(); > > >> > > >> This is rather frustrating that every time I try to install PHP on > > a > > >> machine > > >> it takes me a week to get it going. > > >> > > >> Here is what I have for the config from the srpm after > > modification > > >> as > > >> instructed earlier. > > >> > > >> ../configure \ > > >> --prefix=%{_prefix} \ > > >> --with-config-file-path=%{_sysconfdir} \ > > >> --disable-debug \ > > >> --enable-pic \ > > >> --enable-shared \ > > >> --enable-inline-optimization \ > > >> $* \ > > >> --with-exec-dir=%{_bindir} \ > > >> --with-regex=system \ > > >> --with-gettext \ > > >> --with-gd \ > > >> --with-jpeg-dir=%{_prefix} \ > > >> --with-png \ > > >> --with-zlib \ > > >> --with-gdbm \ > > >> --enable-debugger \ > > >> --enable-magic-quotes \ > > >> --enable-safe-mode \ > > >> --enable-sockets \ > > >> --enable-sysvsem \ > > >> --enable-sysvshm \ > > >> --enable-track-vars \ > > >> --enable-yp \ > > >> --enable-ftp \ > > >> --enable-wddx \ > > >> --with-mysql \ > > >> --with-xml \ > > >> --with-pdflib=/usr/lib/lipdf.so.0 \ > > >> --with-tiff > > >> > > >> Can someone look at this and tell me what else I need to put in to > > >> get this > > >> to work? > > >> > > >> Mike > > >> > > >> > > >> > > >> > > >> -- > > >> PHP General Mailing List (http://www.php.net/) > > >> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > >> For additional commands, e-mail: php-general-helplists.php.net > > >> To contact the list administrators, e-mail: > > >> php-list-adminlists.php.net > > >> > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: > > php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Exactly!!! I have gone back and redone everything 3 or 4 times, and am on day 3 of this. I watch while I configure, and it says that it is working, but when I go to check. I still get an error.

    > From: Michael Stearne <mstearneentermix.com> > Date: Wed, 14 Feb 2001 18:01:20 -0500 > To: cjtech2000yahoo.com > Cc: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > <php-generallists.php.net> > Subject: Re: [PHP] PDF Functions > > > > Chris Carbaugh wrote: > >> >> >> I have had problems in the past with RedHat's RPMs. They seem to put >> things in weird places. And just removing them and starting fresh with >> source always seems to work. Besides, once you have built from source >> a few times, it's really a piece of cake, and much less frustrating >> than screwing with RPMs. >> > > I am in the same situation except I have compiled from all the sources (not > RPMS) and I still get hung up when I try to include PDF. My system is a > new install of RH 7 with the updates that up2date suggests (gcc, etc.). I > have compiled and installed PHP with PDF no problem on RH 6.2. I think the > issue is something specific to RH7. I hope RH 7.1 fixes it. I think at > this point I am going back to 6.2 > > Michael > > > >> >> Chris >> >> On Wed, 14 Feb 2001, Mike Tuller wrote: >>> Date: Wed, 14 Feb 2001 15:49:44 -0600 >>> To: <cjtech2000yahoo.com>, php mailing list >>> <php-generallists.php.net> >>> From: Mike Tuller <mitull01willy.wsc.edu> >>> Subject: Re: [PHP] PDF Functions >>> >>> The reason why I needed the RPM is because no matter what I tried, I >>> couldn't get PHP to compile for the Apache rpm on Redhat 7. If at all >>> possible, I like to use the rpms so that they can be easily updated. >>> >>> I have done everything everyone has suggested, and I still get an >>> error. I >>> have even compiled PHP and still I can't use PDFlib. What next? >>> >>> Here is the updated config script that I used. >>> >>> ./configure --prefix=/usr --with-config-file-path=/etc >>> --disable-debug --enable-pic --enable-shared >>> --enable-inline-optimization --with-apxs=/usr/sbin/apxs >>> --with-exec-dir=/usr/bin --with-regex=system --with-gettext >>> --with-gd >>> --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm >>> --enable-debugger --enable-magic-quotes --enable-safe-mode >>> --enable-sockets --enable-sysvsem --enable-sysvshm >>> --enable-track-vars >>> --enable-yp --enable-ftp --enable-wddx --with-mysql >>> --with-xml >>> --with-pdflib=/usr/local/lib --with-tiff >>> >>> >>>> From: Chris Carbaugh <cjtech2000yahoo.com> >>>> Reply-To: cjtech2000yahoo.com >>>> Date: Wed, 14 Feb 2001 15:08:02 EST >>>> To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list >>>> <php-generallists.php.net> >>>> Subject: Re: [PHP] PDF Functions >>>> >>>> >>>> How about in /etc/ld.so.conf you make sure /usr/lib is in there. >>>> >>>> Then run /sbin/ldconfig. >>>> >>>> Also, why bother with the source RPM? I would rather just get the >>>> source tarball direct from PHP.net and run with it. >>>> >>>> Chris >>>> >>>> On Wed, 14 Feb 2001, Mike Tuller wrote: >>>>> Date: Wed, 14 Feb 2001 12:07:50 -0600 >>>>> To: php mailing list <php-generallists.php.net> >>>>> From: Mike Tuller <mitull01willy.wsc.edu> >>>>> Subject: [PHP] PDF Functions >>>>> >>>>> I finally got everything to install on RedHat 7, but I can't do >>>>> anything >>>>> with pdflib like I had expected. >>>>> >>>>> I get back Fatal error: Call to undefined function: pdf_new() in >>>>> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = PDF_new(); >>>>> >>>>> This is rather frustrating that every time I try to install PHP on >>> a >>>>> machine >>>>> it takes me a week to get it going. >>>>> >>>>> Here is what I have for the config from the srpm after >>> modification >>>>> as >>>>> instructed earlier. >>>>> >>>>> ../configure \ >>>>> --prefix=%{_prefix} \ >>>>> --with-config-file-path=%{_sysconfdir} \ >>>>> --disable-debug \ >>>>> --enable-pic \ >>>>> --enable-shared \ >>>>> --enable-inline-optimization \ >>>>> $* \ >>>>> --with-exec-dir=%{_bindir} \ >>>>> --with-regex=system \ >>>>> --with-gettext \ >>>>> --with-gd \ >>>>> --with-jpeg-dir=%{_prefix} \ >>>>> --with-png \ >>>>> --with-zlib \ >>>>> --with-gdbm \ >>>>> --enable-debugger \ >>>>> --enable-magic-quotes \ >>>>> --enable-safe-mode \ >>>>> --enable-sockets \ >>>>> --enable-sysvsem \ >>>>> --enable-sysvshm \ >>>>> --enable-track-vars \ >>>>> --enable-yp \ >>>>> --enable-ftp \ >>>>> --enable-wddx \ >>>>> --with-mysql \ >>>>> --with-xml \ >>>>> --with-pdflib=/usr/lib/lipdf.so.0 \ >>>>> --with-tiff >>>>> >>>>> Can someone look at this and tell me what else I need to put in to >>>>> get this >>>>> to work? >>>>> >>>>> Mike >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> PHP General Mailing List (http://www.php.net/) >>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>>>> For additional commands, e-mail: php-general-helplists.php.net >>>>> To contact the list administrators, e-mail: >>>>> php-list-adminlists.php.net >>>>> >>>> >>>> -- >>>> PHP General Mailing List (http://www.php.net/) >>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>>> For additional commands, e-mail: php-general-helplists.php.net >>>> To contact the list administrators, e-mail: >>> php-list-adminlists.php.net >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>> For additional commands, e-mail: php-general-helplists.php.net >>> To contact the list administrators, e-mail: >>> php-list-adminlists.php.net >>> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >> For additional commands, e-mail: php-general-helplists.php.net >> To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Well, first let me say that I'm kind of surprised I'm the only one trying to help you guys out. It seems not many folk are into PHP/PDF?

    Any how,

    Redhat's *.0 releases are known to be problematic. They are usually pretty much bleading edge, meaning they're buggy.

    The last time I compiled PHP with PDF support, was a few weeks ago. It was on RedHat 6.2, PHP 4.0.2, and PDFLIB, as a CGI or a stand alone executable. The config was pretty much ./configure --with-pgsql=/usr/local/pgsql --with-pdf=/usr/local/bin (I really think that was it, note I did NOT point right to the libpdf.so). I also added /usr/local/lib to /etc/ld.so.conf and did a ldconfig.

    That's really all I did. RH 6.2, source tarballs of Apache 1.3.12, PHP 4.0.2, pdflib 3.03, postgresql 7.0.2.

    If everything configs/builds correctly, I would blame RH 7.0

    While I would like to install RH 7.0 and figure out what's up, I just don't have the time. I would suggest, A) you try to install PHP/PDF as a CGI under your current install. This allows the simplest install. If that doesn't work, try RH 6.2 or some other distro?

    Good Luck,

    Chris

    On Wed, 14 Feb 2001, Mike Tuller wrote: > Date: Wed, 14 Feb 2001 17:45:28 -0600 > To: Michael Stearne <mstearneentermix.com> > From: Mike Tuller <mitull01willy.wsc.edu> > Subject: Re: [PHP] PDF Functions > > Exactly!!! I have gone back and redone everything 3 or 4 times, and > am on > day 3 of this. I watch while I configure, and it says that it is > working, > but when I go to check. I still get an error. > > > > From: Michael Stearne <mstearneentermix.com> > > Date: Wed, 14 Feb 2001 18:01:20 -0500 > > To: cjtech2000yahoo.com > > Cc: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > > <php-generallists.php.net> > > Subject: Re: [PHP] PDF Functions > > > > > > > > Chris Carbaugh wrote: > > > >> > >> > >> I have had problems in the past with RedHat's RPMs. They seem to > put > >> things in weird places. And just removing them and starting fresh > with > >> source always seems to work. Besides, once you have built from > source > >> a few times, it's really a piece of cake, and much less > frustrating > >> than screwing with RPMs. > >> > > > > I am in the same situation except I have compiled from all the > sources (not > > RPMS) and I still get hung up when I try to include PDF. My system > is a > > new install of RH 7 with the updates that up2date suggests (gcc, > etc.). I > > have compiled and installed PHP with PDF no problem on RH 6.2. I > think the > > issue is something specific to RH7. I hope RH 7.1 fixes it. I > think at > > this point I am going back to 6.2 > > > > Michael > > > > > > > >> > >> Chris > >> > >> On Wed, 14 Feb 2001, Mike Tuller wrote: > >>> Date: Wed, 14 Feb 2001 15:49:44 -0600 > >>> To: <cjtech2000yahoo.com>, php mailing list > >>> <php-generallists.php.net> > >>> From: Mike Tuller <mitull01willy.wsc.edu> > >>> Subject: Re: [PHP] PDF Functions > >>> > >>> The reason why I needed the RPM is because no matter what I > tried, I > >>> couldn't get PHP to compile for the Apache rpm on Redhat 7. If at > all > >>> possible, I like to use the rpms so that they can be easily > updated. > >>> > >>> I have done everything everyone has suggested, and I still get an > >>> error. I > >>> have even compiled PHP and still I can't use PDFlib. What next? > >>> > >>> Here is the updated config script that I used. > >>> > >>> ./configure --prefix=/usr --with-config-file-path=/etc > >>> --disable-debug --enable-pic --enable-shared > >>> --enable-inline-optimization --with-apxs=/usr/sbin/apxs > >>> --with-exec-dir=/usr/bin --with-regex=system --with-gettext > >>> --with-gd > >>> --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm > >>> --enable-debugger --enable-magic-quotes --enable-safe-mode > >>> --enable-sockets --enable-sysvsem --enable-sysvshm > >>> --enable-track-vars > >>> --enable-yp --enable-ftp --enable-wddx --with-mysql > >>> --with-xml > >>> --with-pdflib=/usr/local/lib --with-tiff > >>> > >>> > >>>> From: Chris Carbaugh <cjtech2000yahoo.com> > >>>> Reply-To: cjtech2000yahoo.com > >>>> Date: Wed, 14 Feb 2001 15:08:02 EST > >>>> To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > >>>> <php-generallists.php.net> > >>>> Subject: Re: [PHP] PDF Functions > >>>> > >>>> > >>>> How about in /etc/ld.so.conf you make sure /usr/lib is in there. > >>>> > >>>> Then run /sbin/ldconfig. > >>>> > >>>> Also, why bother with the source RPM? I would rather just get > the > >>>> source tarball direct from PHP.net and run with it. > >>>> > >>>> Chris > >>>> > >>>> On Wed, 14 Feb 2001, Mike Tuller wrote: > >>>>> Date: Wed, 14 Feb 2001 12:07:50 -0600 > >>>>> To: php mailing list <php-generallists.php.net> > >>>>> From: Mike Tuller <mitull01willy.wsc.edu> > >>>>> Subject: [PHP] PDF Functions > >>>>> > >>>>> I finally got everything to install on RedHat 7, but I can't do > >>>>> anything > >>>>> with pdflib like I had expected. > >>>>> > >>>>> I get back Fatal error: Call to undefined function: pdf_new() > in > >>>>> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = > PDF_new(); > >>>>> > >>>>> This is rather frustrating that every time I try to install PHP > on > >>> a > >>>>> machine > >>>>> it takes me a week to get it going. > >>>>> > >>>>> Here is what I have for the config from the srpm after > >>> modification > >>>>> as > >>>>> instructed earlier. > >>>>> > >>>>> ../configure \ > >>>>> --prefix=%{_prefix} \ > >>>>> --with-config-file-path=%{_sysconfdir} \ > >>>>> --disable-debug \ > >>>>> --enable-pic \ > >>>>> --enable-shared \ > >>>>> --enable-inline-optimization \ > >>>>> $* \ > >>>>> --with-exec-dir=%{_bindir} \ > >>>>> --with-regex=system \ > >>>>> --with-gettext \ > >>>>> --with-gd \ > >>>>> --with-jpeg-dir=%{_prefix} \ > >>>>> --with-png \ > >>>>> --with-zlib \ > >>>>> --with-gdbm \ > >>>>> --enable-debugger \ > >>>>> --enable-magic-quotes \ > >>>>> --enable-safe-mode \ > >>>>> --enable-sockets \ > >>>>> --enable-sysvsem \ > >>>>> --enable-sysvshm \ > >>>>> --enable-track-vars \ > >>>>> --enable-yp \ > >>>>> --enable-ftp \ > >>>>> --enable-wddx \ > >>>>> --with-mysql \ > >>>>> --with-xml \ > >>>>> --with-pdflib=/usr/lib/lipdf.so.0 \ > >>>>> --with-tiff > >>>>> > >>>>> Can someone look at this and tell me what else I need to put in > to > >>>>> get this > >>>>> to work? > >>>>> > >>>>> Mike > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> PHP General Mailing List (http://www.php.net/) > >>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>>>> For additional commands, e-mail: php-general-helplists.php.net > >>>>> To contact the list administrators, e-mail: > >>>>> php-list-adminlists.php.net > >>>>> > >>>> > >>>> -- > >>>> PHP General Mailing List (http://www.php.net/) > >>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>>> For additional commands, e-mail: php-general-helplists.php.net > >>>> To contact the list administrators, e-mail: > >>> php-list-adminlists.php.net > >>> > >>> > >>> -- > >>> PHP General Mailing List (http://www.php.net/) > >>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>> For additional commands, e-mail: php-general-helplists.php.net > >>> To contact the list administrators, e-mail: > >>> php-list-adminlists.php.net > >>> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >> For additional commands, e-mail: php-general-helplists.php.net > >> To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > -- > 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 >

    -- 
    "Without the threat of death, there's no reason to live at all"  -
    Marilyn Manson
    

    attached mail follows:


    I decided on my way home tonight to ditch 7.0 and go back to 6.2. I think that it is the only way to get anything done. When 7.1 or later comes out then I can go back. Thanks for your help.

    When OS X finally ships I will be happy.

    Mike

    > From: Chris Carbaugh <cjtech2000yahoo.com> > Reply-To: cjtech2000yahoo.com > Date: Wed, 14 Feb 2001 19:39:04 EST > To: Mike Tuller <mitull01willy.wsc.edu>, Michael Stearne > <mstearneentermix.com> > Cc: php mailing list <php-generallists.php.net> > Subject: Re: Re: [PHP] PDF Functions > > > Well, first let me say that I'm kind of surprised I'm the only one > trying to help you guys out. It seems not many folk are into PHP/PDF? > > Any how, > > Redhat's *.0 releases are known to be problematic. They are usually > pretty much bleading edge, meaning they're buggy. > > The last time I compiled PHP with PDF support, was a few weeks ago. It > was on RedHat 6.2, PHP 4.0.2, and PDFLIB, as a CGI or a stand alone > executable. The config was pretty much ./configure > --with-pgsql=/usr/local/pgsql --with-pdf=/usr/local/bin (I really > think that was it, note I did NOT point right to the libpdf.so). I > also added /usr/local/lib to /etc/ld.so.conf and did a ldconfig. > > That's really all I did. RH 6.2, source tarballs of Apache 1.3.12, PHP > 4.0.2, pdflib 3.03, postgresql 7.0.2. > > If everything configs/builds correctly, I would blame RH 7.0 > > While I would like to install RH 7.0 and figure out what's up, I just > don't have the time. I would suggest, A) you try to install PHP/PDF as > a CGI under your current install. This allows the simplest install. > If that doesn't work, try RH 6.2 or some other distro? > > Good Luck, > > Chris > > On Wed, 14 Feb 2001, Mike Tuller wrote: >> Date: Wed, 14 Feb 2001 17:45:28 -0600 >> To: Michael Stearne <mstearneentermix.com> >> From: Mike Tuller <mitull01willy.wsc.edu> >> Subject: Re: [PHP] PDF Functions >> >> Exactly!!! I have gone back and redone everything 3 or 4 times, and >> am on >> day 3 of this. I watch while I configure, and it says that it is >> working, >> but when I go to check. I still get an error. >> >> >>> From: Michael Stearne <mstearneentermix.com> >>> Date: Wed, 14 Feb 2001 18:01:20 -0500 >>> To: cjtech2000yahoo.com >>> Cc: Mike Tuller <mitull01willy.wsc.edu>, php mailing list >>> <php-generallists.php.net> >>> Subject: Re: [PHP] PDF Functions >>> >>> >>> >>> Chris Carbaugh wrote: >>> >>>> >>>> >>>> I have had problems in the past with RedHat's RPMs. They seem to >> put >>>> things in weird places. And just removing them and starting fresh >> with >>>> source always seems to work. Besides, once you have built from >> source >>>> a few times, it's really a piece of cake, and much less >> frustrating >>>> than screwing with RPMs. >>>> >>> >>> I am in the same situation except I have compiled from all the >> sources (not >>> RPMS) and I still get hung up when I try to include PDF. My system >> is a >>> new install of RH 7 with the updates that up2date suggests (gcc, >> etc.). I >>> have compiled and installed PHP with PDF no problem on RH 6.2. I >> think the >>> issue is something specific to RH7. I hope RH 7.1 fixes it. I >> think at >>> this point I am going back to 6.2 >>> >>> Michael >>> >>> >>> >>>> >>>> Chris >>>> >>>> On Wed, 14 Feb 2001, Mike Tuller wrote: >>>>> Date: Wed, 14 Feb 2001 15:49:44 -0600 >>>>> To: <cjtech2000yahoo.com>, php mailing list >>>>> <php-generallists.php.net> >>>>> From: Mike Tuller <mitull01willy.wsc.edu> >>>>> Subject: Re: [PHP] PDF Functions >>>>> >>>>> The reason why I needed the RPM is because no matter what I >> tried, I >>>>> couldn't get PHP to compile for the Apache rpm on Redhat 7. If at >> all >>>>> possible, I like to use the rpms so that they can be easily >> updated. >>>>> >>>>> I have done everything everyone has suggested, and I still get an >>>>> error. I >>>>> have even compiled PHP and still I can't use PDFlib. What next? >>>>> >>>>> Here is the updated config script that I used. >>>>> >>>>> ./configure --prefix=/usr --with-config-file-path=/etc >>>>> --disable-debug --enable-pic --enable-shared >>>>> --enable-inline-optimization --with-apxs=/usr/sbin/apxs >>>>> --with-exec-dir=/usr/bin --with-regex=system --with-gettext >>>>> --with-gd >>>>> --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm >>>>> --enable-debugger --enable-magic-quotes --enable-safe-mode >>>>> --enable-sockets --enable-sysvsem --enable-sysvshm >>>>> --enable-track-vars >>>>> --enable-yp --enable-ftp --enable-wddx --with-mysql >>>>> --with-xml >>>>> --with-pdflib=/usr/local/lib --with-tiff >>>>> >>>>> >>>>>> From: Chris Carbaugh <cjtech2000yahoo.com> >>>>>> Reply-To: cjtech2000yahoo.com >>>>>> Date: Wed, 14 Feb 2001 15:08:02 EST >>>>>> To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list >>>>>> <php-generallists.php.net> >>>>>> Subject: Re: [PHP] PDF Functions >>>>>> >>>>>> >>>>>> How about in /etc/ld.so.conf you make sure /usr/lib is in there. >>>>>> >>>>>> Then run /sbin/ldconfig. >>>>>> >>>>>> Also, why bother with the source RPM? I would rather just get >> the >>>>>> source tarball direct from PHP.net and run with it. >>>>>> >>>>>> Chris >>>>>> >>>>>> On Wed, 14 Feb 2001, Mike Tuller wrote: >>>>>>> Date: Wed, 14 Feb 2001 12:07:50 -0600 >>>>>>> To: php mailing list <php-generallists.php.net> >>>>>>> From: Mike Tuller <mitull01willy.wsc.edu> >>>>>>> Subject: [PHP] PDF Functions >>>>>>> >>>>>>> I finally got everything to install on RedHat 7, but I can't do >>>>>>> anything >>>>>>> with pdflib like I had expected. >>>>>>> >>>>>>> I get back Fatal error: Call to undefined function: pdf_new() >> in >>>>>>> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = >> PDF_new(); >>>>>>> >>>>>>> This is rather frustrating that every time I try to install PHP >> on >>>>> a >>>>>>> machine >>>>>>> it takes me a week to get it going. >>>>>>> >>>>>>> Here is what I have for the config from the srpm after >>>>> modification >>>>>>> as >>>>>>> instructed earlier. >>>>>>> >>>>>>> ../configure \ >>>>>>> --prefix=%{_prefix} \ >>>>>>> --with-config-file-path=%{_sysconfdir} \ >>>>>>> --disable-debug \ >>>>>>> --enable-pic \ >>>>>>> --enable-shared \ >>>>>>> --enable-inline-optimization \ >>>>>>> $* \ >>>>>>> --with-exec-dir=%{_bindir} \ >>>>>>> --with-regex=system \ >>>>>>> --with-gettext \ >>>>>>> --with-gd \ >>>>>>> --with-jpeg-dir=%{_prefix} \ >>>>>>> --with-png \ >>>>>>> --with-zlib \ >>>>>>> --with-gdbm \ >>>>>>> --enable-debugger \ >>>>>>> --enable-magic-quotes \ >>>>>>> --enable-safe-mode \ >>>>>>> --enable-sockets \ >>>>>>> --enable-sysvsem \ >>>>>>> --enable-sysvshm \ >>>>>>> --enable-track-vars \ >>>>>>> --enable-yp \ >>>>>>> --enable-ftp \ >>>>>>> --enable-wddx \ >>>>>>> --with-mysql \ >>>>>>> --with-xml \ >>>>>>> --with-pdflib=/usr/lib/lipdf.so.0 \ >>>>>>> --with-tiff >>>>>>> >>>>>>> Can someone look at this and tell me what else I need to put in >> to >>>>>>> get this >>>>>>> to work? >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> PHP General Mailing List (http://www.php.net/) >>>>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>>>>>> For additional commands, e-mail: php-general-helplists.php.net >>>>>>> To contact the list administrators, e-mail: >>>>>>> php-list-adminlists.php.net >>>>>>> >>>>>> >>>>>> -- >>>>>> PHP General Mailing List (http://www.php.net/) >>>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>>>>> For additional commands, e-mail: php-general-helplists.php.net >>>>>> To contact the list administrators, e-mail: >>>>> php-list-adminlists.php.net >>>>> >>>>> >>>>> -- >>>>> PHP General Mailing List (http://www.php.net/) >>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>>>> For additional commands, e-mail: php-general-helplists.php.net >>>>> To contact the list administrators, e-mail: >>>>> php-list-adminlists.php.net >>>>> >>>> >>>> -- >>>> PHP General Mailing List (http://www.php.net/) >>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>>> For additional commands, e-mail: php-general-helplists.php.net >>>> To contact the list administrators, e-mail: >> php-list-adminlists.php.net >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >>> For additional commands, e-mail: php-general-helplists.php.net >>> To contact the list administrators, e-mail: >> php-list-adminlists.php.net >> >> >> -- >> 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 >> > -- > "Without the threat of death, there's no reason to live at all" - > Marilyn Manson

    attached mail follows:


    OS X? What's that? :) Damn Mac.... PPC somethin or other.... I just don't get it..............

    In the mean time, I'd say 6.2 is a good bet.

    Good Luck,

    Chris

    On Wed, 14 Feb 2001, Mike Tuller wrote: > Date: Wed, 14 Feb 2001 19:03:05 -0600 > To: <cjtech2000yahoo.com>, Michael Stearne <mstearneentermix.com> > From: Mike Tuller <mitull01willy.wsc.edu> > Subject: Re: [PHP] PDF Functions > > I decided on my way home tonight to ditch 7.0 and go back to 6.2. I > think > that it is the only way to get anything done. When 7.1 or later comes > out > then I can go back. Thanks for your help. > > When OS X finally ships I will be happy. > > Mike > > > From: Chris Carbaugh <cjtech2000yahoo.com> > > Reply-To: cjtech2000yahoo.com > > Date: Wed, 14 Feb 2001 19:39:04 EST > > To: Mike Tuller <mitull01willy.wsc.edu>, Michael Stearne > > <mstearneentermix.com> > > Cc: php mailing list <php-generallists.php.net> > > Subject: Re: Re: [PHP] PDF Functions > > > > > > Well, first let me say that I'm kind of surprised I'm the only one > > trying to help you guys out. It seems not many folk are into > PHP/PDF? > > > > Any how, > > > > Redhat's *.0 releases are known to be problematic. They are > usually > > pretty much bleading edge, meaning they're buggy. > > > > The last time I compiled PHP with PDF support, was a few weeks ago. > It > > was on RedHat 6.2, PHP 4.0.2, and PDFLIB, as a CGI or a stand alone > > executable. The config was pretty much ./configure > > --with-pgsql=/usr/local/pgsql --with-pdf=/usr/local/bin (I really > > think that was it, note I did NOT point right to the libpdf.so). I > > also added /usr/local/lib to /etc/ld.so.conf and did a ldconfig. > > > > That's really all I did. RH 6.2, source tarballs of Apache 1.3.12, > PHP > > 4.0.2, pdflib 3.03, postgresql 7.0.2. > > > > If everything configs/builds correctly, I would blame RH 7.0 > > > > While I would like to install RH 7.0 and figure out what's up, I > just > > don't have the time. I would suggest, A) you try to install > PHP/PDF as > > a CGI under your current install. This allows the simplest > install. > > If that doesn't work, try RH 6.2 or some other distro? > > > > Good Luck, > > > > Chris > > > > On Wed, 14 Feb 2001, Mike Tuller wrote: > >> Date: Wed, 14 Feb 2001 17:45:28 -0600 > >> To: Michael Stearne <mstearneentermix.com> > >> From: Mike Tuller <mitull01willy.wsc.edu> > >> Subject: Re: [PHP] PDF Functions > >> > >> Exactly!!! I have gone back and redone everything 3 or 4 times, > and > >> am on > >> day 3 of this. I watch while I configure, and it says that it is > >> working, > >> but when I go to check. I still get an error. > >> > >> > >>> From: Michael Stearne <mstearneentermix.com> > >>> Date: Wed, 14 Feb 2001 18:01:20 -0500 > >>> To: cjtech2000yahoo.com > >>> Cc: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > >>> <php-generallists.php.net> > >>> Subject: Re: [PHP] PDF Functions > >>> > >>> > >>> > >>> Chris Carbaugh wrote: > >>> > >>>> > >>>> > >>>> I have had problems in the past with RedHat's RPMs. They seem > to > >> put > >>>> things in weird places. And just removing them and starting > fresh > >> with > >>>> source always seems to work. Besides, once you have built from > >> source > >>>> a few times, it's really a piece of cake, and much less > >> frustrating > >>>> than screwing with RPMs. > >>>> > >>> > >>> I am in the same situation except I have compiled from all the > >> sources (not > >>> RPMS) and I still get hung up when I try to include PDF. My > system > >> is a > >>> new install of RH 7 with the updates that up2date suggests (gcc, > >> etc.). I > >>> have compiled and installed PHP with PDF no problem on RH 6.2. I > >> think the > >>> issue is something specific to RH7. I hope RH 7.1 fixes it. I > >> think at > >>> this point I am going back to 6.2 > >>> > >>> Michael > >>> > >>> > >>> > >>>> > >>>> Chris > >>>> > >>>> On Wed, 14 Feb 2001, Mike Tuller wrote: > >>>>> Date: Wed, 14 Feb 2001 15:49:44 -0600 > >>>>> To: <cjtech2000yahoo.com>, php mailing list > >>>>> <php-generallists.php.net> > >>>>> From: Mike Tuller <mitull01willy.wsc.edu> > >>>>> Subject: Re: [PHP] PDF Functions > >>>>> > >>>>> The reason why I needed the RPM is because no matter what I > >> tried, I > >>>>> couldn't get PHP to compile for the Apache rpm on Redhat 7. If > at > >> all > >>>>> possible, I like to use the rpms so that they can be easily > >> updated. > >>>>> > >>>>> I have done everything everyone has suggested, and I still get > an > >>>>> error. I > >>>>> have even compiled PHP and still I can't use PDFlib. What next? > >>>>> > >>>>> Here is the updated config script that I used. > >>>>> > >>>>> ./configure --prefix=/usr --with-config-file-path=/etc > >>>>> --disable-debug --enable-pic --enable-shared > >>>>> --enable-inline-optimization --with-apxs=/usr/sbin/apxs > >>>>> --with-exec-dir=/usr/bin --with-regex=system --with-gettext > >>>>> --with-gd > >>>>> --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm > >>>>> --enable-debugger --enable-magic-quotes --enable-safe-mode > >>>>> --enable-sockets --enable-sysvsem --enable-sysvshm > >>>>> --enable-track-vars > >>>>> --enable-yp --enable-ftp --enable-wddx --with-mysql > >>>>> --with-xml > >>>>> --with-pdflib=/usr/local/lib --with-tiff > >>>>> > >>>>> > >>>>>> From: Chris Carbaugh <cjtech2000yahoo.com> > >>>>>> Reply-To: cjtech2000yahoo.com > >>>>>> Date: Wed, 14 Feb 2001 15:08:02 EST > >>>>>> To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > >>>>>> <php-generallists.php.net> > >>>>>> Subject: Re: [PHP] PDF Functions > >>>>>> > >>>>>> > >>>>>> How about in /etc/ld.so.conf you make sure /usr/lib is in > there. > >>>>>> > >>>>>> Then run /sbin/ldconfig. > >>>>>> > >>>>>> Also, why bother with the source RPM? I would rather just get > >> the > >>>>>> source tarball direct from PHP.net and run with it. > >>>>>> > >>>>>> Chris > >>>>>> > >>>>>> On Wed, 14 Feb 2001, Mike Tuller wrote: > >>>>>>> Date: Wed, 14 Feb 2001 12:07:50 -0600 > >>>>>>> To: php mailing list <php-generallists.php.net> > >>>>>>> From: Mike Tuller <mitull01willy.wsc.edu> > >>>>>>> Subject: [PHP] PDF Functions > >>>>>>> > >>>>>>> I finally got everything to install on RedHat 7, but I can't > do > >>>>>>> anything > >>>>>>> with pdflib like I had expected. > >>>>>>> > >>>>>>> I get back Fatal error: Call to undefined function: pdf_new() > >> in > >>>>>>> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = > >> PDF_new(); > >>>>>>> > >>>>>>> This is rather frustrating that every time I try to install > PHP > >> on > >>>>> a > >>>>>>> machine > >>>>>>> it takes me a week to get it going. > >>>>>>> > >>>>>>> Here is what I have for the config from the srpm after > >>>>> modification > >>>>>>> as > >>>>>>> instructed earlier. > >>>>>>> > >>>>>>> ../configure \ > >>>>>>> --prefix=%{_prefix} \ > >>>>>>> --with-config-file-path=%{_sysconfdir} \ > >>>>>>> --disable-debug \ > >>>>>>> --enable-pic \ > >>>>>>> --enable-shared \ > >>>>>>> --enable-inline-optimization \ > >>>>>>> $* \ > >>>>>>> --with-exec-dir=%{_bindir} \ > >>>>>>> --with-regex=system \ > >>>>>>> --with-gettext \ > >>>>>>> --with-gd \ > >>>>>>> --with-jpeg-dir=%{_prefix} \ > >>>>>>> --with-png \ > >>>>>>> --with-zlib \ > >>>>>>> --with-gdbm \ > >>>>>>> --enable-debugger \ > >>>>>>> --enable-magic-quotes \ > >>>>>>> --enable-safe-mode \ > >>>>>>> --enable-sockets \ > >>>>>>> --enable-sysvsem \ > >>>>>>> --enable-sysvshm \ > >>>>>>> --enable-track-vars \ > >>>>>>> --enable-yp \ > >>>>>>> --enable-ftp \ > >>>>>>> --enable-wddx \ > >>>>>>> --with-mysql \ > >>>>>>> --with-xml \ > >>>>>>> --with-pdflib=/usr/lib/lipdf.so.0 \ > >>>>>>> --with-tiff > >>>>>>> > >>>>>>> Can someone look at this and tell me what else I need to put > in > >> to > >>>>>>> get this > >>>>>>> to work? > >>>>>>> > >>>>>>> Mike > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> -- > >>>>>>> PHP General Mailing List (http://www.php.net/) > >>>>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>>>>>> For additional commands, e-mail: > php-general-helplists.php.net > >>>>>>> To contact the list administrators, e-mail: > >>>>>>> php-list-adminlists.php.net > >>>>>>> > >>>>>> > >>>>>> -- > >>>>>> PHP General Mailing List (http://www.php.net/) > >>>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>>>>> For additional commands, e-mail: > php-general-helplists.php.net > >>>>>> To contact the list administrators, e-mail: > >>>>> php-list-adminlists.php.net > >>>>> > >>>>> > >>>>> -- > >>>>> PHP General Mailing List (http://www.php.net/) > >>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>>>> For additional commands, e-mail: php-general-helplists.php.net > >>>>> To contact the list administrators, e-mail: > >>>>> php-list-adminlists.php.net > >>>>> > >>>> > >>>> -- > >>>> PHP General Mailing List (http://www.php.net/) > >>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>>> For additional commands, e-mail: php-general-helplists.php.net > >>>> To contact the list administrators, e-mail: > >> php-list-adminlists.php.net > >>> > >>> > >>> -- > >>> PHP General Mailing List (http://www.php.net/) > >>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > >>> For additional commands, e-mail: php-general-helplists.php.net > >>> To contact the list administrators, e-mail: > >> php-list-adminlists.php.net > >> > >> > >> -- > >> 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 > >> > > -- > > "Without the threat of death, there's no reason to live at all" - > > Marilyn Manson > > > -- > 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 >

    -- 
    Earnest HemmingWay wrote: "The world is a fine place, and worth
    fighting for" I agree with the second part.
    

    attached mail follows:


    I'm waiting on OS X also. (I'm running it now.) But I need to get a RH setup working for a client. BTW PHP4, mySQL and Apache work fine of the OS X PB so you might try installing PDF on that (I haven't yet though).

    Michael

    Chris Carbaugh wrote:

    > OS X? What's that? :) Damn Mac.... PPC somethin or other.... I just > don't get it.............. > > In the mean time, I'd say 6.2 is a good bet. > > Good Luck, > > Chris > > On Wed, 14 Feb 2001, Mike Tuller wrote: > > Date: Wed, 14 Feb 2001 19:03:05 -0600 > > To: <cjtech2000yahoo.com>, Michael Stearne <mstearneentermix.com> > > From: Mike Tuller <mitull01willy.wsc.edu> > > Subject: Re: [PHP] PDF Functions > > > > I decided on my way home tonight to ditch 7.0 and go back to 6.2. I > > think > > that it is the only way to get anything done. When 7.1 or later comes > > out > > then I can go back. Thanks for your help. > > > > When OS X finally ships I will be happy. > > > > Mike > > > > > From: Chris Carbaugh <cjtech2000yahoo.com> > > > Reply-To: cjtech2000yahoo.com > > > Date: Wed, 14 Feb 2001 19:39:04 EST > > > To: Mike Tuller <mitull01willy.wsc.edu>, Michael Stearne > > > <mstearneentermix.com> > > > Cc: php mailing list <php-generallists.php.net> > > > Subject: Re: Re: [PHP] PDF Functions > > > > > > > > > Well, first let me say that I'm kind of surprised I'm the only one > > > trying to help you guys out. It seems not many folk are into > > PHP/PDF? > > > > > > Any how, > > > > > > Redhat's *.0 releases are known to be problematic. They are > > usually > > > pretty much bleading edge, meaning they're buggy. > > > > > > The last time I compiled PHP with PDF support, was a few weeks ago. > > It > > > was on RedHat 6.2, PHP 4.0.2, and PDFLIB, as a CGI or a stand alone > > > executable. The config was pretty much ./configure > > > --with-pgsql=/usr/local/pgsql --with-pdf=/usr/local/bin (I really > > > think that was it, note I did NOT point right to the libpdf.so). I > > > also added /usr/local/lib to /etc/ld.so.conf and did a ldconfig. > > > > > > That's really all I did. RH 6.2, source tarballs of Apache 1.3.12, > > PHP > > > 4.0.2, pdflib 3.03, postgresql 7.0.2. > > > > > > If everything configs/builds correctly, I would blame RH 7.0 > > > > > > While I would like to install RH 7.0 and figure out what's up, I > > just > > > don't have the time. I would suggest, A) you try to install > > PHP/PDF as > > > a CGI under your current install. This allows the simplest > > install. > > > If that doesn't work, try RH 6.2 or some other distro? > > > > > > Good Luck, > > > > > > Chris > > > > > > On Wed, 14 Feb 2001, Mike Tuller wrote: > > >> Date: Wed, 14 Feb 2001 17:45:28 -0600 > > >> To: Michael Stearne <mstearneentermix.com> > > >> From: Mike Tuller <mitull01willy.wsc.edu> > > >> Subject: Re: [PHP] PDF Functions > > >> > > >> Exactly!!! I have gone back and redone everything 3 or 4 times, > > and > > >> am on > > >> day 3 of this. I watch while I configure, and it says that it is > > >> working, > > >> but when I go to check. I still get an error. > > >> > > >> > > >>> From: Michael Stearne <mstearneentermix.com> > > >>> Date: Wed, 14 Feb 2001 18:01:20 -0500 > > >>> To: cjtech2000yahoo.com > > >>> Cc: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > > >>> <php-generallists.php.net> > > >>> Subject: Re: [PHP] PDF Functions > > >>> > > >>> > > >>> > > >>> Chris Carbaugh wrote: > > >>> > > >>>> > > >>>> > > >>>> I have had problems in the past with RedHat's RPMs. They seem > > to > > >> put > > >>>> things in weird places. And just removing them and starting > > fresh > > >> with > > >>>> source always seems to work. Besides, once you have built from > > >> source > > >>>> a few times, it's really a piece of cake, and much less > > >> frustrating > > >>>> than screwing with RPMs. > > >>>> > > >>> > > >>> I am in the same situation except I have compiled from all the > > >> sources (not > > >>> RPMS) and I still get hung up when I try to include PDF. My > > system > > >> is a > > >>> new install of RH 7 with the updates that up2date suggests (gcc, > > >> etc.). I > > >>> have compiled and installed PHP with PDF no problem on RH 6.2. I > > >> think the > > >>> issue is something specific to RH7. I hope RH 7.1 fixes it. I > > >> think at > > >>> this point I am going back to 6.2 > > >>> > > >>> Michael > > >>> > > >>> > > >>> > > >>>> > > >>>> Chris > > >>>> > > >>>> On Wed, 14 Feb 2001, Mike Tuller wrote: > > >>>>> Date: Wed, 14 Feb 2001 15:49:44 -0600 > > >>>>> To: <cjtech2000yahoo.com>, php mailing list > > >>>>> <php-generallists.php.net> > > >>>>> From: Mike Tuller <mitull01willy.wsc.edu> > > >>>>> Subject: Re: [PHP] PDF Functions > > >>>>> > > >>>>> The reason why I needed the RPM is because no matter what I > > >> tried, I > > >>>>> couldn't get PHP to compile for the Apache rpm on Redhat 7. If > > at > > >> all > > >>>>> possible, I like to use the rpms so that they can be easily > > >> updated. > > >>>>> > > >>>>> I have done everything everyone has suggested, and I still get > > an > > >>>>> error. I > > >>>>> have even compiled PHP and still I can't use PDFlib. What next? > > >>>>> > > >>>>> Here is the updated config script that I used. > > >>>>> > > >>>>> ./configure --prefix=/usr --with-config-file-path=/etc > > >>>>> --disable-debug --enable-pic --enable-shared > > >>>>> --enable-inline-optimization --with-apxs=/usr/sbin/apxs > > >>>>> --with-exec-dir=/usr/bin --with-regex=system --with-gettext > > >>>>> --with-gd > > >>>>> --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm > > >>>>> --enable-debugger --enable-magic-quotes --enable-safe-mode > > >>>>> --enable-sockets --enable-sysvsem --enable-sysvshm > > >>>>> --enable-track-vars > > >>>>> --enable-yp --enable-ftp --enable-wddx --with-mysql > > >>>>> --with-xml > > >>>>> --with-pdflib=/usr/local/lib --with-tiff > > >>>>> > > >>>>> > > >>>>>> From: Chris Carbaugh <cjtech2000yahoo.com> > > >>>>>> Reply-To: cjtech2000yahoo.com > > >>>>>> Date: Wed, 14 Feb 2001 15:08:02 EST > > >>>>>> To: Mike Tuller <mitull01willy.wsc.edu>, php mailing list > > >>>>>> <php-generallists.php.net> > > >>>>>> Subject: Re: [PHP] PDF Functions > > >>>>>> > > >>>>>> > > >>>>>> How about in /etc/ld.so.conf you make sure /usr/lib is in > > there. > > >>>>>> > > >>>>>> Then run /sbin/ldconfig. > > >>>>>> > > >>>>>> Also, why bother with the source RPM? I would rather just get > > >> the > > >>>>>> source tarball direct from PHP.net and run with it. > > >>>>>> > > >>>>>> Chris > > >>>>>> > > >>>>>> On Wed, 14 Feb 2001, Mike Tuller wrote: > > >>>>>>> Date: Wed, 14 Feb 2001 12:07:50 -0600 > > >>>>>>> To: php mailing list <php-generallists.php.net> > > >>>>>>> From: Mike Tuller <mitull01willy.wsc.edu> > > >>>>>>> Subject: [PHP] PDF Functions > > >>>>>>> > > >>>>>>> I finally got everything to install on RedHat 7, but I can't > > do > > >>>>>>> anything > > >>>>>>> with pdflib like I had expected. > > >>>>>>> > > >>>>>>> I get back Fatal error: Call to undefined function: pdf_new() > > >> in > > >>>>>>> /var/www/html/pdfclock.php on line 7. Line 7 is $pdf = > > >> PDF_new(); > > >>>>>>> > > >>>>>>> This is rather frustrating that every time I try to install > > PHP > > >> on > > >>>>> a > > >>>>>>> machine > > >>>>>>> it takes me a week to get it going. > > >>>>>>> > > >>>>>>> Here is what I have for the config from the srpm after > > >>>>> modification > > >>>>>>> as > > >>>>>>> instructed earlier. > > >>>>>>> > > >>>>>>> ../configure \ > > >>>>>>> --prefix=%{_prefix} \ > > >>>>>>> --with-config-file-path=%{_sysconfdir} \ > > >>>>>>> --disable-debug \ > > >>>>>>> --enable-pic \ > > >>>>>>> --enable-shared \ > > >>>>>>> --enable-inline-optimization \ > > >>>>>>> $* \ > > >>>>>>> --with-exec-dir=%{_bindir} \ > > >>>>>>> --with-regex=system \ > > >>>>>>> --with-gettext \ > > >>>>>>> --with-gd \ > > >>>>>>> --with-jpeg-dir=%{_prefix} \ > > >>>>>>> --with-png \ > > >>>>>>> --with-zlib \ > > >>>>>>> --with-gdbm \ > > >>>>>>> --enable-debugger \ > > >>>>>>> --enable-magic-quotes \ > > >>>>>>> --enable-safe-mode \ > > >>>>>>> --enable-sockets \ > > >>>>>>> --enable-sysvsem \ > > >>>>>>> --enable-sysvshm \ > > >>>>>>> --enable-track-vars \ > > >>>>>>> --enable-yp \ > > >>>>>>> --enable-ftp \ > > >>>>>>> --enable-wddx \ > > >>>>>>> --with-mysql \ > > >>>>>>> --with-xml \ > > >>>>>>> --with-pdflib=/usr/lib/lipdf.so.0 \ > > >>>>>>> --with-tiff > > >>>>>>> > > >>>>>>> Can someone look at this and tell me what else I need to put > > in > > >> to > > >>>>>>> get this > > >>>>>>> to work? > > >>>>>>> > > >>>>>>> Mike > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> -- > > >>>>>>> PHP General Mailing List (http://www.php.net/) > > >>>>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > >>>>>>> For additional commands, e-mail: > > php-general-helplists.php.net > > >>>>>>> To contact the list administrators, e-mail: > > >>>>>>> php-list-adminlists.php.net > > >>>>>>> > > >>>>>> > > >>>>>> -- > > >>>>>> PHP General Mailing List (http://www.php.net/) > > >>>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > >>>>>> For additional commands, e-mail: > > php-general-helplists.php.net > > >>>>>> To contact the list administrators, e-mail: > > >>>>> php-list-adminlists.php.net > > >>>>> > > >>>>> > > >>>>> -- > > >>>>> PHP General Mailing List (http://www.php.net/) > > >>>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > >>>>> For additional commands, e-mail: php-general-helplists.php.net > > >>>>> To contact the list administrators, e-mail: > > >>>>> php-list-adminlists.php.net > > >>>>> > > >>>> > > >>>> -- > > >>>> PHP General Mailing List (http://www.php.net/) > > >>>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > >>>> For additional commands, e-mail: php-general-helplists.php.net > > >>>> To contact the list administrators, e-mail: > > >> php-list-adminlists.php.net > > >>> > > >>> > > >>> -- > > >>> PHP General Mailing List (http://www.php.net/) > > >>> To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > >>> For additional commands, e-mail: php-general-helplists.php.net > > >>> To contact the list administrators, e-mail: > > >> php-list-adminlists.php.net > > >> > > >> > > >> -- > > >> 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 > > >> > > > -- > > > "Without the threat of death, there's no reason to live at all" - > > > Marilyn Manson > > > > > > -- > > 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 > > > -- > Earnest HemmingWay wrote: "The world is a fine place, and worth > fighting for" I agree with the second part.

    attached mail follows:


    Hi, I've been using horde, IMP for a while with PHP4 pretty well, no problem at all (uses PHPLIB for session and database storage). But now I need to built some code and I'm using PHP4's native session functions. The problem was that when coding I got an error related with PHPLIB's session object. So, I took the prepend file out of the autoprepend line in php.ini, and my code started working. The problem is that IMP needs the prepended file, so what can I do?

    Saludos... :-)

    -- 
    System Administration: It's a dirty job, 
    but someone told I had to do it.
    -----------------------------------------------------------------
    Martín Marqués			email: 	martinmath.unl.edu.ar
    Santa Fe - Argentina		http://math.unl.edu.ar/~martin/
    Administrador de sistemas en math.unl.edu.ar
    -----------------------------------------------------------------
    

    attached mail follows:


    The HTTP_IDENT env. variable was depreciated due to its limited use. REMOTE_USER does have a value if the user has been authenticated. If the authentication was successfull then the users name is stored in here.

    Use HTTP_REFERER if you want to know where the visitors were before they came to your site or a page on it.

    ""Barry Fawthrop"" <barryttienterprises.org> wrote in message news:00db01c096c7$67511800$bdad2041tampabay.rr.com... > Why do the Environment Variables > REMOTE_IDENT > REMOTE_USER > HTTP_FROM > HTTP_IDENT > and others exists IF they don't return any information ??? > > Is there anyway to find out Who visit's your site. > (1) I'm trying to determine between Search Engines and actual Visitors > (2) I'm trying to see who is interested in what I have. I have mailing list > and guestbook, yet no-one clicks these > > Are there any "tricks" I can use to see who these people are ?? > This is for a Christian Ministry site, if this is a factor > > > Thanks Barry > > > > -- > 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:


    Questions:

    I want to make an e-commerce like transaction with a remote file, similar to how a merchant account process a credit card. The concept is very similar.

    Basically, I have two servers in two different cities. I have a web interface on server A, and DB on server B. Server A is a membership site.

    If someone tries to access a members-feature from site A, then site A will contact site B, run a cgi script (which returns YES or NO), then proceed according to the answer from B.

    [It's not possible for the user to connect to site B, then transfer to site A]

    I want this to be invisible to the user, so I'm using

    $fp = fopen(http://.../file.cgi?var=value);

    to run the remote script.

    Now, if the remote script returns a value, like

    return ($va1, $var2);

    ================= How can I read these value, from site A? =================

    If the function was in the same file, then it would be no problem. For example, with

    $var1 = function_name();

    $var1 would contain any value returned by function_name().

    ===================== Does that same concept holds, if the files are different? ====================

    === How can I capture the returned value of the remote file?

    === Is there a better way to do this?

    Any and all suggestions are welcome. I would appreciate any help, comments, directions, that can provide.

    Thanks in advance.

    -John M. pepiedesigns

    attached mail follows:


    You could try Xemacs, which has colour syntax highlighting and a built in psychoanalist! (No, really!) But I prefer Gvim. You need (say) gvim 5.7 and the vim 5.7rt. If you're running a *nix, build it against Gtk. It's charityware, and looks and works the same on any platform. Menu driven and Grep style search and replace, unlimited undoos, colour sytax hightlighting, lots of ready made macros and so on. Get it from

    http://www.vim.org

    -- 
    ******************************************************************************
    Marx: "Why do Anarchists only drink herbal tea?"
    Proudhon: "Because all proper tea is theft."
    ******************************************************************************
    

    attached mail follows:


    Hi,

    can anyone suggest how to make this less hackish - perhaps preserving the array across page iterations somehow?

    I'm storing image path info in MySQL and creating an array from the result set, so I can build hrefs to the other pics as well as populate the img tag. This page calls itself to provide a running display of the current pic and the links to other pics. To preserve the passed href value, I've had to create the array TWICE as well as map the passed variable to another name to preserve it.

    tia, andrew

    <?php //begin database connection stuff include("db_connect_params.inc"); //all relevant database variables $sql="select path from PHOTO where pid =1"; //obvious $link_id = mysql_connect($host, $usr, $pass); //get connection handle $result = mysql_db_query($database, $sql, $link_id) or die("no result");

    //begin hackishness if (!isset($i)) { $i = 1; //initialize counter while($row=mysql_fetch_array($result)) //read rows of picture paths into an array { extract($row); $displayed[$i]=$path; echo "<a href=\"$PHP_SELF?i=$i\">$i</a>&nbsp&nbsp"; $i++; }

    echo "<img src =\"$displayed[1]\"></img><br>"; //use first row pic as default

    } else {

    $ii = $i; //preserve passed pic selection value $i = 1; //re-initialize counter while($row=mysql_fetch_array($result)) //read rows of picture paths into an array { extract($row); $displayed[$i]=$path; echo "<a href=\"$PHP_SELF?i=$i\">$i</a>&nbsp&nbsp"; $i++; }

    echo "<img src =\"$displayed[$ii]\"></img><br>"; //use passed pic

    }

    ?>

    attached mail follows:


    try using serialize() and unserialize()

    but if you have a large amount of data, you would be better off using sessions.

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Andrew" <andrewsalamander.net> To: <php-generallists.php.net> Sent: Thursday, February 15, 2001 3:49 AM Subject: [PHP] help make less ugly?

    > Hi, > > can anyone suggest how to make this less hackish - perhaps preserving the > array across page iterations somehow? > > I'm storing image path info in MySQL and creating an array from the result > set, so I can build hrefs to the other pics as well as populate the img tag. > This page calls itself to provide a running display of the current pic and > the links to other pics. > To preserve the passed href value, I've had to create the array TWICE as > well as map the passed variable to another name to preserve it. > > tia, > andrew > > <?php > file://begin database connection stuff > include("db_connect_params.inc"); file://all relevant database variables > $sql="select path from PHOTO where pid =1"; file://obvious > $link_id = mysql_connect($host, $usr, $pass); file://get connection handle > $result = mysql_db_query($database, $sql, $link_id) or die("no result"); > > file://begin hackishness > if (!isset($i)) > { > $i = 1; file://initialize counter > while($row=mysql_fetch_array($result)) file://read rows of picture paths into an > array > { > extract($row); > $displayed[$i]=$path; > echo "<a href=\"$PHP_SELF?i=$i\">$i</a>&nbsp&nbsp"; > $i++; > } > > echo "<img src =\"$displayed[1]\"></img><br>"; file://use first row pic as > default > > } else { > > $ii = $i; file://preserve passed pic selection value > $i = 1; file://re-initialize counter > while($row=mysql_fetch_array($result)) file://read rows of picture paths > into an array > { > extract($row); > $displayed[$i]=$path; > echo "<a href=\"$PHP_SELF?i=$i\">$i</a>&nbsp&nbsp"; > $i++; > } > > echo "<img src =\"$displayed[$ii]\"></img><br>"; file://use passed pic > > } > > ?> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Hello.. ..how i can make a extension for this version of PHP3? ..Thanks :-)

    attached mail follows:


    how can i make somthing that nows if there are 6-12 chars in a password field. Also how do you make somthing the know is the password, and the password confermation is the same. And finnally i need a script that know if they filled all the form fields, and one that know if they put and "" in there e - mial

    sorry for all the request but i just cant find it anywere and i need a little help to get my buissness going

    -Thank you for you time Brandon

    attached mail follows:


    with the password you can use the funcio srtlen:

    $number_of_chars=strlen($password);

    Where are the right password? On a database??

    In the site http://www.hotscripts.com you'll find a lot of script exemplos in PHP and JavaScript to verify if a e-mail typed is right.

    Augusto Cesar Castoldi

    On Wed, 14 Feb 2001, Brandon Feldhahn wrote:

    > how can i make somthing that nows if there are 6-12 chars in a password > field. Also how do you make somthing the know is the password, and the > password confermation is the same. And finnally i need a script that > know if they filled all the form fields, and one that know if they put > and "" in there e - mial > > sorry for all the request but i just cant find it anywere and i need a > little help to get my buissness going > > -Thank you for you time > Brandon > > > -- > 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:


    The latest version should be at: ftp://argeas.cs-net.gr/pub/unix/mcrypt/win32/

    --
    phill
    

    > Kevin Connolly wrote: > > Does anyone know where I might get the mcrypt dll for windows nt or > > win 98?? >

    attached mail follows:


    Hi, I need help from checkbox-specialists needed !

    I have a list of records each carrying a checkbox.

    The source in this original page looks like this as for the checkbox - the value of "value" equals the ID of the record:

    <input type=checkbox name=marked[] value=1 ></TD>... <input type=checkbox name=marked[] value=2 ></TD>... <input type=checkbox name=marked[] value=3 ></TD>...

    The user shall mark interesting records and upon submitting the form shall be shown on a new page showing only the marked records.

    The script for this new page exept for the query is shown below.

    WHAT MUST THE QUERY ON THIS NEW PAGE LOOK LIKE? e.g.

    Thanks for any help!

    Helmut

    <TABLE <TR > <? for (list($key, $val) = each($id)) { echo $key . " " . $val . "<BR>\n"; } $val = urlencode(mysql_result($result,$i,"id")); echo "<TD><input type=checkbox name=marked[]"; echo " value="; print_sp($val); echo " checked></TD>"; echo "<TD><b><A HREF=$PHP_SELF?func=browselist&par="; $val = urlencode(mysql_result($result,$i,"id")); print_sp($val); echo ">"; $val = mysql_result($result,$i,"id"); print_sp(w.$val); echo "</A></b></TD>";

    echo "<TD ><fontcolor=#000080>"; $val = mysql_result($result, $i, "field1"); print_sp($val); echo "</font></TD>";

    echo "<TD ><fontcolor=#000080>"; $val = mysql_result($result, $i, "field2"); print_sp($val); echo "</font></TD>";

    echo "</TR>"; endfor; echo "</Td></TR></TABLE>";

    if ($result){mysql_free_result($result);} endif /* Show selected */ ?>

    attached mail follows:


    Okay, last one for the day! How do you query the clients IP address? We have a site in development, and I want to restrict access to people coming in from certain IP addresses. Really, all I need to do is query the IP address, I can code the rest of it.

    Thanks!

    Karl

    attached mail follows:


    Run <? phpinfo(); ?>

    on a page. You will be able to see all of the available environment variables avaliable to you, one will tell you the client IP address.

    Michael

    "Karl J. Stubsjoen" wrote:

    > Okay, last one for the day! How do you query the clients IP address? We > have a site in development, and I want to restrict access to people coming > in from certain IP addresses. > Really, all I need to do is query the IP address, I can code the rest of it. > > Thanks! > > Karl > > -- > 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:


    be Careful using the IPAddress as a primary security measure. If the client has accessed your site through a proxy, then the IP Address shown will be the IP Address of the proxy. While you can use X_FORWARDED_FOR (or something similar,c ant remember off the top of my head :p ) to determine the requesting IP address, not all proxies support this and can be easily spoofed.

    IP address checking is fine as a filter, but make sure more robust methods are in place as a secondary precaution.

    ^^rk << This email brought to you by RFCs 821 and 1225. >> << If I was a signature file, where would I be?? >> << if (is_function($i)) { which_one_would_i_be(); } >>

    Michael Stearne wrote: > > Run > <? > phpinfo(); > ?> > > on a page. You will be able to see all of the available environment variables > avaliable to you, one will tell you the client IP address. > > Michael > > "Karl J. Stubsjoen" wrote: > > > Okay, last one for the day! How do you query the clients IP address? We > > have a site in development, and I want to restrict access to people coming > > in from certain IP addresses. > > Really, all I need to do is query the IP address, I can code the rest of it. > > > > Thanks! > > > > Karl > > > > -- > > 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:


    Karl J. Stubsjoen wrote: > Okay, last one for the day! How do you query the clients IP address? > We have a site in development, and I want to restrict access to > people coming in from certain IP addresses. > Really, all I need to do is query the IP address, I can code the rest > of it.

    $remote_ip = getenv('REMOTE_ADDR'); should work. There are other ways, but this one should be the safest.

    regards Wagner

    -- 
    Three may keep a secret, if two of them are dead.
    

    attached mail follows:


    On Thu, 15 Feb 2001 07:12, Randy Johnson wrote: > Can somebody give me a url of an example or an example of how to page > results so they can be view by clicking page 1 page 2 or back and > next? > > results obtained from mysql database. > > Thanks > > Randy

    http://px.sklar.com/code.html?code_id=77

    and leave out the require at the beginning. You'll need to hack it around a bit (lot?) to suit your circumstances, but the code to keep track of where you are is in there.

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    I guess there are good articles on this at phpbuilder.com

    http://www.phpbuilder.com/columns/rod20001214.php3

    http://www.phpbuilder.com/columns/rod20000221.php3

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Randy Johnson" <programmerjennybug.com> To: <php-generallists.php.net> Sent: Thursday, February 15, 2001 2:12 AM Subject: [PHP] Paging results

    > Can somebody give me a url of an example or an example of how to page > results so they can be view by clicking page 1 page 2 or back and next? > > results obtained from mysql database. > > Thanks > > Randy > > > -- > 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:


    Evan,

    It sounds like your PATH doesn't contain the JDK/bin directory. What happens if you type "which jar" at a command shell?

    Alex

    attached mail follows:


    "Jens Nedal" <jnedalostry.com> wrote: > In case of displaying \n that are stored in a variable or com from a DB or > inptu field you can also use nl2br($var) which automatically converts those > linebreaks to <br> and so get displayed correctly.

    Good call, Jens.

    > Though that will not work > for the tabs.

    For tabs something like this will probably give a tolerable result, though I've never had a need to try:

    $var = str_replace( "\t", str_repeat( "&nbsp;", 4 ), $var );

    --
    Steve Werby
    COO
    24-7 Computer Services, LLC
    Tel: 804.817.2470
    http://www.247computing.com/
    

    attached mail follows:


    Hi, How do I get the index,number of an array if reffering to an array via string? Ex: I have 100 arrays, and I want to know what # myarray["something"] is. I looked at Current, but how do I move the pointer to where "something" is in the array?

    Would this work:

    $null = myarray["something"]; $indexofsomething = current();

    Thanks, Chris

    attached mail follows:


    At 19:53 14/2/2001 +0100, Christian Reiniger wrote: >On Wednesday 14 February 2001 18:43, Christian Dechery wrote: > > that's kinda what I have here... but the line of code isn't being > > shown... and that is the problem... I for one, think that in an error > > message the line of code is crucial. > >Check the manual for set_error_handler ()

    well... that could help, but even than I'd have to call that error_handler everytime I execd a query and still would have to pass to it the __LINE__ of code...

    so, I'd wouldn't exactly help... ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer

    attached mail follows:


    How can I disable the display of error to the browser window from within the script? I want to do a redirect based on the error and cannot because header info has already been sent.

    Thanks, Pat

    attached mail follows:


    On Thu, 15 Feb 2001 11:42, Patrick Brown wrote: > How can I disable the display of error to the browser window from > within the script? I want to do a redirect based on the error and > cannot because header info has already been sent. > > Thanks, > Pat

    Try an prepended to the function that triggers the error, then test for the error. should prevent the display of the error message.

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    In article <96faad$h9k$1toye.p.sourceforge.net>, pbrownsla.com ("Patrick Brown") wrote:

    > How can I disable the display of error to the browser window from within the > script? I want to do a redirect based on the error and cannot because header > info has already been sent.

    Use the "" sign. Example

    some_function()

    -- 
    CC
    

    attached mail follows:


    OK, I tried the symbol. It seemed to just disable error checking altogether. I have this in my code that I'd like to use.

    if (!$php_errormsg) { header("Location: http://www.domain.com/admin/index.php"); } else { header("Location: http://www.domain.com/admin/error.html"); }

    "CC Zona" <cczonanospam.invalid> wrote in message news:96fcv5$2o0$1toye.p.sourceforge.net... > In article <96faad$h9k$1toye.p.sourceforge.net>, pbrownsla.com ("Patrick > Brown") wrote: > > > How can I disable the display of error to the browser window from within the > > script? I want to do a redirect based on the error and cannot because header > > info has already been sent. > > Use the "" sign. Example > > some_function() > > -- > CC > > -- > 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:


    ---------------------------------------------------------------------------- ----------------- Disclaimer: The information contained in this email is intended only for the use of the person(s) to whom it is addressed and may be confidential or contain legally privileged information. If you are not the intended recipient you are hereby notified that any perusal, use, distribution, copying or disclosure is strictly prohibited. If you have received this email in error please immediately advise us by return email at postmasternormandy.com.au and delete the email document without making a copy. ---------------------------------------------------------------------------- -----------------

    Pretty neat, I never once thought of making one big parameter array....

    I agree its all a matter of taste. It could be a personal inditement but i've always found my OO code easier to extend and maintain than my proceedural stuff.

    I can only recommend you give a go in PHP and see if it makes a difference for you.

    mn

    Mark Nold marknenspace.com <mailto:marknenspace.com> Senior Consultant   Change is inevitable, except from vending machines.

    -----Original Message----- From: Mark Maggelet [mailto:maggeletmminternet.com] Sent: Thursday, February 15, 2001 2:16 AM To: Nold, Mark; php-generallists.php.net Subject: RE: [PHP] OOP in web development

    On Wed, 14 Feb 2001 19:21:20 +1030, Nold, Mark (mark.noldnormandy.com.au) wrote: >---------------------------------------------------------------------

    >------- >----------------- >Disclaimer: The information contained in this email is intended only >for the >use of the person(s) to whom it is addressed and may be confidential >or >contain legally privileged information. If you are not the intended >recipient you are hereby notified that any perusal, use, >distribution, >copying or disclosure is strictly prohibited. If you have received >this >email in error please immediately advise us by return email at >postmasternormandy.com.au and delete the email document without >making a >copy. >---------------------------------------------------------------------

    >------- >----------------- > >I have to agree that OOP is much better in abstracting than user >defined >functions... why? > >To return some data and display in a HTML table it i do: >$db = new DB; >$db->query("SELECT foo from bar"); > >$t = new Table; >echo $t->create($db->data); > > >Pretty easy. Now i could have all these have be functions > >$data = query($connection_details,"SELECT foo from bar"); >echo create_table($data); > >But.... > >What if i wanted a special connection specified as myDB that was >consistant >through out my site? Or what if my table creation function has over >30 >different options setable (colours, fonts, spacing by cells, >columns, rows >and table)? This becomes difficult with pure functions as you end up >with > > >echo >create_table($data,"nowrap","black",null,"white",null,null,null,"Taho

    >ma",12, >null,null,null,array(array("bold"))); > >instead of > >$t = new Table; >$t->options = "nowrap"; >$t->heading["bgcolor"] = "black"; >$t->heading["fontcolor"] = "white"; >$t->global["font"] = "tahoma"; >$t->global["fontsize"] = 12; >$t->column["total"]["format"] = "bold"; > >echo $t->create($db->data);

    you could do something like:

    $parameters["options"] = "nowrap"; $parameters["heading"]["bgcolor"] = "black"; $parameters["heading"]["fontcolor"] = "white"; $parameters["global"]["font"] = "tahoma"; $parameters["global"]["fontsize"] = 12; $parameters["column"]["total"]["format"] = "bold"; echo create_table($data,$parameters);

    The difference is a matter of style.

    >// Create another table with similiar properties, but different data >echo $t->create($mydb->data); > > > >What if wanted to make my table definition reusable (you would have >to make >sure all these class's are included like your functions) > > >class myTable extends Table { > var $options = "nowrap"; > var $heading["bgcolor"] = "black"; > var $heading["fontcolor"] = "white"; > var $global["font"] = "tahoma"; > var $global["fontsize"] = 12; > var $column["total"]["format"] = "bold"; >} > > >Then from then on you could just call > > >$t = new myTable; >echo $t->create($db->data); > >Now if change my definition of what a myTable should look like i >change it >once, not in everyfile as you might with functions. (You could >however >define a new function called create_myTable that does something >similiar).

    this is nothing you can't do without OOP.

    >The last benefit is that with phpdoc and similiar tools class's can >be autodocumented which is very nice.

    Maybe so, I never used it. To me, the main reason to use OOP is when you're dealing with Java or something and native code is dealing with your objects. For instance laying out widgets on a screen might need that your widget extend Widget and have a draw() method.

    I've never had a situation with php where I thought doing things this way would make things easier.

    - Mark

    attached mail follows:


    Hi Guys,

    Does anybody know how to upload a file if the only information you have is the string to the location of the file on the clients hard drive. Also, the string was not retrieved using the form method, which I know about. This method can't be used and I need to be able to upload with only the location information.

    PHP3 is the ver that I am using.

    Thanks

    Scott Mebberson scottredbluedesign.com

    attached mail follows:


    Doesn't anybody know anything?? Even a nope it can't be done is a better response than nothing?

    Thanks guys

    ""Scott Mebberson"" <scottredbluedesign.com> wrote in message news:96fcni$kg$1toye.p.sourceforge.net... > Hi Guys, > > Does anybody know how to upload a file if the only information you have is > the string to the location of the file on the clients hard drive. Also, the > string was not retrieved using the form method, which I know about. This > method can't be used and I need to be able to upload with only the location > information. > > PHP3 is the ver that I am using. > > Thanks > > Scott Mebberson > scottredbluedesign.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    > Doesn't anybody know anything?? Even a nope it can't be done > is a better response than nothing?

    "Nope, it can't be done."

    Well ... actually, it *can* be done. But you ruled out the only possible method of doing it, for some reason.

    Jason

    -- 
    Jason Murray
    jasonmmelbourneit.com.au
    Web Design Team, Melbourne IT
    Fetch the comfy chair!
    

    attached mail follows:


    Scott Mebberson wrote: > Does anybody know how to upload a file if the only information you have is > the string to the location of the file on the clients hard drive. Also, the > string was not retrieved using the form method, which I know about. This > method can't be used and I need to be able to upload with only the location > information.

    I wouldn't know how to do this myself, especially since it would help greatly in a project I'm working on. Although I'm suspecting it's a restriction in the <input type="file"> tag which won't allow this kind of behaviour. eg: "c:/windows/passwd.pwl"

    of course I could be paranoid

    -- 
    | Disclaimer:                            | Timothy Aslat timspyderweb.com.au |
    | The sender of this email is a figment  | http://www.goodiesruleok.com       |
    | of a deranged imagination and leaves it| Spyderweb Consulting               |
    | to your own devices to decide whose... | P: 82270800    M: 0401088479       |
    

    attached mail follows:


    > > Does anybody know how to upload a file if the only information you > > have is the string to the location of the file on the clients hard > > drive. Also, the string was not retrieved using the form method, which > > I know about. This method can't be used and I need to be able to upload > > with only the location information. > > I wouldn't know how to do this myself, especially since it would help > greatly in a project I'm working on. Although I'm suspecting it's a > restriction in the <input type="file"> tag which won't allow this kind > of behaviour. eg: "c:/windows/passwd.pwl" > > of course I could be paranoid

    Actually, given your comments and thinking about the original post again, why does it sound like he's trying to do Something Naughty(tm)? :)

    Jason

    attached mail follows:


    So does anybody have a work around. I need this becase I am creating a web updating system using my own code and text box. Ie, I use reg epx's to search through 'my code' and change it to proper html. Then I search through and find all file references in order to upload them. But them I am stuck with strings to files on people's hard drives, with no way of uploading??

    Any ideas??

    Thanks guys for helping out

    ""Scott Mebberson"" <scottredbluedesign.com> wrote in message news:96fcni$kg$1toye.p.sourceforge.net... > Hi Guys, > > Does anybody know how to upload a file if the only information you have is > the string to the location of the file on the clients hard drive. Also, the > string was not retrieved using the form method, which I know about. This > method can't be used and I need to be able to upload with only the location > information. > > PHP3 is the ver that I am using. > > Thanks > > Scott Mebberson > scottredbluedesign.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    > Doesn't anybody know anything?? Even a nope it can't be done is a better > response than nothing? > > Thanks guys

    Don't always expect a response, especially within 137 minutes.

    Also consider how dangerous it would be. If I decided to check for files on a visitors HD's and was able to download them at will, that would be bad.

    Regards,

    Philip

    attached mail follows:


    Scott Mebberson pressed the little lettered thingies in this order...

    > So does anybody have a work around. > I need this becase I am creating a web updating system using my own code > and text box. Ie, I use reg epx's to search through 'my code' and change it > to proper html. Then I search through and find all file references in order > to upload them. But them I am stuck with strings to files on people's hard > drives, with no way of uploading?? > > Any ideas?? > > Thanks guys for helping out > > > > ""Scott Mebberson"" <scottredbluedesign.com> wrote in message > news:96fcni$kg$1toye.p.sourceforge.net... > > Hi Guys, > > > > Does anybody know how to upload a file if the only information you have > > is the string to the location of the file on the clients hard drive. > > Also, > the > > string was not retrieved using the form method, which I know about. This > > method can't be used and I need to be able to upload with only the > location

    In order to do ANYTHING on the client computer, you need a CLIENT- SIDE program. PHP is handled completely SERVER-SIDE, so no, this cannot be done in PHP (unless, of course, the client and the server are the same machine).

    You'll be wanting to look into javascript or something more of that flavor.

    Good luck...

    Christopher Ostmo a.k.a. techAppIdeas.com AppIdeas.com

    For a good time, http://www.AppIdeas.com/

    attached mail follows:


    Hello,

    I have a situation where I need to verify the PGP signature of a message that is stored within a variable in a PHP script. Is it possible to launch external programs from within PHP? I can't find anything about it in the manual. If not, has anyone ported PGP over to PHP?? (That's a lot of Ps!)

    Thanks for your help!

    Wyatt

    attached mail follows:


    On Thu, 15 Feb 2001 12:40, Wyatt Earp wrote: > Hello, > > I have a situation where I need to verify the PGP signature of a > message that is stored within a variable in a PHP script. Is it > possible to launch external programs from within PHP? I can't find > anything about it in the manual. If not, has anyone ported PGP over to > PHP?? (That's a lot of Ps!) > > Thanks for your help! > > Wyatt

    Program execution functions - exec or system might be what you need.

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    On Thu, 15 Feb 2001, David Robley wrote: > > Program execution functions - exec or system might be what you need.

    Thanks, exec sounds sounds like what I need.

    - Wyatt

    attached mail follows:


    * Janet Valade <janetvsystech.com> [010214 18:33]: > I think you can do it like this: > > $mailbody="$varname\n$varname2"; That works. Hmm. I wonder why the concatenation didn't?

    Thanks!

    LER

    > > Janet > > > > -----Original Message----- > > From: Larry Rosenman [SMTP:lerlerctr.org] > > Sent: Wednesday, February 14, 2001 11:22 AM > > To: php-generallists.php.net > > Subject: [PHP] concatenating strings and \n's for mail... > > > > Greetings, > > I was trying to build up a multi-line body to use with the mail > > command, using code similar to: > > $mailbody = $mailbody . '\n' . $HTTP_POST_VARS["somefield"]; > > > > when I sent the mail, the \n showed up, not as a new line, but a > > literal \n. How do I fix this? > > > > This is with 4.0.4pl1. > > > > LER > > > > > > -- > > Larry Rosenman http://www.lerctr.org/~ler > > Phone: +1 972-414-9812 E-Mail: lerlerctr.org > > US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 > > > > -- > > 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

    -- 
    Larry Rosenman                     http://www.lerctr.org/~ler
    Phone: +1 972-414-9812                 E-Mail: lerlerctr.org
    US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
    

    attached mail follows:


    [restored to bottom-posting, for clarity]

    > > > I was trying to build up a multi-line body to use with the mail > > > command, using code similar to: > > > $mailbody = $mailbody . '\n' . $HTTP_POST_VARS["somefield"];

    <snip>

    > > I think you can do it like this: > > > > $mailbody="$varname\n$varname2"; > That works. Hmm. I wonder why the concatenation didn't?

    Because '\n' is a string consisting of a backslash followed by the letter n, while "\n" is a newline character. Gotta use double-quotes.

    -- 
    CC
    

    attached mail follows:


    * CC Zona <cczonanospam.invalid> [010214 21:21]: > [restored to bottom-posting, for clarity] > > > > > I was trying to build up a multi-line body to use with the mail > > > > command, using code similar to: > > > > $mailbody = $mailbody . '\n' . $HTTP_POST_VARS["somefield"]; > > <snip> > > > > I think you can do it like this: > > > > > > $mailbody="$varname\n$varname2"; > > That works. Hmm. I wonder why the concatenation didn't? > > Because '\n' is a string consisting of a backslash followed by the letter > n, while "\n" is a newline character. Gotta use double-quotes. I even had trouble within double quotes with the concatenation.

    LER

    -- 
    Larry Rosenman                     http://www.lerctr.org/~ler
    Phone: +1 972-414-9812                 E-Mail: lerlerctr.org
    US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
    

    attached mail follows:


    you will need to use "\r\n" instead of only "\n", I guess

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Larry Rosenman" <lerlerctr.org> To: <php-generallists.php.net> Sent: Thursday, February 15, 2001 12:51 AM Subject: [PHP] concatenating strings and \n's for mail...

    > Greetings, > I was trying to build up a multi-line body to use with the mail > command, using code similar to: > $mailbody = $mailbody . '\n' . $HTTP_POST_VARS["somefield"]; > > when I sent the mail, the \n showed up, not as a new line, but a > literal \n. How do I fix this? > > This is with 4.0.4pl1. > > LER > > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 972-414-9812 E-Mail: lerlerctr.org > US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    I have a few text input boxes that I am using to allow the client to compose emails for a mailing list... does anyone have a little snippet that will take the "\n's" and turn them into <BR>'s? I would attempt to write one myself.... but Im not the best at ereg or replace code...

    Much Thanks in Advance.

    Dallas K.

    attached mail follows:


    Are you sure you want to convert \n into <br> for an email? At any rate, a function exists for this conversion :

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

    Regards,

    Philip Olson http://www.cornado.com/

    .sig be outside the box.

    On Wed, 14 Feb 2001, Dallas Kropka wrote:

    > I have a few text input boxes that I am using to allow the client to > compose emails for a mailing list... does anyone have a little snippet that > will take the "\n's" and turn them into <BR>'s? I would attempt to write one > myself.... but Im not the best at ereg or replace code... > > > Much Thanks in Advance. > > Dallas K. > > > -- > 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:


    Hmmm, ok, now I feel like a dumbass..... and somewhere in the back of my mind I knew of that function.

    sorry.

    -----Original Message----- From: Cameron [mailto:gamrgattcomp.com.au] Sent: Wednesday, February 14, 2001 9:34 PM To: Dallas Kropka Subject: Re: [PHP] A little code here? :)

    http://www.php.net/nl2br

    RTFM

    Dallas Kropka wrote:

    > I have a few text input boxes that I am using to allow the client to > compose emails for a mailing list... does anyone have a little snippet that > will take the "\n's" and turn them into <BR>'s? I would attempt to write one > myself.... but Im not the best at ereg or replace code... > > Much Thanks in Advance. > > Dallas K. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    check nl2br()

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Dallas Kropka" <dallaskaustin.rr.com> To: "PHP LIST" <php-generallists.php.net> Sent: Thursday, February 15, 2001 9:01 AM Subject: [PHP] A little code here? :)

    > I have a few text input boxes that I am using to allow the client to > compose emails for a mailing list... does anyone have a little snippet that > will take the "\n's" and turn them into <BR>'s? I would attempt to write one > myself.... but Im not the best at ereg or replace code... > > > Much Thanks in Advance. > > Dallas K. > > > -- > 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:


    Hiya, i was wondering if some one could help me with this ... i have a little form where you can enter a value say company then on submit its ment to check the db for value or one like it my sql line works fine (mysql_error() shows nothing and it works from command line) ..

    . . . <form name=search method=POST action="<? $PHP_SELF ?>"> <input type="text" name="query"> <input type="submit" name="submit" value="submit"> </form> <? if ($submit){ echo "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" BGCOLOR=\"#CCCCCC\" ALIGN=\"CENTER\">\n<tr BGCOLOR=\"#CCCCCC\">\n<td bgcolor=\"#006699\"><div align=\"center\"><font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#FFFFFF\"><b>Company</b> </td></tr>"; $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE '%$query%'"); printf("<tr><td> $company </td></tr>\n"); echo "</table>"; echo mysql_error(); } ?>

    Thanks in advance

    Peter

    attached mail follows:


    In article <NEBBLGJHKKLGPHEAPNADEEEECBAA.peterhsunrentals.com.au>, peterhvfsa.com.au ("Peter Houchin") wrote:

    > <form name=search method=POST action="<? $PHP_SELF ?>"> > <input type="text" name="query"> > <input type="submit" name="submit" value="submit"> > </form> > <? if ($submit){ > echo "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" > BGCOLOR=\"#CCCCCC\" ALIGN=\"CENTER\">\n<tr BGCOLOR=\"#CCCCCC\">\n<td > bgcolor=\"#006699\"><div align=\"center\"><font face=\"Helvetica, > sans-serif\" size=\"3\" color=\"#FFFFFF\"><b>Company</b> </td></tr>"; > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$query%'"); > printf("<tr><td> $company </td></tr>\n"); > echo "</table>"; > echo mysql_error(); > } > ?>

    Are you establishing a valid database connection someplace earlier in the script? If not, then you need to do so first (see mysql_connect mysql_pconnect, for instance). Also, the resource id for that connection should be included as the second parameter in your mysql_query() call. You may find it helpful to read the PHP manual section on mysql and/or a PHP/MySQL tutorial (ex. phpbuilder.com).

    -- 
    CC
    

    attached mail follows:


    Peter,

    after querying the database, you need to fetch the returned values from the result before you can use them:

    > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$query%'");

    $row = mysql_fetch_row($result); $company = $row[0];

    OR (shorter):

    list($company)=mysql_fetch_row($result);

    > printf("<tr><td> $company </td></tr>\n");

    otherwise, $company would not be set.

    Ben

    Peter Houchin wrote: > > Hiya, i was wondering if some one could help me with this ... i have a > little form where you can enter a value say company then on submit its ment > to check the db for value or one like it my sql line works fine > (mysql_error() shows nothing and it works from command line) .. > > . > . > . > <form name=search method=POST action="<? $PHP_SELF ?>"> > <input type="text" name="query"> > <input type="submit" name="submit" value="submit"> > </form> > <? if ($submit){ > echo "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" > BGCOLOR=\"#CCCCCC\" ALIGN=\"CENTER\">\n<tr BGCOLOR=\"#CCCCCC\">\n<td > bgcolor=\"#006699\"><div align=\"center\"><font face=\"Helvetica, > sans-serif\" size=\"3\" color=\"#FFFFFF\"><b>Company</b> </td></tr>"; > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$query%'"); > printf("<tr><td> $company </td></tr>\n"); > echo "</table>"; > echo mysql_error(); > } > ?> > > Thanks in advance > > Peter

    attached mail follows:


    thanks ben it works :)

    Just one thing if i say enter just one letter .. how could i make it show more than just the one result?

    -----Original Message----- From: benhost2.successfulhosting.com [mailto:benhost2.successfulhosting.com]On Behalf Of Ben Peter Sent: Thursday, February 15, 2001 2:23 PM To: Peter Houchin Cc: PHP MAIL GROUP Subject: Re: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working

    Peter,

    after querying the database, you need to fetch the returned values from the result before you can use them:

    > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$query%'");

    $row = mysql_fetch_row($result); $company = $row[0];

    OR (shorter):

    list($company)=mysql_fetch_row($result);

    > printf("<tr><td> $company </td></tr>\n");

    otherwise, $company would not be set.

    Ben

    Peter Houchin wrote: > > Hiya, i was wondering if some one could help me with this ... i have a > little form where you can enter a value say company then on submit its ment > to check the db for value or one like it my sql line works fine > (mysql_error() shows nothing and it works from command line) .. > > . > . > . > <form name=search method=POST action="<? $PHP_SELF ?>"> > <input type="text" name="query"> > <input type="submit" name="submit" value="submit"> > </form> > <? if ($submit){ > echo "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" > BGCOLOR=\"#CCCCCC\" ALIGN=\"CENTER\">\n<tr BGCOLOR=\"#CCCCCC\">\n<td > bgcolor=\"#006699\"><div align=\"center\"><font face=\"Helvetica, > sans-serif\" size=\"3\" color=\"#FFFFFF\"><b>Company</b> </td></tr>"; > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$query%'"); > printf("<tr><td> $company </td></tr>\n"); > echo "</table>"; > echo mysql_error(); > } > ?> > > Thanks in advance > > Peter

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


    Peter,

    use something like

    if ( mysql_num_rows( $result ) ) { echo '<UL>'; while( list($company) = mysql_fetch_row($result) ) { echo '<LI>'.htmlentities($company).'</LI>'; } echo '</UL>'; }

    the first line checks whether there are results (if no, we don't need to display the <UL></UL> either.

    The while runs until mysql_fetch_row returns false, which is the case when all rows have been retireved.

    htmlentitites($company) makes sure that no HTML special characters slip through (like a company named '<E>-Buiz Inc'.

    Ben

    Peter Houchin wrote: > > thanks ben it works :) > > Just one thing if i say enter just one letter .. how could i make it show > more than just the one result? > > -----Original Message----- > From: benhost2.successfulhosting.com > [mailto:benhost2.successfulhosting.com]On Behalf Of Ben Peter > Sent: Thursday, February 15, 2001 2:23 PM > To: Peter Houchin > Cc: PHP MAIL GROUP > Subject: Re: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working > > Peter, > > after querying the database, you need to fetch the returned values from > the result before you can use them: > > > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > > '%$query%'"); > > $row = mysql_fetch_row($result); > $company = $row[0]; > > OR (shorter): > > list($company)=mysql_fetch_row($result); > > > printf("<tr><td> $company </td></tr>\n"); > > otherwise, $company would not be set. > > Ben > > Peter Houchin wrote: > > > > Hiya, i was wondering if some one could help me with this ... i have a > > little form where you can enter a value say company then on submit its > ment > > to check the db for value or one like it my sql line works fine > > (mysql_error() shows nothing and it works from command line) .. > > > > . > > . > > . > > <form name=search method=POST action="<? $PHP_SELF ?>"> > > <input type="text" name="query"> > > <input type="submit" name="submit" value="submit"> > > </form> > > <? if ($submit){ > > echo "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" > > BGCOLOR=\"#CCCCCC\" ALIGN=\"CENTER\">\n<tr BGCOLOR=\"#CCCCCC\">\n<td > > bgcolor=\"#006699\"><div align=\"center\"><font face=\"Helvetica, > > sans-serif\" size=\"3\" color=\"#FFFFFF\"><b>Company</b> </td></tr>"; > > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > > '%$query%'"); > > printf("<tr><td> $company </td></tr>\n"); > > echo "</table>"; > > echo mysql_error(); > > } > > ?> > > > > Thanks in advance > > > > Peter > > -- > 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:


    Could anyone recommend a reasonably priced (preferably below USD 100 a month) host that provides PHP4 and MySQL? What are your experiences with the host that you are recommeding?

    Thanks in advance.

    - Andres Montiel

    attached mail follows:


    Freemail wrote: > Could anyone recommend a reasonably priced (preferably > below USD 100 a month) host that provides PHP4 and > MySQL? What are your experiences with the host that you > are recommeding?

    Actually, yes. I do. My rates are approximately US$20 per month depending on the expected size of the database.

    as far as experiences go, I haven't had any complaints about the QOS or the accessibility of the system.

    -- 
    | Disclaimer:                            | Timothy Aslat timspyderweb.com.au |
    | The sender of this email is a figment  | http://www.goodiesruleok.com       |
    | of a deranged imagination and leaves it| Spyderweb Consulting               |
    | to your own devices to decide whose... | P: 82270800    M: 0401088479       |
    

    attached mail follows:


    Well I don't know about anyone else's experience, but I've been using JTL Networks (http://www.jtlnet.com) for almost 6 months. Granted, that's not a lot of time, but I've been fairly impressed with them. Reasonable rates, a great support staff, and a lot of flexibility...

    Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com =================================

    > -----Original Message----- > From: Freemail [mailto:freemailsofthome.net] > Sent: Wednesday, February 14, 2001 8:56 PM > To: php-generallists.php.net > Subject: [PHP] recommended PHP/MySQL host > > > Could anyone recommend a reasonably priced (preferably > below USD 100 a month) host that provides PHP4 and > MySQL? What are your experiences with the host that you > are recommeding? > > Thanks in advance. > > - Andres Montiel > > > -- > 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:


    take a look at some good tutorials on www.phpbuilder.com, www.devshed.com and www.webmonkey.com

    also, download the php manual from www.php.net and go through the installation section therein that deals in detail with the stuff on installing php with apache , both on Windows and Unix

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: <itedmac.com> To: <php-generallists.php.net> Sent: Wednesday, February 14, 2001 5:31 PM Subject: [PHP] apache & php

    > help! > > i want to get started! > > how do configure Apache to work with PHP? > > apparently it is not because my browser will not "find" the test files.php. > > please help me to test it. > > i am using Mac OS X (pb) so i should follow any Unix procedure ok, i think. > > thank you. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    check out the filesystems functions in the php manual

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

    and also check out the code of some good file Management systems at

    http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/File_Ma nagement/

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Karl J. Stubsjoen" <karlflipskstub.com> To: "PHP Mailing List" <php-generallists.php.net> Sent: Wednesday, February 14, 2001 8:44 PM Subject: [PHP] Help Work with files

    > Hello, I need to work with files on my web server. I need to be able move > them, delete them, rename them etc... > Is there a section in the documentation devoted to this? > - How do I list files in a directory? > > Thanks! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    try using

    strtotime()

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

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Don" <donlclcan.com> To: "php list" <php-generallists.php.net> Sent: Wednesday, February 14, 2001 9:17 PM Subject: [PHP] date maniplations

    > Hello, > > Sorry if I am confused by the date functions in the manual but I am. > Here's what I want to do: > > I have a string in the form MM/DD/YYYY. I wish to: > 1) convert it to a date > 2) add $n days to it > 3) convert back to a string in the same format above > > I believe I can accomplish [2] and [3] with: > > $mytdate = date("m/d/Y",mktime(0,0,0,date("m") > ,date("d")+$n,date("Y"))); > > How do I accomplish step 1? > Can I type cast a string to a date? > > Thanks, > Don > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    read about stripslashes at

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

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Nguyen, David M" <david.m.nguyenxo.com> To: <php-generallists.php.net> Sent: Wednesday, February 14, 2001 9:32 PM Subject: [PHP] Why???

    > Hi all, > > I have a PHP web form setup for user to fill in information then email it to > me after pressing SUBMIT button. Everytime user uses double-quote(") or > single(') it inserts (/) right in front of " or '. Does anyone know why and > how to fix it? Please advise. Below is example of what I got from my email > when user submits form to me. > > > Topic: Added \"Initial login to the EMS\" procedure. > > > Thanks in advance, > David > > > > -- > 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:


    just use

    <?

    $topic=stripslashes($topic); $to = "xxxxxxxxo.com"; $subject = "Update"; $message = "The following Webpage is added or updated:\n\nDate: $date\nEquipment : $equipment\nTopic: $topic\nURL: $url"; $mail_header = "From: $email"; mail( $to, $subject, $message, $mail_header ) or print "Could not send mail";

    print ("<HTML>\n"); print ("<HEAD>\n"); print ("<TITLE>$title</TITLE>\n"); print ("</HEAD>\n"); print ("<BODY BACKGROUND=\"images/bkgrnd.jpg\" bgcolor=\"#FFFFFF\">\n"); print ("<H3>Thank you. Your submission has been sent. <br><br><A HREF=\"index.h tml\">Back</A> to Home Page.\n"); print ("</BODY>\n"); print ("</HTML>"); ?>

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Nguyen, David M" <david.m.nguyenxo.com> To: <php-generallists.php.net> Sent: Wednesday, February 14, 2001 9:58 PM Subject: RE: [PHP] Why???

    > The / is coming from $topic, how do I use stripslashes to remove / . Can > someone give me an example how to code it? > > Here is my original PHP script: > > <? > > $to = "xxxxxxxxo.com"; > $subject = "Update"; > $message = "The following Webpage is added or updated:\n\nDate: > $date\nEquipment > : $equipment\nTopic: $topic\nURL: $url"; > $mail_header = "From: $email"; > mail( $to, $subject, $message, $mail_header ) or print "Could not send > mail"; > > print ("<HTML>\n"); > print ("<HEAD>\n"); > print ("<TITLE>$title</TITLE>\n"); > print ("</HEAD>\n"); > print ("<BODY BACKGROUND=\"images/bkgrnd.jpg\" bgcolor=\"#FFFFFF\">\n"); > print ("<H3>Thank you. Your submission has been sent. <br><br><A > HREF=\"index.h > tml\">Back</A> to Home Page.\n"); > print ("</BODY>\n"); > print ("</HTML>"); > > ========================================================== > > > > -----Original Message----- > From: John Vanderbeck [mailto:agathorncfl.rr.com] > Sent: Wednesday, February 14, 2001 10:07 AM > To: Nguyen, David M; php-generallists.php.net > Subject: Re: [PHP] Why??? > > > I can help you there, as I had the same problem until someone else helped > me. This is because PHP will escape the input it gets. I think this is > dependant on some enviroment setting, but I can't recall which one. > > To fix it you call stripslashes($var); > > - John Vanderbeck > - Admin, GameDesign > > ----- Original Message ----- > From: "Nguyen, David M" <david.m.nguyenxo.com> > To: <php-generallists.php.net> > Sent: Wednesday, February 14, 2001 11:02 AM > Subject: [PHP] Why??? > > > > Hi all, > > > > I have a PHP web form setup for user to fill in information then email it > to > > me after pressing SUBMIT button. Everytime user uses double-quote(") or > > single(') it inserts (/) right in front of " or '. Does anyone know why > and > > how to fix it? Please advise. Below is example of what I got from my > email > > when user submits form to me. > > > > > > Topic: Added \"Initial login to the EMS\" procedure. > > > > > > Thanks in advance, > > David > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    use stripslashes() in the submit page to take care of the problem with the quotes

    for ex, if the name of the textbox for description is "txtDesc", use the following line at the top of the page

    $describe=stripslashes($describe);

    so your code will look like

    PHP Script #1: Editing description

    print' </textarea><br> Description:<br><textarea name=describe cols=40 rows=10>'; echo $info["description"]; print' </textarea><br>';

    PHP Script #2: (preview changes)

    <input type=hidden name=describe value="<?php print stripslashes($describe)?>"> <b>Description:</b><br> <?php print stripslashes($describe) ?> <p>

    PHP Script #3: (update database)

    $describe=stripslashes($describe); $sql = "UPDATE news SET release_date='$date', title='$title', description='$describe', contact='$contact', content='$test', type='$type' WHERE news_id=$id"; $result = mysql_query($sql)

    make sure that you make use of stripslashes in both the pages ( in the hidden field of the second page as well) otherwise you will have to use multiple stripslashes() calls to get back to your original data

    hope that halps best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Tanya Brethour" <brethourncsa.uiuc.edu> To: <php-generallists.php.net> Sent: Wednesday, February 14, 2001 10:26 PM Subject: [PHP] Qoute problem

    > > Hi! I was hoping that someone could help me out. I am not positive if I > understand whats going on.. so let me try to explain. > > This is a process to modify news articles in a MySQL database. > > (From the point after picking the article to modify) > PHP Script #1: > I grab everything from the database and stick it into the HTML form > (textarea, text, etc). I allow the user to modify whatever they want. > > PHP Script #2: > This script takes the new information and displays it to the user.. it is > a preview of what it will look like with the changes. > > PHP Script #3: > Updates the news article in the database. > > Now the problem I am having.. is that the description and content fields > have qoutes in them. For example: > Description: I like to run and walk. I love "smelly cheese." > > So.. when it tries to update the database. It will only store this as the > description: > I like to run and walk. I love\\ > > I know that its because the qoutes are not being escaped correctly.. and > it seems as though it is escaping the escape. > > So my question is.. how can I keep my qoutes? > > Just FYI.. I am making the user enter in the description and content in > html. So i cant just change the qoutes to HTMLTags because it would change > my <P> and <a href=> etc. > > Below is an example of the code (shortened for an example): > > PHP Script #1: Editing description > > print' > </textarea><br> > Description:<br><textarea name=describe cols=40 rows=10>'; > echo $info["description"]; > print' > </textarea><br>'; > > PHP Script #2: (preview changes) > > <input type=hidden name=describe value="<?php print $describe?>"> > <b>Description:</b><br> > <?php print $describe?> <p> > > PHP Script #3: (update database) > $sql = "UPDATE news SET release_date='$date', title='$title', > description='$describe', contact='$contact', content='$test', type='$type' > WHERE news_id=$id"; > $result = mysql_query($sql) > > > Thanks in advance. > > -Tanya > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    if you store the data in the MYSQL database with the slashes escaping the quotes, I think the complete stuff will get stored.

    for ex - if you have

    Description: I like to run and walk. I love "smelly cheese."

    and on posting, you get

    I like to run and walk. I love \"smelly cheese.\"

    it will store the complete string into the MYSQL database.

    and on retrieval you will get

    I like to run and walk. I love "smelly cheese."

    try it out

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Tanya Brethour" <brethourncsa.uiuc.edu> To: "Web master" <webmasterunni.com> Cc: <php-generallists.php.net> Sent: Wednesday, February 14, 2001 11:47 PM Subject: Re: [PHP] Qoute problem

    > > > Let says I strip the slashes.. so it goes back to just normal qoutes.. and > then do the str_replace("\"","|", $describe); > > $describe = stripslashes($describe); > str_replace("\"","|",$describe); > > It doesnt replace the qoutes.. > > -Tanya > > On Wed, 14 Feb 2001, Web master wrote: > > > My approach towards this problem was to parse the data before inserting > > and before displaying. > > Before inserting the data entered by user, do something like > > str_replace($comments, "'","~") and do the same thing for " do a > > different character like | and then insert it into database. > > Do the reverse before displaying the data, it should fix your problem.. > > > > Tanya Brethour wrote: > > > > > Hi! I was hoping that someone could help me out. I am not positive if I > > > understand whats going on.. so let me try to explain. > > > > > > This is a process to modify news articles in a MySQL database. > > > > > > (From the point after picking the article to modify) > > > PHP Script #1: > > > I grab everything from the database and stick it into the HTML form > > > (textarea, text, etc). I allow the user to modify whatever they want. > > > > > > PHP Script #2: > > > This script takes the new information and displays it to the user.. it is > > > a preview of what it will look like with the changes. > > > > > > PHP Script #3: > > > Updates the news article in the database. > > > > > > Now the problem I am having.. is that the description and content fields > > > have qoutes in them. For example: > > > Description: I like to run and walk. I love "smelly cheese." > > > > > > So.. when it tries to update the database. It will only store this as the > > > description: > > > I like to run and walk. I love\\ > > > > > > I know that its because the qoutes are not being escaped correctly.. and > > > it seems as though it is escaping the escape. > > > > > > So my question is.. how can I keep my qoutes? > > > > > > Just FYI.. I am making the user enter in the description and content in > > > html. So i cant just change the qoutes to HTMLTags because it would change > > > my <P> and <a href=> etc. > > > > > > Below is an example of the code (shortened for an example): > > > > > > PHP Script #1: Editing description > > > > > > print' > > > </textarea><br> > > > Description:<br><textarea name=describe cols=40 rows=10>'; > > > echo $info["description"]; > > > print' > > > </textarea><br>'; > > > > > > PHP Script #2: (preview changes) > > > > > > <input type=hidden name=describe value="<?php print $describe?>"> > > > <b>Description:</b><br> > > > <?php print $describe?> <p> > > > > > > PHP Script #3: (update database) > > > $sql = "UPDATE news SET release_date='$date', title='$title', > > > description='$describe', contact='$contact', content='$test', type='$type' > > > WHERE news_id=$id"; > > > $result = mysql_query($sql) > > > > > > > > > Thanks in advance. > > > > > > -Tanya > > > > > > > > > > > > > > > > > > > > > > > > > > -- > 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:


    magic quotes?? how does this come into place then.

    terrence

    Ankur Verma wrote:

    > if you store the data in the MYSQL database with the slashes escaping the > quotes, I think the complete stuff will get stored. > > for ex - if you have > > Description: I like to run and walk. I love "smelly cheese." > > and on posting, you get > > I like to run and walk. I love \"smelly cheese.\" > > it will store the complete string into the MYSQL database. > > and on retrieval you will get > > I like to run and walk. I love "smelly cheese." > > try it out > > best regards > > Ankur Verma > HCL Technologies > A1CD, Sec -16 > Noida, UP > India > > ----- Original Message ----- > From: "Tanya Brethour" <brethourncsa.uiuc.edu> > To: "Web master" <webmasterunni.com> > Cc: <php-generallists.php.net> > Sent: Wednesday, February 14, 2001 11:47 PM > Subject: Re: [PHP] Qoute problem > > > > > > > Let says I strip the slashes.. so it goes back to just normal qoutes.. and > > then do the str_replace("\"","|", $describe); > > > > $describe = stripslashes($describe); > > str_replace("\"","|",$describe); > > > > It doesnt replace the qoutes.. > > > > -Tanya > > > > On Wed, 14 Feb 2001, Web master wrote: > > > > > My approach towards this problem was to parse the data before inserting > > > and before displaying. > > > Before inserting the data entered by user, do something like > > > str_replace($comments, "'","~") and do the same thing for " do a > > > different character like | and then insert it into database. > > > Do the reverse before displaying the data, it should fix your problem.. > > > > > > Tanya Brethour wrote: > > > > > > > Hi! I was hoping that someone could help me out. I am not positive if > I > > > > understand whats going on.. so let me try to explain. > > > > > > > > This is a process to modify news articles in a MySQL database. > > > > > > > > (From the point after picking the article to modify) > > > > PHP Script #1: > > > > I grab everything from the database and stick it into the HTML form > > > > (textarea, text, etc). I allow the user to modify whatever they want. > > > > > > > > PHP Script #2: > > > > This script takes the new information and displays it to the user.. > it is > > > > a preview of what it will look like with the changes. > > > > > > > > PHP Script #3: > > > > Updates the news article in the database. > > > > > > > > Now the problem I am having.. is that the description and content > fields > > > > have qoutes in them. For example: > > > > Description: I like to run and walk. I love "smelly cheese." > > > > > > > > So.. when it tries to update the database. It will only store this as > the > > > > description: > > > > I like to run and walk. I love\\ > > > > > > > > I know that its because the qoutes are not being escaped correctly.. > and > > > > it seems as though it is escaping the escape. > > > > > > > > So my question is.. how can I keep my qoutes? > > > > > > > > Just FYI.. I am making the user enter in the description and content > in > > > > html. So i cant just change the qoutes to HTMLTags because it would > change > > > > my <P> and <a href=> etc. > > > > > > > > Below is an example of the code (shortened for an example): > > > > > > > > PHP Script #1: Editing description > > > > > > > > print' > > > > </textarea><br> > > > > Description:<br><textarea name=describe cols=40 rows=10>'; > > > > echo $info["description"]; > > > > print' > > > > </textarea><br>'; > > > > > > > > PHP Script #2: (preview changes) > > > > > > > > <input type=hidden name=describe value="<?php print $describe?>"> > > > > <b>Description:</b><br> > > > > <?php print $describe?> <p> > > > > > > > > PHP Script #3: (update database) > > > > $sql = "UPDATE news SET release_date='$date', title='$title', > > > > description='$describe', contact='$contact', content='$test', > type='$type' > > > > WHERE news_id=$id"; > > > > $result = mysql_query($sql) > > > > > > > > > > > > Thanks in advance. > > > > > > > > -Tanya > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > 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:


    Is there any reason why php is better than perl for shopping carts and/or product catalogs?

    Thanks, Jeff

    attached mail follows:


    > Is there any reason why php is better than perl for shopping carts > and/or product catalogs? > > Thanks, > Jeff

    It's hard to just come out and say that php is better than perl for shopping carts because there's too many factors to take into consideration.

    If you were a person who'd never used either, I'd guess that php might be better to use because the essential ingredients are pretty much already included with php, such as session handling, form and url data processing, and a wide variety of database functions.

    That's not to say the same things aren't fairly easy to plug right into perl by way of readily-available modules, but it's probably a bit of extra work, especially for the beginner. Someone who already uses perl would likely have libraries for these things already installed/handled anyway though.

    I think the syntax might be a little easier to understand in php too, although it's sure to be a personal preference thing to a large extent.

    To me, the bottom line is go with the one you feel most productive/comfortable with. They're both about as cross-platform portable as each other (I think?) and both are pretty robust under heavy load, especially when you're not using the cgi.

    jason

    attached mail follows:


    When Jason says 'especially when your note using the cgi' he means the cgi version of PHP (I think) in preference to installing PHP as an apache module.

    ""Jason Brooke"" <jasonqgl.org> wrote in message news:04ad01c0970f$927eeff0$0100a8c0jb... > > Is there any reason why php is better than perl for shopping carts > > and/or product catalogs? > > > > Thanks, > > Jeff > > > It's hard to just come out and say that php is better than perl for shopping > carts because there's too many factors to take into consideration. > > If you were a person who'd never used either, I'd guess that php might be > better to use because the essential ingredients are pretty much already > included with php, such as session handling, form and url data processing, > and a wide variety of database functions. > > That's not to say the same things aren't fairly easy to plug right into perl > by way of readily-available modules, but it's probably a bit of extra work, > especially for the beginner. Someone who already uses perl would likely have > libraries for these things already installed/handled anyway though. > > I think the syntax might be a little easier to understand in php too, > although it's sure to be a personal preference thing to a large extent. > > To me, the bottom line is go with the one you feel most > productive/comfortable with. They're both about as cross-platform portable > as each other (I think?) and both are pretty robust under heavy load, > especially when you're not using the cgi. > > jason > > > > > -- > 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:


    Is there any way to get a php script to automatically run, say every night at 2am?

    Thanks, Jeff

    attached mail follows:


    Read about CRON, here's a couple nice descriptions :

    http://www.faqts.com/knowledge_base/view.phtml/aid/1005/fid/436

    http://schvin.net/writings/crontab.html

    faqts.com has a few php specific cron replies too which basically say "use wget or lynx to dump it" but it'll all make sense soon.

    regards,

    Philip Olson http://www.cornado.com/

    On Thu, 15 Feb 2001, Jeff wrote:

    > Is there any way to get a php script to automatically run, say every > night at 2am? > > Thanks, > Jeff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    this question has been dealt with extensively in the past. try searching the archives.

    to give you a hint, you will need to make use of the cron daemon on the *nix systems.

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Jeff" <jeff4erochester.rr.com> To: <php-generallists.php.net> Sent: Thursday, February 15, 2001 10:43 AM Subject: [PHP] automatic php execution

    > Is there any way to get a php script to automatically run, say every > night at 2am? > > Thanks, > Jeff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    I guess that someone posted a good script to browse through the contents of a specified directory and browse through it. Search through the archives for the last week or so and you shoudl land up with it. If you don't write baxck to me. I have a similar script that I wrote but I need to search for it. I will send that to you. The script does eactly what you want -filesystem manipulation after database matching.

    Also, to limit the filesize for uploaded files, take a look at the uploading files section of trhe php manual

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

    there are good code snippets to achieve this.

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Kenneth R Zink II" <Hellcat1EV1.Net> To: "PHP" <php-generallists.php.net> Sent: Wednesday, February 14, 2001 11:30 PM Subject: [PHP] how do I do file maintenance with PHP?

    Ok here is the deal.

    I have a Linux server running PHP4 and MySQL and a directory full of images.

    The images that are currently being used should be listed in a table (members) in a column titled "pic1". What is the best way to pull the file names of the files and check them against the files in the table? I want all files that are not listed in the table to be deleted.

    Also, is there a way to limit file size? I don't want new images to be accepted if they exceed 250k. It takes too long for images to display if they are larger then that.

    Thanks in advance for any help.

    Kenneth R Zink II Hellcat1S-Series.Org ICQ# 5095094 '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!! http://www.s-series.org/htm/windstorm/project-windstorm.htm '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!! http://www.s-series.org/htm/firestorm/firestorm.htm Racing by the Grace of God!!

    attached mail follows:


    hey all,

    I was wondering how one would suggest removing items from a cart system once the session lifetime has expired. I have it set to the default 0, which expires the session on browser close, what I want to be able to do is "delete * from Cart where session='$PHPSESSID'" when the user closes thier browser window is this even possible? maybe using register_shutdown_function or something?

    Any ideas would be great!

    Thanks

    Joseph

    attached mail follows:


    You'll probably need to trigger the deletion of all expired carts with something other than trying to guess when the user closes their browser.

    Maybe a regular cronjob, or just do it inside your globally-included function definition script so that any hit to the website can trigger it for you, or perhaps just put it in the script that's used when creating a new cart for someone.

    jason

    ----- Original Message ----- From: "Joseph H Blythe" <joebinarylogic.com.au> To: "php-general" <php-generallists.php.net> Sent: Friday, February 16, 2001 3:29 PM Subject: [PHP] deleting cart items on session expire

    > hey all, > > I was wondering how one would suggest removing items from a cart system once the session lifetime has expired. I have it set to the default 0, which expires the session on browser close, what I want to be able to do is "delete * from Cart where session='$PHPSESSID'" when the user closes thier browser window is this even possible? maybe using register_shutdown_function or something? > > Any ideas would be great! > > Thanks > > Joseph

    attached mail follows:


    > > hey all, > > > > I was wondering how one would suggest removing items from a cart system > once the session lifetime has expired. I have it set to the default 0, > which expires the session on browser close, what I want to be able to do is > "delete * from Cart where session='$PHPSESSID'" when the user closes thier > browser window is this even possible? maybe using > register_shutdown_function or something? > > Any ideas would be great! > > > Thanks > > Joseph >

    Since HTTP connections are "stateless" their can be no communication initiated from the server-side that instructs the browser to tell the server that the browser has been closed. In other words, once an HTTP request has been made, the browser and server talk to each other while the file(s) is/are transferring and will not talk again until the browser asks for more. Getting any other behavior from an HTTP connection would require something to run on the client side (like a javascript). The reason your cookies go away when they have a lifetime of zero is because the browser throws them away. This really doesn't have anything to do with the communication between the browser and the server (the server didn't see that the browser was closing and delete the cookie from your machine for you).

    We personally run perl scripts out of cron at 2:00 every morning to clean up all tables that need cleaning. This could be done in pretty much the same manner using the PHP language if you run the CGI version of PHP. If you're already using the CGI version of PHP, there isn't any disadvantage to using either it or perl scripts to do this clean-up. If you're running the Apache module version of PHP, you'll need to find a tool that can be invoked from the command prompt (such as perl) to do this for you.

    Good luck...

    Christopher Ostmo a.k.a. techAppIdeas.com AppIdeas.com

    For a good time, http://www.AppIdeas.com/

    attached mail follows:


    > If you're already using the CGI version of PHP, there isn't any > disadvantage to using either it or perl scripts to do this clean-up. If > you're running the Apache module version of PHP, you'll need to find a > tool that can be invoked from the command prompt (such as perl) to do > this for you.

    Just as an aside, there's no reason I can think of that you can't run both the Apache module and standalone binary on the same system side by side - I've been doing this for about 2 years without trouble.

    jason

    attached mail follows:


    I guess you will need to have a script sunning after a specific period of time which would check for the sessions that have expired and then remove the associated items from the cart. database.

    there is no way for you to know if the user closes the browser as php is a server side language.

    I may be wrong, but I this is what comes to my mind.

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Joseph H Blythe" <joebinarylogic.com.au> To: "php-general" <php-generallists.php.net> Sent: Friday, February 16, 2001 10:59 AM Subject: [PHP] deleting cart items on session expire

    > hey all, > > I was wondering how one would suggest removing items from a cart system once the session lifetime has expired. I have it set to the default 0, which expires the session on browser close, what I want to be able to do is "delete * from Cart where session='$PHPSESSID'" when the user closes thier browser window is this even possible? maybe using register_shutdown_function or something? > > Any ideas would be great! > > Thanks > > Joseph > > -- > 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:


    take a look at the header function

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

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Barry Fawthrop" <barryttienterprises.org> To: <php-generallists.php.net> Sent: Wednesday, February 14, 2001 11:43 PM Subject: [PHP] Re: Access my script

    > > ----- Original Message ----- > From: "Barry Fawthrop" <barryttienterprises.org> > To: <php-general-helplists.php.net> > Sent: Wednesday, February 14, 2001 1:01 PM > Subject: Access my script > > > > I now have my .php3 script works well > > How do I access / call this script automatically from a .html page > > > > or must it be set to a .shtml page ? > > > > without the user / viewer pressing a link or button > > > > > -- > 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:


    one way would be to pass this using Hidden fields if you can submit the form

    or else use the session variables to propogate the values across multiple pages

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

    or try out phplib if you are on PHP3

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Tanya Brethour" <brethourncsa.uiuc.edu> To: <php-generallists.php.net> Cc: <php-dblists.php.net> Sent: Wednesday, February 14, 2001 11:50 PM Subject: [PHP] Passing vars

    > > Quick question.. > > If I have like 6 variables to pass to another PHP script... and some of > the vars are actually multiple lines of text (lets say over 30 lines). > What is the best way of doing this? > > I would like to avoid doing something like test.php?cheese=(30 lines of > stuff) > > Thanks in advance! > -Tanya > > > -- > 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:


    does anyone know of a way to currency conversions with php? i want to grab the current currency from some kind of web site and then convert money to different currency value

    any help is greatly appreciated

    many thanks in advance christian

    attached mail follows:


    Sorry for not being able to send you the code you requested for. But I am glad that you learnt uploading files.

    coming to your problem, PHP by default deletes the temporary upload file it created when the script finishes execution. You will need to explicitly make all the copies of the file that you want to keep.

    more information about this can be found in the Handling file uploads section of the php manual

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    ----- Original Message ----- From: "Dhaval Desai" <dhaval_adamsyahoo.com> To: <php-generallists.php.net> Sent: Thursday, February 15, 2001 12:38 AM Subject: [PHP] Upload moves the file doesn't copy it..

    > Hi! > > > I have finally learned to upload file using php. > But the problem is that When I upload a file, it > disappears from it's place and moves to the location I > have told it to go to. It's more like a cut & paste > rather then copy and paste... > > My code is as follows: > > > > Index.html: > ****************************************************** > <html> > <head> > <title>Untitled Document</title> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"> > </head> > > <body bgcolor="#FFFFFF"> > <form method="post" action="upload.php"> > <p> > <input type="file" name="userfile"> > <br> > <br> > <input type="submit" name="Submit" value="Upload"> > </p> > <p>&nbsp;</p> > <p>&nbsp;</p> > <p>&nbsp;</p> > </form> > </body> > </html> > > > ******************************************************* > > > > Below is upload.php: > > ******************************************************* > <?php > > if (copy($userfile, "c:\\upload.txt")) > { > echo "Succesful"; > } > else > { > echo "failure"; > } > unlink($userfile); > > ?> > ****************************************************** > > > > > > Thank You! > Dhaval Desai > > > > > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    I was browsing thru the http authentication method given thru the header() function in the manual. I tried it out but it's not giving me the pop-up window asking me the username and password and is only writing the text given in the code on the page. I'm using win98 and otherwise use sun solaris. Does this function work on these two OS? I have to write a code that checks each time a user enters a page, his previously entered user/pwd so as to prevent anyone from entering the page if he knows and writes the page's URL in the address bar. I've used the same authentication method in ASP before for the same. Can I use it in my OS using PHP? The code I'm entering is:

    <?php if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm=\"My Realm\""); Header("HTTP/1.0 401 Unauthorized"); echo "Text to send if user hits Cancel button\n"; exit; } else { echo "Hello $PHP_AUTH_USER.<P>"; echo "You entered $PHP_AUTH_PW as your password.<P>"; } ?>

    Regards, T.Edison jr.

    ===== Rahul S. Johari (Director) ****************************************** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : abraxastechyahoo.com Tel : 91-4546512/4522124 *******************************************

    __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

    attached mail follows:


    try using

    $PATH_TRANSLATED variable

    also use the phpinfo() function to get lots of information which you can use

    hope that helps

    best regards

    Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India

    .----- Original Message ----- From: "Dhaval Desai" <dhaval_adamsyahoo.com> To: "Ankur Verma" <avermanoida.hcltech.com> Sent: Thursday, February 15, 2001 11:54 AM Subject: realpath() problem

    > Hi! > > > I am trying to find the absolute path of a particular > file: > > For that I am using realpath() function in php. > > > I made two files: > path.php; > try.php > > > Path.php is as follows: > ****************************** > <?php > > > $path = realpath("./try.php"); > echo "$path"; > > > ?> > ************************************ > > try.php > > **************************** > <?php > > echo "Hiee!"; > ?> > > > > > It returns a blank string..I mean It echos nothing... > > Can anybody tell me where's the problem. > > > Thank You! > Dhaval Desai > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/

    attached mail follows:


    Hi!

    I need some help in using the function

    $try = realpath("./filename");

    I get a blank page when I try to echo. $try

    Thanx! Dhaval Desai

    __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

    attached mail follows:


    "Rog" <roggameslate.com> wrote in message news:4.2.2.20010214085022.00a5f3c0direct.ca... > Can anyone here decipher for me some of the undocumented Socket functions > in PHP4? > > For instance, how do I use select() to multiplex multiple connections? > > With the functions that are documented, there is a nice example of a simple > echoing TCP server, but it only accepts a single connection which has > limited usage. Can anyone come up with an example to expand that to > multiple connections.

    I too would be interested in knowing this. I was once (and still am) interested in developing a MUD (= multi-user text-based game) engine entirely in PHP. This would be nice because powerful scripts and stuff like that could be coded within the mud and executed on-the-fly if proper considerations were taken towards stability and security.

    --
     - Daniel Grace <http://dewin.oldbattery.com/>
    

    "Space may be the final frontier but its made in a Hollywood basement." - Red Hot Chili Peppers - Californication

    attached mail follows:


    Hi all.

    I understand that a lot of JSP Vs. PHP questions have been asked on this list, but they've been philosophical and general in nature. I have some specific questions and was hoping that someone might be able to entertain them:

    1) JSPs can persist variables at the page, request, session and application scopes. I believe PHP variables are implicitly page-scoped, and session management can be used for session-scoping. Are there equivalents to request and application scoping?

    2) In JSPs, it is possible to do server-side page redirection, i.e. "forward" a request from page A to page B, as if the user actually requested page B. There is no browser involvement in the redirection; it is complete on the server. In this scenario, there are two "page scopes", and one "request scope". How is this server-side redirection done in PHP?

    3) In doing the server-side page redirection, variables can be added to a "request" object, which embodies parameters related to a request. Page A can add variables to the request object (perhaps values from an SQL select), which page B can then retrieve and display. How is this done in PHP?

    4) JSPs, being a part of J2EE, can use a security system that does authentication and authorization. What is the commonly accepted way to do security with PHP?

    5) On a JSP site, I typically arrange things such that a particular JSP (or servlet) accepts requests, processes them and then forwards them to one of a number of different pages, depending on the outcome of the processing. This is in contrast to the alternative approach where one simply goes to a page, which does some processing and then displays the contents of the requested page. What is the typical way to achieving this "funnel all requests to a single point and have it forward the correct response to the user" paradigm?

    6) JSPs can be packaged up as an application (a WAR file), and that WAR file has descriptors that allow mapping of URLs to JSPs and servlets. This allows me to just drop in a WAR file to a JSP container, like Tomcat, and have it run. Are there equivalents to the "pack it up as an application" and URL mapping concepts in PHP?

    7) JSPs can be mapping to multiple URLS, e.g. /alpha/mypage and /beta/mypage can both go to the same JSP. Is there an equivalent to this in PHP?

    I have several more, but this is a sample. Answers to these questions are quite important to me because at the moment I'm trying to decide whether I should choose JSPs (J2EE actually), PHP or Zope for some projects.

    Thanks.

    Gerald.