OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Tue Jul 10 2001 - 13:16:44 CDT

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

    php-general Digest 10 Jul 2001 18:16:44 -0000 Issue 747

    Topics (messages 57087 through 57224):

    Re: PDF Problems
            57087 by: David Robley
            57088 by: ReDucTor
            57090 by: ReDucTor

    Re: stripping white space?
            57089 by: Bart Veldhuizen
            57091 by: Maxim Maletsky
            57093 by: Navid A. Yar
            57102 by: Navid A. Yar
            57107 by: Maxim Maletsky
            57108 by: Maxim Maletsky
            57110 by: Bart Veldhuizen
            57113 by: Maxim Maletsky
            57115 by: Bart Veldhuizen
            57116 by: Maxim Maletsky
            57122 by: Bart Veldhuizen
            57140 by: Christian Reiniger
            57151 by: Remo Pini
            57163 by: Maxim Maletsky
            57187 by: Bart Veldhuizen
            57211 by: Christian Reiniger

    something like get_html_translation_table
            57092 by: Jack Dempsey

    Re: how to hide dbconnect file if its in publisheddirectory?
            57094 by: John Weaver
            57095 by: John Weaver

    Re: form action problem
            57096 by: elias
            57126 by: Adam
            57157 by: elias
            57167 by: Adam

    Re: Running PHP as a cron job....
            57097 by: Manohar.K (GM Systems)
            57101 by: Henrik Hansen

    Re: Code Examples for Job Interview
            57098 by: elias
            57164 by: Chris Lee

    Re: Hiding password in a class file (object-oriented programming)?
            57099 by: scorpio1
            57128 by: teo.gecadsoftware.com

    Re: caller() function
            57100 by: elias

    Re: webmail
            57103 by: Adrian D'Costa
            57104 by: Adrian D'Costa
            57105 by: Adrian D'Costa

    capturing email adresses
            57106 by: scorpio1
            57109 by: mojo jojo

    Re: Any banner system?
            57111 by: Sara Young
            57188 by: Robert V. Zwink

    Re: php chat
            57112 by: Sara Young

    Oracle 8i + non perstistant database connections remaining open.
            57114 by: Taylor, Stewart
            57121 by: Thies C. Arntzen
            57123 by: Steve Brett

    Re: php > XML output in IE: no display
            57117 by: Patrick Sibenaler
            57135 by: Michel Laine

    Re: Oracle question
            57118 by: Sebastian Stadtlich
            57133 by: Rouvas Stathis
            57194 by: Chadwick, Russell

    how to use/compile ssl with apache and php?
            57119 by: Sebastian Stadtlich
            57152 by: Christopher Allen

    Store uploaded files in MySQL-BLOB
            57120 by: Tom Gitzinger
            57124 by: Adam
            57142 by: elias
            57159 by: Ben Bleything
            57161 by: Ben Bleything

    http header
            57125 by: Jack
            57130 by: Adrian Ciutureanu
            57143 by: elias
            57144 by: Johannes Janson

    PHP] Re: Store uploaded files in MySQL-BLOB
            57127 by: Tom Gitzinger
            57131 by: Adam

    Help me install php in netscape web server ...
            57129 by: Nguyen Thanh Tung

    Re: IE cookies don't expire!
            57132 by: Adam

    need a *very simple* email checker or help to design one!
            57134 by: sunny AT wde

    Cookie Strange Problem - Need Help
            57136 by: Felipe Moreno

    global.asa or application.cfm equivalent?
            57137 by: Frédéric Mériot
            57149 by: Sebastian Stadtlich

    Re: Require very urgent Help about Security (pki, digital signature) along with PHP
            57138 by: Christian Reiniger

    Session timeout
            57139 by: Frédéric Mériot
            57145 by: py

    How to fetch a "group by" Query?
            57141 by: Frédéric Mériot
            57166 by: Ben Bleything

    Not sure how to describe this problem..
            57146 by: Chad Day
            57147 by: infoz

    GetImageSize
            57148 by: Matt Simpson

    including secure pages in PHP
            57150 by: Reuben D Budiardja

    StreamMp3 from ming extension doesn't work!!!
            57153 by: octopussy

    Removing quotes (was stripping white space?)
            57154 by: Kurt Lieber
            57165 by: Maxim Maletsky

    exec(), system() and &
            57155 by: Siva Subraj
            57156 by: elias

    Re: Thumbnail code that will do an entire directory at once
            57158 by: elias

    Re: virus alert
            57160 by: Maxim Maletsky

    Access to oracle db
            57162 by: Parisi Giuliano
            57170 by: Sebastian Stadtlich
            57173 by: Parisi Giuliano
            57177 by: Sebastian Stadtlich
            57184 by: Parisi Giuliano

    PHP 4.0.6 and TSRM, I can't compile it! please help
            57168 by: alexus

    Average of column...
            57169 by: Jeff Lewis
            57171 by: infoz
            57174 by: Remo Pini
            57178 by: Jeff Lewis
            57181 by: Steve Brett
            57201 by: Remo Pini

    Authentication
            57172 by: David Baldwin
            57175 by: Jack Dempsey

    weird behaviour with ("Z" <= "Z")
            57176 by: Christian Dechery
            57179 by: Jack Dempsey
            57180 by: Vitali Falileev
            57182 by: Maxim Maletsky
            57186 by: Jack Dempsey
            57202 by: Maxim Maletsky
            57205 by: Philip Olson
            57208 by: Maxim Maletsky

    Re: Always global variables
            57183 by: Uri Even-Chen

    Q: Best EZ & Free Mailing List Manager?
            57185 by: Marcus James Christian
            57191 by: Chadwick, Russell
            57197 by: Maxim Maletsky

    ? : where in the manual?
            57189 by: Rehuel Lobato de Mesquita
            57196 by: Jack Dempsey
            57203 by: Philip Olson
            57206 by: Maxim Maletsky

    PHP Conference in California
            57190 by: Uri Even-Chen
            57224 by: Aaron Bennett

    security
            57192 by: AVisioN:::nomoremedia:::
            57200 by: Chris Lambert - WhiteCrown Networks
            57223 by: py

    flat file db
            57193 by: Jon Yaggie
            57195 by: Chadwick, Russell
            57199 by: Jon Yaggie

    Re: Post a form within a running php-script
            57198 by: Julian Wood

    Line by Line , Word by Word
            57204 by: alfareees alfareees
            57207 by: Philip Olson
            57209 by: Maxim Maletsky
            57213 by: Chris Lambert - WhiteCrown Networks

    Thanx Guys
            57210 by: Rehuel Lobato de Mesquita

    include nubie question - need help
            57212 by: Ivo Stoykov

    Image manipulation
            57214 by: Kevin Pratt
            57215 by: Sebastian Stadtlich
            57216 by: Chris Lambert - WhiteCrown Networks

    How to add a new color to JPEG
            57217 by: SED
            57218 by: Jeff Lewis
            57220 by: SED

    Re: Object oriented if statements
            57219 by: Patterson Liddle

    Apostrophe's
            57221 by: Dave Stewart

    Re: HTML/PHP's static state problem.
            57222 by: Aaron Bennett

    Administrivia:

    To subscribe to the digest, e-mail:
            php-general-digest-subscribelists.php.net

    To unsubscribe from the digest, e-mail:
            php-general-digest-unsubscribelists.php.net

    To post to the list, e-mail:
            php-generallists.php.net

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

    attached mail follows:


    On Tue, 10 Jul 2001 15:40, ReDucTor wrote:
    > I get undefined func on pdf_new but on all the other pdf functions they
    > work, but i first need the pdf_new then i tried cpdf, all works, but i
    > can't seem to get text onto a page...HELP ME - James "ReDucTor"
    > Mitchell

    That function wasn't introduced until 4.0.5, according to the manual. Is
    your version sufficiently up to date?

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

    Will the information superhighway have any rest stops?

    attached mail follows:


    Shit i only have 4.0 ): ----- Original Message ----- From: David Robley <huntsmanwww.nisu.flinders.edu.au> To: ReDucTor <sjdtmvtpg.com.au>; <php-generallists.php.net> Sent: Tuesday, July 10, 2001 4:18 PM Subject: Re: [PHP] PDF Problems

    > On Tue, 10 Jul 2001 15:40, ReDucTor wrote: > > I get undefined func on pdf_new but on all the other pdf functions they > > work, but i first need the pdf_new then i tried cpdf, all works, but i > > can't seem to get text onto a page...HELP ME - James "ReDucTor" > > Mitchell > > That function wasn't introduced until 4.0.5, according to the manual. Is > your version sufficiently up to date? > > -- > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > Will the information superhighway have any rest stops? > > -- > 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:


    Fatal error: PDFlib error: Beta expired - retrieve new version from www.pdflib.com in c:\phpdev3\www\pdf\test.php on line 2 hahahahha ----- Original Message ----- From: ReDucTor <sjdtmvtpg.com.au> To: <php-generallists.php.net> Sent: Tuesday, July 10, 2001 4:22 PM Subject: Re: [PHP] PDF Problems

    > Shit i only have 4.0 ): > ----- Original Message ----- > From: David Robley <huntsmanwww.nisu.flinders.edu.au> > To: ReDucTor <sjdtmvtpg.com.au>; <php-generallists.php.net> > Sent: Tuesday, July 10, 2001 4:18 PM > Subject: Re: [PHP] PDF Problems > > > > On Tue, 10 Jul 2001 15:40, ReDucTor wrote: > > > I get undefined func on pdf_new but on all the other pdf functions they > > > work, but i first need the pdf_new then i tried cpdf, all works, but i > > > can't seem to get text onto a page...HELP ME - James "ReDucTor" > > > Mitchell > > > > That function wasn't introduced until 4.0.5, according to the manual. Is > > your version sufficiently up to date? > > > > -- > > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > > > Will the information superhighway have any rest stops? > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hi Brian,

    > * Persuade someone at Zend to modify PHP so that a filter function can > be specified which all output text is passed through - would have the > same restrictions as the "header" function

    You can already achieve this by using the built-in output buffering function. Read http://www.zend.com/manual/function.ob-start.php for more information and a simple example on this.

    Why not go for HTTP compression though? The gain would be much larger than just stripping out the whitespace/comments and such..

    Have fun,

    Bart

    attached mail follows:


    Bart,

    a project we are working on will have:

    1. HTTP compression, which is not 100% compatible, but catches most of the browsers anyway. 2. Our own caching system: in two words: ob_*() to save the output as a text file, mod_rewrite to check for file and throw the plain .txt files if exist, PostgreSQL triggers to update (delete cached) .txt files. 3. Browser/Platform detection: there's no need to make cross-platform heavy but compatible pages, just specific style sheets and html tags for specific browser families. 4. clever HTML design, so there are less tags, tables etc, to have files smaller. And *that* also includes less comments and double quotes on integers. We do nothing with XML, so that is why I am so shocked why people here discourage me that much.

    -maxim maletsky

    -----Original Message----- From: Bart Veldhuizen [mailto:bartblender.nl] Sent: Tuesday, July 10, 2001 3:31 PM To: php-generallists.php.net Subject: Re: [PHP] stripping white space?

    Hi Brian,

    > * Persuade someone at Zend to modify PHP so that a filter function can > be specified which all output text is passed through - would have the > same restrictions as the "header" function

    You can already achieve this by using the built-in output buffering function. Read http://www.zend.com/manual/function.ob-start.php for more information and a simple example on this.

    Why not go for HTTP compression though? The gain would be much larger than just stripping out the whitespace/comments and such..

    Have fun,

    Bart

    -- 
    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 this is just one of those things where everyone's opinions runs in different directions, yet everyone is entitled to their own. I myself try to respect the standard because of the browser war years which made everyone uncomfortable. Now most browsers are trying to merge into a single standard (thank god). I believe the future to be XML, and I also don't think HTML will ever go away. However, I do believe that HTML will be treated more strict (hence the emergence of XHTML which is based on HTML 4.0 and XML). My suggestion to everyone is to continue using standards and try not to go astray from them, else we know the headaches us developers can face in the future.

    Sincerely, Navid Yar

    -----Original Message----- From: Maxim Maletsky [mailto:maximjapaninc.com] Sent: Tuesday, July 10, 2001 1:06 AM To: 'NavidYar2home.com'; php-generallists.php.net Subject: RE: [PHP] stripping white space?

    Yeah, I know that XML requires it. And I also know that it is not a good code practice, but it perfectly works for HTML pages. Browsers compatible with the style sheets have no problems with this code (there's no connection), and if there's any XML to work on the HTML will be rewritten anyway, so there's really no reason to worry about it. Just the size gets lower and typing (escaping in PHP) is easier. I think it IS a good practice if you only practicing HTML to be outputted by PHP.

    Sincerely,

    Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maximphpbeginner.com www.phpbeginner.com

    -----Original Message----- From: Navid A. Yar [mailto:NavidYar2home.com] Sent: Tuesday, July 10, 2001 2:40 PM To: php-generallists.php.net Subject: RE: [PHP] stripping white space?

    If you do this then those who will want to eventually convert their projects over to XML or XHTML format will have a hard time doing so, because the double quotes around the values of the attributes are required. Also, it's not good code practice. Just something for future reference...

    -----Original Message----- From: Maxim Maletsky [mailto:maximjapaninc.com] Sent: Tuesday, July 10, 2001 12:16 AM To: 'mukulsabharwalyahoo.com'; Kurt Lieber; php-generallists.php.net Subject: RE: [PHP] stripping white space?

    I would not be stripping white spaces, but double white spaces into single ' ';

    for example:

    $html = ereg_replace("[[:space:]]+", ' ', $page);

    I never tested this, but what I am trying to do is to get all and any blank characters and replace them with one single space. Why? Because I don't want all the words in text to merge together.

    This should reduce the size.

    Also here's a tip: remove any double or single quotes in tags surrounding integers. This is compatible enough, but is a bunch of bytes.

    i.e.:

    change every <IMG SRC="/img/arrow.gif" WIDTH="12" HEIGHT="11" BORDER="0" ALT="arrow" align="left">

    to

    <IMG SRC="/img/arrow.gif" WIDTH=12 HEIGHT=11 BORDER=0 ALT="arrow" align="left">

    this example is reduced by 6 bytes.

    Sincerely,

    Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maximphpbeginner.com www.phpbeginner.com

    -----Original Message----- From: Mukul Sabharwal [mailto:mukulsabharwalyahoo.com] Sent: Tuesday, July 10, 2001 2:05 PM To: Kurt Lieber; php-generallists.php.net Subject: Re: [PHP] stripping white space?

    Hi,

    I take that you simply want to remove ALL whitespaces from a data block (variable).

    you could simply use str_replace(" ", "", $var);

    --- Kurt Lieber <phpinternalcombustion.com> wrote: > Is there a way using PHP to easily strip white space > out of an html page as > it's being sent to the client. That is to say, the > page that we as > developers work on is nicely formatted, indented, > etc. but when it's sent > out to the client, PHP will remove all the extra > white space both to > obfuscate the code and reduce the size a bit. > > For anyone who knows Cold Fusion, I'm looking for > the PHP equivalent of the > "Suppress whitespace by default" option in the Cold > Fusion Server > Administrator. > > (NOTE: I'm not looking for a discussion on the > merits of stripping vs. not > stripping white space characters or whether or not > it really does any > good -- I just want to know if it can be done easily > using PHP) > > Thanks. > > --kurt > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribelists.php.net > For additional commands, e-mail: > php-general-helplists.php.net > To contact the list administrators, e-mail: > php-list-adminlists.php.net >

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

    __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail 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
    

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


    "We do nothing with XML, so that is why I am so shocked why people here discourage me that much."

    Even HTML is headed toward a more efficient structure. The current browser companies won't hold on to old code for long, just to make everything backward compatible. Next thing we know, we'll have to download a 100MB IE browser just cause it supports backward compatibility of older HTML and client-side coding practices, which in turn will discourage people to download a newer version of a browser. Imagine the year 2010, where uncle bob is still stuck with IE 4.0 while everyone else is using IE 15.0. And guess what? Uncle Bob is the one with the money to shop online, not little joey who was born to see the 10.0 version and nothing earlier.

    W3C will not maintain older DTDs for HTML 3.2 for long, language practices die too, just like browsers and Windows 3.1/95. Standards are emerging to make it easier for everyone. Technology moves forward, not backward. By using good HTML practices, you're helping technology move in a steady upward motion. Saving a few bytes will soon not make a difference once everyone jumps into the high speed bandwagon, or when the broadband bottleneck phenomenon is broken and when no one needs to worry about broadband anymore. If you want small file sizes use other practices such as decreasing image size or quality, etc. Just don't contaminate the web with the architecture drawings of the prehistoric wheel. And I don't mean to sound so harsh, please don't take it personally.

    attached mail follows:


    well, my dear patriot, I do.

    Contaminating the web is not my main purpose. The usual life time of a web application is around one year. I think our project will be changed ten times before uncle Bob gets online.

    Since there's no plans for us to use XML, since there's no way W3C goes broke, since there's no way a 100MB large browsers will be released and, most importantly, since there's no way in THIS ONE YEAR I AM TALKING ABOUT anything rush will be changed to the planet's internet connection speeds - I will build my site in the way that saves my and my team's development time and with it our money, as well as the healthy page load time reduce.

    Be rational, Navid.

    ...and don't take it personally.

    -maxim maletsky

    -----Original Message----- From: Navid A. Yar [mailto:NavidYar2home.com] Sent: Tuesday, July 10, 2001 4:47 PM To: Maxim Maletsky; 'Bart Veldhuizen'; php-generallists.php.net Subject: RE: [PHP] stripping white space?

    "We do nothing with XML, so that is why I am so shocked why people here discourage me that much."

    Even HTML is headed toward a more efficient structure. The current browser companies won't hold on to old code for long, just to make everything backward compatible. Next thing we know, we'll have to download a 100MB IE browser just cause it supports backward compatibility of older HTML and client-side coding practices, which in turn will discourage people to download a newer version of a browser. Imagine the year 2010, where uncle bob is still stuck with IE 4.0 while everyone else is using IE 15.0. And guess what? Uncle Bob is the one with the money to shop online, not little joey who was born to see the 10.0 version and nothing earlier.

    W3C will not maintain older DTDs for HTML 3.2 for long, language practices die too, just like browsers and Windows 3.1/95. Standards are emerging to make it easier for everyone. Technology moves forward, not backward. By using good HTML practices, you're helping technology move in a steady upward motion. Saving a few bytes will soon not make a difference once everyone jumps into the high speed bandwagon, or when the broadband bottleneck phenomenon is broken and when no one needs to worry about broadband anymore. If you want small file sizes use other practices such as decreasing image size or quality, etc. Just don't contaminate the web with the architecture drawings of the prehistoric wheel. And I don't mean to sound so harsh, please don't take it personally.

    attached mail follows:


    The fact is:

    getting discouraged about using double quotes in HTML on integers I was wondering what are the drawbacks of it. Maybe something I missed. Maybe there's someone hating me using this style because his browser goes wild or even crashes or does something else I never came across of.

    It was a good question to ask and a good topic to make sure of other's opinions.

    ---just my reasons of keeping this discussions.

    -maxim maletsky

    -----Original Message----- From: Maxim Maletsky Sent: Tuesday, July 10, 2001 4:54 PM To: 'NavidYar2home.com'; 'Bart Veldhuizen'; php-generallists.php.net Subject: RE: [PHP] stripping white space?

    well, my dear patriot, I do.

    Contaminating the web is not my main purpose. The usual life time of a web application is around one year. I think our project will be changed ten times before uncle Bob gets online.

    Since there's no plans for us to use XML, since there's no way W3C goes broke, since there's no way a 100MB large browsers will be released and, most importantly, since there's no way in THIS ONE YEAR I AM TALKING ABOUT anything rush will be changed to the planet's internet connection speeds - I will build my site in the way that saves my and my team's development time and with it our money, as well as the healthy page load time reduce.

    Be rational, Navid.

    ...and don't take it personally.

    -maxim maletsky

    -----Original Message----- From: Navid A. Yar [mailto:NavidYar2home.com] Sent: Tuesday, July 10, 2001 4:47 PM To: Maxim Maletsky; 'Bart Veldhuizen'; php-generallists.php.net Subject: RE: [PHP] stripping white space?

    "We do nothing with XML, so that is why I am so shocked why people here discourage me that much."

    Even HTML is headed toward a more efficient structure. The current browser companies won't hold on to old code for long, just to make everything backward compatible. Next thing we know, we'll have to download a 100MB IE browser just cause it supports backward compatibility of older HTML and client-side coding practices, which in turn will discourage people to download a newer version of a browser. Imagine the year 2010, where uncle bob is still stuck with IE 4.0 while everyone else is using IE 15.0. And guess what? Uncle Bob is the one with the money to shop online, not little joey who was born to see the 10.0 version and nothing earlier.

    W3C will not maintain older DTDs for HTML 3.2 for long, language practices die too, just like browsers and Windows 3.1/95. Standards are emerging to make it easier for everyone. Technology moves forward, not backward. By using good HTML practices, you're helping technology move in a steady upward motion. Saving a few bytes will soon not make a difference once everyone jumps into the high speed bandwagon, or when the broadband bottleneck phenomenon is broken and when no one needs to worry about broadband anymore. If you want small file sizes use other practices such as decreasing image size or quality, etc. Just don't contaminate the web with the architecture drawings of the prehistoric wheel. And I don't mean to sound so harsh, please don't take it personally.

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

    > 1. HTTP compression, which is not 100% compatible, but catches most > of the browsers anyway.

    Yes. The standard PHP implementation actually inspects the HTTP headers to determine if the browser supports gzip encoding. If not, it will send the files uncompressed. Looking at our website stats, 97%+ of the people use a version 4 browser so they're fine.

    > 2. Our own caching system: in two words: ob_*() to save the output > as a text file, mod_rewrite to check for file and throw the plain .txt files > if exist, PostgreSQL triggers to update (delete cached) .txt files.

    Hah! We think alike :) I implemented a similar system on our own website a few weeks ago. It does not cache complete pages (that's hardly possible due to the dynamic nature of our site), but instead caches HTML 'blocks'. (one page can consist of multiple blocks). Instead of serving those files directly from the filesystem I let PHP inspect them first: each file contains a timestamp that allows for expiry times.

    The results are wonderful: our website (http://www.blender.nl) has approximately 80.000 pageviews a day and the system load is almost never higher than 0.4. (Dual PIII/450/512MB/FreeBSD)

    If people are interested I'll publish the code for the caching module.

    > 3. Browser/Platform detection: there's no need to make > cross-platform heavy but compatible pages, just specific style sheets and > html tags for specific browser families.

    Clever! That's something I will put on my to-do list as well.

    > 4. clever HTML design, so there are less tags, tables etc, to have > files smaller. And *that* also includes less comments and double quotes on > integers. We do nothing with XML, so that is why I am so shocked why people > here discourage me that much.

    In my experience once you use HTTP compression, adding a few comments or whitelines do hardly add to the filesize anymore. I don't think it's worth the trouble to write super-compact HTML.

    I don't know a single thing about XML, so I'll skip that discussion :)

    Bart

    attached mail follows:


    Thanks, Bart.

    I am definitely interested in seeing your caching modules - it could be a useful resource for ours. Right now our caching module is only in the planning stage, but there are few scratches I wrote myself, and it seems to be very promising.

    Our project is a website that mainly contains articles. The database is fast but big, the pages can also get quite large, so as long as we get a good hard-drive we can work on that caching things.

    There's a directory called /cached which we will store the file with the exactly same file names (with mod_rewrite there's no need to use any ?var=val&etc=etc&, you just get it looking like a directory) so it is extremely easy to locate a file.

    ie: if you go to a file

    articles/2000/10/26/features/doom

    then apache looks first into

    cached/articles-2000-10-26-features-doom.txt

    and, if it finds it, sends it to your browser sweetly compressed. We were also thinking to use shtml or even php over again, but it kind of doesn't look to make much sense...

    When an article is updated PostgreSQL's (INSERT/UPDATE/DELETE) trigger shoots up a function that deletes a file relative to the database and looks for whatever related to it entry to delete other 'outdated' files as well. The file is gone, and the next visitor as soon as he accesses the page for the first time will drop a new file in cached folder again, without even understanding it.

    That's the idea.

    The difficulty here is one - create a bullet proof relation between database entries so only the right files get 100% removed to avoid situations like "I just updated that, where is it?...".

    Any comments, gurus?

    -maxim maletsky

    -----Original Message----- From: Bart Veldhuizen [mailto:bartblender.nl] Sent: Tuesday, July 10, 2001 5:07 PM To: php-generallists.php.net Subject: Re: [PHP] stripping white space?

    Hi Maxim,

    > 1. HTTP compression, which is not 100% compatible, but catches most > of the browsers anyway.

    Yes. The standard PHP implementation actually inspects the HTTP headers to determine if the browser supports gzip encoding. If not, it will send the files uncompressed. Looking at our website stats, 97%+ of the people use a version 4 browser so they're fine.

    > 2. Our own caching system: in two words: ob_*() to save the output > as a text file, mod_rewrite to check for file and throw the plain .txt files > if exist, PostgreSQL triggers to update (delete cached) .txt files.

    Hah! We think alike :) I implemented a similar system on our own website a few weeks ago. It does not cache complete pages (that's hardly possible due to the dynamic nature of our site), but instead caches HTML 'blocks'. (one page can consist of multiple blocks). Instead of serving those files directly from the filesystem I let PHP inspect them first: each file contains a timestamp that allows for expiry times.

    The results are wonderful: our website (http://www.blender.nl) has approximately 80.000 pageviews a day and the system load is almost never higher than 0.4. (Dual PIII/450/512MB/FreeBSD)

    If people are interested I'll publish the code for the caching module.

    > 3. Browser/Platform detection: there's no need to make > cross-platform heavy but compatible pages, just specific style sheets and > html tags for specific browser families.

    Clever! That's something I will put on my to-do list as well.

    > 4. clever HTML design, so there are less tags, tables etc, to have > files smaller. And *that* also includes less comments and double quotes on > integers. We do nothing with XML, so that is why I am so shocked why people > here discourage me that much.

    In my experience once you use HTTP compression, adding a few comments or whitelines do hardly add to the filesize anymore. I don't think it's worth the trouble to write super-compact HTML.

    I don't know a single thing about XML, so I'll skip that discussion :)

    Bart

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

    > I am definitely interested in seeing your caching modules - it could be a > useful resource for ours. > Right now our caching module is only in the planning stage, but there are > few scratches I wrote myself, and it seems to be very promising.

    I'll do my best to write a short blurb on how to use it today and publish the code. I also have to do a zillion other things (like work on my new house), so I can't promise it'll actually be there today!

    > There's a directory called /cached which we will store the file with the > exactly same file names (with mod_rewrite there's no need to use any > ?var=val&etc=etc&, you just get it looking like a directory) so it is > extremely easy to locate a file. > > ie: if you go to a file > > articles/2000/10/26/features/doom > > then apache looks first into > > cached/articles-2000-10-26-features-doom.txt

    I can see one problem that you're gonna run into and that is that this directory will contain thousands of files. Not many OS's can handle that. In our case, each article has an article ID and the caching module automatically creates subdirectories that will hold a number of cached pages. Additionally, I can assign page 'types' to a page. These will generate new subdirectories as well. My caching directory looks like this:

    /cache/data/articles/0-24/... /cache/data/articles/25-50/... /cache/data/searches/...

    Have fun,

    Bart

    attached mail follows:


    > /cache/data/articles/0-24/... > /cache/data/articles/25-50/... > /cache/data/searches/...

    this was our original idea, the difficulty is that there's the need to access this directory from several places (mod_rewrite, php and postrges). It is easy to access but might be hard to combine the URL together.

    But you're right, on UNIX systems, if I am not wrong, you cannot hold more then 1024 (?) files in a single directory. So subfolders is the way to go.

    Cheers, Maxim Maletsky

    -----Original Message----- From: Bart Veldhuizen [mailto:bartblender.nl] Sent: Tuesday, July 10, 2001 6:07 PM To: Maxim Maletsky; php-generallists.php.net Subject: Re: [PHP] stripping white space?

    Hi Maxim,

    > I am definitely interested in seeing your caching modules - it could be a > useful resource for ours. > Right now our caching module is only in the planning stage, but there are > few scratches I wrote myself, and it seems to be very promising.

    I'll do my best to write a short blurb on how to use it today and publish the code. I also have to do a zillion other things (like work on my new house), so I can't promise it'll actually be there today!

    > There's a directory called /cached which we will store the file with the > exactly same file names (with mod_rewrite there's no need to use any > ?var=val&etc=etc&, you just get it looking like a directory) so it is > extremely easy to locate a file. > > ie: if you go to a file > > articles/2000/10/26/features/doom > > then apache looks first into > > cached/articles-2000-10-26-features-doom.txt

    I can see one problem that you're gonna run into and that is that this directory will contain thousands of files. Not many OS's can handle that. In our case, each article has an article ID and the caching module automatically creates subdirectories that will hold a number of cached pages. Additionally, I can assign page 'types' to a page. These will generate new subdirectories as well. My caching directory looks like this:

    /cache/data/articles/0-24/... /cache/data/articles/25-50/... /cache/data/searches/...

    Have fun,

    Bart

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

    I wrote a mini-manual about the module. You can get it with the code from:

    http://helium.homeip.net/stuff/cache.tar.gz

    I hope it helps you and I look forward to suggestions and contributions!

    Bart

    "Maxim Maletsky" <maximjapaninc.com> wrote in message news:DC017B079D81D411998C009027B7112A015ED390EXC-TYO-01... > > > /cache/data/articles/0-24/... > > /cache/data/articles/25-50/... > > /cache/data/searches/... > > this was our original idea, the difficulty is that there's the need to > access this directory from several places (mod_rewrite, php and postrges). > It is easy to access but might be hard to combine the URL together. > > But you're right, on UNIX systems, if I am not wrong, you cannot hold more > then 1024 (?) files in a single directory. > So subfolders is the way to go. > > Cheers, > Maxim Maletsky > > > > -----Original Message----- > From: Bart Veldhuizen [mailto:bartblender.nl] > Sent: Tuesday, July 10, 2001 6:07 PM > To: Maxim Maletsky; php-generallists.php.net > Subject: Re: [PHP] stripping white space? > > > Hi Maxim, > > > I am definitely interested in seeing your caching modules - it could be a > > useful resource for ours. > > Right now our caching module is only in the planning stage, but there are > > few scratches I wrote myself, and it seems to be very promising. > > I'll do my best to write a short blurb on how to use it today and publish > the code. I also have to do a zillion other things (like work on my new > house), so I can't promise it'll actually be there today! > > > There's a directory called /cached which we will store the file with the > > exactly same file names (with mod_rewrite there's no need to use any > > ?var=val&etc=etc&, you just get it looking like a directory) so it is > > extremely easy to locate a file. > > > > ie: if you go to a file > > > > articles/2000/10/26/features/doom > > > > then apache looks first into > > > > cached/articles-2000-10-26-features-doom.txt > > I can see one problem that you're gonna run into and that is that this > directory will contain thousands of files. Not many OS's can handle that. In > our case, each article has an article ID and the caching module > automatically creates subdirectories that will hold a number of cached > pages. Additionally, I can assign page 'types' to a page. These will > generate new subdirectories as well. My caching directory looks like this: > > /cache/data/articles/0-24/... > /cache/data/articles/25-50/... > /cache/data/searches/... > > Have fun, > > Bart > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    On Tuesday 10 July 2001 10:34, Maxim Maletsky wrote:

    > I am definitely interested in seeing your caching modules - it could be > a useful resource for ours.

    If you're interested in another complete-page-caching system, have a look at http://lgdc.sunsite.dk/source/addon/phpbase/db/pagecache.php http://lgdc.sunsite.dk/source/includes/ui/cached_page.php http://lgdc.sunsite.dk/source/includes/ui/page_builder.php

    (the main files having to do with my caching system)

    > The difficulty here is one - create a bullet proof relation between > database entries so only the right files get 100% removed to avoid > situations like "I just updated that, where is it?...".

    That's why I'm only using the DB for caching (i.e. I store nothing iin the filesystem). Still fast enough, and more robust.

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

    I sat laughing snidely into my notebook until they showed me a PC running Linux. And oh! It was as though the heavens opened and God handed down a client-side OS so beautiful, so graceful, and so elegant that a million Microsoft developers couldn't have invented it even if they had a hundred years and a thousand crates of Jolt cola.

    - LAN Times

    attached mail follows:


    AFAIK some browsers can have trouble with lines longer than 255 chars. so you might need to throw in some linebreaks after all...

    PS: Can anyone enlighten me concerning HTTP compression?

    > Hi Maxim, > > > 1. HTTP compression, which is not 100% compatible, but catches most > > of the browsers anyway. > > Yes. The standard PHP implementation actually inspects the HTTP headers to > determine if the browser supports gzip encoding. If not, it will send the > files uncompressed. Looking at our website stats, 97%+ of the people use a > version 4 browser so they're fine. > > > 2. Our own caching system: in two words: ob_*() to save the output > > as a text file, mod_rewrite to check for file and throw the plain .txt > files > > if exist, PostgreSQL triggers to update (delete cached) .txt files. > > Hah! We think alike :) I implemented a similar system on our own website a > few weeks ago. It does not cache complete pages (that's hardly > possible due > to the dynamic nature of our site), but instead caches HTML > 'blocks'. (one > page can consist of multiple blocks). Instead of serving those files > directly from the filesystem I let PHP inspect them first: each file > contains a timestamp that allows for expiry times. > > The results are wonderful: our website (http://www.blender.nl) has > approximately 80.000 pageviews a day and the system load is almost never > higher than 0.4. (Dual PIII/450/512MB/FreeBSD) > > If people are interested I'll publish the code for the caching module. > > > 3. Browser/Platform detection: there's no need to make > > cross-platform heavy but compatible pages, just specific style > sheets and > > html tags for specific browser families. > > Clever! That's something I will put on my to-do list as well. > > > 4. clever HTML design, so there are less tags, tables etc, to have > > files smaller. And *that* also includes less comments and > double quotes on > > integers. We do nothing with XML, so that is why I am so shocked why > people > > here discourage me that much. > > In my experience once you use HTTP compression, adding a few comments or > whitelines do hardly add to the filesize anymore. I don't think it's worth > the trouble to write super-compact HTML. > > I don't know a single thing about XML, so I'll skip that discussion :) > > Bart > > > > -- > 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:


    Right, but there's almost no point doing so. You just slightly improve the performance. What I am trying to design would be a total caching system. No PHP and Database involved if nothing changed in the database records and PHP templates. In this way there's no connections neither the CPU load is up. simple .TXT files.

    Sincerely,

    Maxim Maletsky Founder, Chief Developer

    PHPBeginner.com (Where PHP Begins) maximphpbeginner.com www.phpbeginner.com

    -----Original Message----- From: Christian Reiniger [mailto:creinigmayn.de] Sent: Tuesday, July 10, 2001 9:37 PM To: Maxim Maletsky; 'Bart Veldhuizen'; php-generallists.php.net Subject: Re: [PHP] stripping white space?

    On Tuesday 10 July 2001 10:34, Maxim Maletsky wrote:

    > I am definitely interested in seeing your caching modules - it could be > a useful resource for ours.

    If you're interested in another complete-page-caching system, have a look at http://lgdc.sunsite.dk/source/addon/phpbase/db/pagecache.php http://lgdc.sunsite.dk/source/includes/ui/cached_page.php http://lgdc.sunsite.dk/source/includes/ui/page_builder.php

    (the main files having to do with my caching system)

    > The difficulty here is one - create a bullet proof relation between > database entries so only the right files get 100% removed to avoid > situations like "I just updated that, where is it?...".

    That's why I'm only using the DB for caching (i.e. I store nothing iin the filesystem). Still fast enough, and more robust.

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

    I sat laughing snidely into my notebook until they showed me a PC running Linux. And oh! It was as though the heavens opened and God handed down a client-side OS so beautiful, so graceful, and so elegant that a million Microsoft developers couldn't have invented it even if they had a hundred years and a thousand crates of Jolt cola.

    - LAN Times

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

    > PS: Can anyone enlighten me concerning HTTP compression?

    I wish I could remember where I read this, but the PHP documentation still does not have this feature described. To enable zlib output compression, first make sure you have compiled PHP with the --with-zlib option. Next, add the following line to php.ini:

    zlib.output_compression = On

    That's all there is to it!

    Have fun,

    Bart

    attached mail follows:


    On Tuesday 10 July 2001 11:26, Maxim Maletsky wrote:

    > But you're right, on UNIX systems, if I am not wrong, you cannot hold > more then 1024 (?) files in a single directory.

    AFAIK there's no limit (and certainly not 1024 files), but with most filesystems accesses on large directories are painfully slow. FSs such as ReiserFS however don't slow down noticeably on large directories...

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

    I sat laughing snidely into my notebook until they showed me a PC running Linux. And oh! It was as though the heavens opened and God handed down a client-side OS so beautiful, so graceful, and so elegant that a million Microsoft developers couldn't have invented it even if they had a hundred years and a thousand crates of Jolt cola.

    - LAN Times

    attached mail follows:


    Hi all,

    I hope I haven't missed it if it exists...i've looked through the docs...i'm trying to find something that does the same trick shown at php.net for getting the table, array_flip()'ing it, then using strtr to translate things like &nbsp; What about others like &146; etc...it'd be really useful to have a way to translate things like that automatically, and I would think that'd be the sort of function php would have...am I missing it, or is this something I need to do manually?

    Thanks, Jack

    attached mail follows:


    On Tuesday 10 July 1979 12:55 am, zerosumzeroyahoo.com wrote: > on 7/10/01 1:01 AM, Navid A. Yar at NavidYar2home.com wrote: > > Hmmm, I was wondering about security of PHP also. Does anyone know the > > general issues of security within PHP documents? My thought is that PHP > > cannot be seen when you view a source anyway, so isn't it secure enough > > (besides the basic firewall and system security)? > > If you have some function in a file called say ... functions.inc > > you can see the php script if you call functions.inc from a browser... > > because the server won't do the php code in an inc file... > > how do I change this!?

    Name the file ... functions.inc.php and insure that you have the php start and end tags on it.

    -- 
    Regards,
    John Weaver
    

    attached mail follows:


    On Tuesday 10 July 1979 12:39 am, zerosumzeroyahoo.com wrote: > on 7/10/01 12:30 AM, John Weaver at jwwjweaver.net wrote: > > Sorry, I should have been more clear. If you write modular code, your > > included file will be nothing but a group of functions. Call a file with > > nothing but functions in it and you get; <HTML><HEAD></HEAD></HTML>. I > > can't see the security problem you refer to. > > Ahhh! > > I have this problem now ... do you put the <?php ?> tags on an inc file? > > If not how do you keep people from reading it?

    Yes, I include the php tags so that PHP will parse it as php code.

    -- 
    Regards,
    John Weaver
    

    attached mail follows:


    hmm....do again as:

    <? function functionA() { // your function goes here.... }

    if (isset($usefunctiona)) { functionA(); } ?>

    <html> <body> <form name="form1" method="post" action="<?=$PHP_SELF?>" > <input type="submit" name="usefunctiona" value="Use functionA"> </form> </body> </html>

    //elias!

    "Brad Wright" <bradwrightoptushome.com.au> wrote in message news:B770D0C7.6D4%bradwrightoptushome.com.au... > Hi all, > i want to have a submit button on a page that has a php function (on the > same page) as the action. > > ie. > > <form name="form1" method="post" action="<?PHP functionA() ?>" > > > <input type="submit" name="Submit" value="Use functionA"> > </form> > > so when the 'Use functionA' button is pressed, the function 'functionA() ' > is called (using php variables already defined before the form.) > > Thanks > Brad >

    attached mail follows:


    > hmm....do again as: > > <? > function functionA() > { > // your function goes here.... > } > > if (isset($usefunctiona)) > { > functionA(); > } > ?> > > <html> > <body> > <form name="form1" method="post" action="<?=$PHP_SELF?>" > > <input type="submit" name="usefunctiona" value="Use functionA"> > </form> > </body> > </html>

    i might try:

    <?php

    function a() { //same idea put function here }

    function b() { //same idea put function here }

    if (!empty($func_a)) { a($field1); //this would assume you have passed a variable in the form to use in the function. }else if (!empty($func_b)) { b($field1); }

    ?>

    <form name="form1" method="post" action="<?php echo $PHP_SELF ?>" > <input type="text" name="field" value="insert value to be processed by function"> <input type="submit" name="func_a" value="true"> </form>

    this would also assume you need multiple functions to be used on the same form as submit buttons. This seems like the most logical/simple way to do it.

    -Adam

    attached mail follows:


    Adam, It's really better to use the isset() instead of empty() because if you set the error level report to E_ALL you will see that PHP will produce warnings if the variable is not set at all!

    "Adam" <adamwangallery.com> wrote in message news:20010710103418.42043.qmailpb1.pair.com... > > hmm....do again as: > > > > <? > > function functionA() > > { > > // your function goes here.... > > } > > > > if (isset($usefunctiona)) > > { > > functionA(); > > } > > ?> > > > > <html> > > <body> > > <form name="form1" method="post" action="<?=$PHP_SELF?>" > > > <input type="submit" name="usefunctiona" value="Use functionA"> > > </form> > > </body> > > </html> > > i might try: > > <?php > > function a() > { > //same idea put function here > } > > function b() > { > //same idea put function here > } > > if (!empty($func_a)) { > a($field1); //this would assume you have passed a variable in the form > to use in the function. > }else if (!empty($func_b)) { > b($field1); > } > > ?> > > <form name="form1" method="post" action="<?php echo $PHP_SELF ?>" > > <input type="text" name="field" value="insert value to be processed by > function"> > <input type="submit" name="func_a" value="true"> > </form> > > this would also assume you need multiple functions to be used on the same > form as submit buttons. This seems like the most logical/simple way to do > it. > > -Adam > >

    attached mail follows:


    > Adam, > It's really better to use the isset() instead of empty() because if you set > the error level report to E_ALL you will see that PHP will produce warnings > if the variable is not set at all!

    empty() and isset() are totally different. If a variable is set, but is set to nothing (or a value of 0), then the isset() will still hold true, whereas empty() will check that the variable contains a value other than a blank or 0.

    A workaround to the empty() statement?

    if ( (isset($var)) && (!empty($var)) ) { }

    or:

    if ($var!='') { }

    There are other ways to do this but the main point is making sure the varible is not passed as empty when the form is used. -Adam

    attached mail follows:


    Hi Can I have this cron scripts please? Thanks Manohar

    -----Original Message----- From: Ben Bleything [mailto:bleythbemailbox.orst.edu] Sent: Tuesday, July 10, 2001 4:20 AM To: Chadwick, Russell Cc: 'php-generallists.php.net' Subject: RE: [PHP] Re: Running PHP as a cron job....

    Someone yesterday also suggested putting them in a web-accessible location, but having lynx come by and run them.

    That seemed pretty cool =>

    Good luck, Ben

    Quoting "Chadwick, Russell" <rchadwickmiva.com>:

    > > You can still run php... I put my cron scripts > in a directory on the web > server, just makes sure they are all safe to run > multiple times in case > someone finds it > > then make a script that for each entry in that > directory invokes the script. > mines in python so you just > import urllib > > and then for each file in the directory > urllib.urlopen ('<server > name>/cron/<whatever>.php') > > and make it run your python script nightly and > it will run any php script > you put in that directory. > > -----Original Message----- > From: James, Yz [mailto:liljimbtconnect.com] > Sent: Monday, July 09, 2001 3:54 PM > To: php-generallists.php.net > Subject: [PHP] Re: Running PHP as a cron > job.... > > > Thanks for all of your help on this. My host > admin have informed me that > php is installed only for the web, and not as a > cgi, so that's what was > going wrong (it wasn't down to my own naievity > afterall.....) > > So, it's time to learn perl (or bash). > > Thanks again for all your comments and help. > > James. > > > > -- > 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:


    manoharkelgi.jet.co.in (Manohar.K) wrote:

    > Hi > Can I have this cron scripts please? > Thanks > Manohar

    just do something like:

    59 23 * * * wget --quiet http://www.fsck.dk/script.php > /dev/null

    or

    0 10 * * * lynx -dump http://www.fsck.dk/script.php > /dev/null

    > > -----Original Message----- > From: Ben Bleything [mailto:bleythbemailbox.orst.edu] > Sent: Tuesday, July 10, 2001 4:20 AM > To: Chadwick, Russell > Cc: 'php-generallists.php.net' > Subject: RE: [PHP] Re: Running PHP as a cron job.... > > Someone yesterday also suggested putting them in a > web-accessible location, but having lynx come by and run > them. > > That seemed pretty cool => > > Good luck, > Ben > > Quoting "Chadwick, Russell" <rchadwickmiva.com>: > >> >> You can still run php... I put my cron scripts >> in a directory on the web >> server, just makes sure they are all safe to run >> multiple times in case >> someone finds it >> >> then make a script that for each entry in that >> directory invokes the script. >> mines in python so you just >> import urllib >> >> and then for each file in the directory >> urllib.urlopen ('<server >> name>/cron/<whatever>.php') >> >> and make it run your python script nightly and >> it will run any php script >> you put in that directory. >> >> -----Original Message----- >> From: James, Yz [mailto:liljimbtconnect.com] >> Sent: Monday, July 09, 2001 3:54 PM >> To: php-generallists.php.net >> Subject: [PHP] Re: Running PHP as a cron >> job.... >> >> >> Thanks for all of your help on this. My host >> admin have informed me that >> php is installed only for the web, and not as a >> cgi, so that's what was >> going wrong (it wasn't down to my own naievity >> afterall.....) >> >> So, it's time to learn perl (or bash). >> >> Thanks again for all your comments and help. >> >> James. >> >> >> >> -- >> 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 >> >>

    -- 
    Henrik Hansen
    

    attached mail follows:


    I invite you to the OzoneAsylum (Forum) where you can have tens of comments and really helpfull ideas....

    http://www.ozoneasylum.com

    "Jcampbell" <healsdatayahoo.com> wrote in message news:001e01c108c2$9da68c60$779fadacdhcpserver... > Hey Everyone. > > This isn't a request for code or help, just thoughts and ideas. > > I've recently been asked to bring along some code examples for a job > interview I will be heading to this week. This was the exact request "The > sample does not have to be within any particular language, but something > that is a substantive representation of your style and logic. " > > I'm not sure what to take. Most of my PHP and other projects are lengthy and > involved. I'm not sure if it would be better to print out functions I've > created that perform tasks, or just find something that did wonderfully > challenging things and print that out. Anyone have thoughts on this? > > > > =- > Jonathan Campbell ( healsdatayahoo.com ) > > Mid days haze and I'm still not awake > I got everything going but my bills are still late > Funnier than hell and I think it's a blast > Life's like a laugh when you got no money > > Lyrics from "Average Day" by Aztek Trip ( http://www.aztektrip.com ) >

    attached mail follows:


    shamefull plug alert, shame, shame alert.

    php/perl/java/etc/etc/etc forum gets two new posts a day. "you can have tens of comments" if you wait 5-7 days.

    --
    

    Chris Lee leemediawaveonline.com

    "Elias" <elias_bachaalanyyahoo.com> wrote in message news:20010710073606.2881.qmailpb1.pair.com... > I invite you to the OzoneAsylum (Forum) where you can have tens of comments > and really helpfull ideas.... > > http://www.ozoneasylum.com > > > "Jcampbell" <healsdatayahoo.com> wrote in message > news:001e01c108c2$9da68c60$779fadacdhcpserver... > > Hey Everyone. > > > > This isn't a request for code or help, just thoughts and ideas. > > > > I've recently been asked to bring along some code examples for a job > > interview I will be heading to this week. This was the exact request "The > > sample does not have to be within any particular language, but something > > that is a substantive representation of your style and logic. " > > > > I'm not sure what to take. Most of my PHP and other projects are lengthy > and > > involved. I'm not sure if it would be better to print out functions I've > > created that perform tasks, or just find something that did wonderfully > > challenging things and print that out. Anyone have thoughts on this? > > > > > > > > =- > > Jonathan Campbell ( healsdatayahoo.com ) > > > > Mid days haze and I'm still not awake > > I got everything going but my bills are still late > > Funnier than hell and I think it's a blast > > Life's like a laugh when you got no money > > > > Lyrics from "Average Day" by Aztek Trip ( http://www.aztektrip.com ) > > > >

    attached mail follows:


    Putting in php tags does not necessarily mean that it will be parsed as php.

    If you are using Apache web server, the file type ( php htm etc) needs to be identified as a php file. This is done in the httpd.conf configuration file. Just putting php tags in a htm file usually does not work by default.

    Getting back to the original question, the include file does have to have an .inc extension. I am pretty sure that this is a convention but is not mandatory. end your include file with a php extension

    cheers Dave

    Ben Bleything wrote:

    > put <?php ?> tags around the file you include, and it > will parse it as PHP => > > I'm doing this now. I have a bunch of files in a subdir > of the published directory, that contain functions and > definitions to do these things, and I include them at > the beginning of each file. But, you do need <?php ?> > tags around the includes. > > => > Ben > > Quoting Thomas David Kehoe <kehoecasafuturatech.com>: > > > How do I put my password into an external > > file? > > > > I have dozens of webpages with the line > > > > mysql_connect (localhost, username, > > password); > > > > What if I have to change my password? Rather > > then change dozens of scripts, > > I want to put this line into an external file > > and call it with "include". > > > > The problem is security. If I make the file a > > class, then the file > > extension must be .inc. Anyone can type in the > > URL and see the contents of > > the file. > > > > I've tried these solutions, without success: > > > > Changing the permission to "everyone-execute" > > and "owner-read" doesn't work, > > apparently because a .inc file is read, not > > executed. > > > > Using the .php file extension (instead of .inc) > > executes the script when the > > URL is accessed. The user sees nothing, if the > > file contains no HTML. But > > class only works with the .inc extension. Using > > "include" without making a > > class treats the file as HTML and it doesn't > > execute. > > -- > > Thomas David Kehoe, author of > > "THE EVOLUTION OF INTIMATE RELATIONSHIPS" > > How Our Brains Are Hardwired For Relationships > > http://www.FriendshipCenter.com/TEIR/ > > > > > > -- > > 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 Thomas! On Mon, 09 Jul 2001, Thomas David Kehoe wrote:

    > How do I put my password into an external file? > > I have dozens of webpages with the line > > mysql_connect (localhost, username, password); > > What if I have to change my password? Rather then change dozens of scripts, > I want to put this line into an external file and call it with "include". > > The problem is security. If I make the file a class, then the file > extension must be .inc. Anyone can type in the URL and see the contents of > the file. huh? you've learnt something wrong from various places. Who said it must be inc? It can be even .my-super-dooper-class, but it's safer to just name the file .php

    as for passwords, define() all the parameters you use in a configuration file and keep it outside webroot e.g.

    /www +--/htdocs +--/images (etc.) ^- at this level let's say you have config.php w/ define('DB_PASSWORD','yabadubi')

    then, in db.sql you just include() the config.php file.

    > > Changing the permission to "everyone-execute" and "owner-read" doesn't work, > apparently because a .inc file is read, not executed. > > Using the .php file extension (instead of .inc) executes the script when the > URL is accessed. The user sees nothing, if the file contains no HTML. But > class only works with the .inc extension. Using "include" without making a > class treats the file as HTML and it doesn't execute. nope, include can include even foo.exe as php code, if foo.exe has php code section i.e. <?php /* code here */?> so your file must least start with an open tag.

    cheers,

    -- teodor

    attached mail follows:


    So far, there is no such functions in PHP...I see lots of posts like this one and all with negative results...

    "Scott" <scottgraphictype.com> wrote in message news:KFEKLFMNHDILCMFAEKJCAEOOCMAA.scottgraphictype.com... > i cannot seem to find any function that's similar to > perl's "caller()" function - to get information about the > file/function that is calling the current function. > > for example, the test() function is called from scott.php > > scott.php > > <? include('test.php'); ?> > Hello there > <? > test(); > ?> > > > test.php > > function test() { > without passing in __LINE__ and __FILE__ > to the test() function myself, is there anyway > to find out the file/line that called this function?? > } > > > > thanks.

    attached mail follows:


    Hi,

    On Mon, 9 Jul 2001 olsonricotn.net wrote:

    > In addition, here's a POP3 class from the PHP Classes Repository...

    Where :) I did not get anything.

    Adrian

    attached mail follows:


    Hi,

    Thanks. I found it and installed it. Maybe I need to hack around it to add more functions such as address book and attachement like squirrelmail.

    Adrian

    On Mon, 9 Jul 2001, Bleue wrote:

    > There is a really good simple pop email client called rymo. Im not sure > where I found it, but it shouldn't be hard to find. It is a very good > base to start with and will help you with the functions and stuff. If > you cant find it, let me know and I will send you a copy. > > Shawn >

    attached mail follows:


    On Mon, 9 Jul 2001, Max Pyziur wrote:

    Thanks, but my specs are PHP4 and POP3

    Adrian

    > > The one which I use which matches your requirements (non-PHP, perl-module > driven) is NS WebMail, one which I use and gives basic webmail > capablities, though missing some desired functionality (sort on date, > sender, or subject; default sort is reverse chrono). It's relatively easy > to install. > http://nikosoft.free.fr/nswm.htm > > For freshmeat's listing check here: > http://freshmeat.net/search/?q=webmail > > > TIA > > > > Adrian > > > Max Pyziur BRAMA - Gateway Ukraine > pyzbrama.com http://www.brama.com/ > >

    attached mail follows:


    Hi

    I am creating a guestbook for an intranet. In case I get people sending inappropriate messages to the guestbook I want to keep a log of visitor's emaill addresses.

    Is there a way in PHP of getting the web browsers email address?

    cheers dave

    attached mail follows:


    As far as I am aware, none of the major web browsers will reveal the email address of the user to any website or web application. This is for privacy reasons.

    You will need to get your guests to enter their email address in a text field to capture it for your records.

    Pete

    Scorpio1 <scorpio1vicnet.net.au> wrote in message news:3B4AB0C0.6402C910vicnet.net.au... > Hi > > I am creating a guestbook for an intranet. In case I get people sending > inappropriate messages to the guestbook I want to keep a log of > visitor's emaill addresses. > > Is there a way in PHP of getting the web browsers email address? > > cheers dave > > >

    attached mail follows:


    There are some ad banner systems at the Zend.com's Applications section: http://www.zend.com/apps.php?CID=35

    Sara

    On 9 Jul 2001, at 13:49, José León Serna wrote:

    > Hello: > I would like to know if there's a PHP Banner system with the following > features: > -Allow insert the banners anywhere > -Advanced statistics page > -Limit on banner impressions/clicks > -Allow users (my customers) to see their banners statistics > -Run on MySQL > > Best Regards. > ------------------------------------------------ > QaDRAM, RAD development for the WEB > http://www.qadram.com > > VCLCrawler.com, your VCL search engine > http://www.vclcrawler.com > > W2Kwm, Windows 2000 interface for XWindow > http://www.vclcrawler.com/w2kwm/index.htm > > ebnoud.com, El Boletín No Oficial de Usuarios de Delphi > http://www.ebnoud.com > > >

    attached mail follows:


    http://www.phpwizard.net/ has something called phpAds. Seems to cover your requests.

    Robert Zwink http://www.zwink.net

    -----Original Message----- From: José León Serna [mailto:vclcrawlervclcrawler.com] Sent: Monday, July 09, 2001 7:50 AM To: php-generallists.php.net Subject: [PHP] Any banner system?

    Hello: I would like to know if there's a PHP Banner system with the following features: -Allow insert the banners anywhere -Advanced statistics page -Limit on banner impressions/clicks -Allow users (my customers) to see their banners statistics -Run on MySQL

    Best Regards. ------------------------------------------------ QaDRAM, RAD development for the WEB http://www.qadram.com

    VCLCrawler.com, your VCL search engine http://www.vclcrawler.com

    W2Kwm, Windows 2000 interface for XWindow http://www.vclcrawler.com/w2kwm/index.htm

    ebnoud.com, El Boletín No Oficial de Usuarios de Delphi http://www.ebnoud.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:


    There are some Chat Programs at Zend.com's Applications Section: http://www.zend.com/apps.php?CID=240

    Try also: http://www.zend.com/codex.php?CID=272

    Sara

    On 9 Jul 2001, at 14:24, Jack wrote:

    > Hi all > is there anyone know where can I get a good php chat programme? > Jack > jackyactivelifestyle.com > "Love your enemies, it will drive them nuts" >

    attached mail follows:


    Hello, I'm using OCI8 Revision 1.96 Oracle Version 8.1 Apache Apache/1.3.11 Redhat Linux 6.2 php 4.0.2 I am connecting to my database using a non-persistant connection (ocilogin). My applications run with no problems during the day. However, at the end of the day there is about 20 database connections still open. This has caused a problem because when the database is shutdown to backup (overnight) and then restarted apache still retains the 20 connections. This means that when users begin using the applications again in the morning apache starts reusing the old connections plus creating some new ones and causes users to be intermittently logged out/refused access/random query failures etc.. The error messages logged when this happens are below: PHP Warning: failed to rollback outstanding transactions!: ORA-01012: not logged on PHP Warning: failed to rollback outstanding transactions!: ORA-24324:service handle not initialized A quick fix to this problem is to shutdown apache when the backup is run so all the connections are dropped/ Hovever, should these connections be remaining open in the first place? Has anyone got any ideas? -Stewart.

    attached mail follows:


    On Tue, Jul 10, 2001 at 09:32:32AM +0100, Taylor, Stewart wrote: > Hello, > > > I'm using > OCI8 Revision 1.96 > Oracle Version 8.1 > Apache Apache/1.3.11 > Redhat Linux 6.2 > php 4.0.2 > > I am connecting to my database using a non-persistant connection (ocilogin). > My applications run with no problems during the day. However, at the end > of the day there is about 20 database connections still open. This has > caused a problem because when the database is shutdown to backup (overnight) > and then restarted apache still retains the 20 connections. This means > that when users begin using the applications again in the morning apache > starts reusing the old connections plus creating some new ones and causes > users to be intermittently logged out/refused access/random query failures > etc.. The error messages logged when this happens are below: > PHP Warning: failed to rollback outstanding transactions!: ORA-01012: not > logged on > PHP Warning: failed to rollback outstanding transactions!: > ORA-24324:service handle not initialized > > A quick fix to this problem is to shutdown apache when the backup is run so > all the connections are dropped/ > > Hovever, should these connections be remaining open in the first place? Has > anyone got any ideas?

    if you only use ocilogon and _not_ ociplogon the connection will be closed at request and, and apache/php will not keep then open - believe me!

    please triple check your setup and report back!

    tc

    attached mail follows:


    you could move to a database that supports hot backups. postgresql perhaps ?

    > -----Original Message----- > From: Thies C. Arntzen [mailto:thiesthieso.net] > Sent: 10 July 2001 10:40 > To: Taylor, Stewart > Cc: php-generallists.php.net > Subject: Re: [PHP] Oracle 8i + non perstistant database connections > remaining open. > > > On Tue, Jul 10, 2001 at 09:32:32AM +0100, Taylor, Stewart wrote: > > Hello, > > > > > > I'm using > > OCI8 Revision 1.96 > > Oracle Version 8.1 > > Apache Apache/1.3.11 > > Redhat Linux 6.2 > > php 4.0.2 > > > > I am connecting to my database using a non-persistant > connection (ocilogin). > > My applications run with no problems during the day. > However, at the end > > of the day there is about 20 database connections still > open. This has > > caused a problem because when the database is shutdown to > backup (overnight) > > and then restarted apache still retains the 20 connections. > This means > > that when users begin using the applications again in the > morning apache > > starts reusing the old connections plus creating some new > ones and causes > > users to be intermittently logged out/refused access/random > query failures > > etc.. The error messages logged when this happens are below: > > PHP Warning: failed to rollback outstanding transactions!: > ORA-01012: not > > logged on > > PHP Warning: failed to rollback outstanding transactions!: > > ORA-24324:service handle not initialized > > > > A quick fix to this problem is to shutdown apache when the > backup is run so > > all the connections are dropped/ > > > > Hovever, should these connections be remaining open in the > first place? Has > > anyone got any ideas? > > if you only use ocilogon and _not_ ociplogon the connection > will be closed at request and, and apache/php will not keep > then open - believe me! > > please triple check your setup and report back! > > tc > > -- > 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't ask me what I did, but same code, same server, same client and today it works. Yes, I know there's something called a cache that could have caused the problem, and I had also checked that. Nevertheless, it must have been some data stuck somewhere or IE beeing stubborn, since content changed but data the mime got ignored completely. My hint: shut down everything. And restart the server/client. It will work as expected...

    So again: To display XML, use: header ("Content-type: text/xml"); at the top of your script (standard mime)

    If you prefer to save it, add content disposition: header ("Content-type: text/xml"); header ("Content-disposition: attachment; filename=\"table.xml\"");

    Since netscape cannot handle XML, it will save it under either scriptname.xml or when content disposition added, table.xml and then call IE to display it.

    thanx for the quick responses people... greets, patrick./

    Patrick Sibenaler wrote: > > Has anyone figured out how to trick IE into displaying an XML file > that is produced by a PHP script (script.php) properly? > > What happens usually is that you send the mime 'text/xml', but IE > still sees content as php because the script is called php. Also > adding <Content-disposition: filename="some.xml"> to the header > does not help and is boldly ignored by IE. > > Nice detail: if the url is called using Netscape, Netscape will > save the file out to the disk, give it the suffix .xml and call > IE which then will display content perfectly. > > Any hints are greatly appreciated. > > greets, > patrick./

    attached mail follows:


    Patrick Sibenaler wrote:

    > Don't ask me what I did, but same code, same server, same client > and today it works. Yes, I know there's something called a cache > that could have caused the problem, and I had also checked that. > Nevertheless, it must have been some data stuck somewhere or IE > beeing stubborn, since content changed but data the mime got > ignored completely. My hint: shut down everything. And restart > the server/client. It will work as expected...

    Don't you have *any* experience with windows? ;-) Any windows platform should be rebooted as a first resource in a normal fault-finding arsenal.

    I remember that i saw a sign in a Engineers workshop (many years from now) where it said something like this:

    Rule #1: Halt and reboot! if this doesn't fix it - Try again. Rule #2: That's not a bug, that's a feature. Rule #3: That is fixed in the next revision. Rule #4: That is not supported. ... ...

    --
    

    Michel Laine

    attached mail follows:


    oracle does not have an autoincrement. it has the more powerfull concept of TRIGGERS unfortunatelly you have to write them in pl/sql or java... have a look on the net for oracle trigger tutorial or you can find a super oracle-feature-documentation here : http://conf.php.net/oci2 http://conf.php.net/pres/slides/oci/paper.txt

    which features a small non-trigger-work-around

    sebastian

    > -----Ursprüngliche Nachricht----- > Von: Duy B [mailto:ngo_duyfmail.vnn.vn] > Gesendet: Dienstag, 10. Juli 2001 04:36 > An: php-generallists.php.net > Betreff: [PHP] Oracle question > > > Dear all, > If i want to use id field in Oracle database, how can i do? > For example, in MySQL > create table test ( > id int not null auto-increment primary key, > ten char(10)); > > So that, when i insert a new row into MySQL database, id > increases by 1. > > But in Oracle i couldn't use as that. > Somebody could help me. > Thanks you all, > BaoDuy > > > >

    attached mail follows:


    PL/SQL code for an Oracle trigger that will auto-increment specified field:

    create or replace trigger <trigger> before insert on <table> for each row begin if :new.<field> is null then select <sequence-name>.nextval into :new.<field> from dual; end if; end;

    You have to create a sequence first. Example:

    CREATE SEQUENCE <sequence-name> INCREMENT BY 1 START WITH -99999999999999999999999999 MAXVALUE 9999999999999999999999999999999999999999999999 MINVALUE -999999999999999999999999999999999999999999999 CYCLE CACHE 5 ORDER;

    Of course, replace values in <xxx> as needed.

    If you use the aboce code verbatim, you will a field incrementing from -99999... until 99999 and then it will begin all over again.

    -Stathis.

    Sebastian Stadtlich wrote: > > oracle does not have an autoincrement. > it has the more powerfull concept of TRIGGERS > unfortunatelly you have to write them in pl/sql or java... > have a look on the net for oracle trigger tutorial or > you can > find a super oracle-feature-documentation here : > http://conf.php.net/oci2 > http://conf.php.net/pres/slides/oci/paper.txt > > which features a small non-trigger-work-around > > sebastian > > > -----Ursprüngliche Nachricht----- > > Von: Duy B [mailto:ngo_duyfmail.vnn.vn] > > Gesendet: Dienstag, 10. Juli 2001 04:36 > > An: php-generallists.php.net > > Betreff: [PHP] Oracle question > > > > > > Dear all, > > If i want to use id field in Oracle database, how can i do? > > For example, in MySQL > > create table test ( > > id int not null auto-increment primary key, > > ten char(10)); > > > > So that, when i insert a new row into MySQL database, id > > increases by 1. > > > > But in Oracle i couldn't use as that. > > Somebody could help me. > > Thanks you all, > > BaoDuy > >

    attached mail follows:


    Create a sequence, like so CREATE SEQUENCE "WHATEVER_IDS" INCREMENT BY 1 START WITH 1 MAXVALUE 1.0E28 MINVALUE 1 NOCYCLE CACHE 20 NOORDER;

    then when you insert INSERT INTO test (whatever_ids.nextval);

    the nice thing is that in your next query you can just do whatever_ids.curval instead of looking up the value with mysql_auto_id or whatever the function is.

    -----Original Message----- From: Duy B [mailto:ngo_duyfmail.vnn.vn] Sent: Monday, July 09, 2001 7:36 PM To: php-generallists.php.net Subject: [PHP] Oracle question

    Dear all, If i want to use id field in Oracle database, how can i do? For example, in MySQL create table test ( id int not null auto-increment primary key, ten char(10));

    So that, when i insert a new row into MySQL database, id increases by 1.

    But in Oracle i couldn't use as that. Somebody could help me. Thanks you all, BaoDuy

    attached mail follows:


    I had to recompile apache on my redhat 7.1, because the default compilation missed some 'features'. I acomplished that since it was well documented in the php readme/install. But now i need ssl in that apache too. is there a EASY way to do that? a small tutorial? all i found with google were big tutorials which involved apache patching and NO PHP. could someone explain me what i need to ad to the apache compiling string ? ( i build php in apache )

    sebastian

    attached mail follows:


    Seb-, http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/ I used this tutorial the first time. It was very straight forward. Remember that you dont need rsaref files anymore in the US.

    >>could someone explain me what i need to ad to the apache compiling >>string ? >>( i build php in apache )

    >>sebastian

    --ccma

    attached mail follows:


    Hi friends, could anybody tell me how I best store one or several uploaded files in a MySQL database (as a BLOB). I use PHP 3. Let's say I have the variable $userfile. Is it possible to simply insert this into the database? $query = "INSERT INTO ... (file) VALUES (" . $userfile . "); By the way: which version of PHP 3 do you need to upload several files at once? Tom

    -- 
    GMX - Die Kommunikationsplattform im Internet.
    http://www.gmx.net
    

    GMX Tipp:

    Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1! http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a

    attached mail follows:


    I would suggest setting the database column to LONGTEXT instead of BLOB since it can accomidate far more characters per entry.

    As for the entry to the database through php, I'm not entirely sure what method you're using to add these. Are they uploading their file and then it reads it as it exists on the server? Is it supposed to read a file they specify with a browse but never actually upload it anywhere? It might be better to just include a text field for them to cut+paste to in a form if it's nothing but text.

    -Adam

    attached mail follows:


    Tom,

    First, I suggest using LONGBLOB as a field... Second, Once the $userfile is uploaded...use the statment as:

    $query = "INSERT INTO ... (file) VALUES ( LOAD_FILE($userfile))";

    using the MySql's LOAD_FILE()

    "Tom Gitzinger" <tom_gitzingergmx.de> wrote in message news:11565.994757948www28.gmx.net... > Hi friends, > > could anybody tell me how I best store one or several uploaded files in a > MySQL database (as a BLOB). I use PHP 3. > Let's say I have the variable $userfile. Is it possible to simply insert > this into the database? > $query = "INSERT INTO ... (file) VALUES (" . $userfile . "); > > By the way: which version of PHP 3 do you need to upload several files at > once? > > Tom > > -- > GMX - Die Kommunikationsplattform im Internet. > http://www.gmx.net > > GMX Tipp: > > Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1! > http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a >

    attached mail follows:


    Check out http://www.phpbuilder.com/columns/florian19991014.php3. I've been using it to maintain image galleries. Works like a champ.

    My guess would be that any version of php will upload multiple files... just use multiple variables =>

    Good luck and let us know, Ben

    -----Original Message----- From: Tom Gitzinger [mailto:tom_gitzingergmx.de] Sent: Tuesday, July 10, 2001 2:39 AM To: php-generallists.php.net Subject: [PHP] Store uploaded files in MySQL-BLOB

    Hi friends, could anybody tell me how I best store one or several uploaded files in a MySQL database (as a BLOB). I use PHP 3. Let's say I have the variable $userfile. Is it possible to simply insert this into the database? $query = "INSERT INTO ... (file) VALUES (" . $userfile . "); By the way: which version of PHP 3 do you need to upload several files at once? Tom

    -- 
    GMX - Die Kommunikationsplattform im Internet.
    http://www.gmx.net
    

    GMX Tipp:

    Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1! http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a

    attached mail follows:


    This won't work if they're binary files. Also, for most binaries, it's better to use LONGBLOB... much more flexibility. But there's a bunch of stuff to tweak to get it to work.

    http://www.phpbuilder.com/columns/florian19991014.php3 has details.

    Ben

    -----Original Message----- From: Adam [mailto:adamwangallery.com] Sent: Tuesday, July 10, 2001 3:20 AM To: php-generallists.php.net Subject: [PHP] Re: Store uploaded files in MySQL-BLOB

    I would suggest setting the database column to LONGTEXT instead of BLOB since it can accomidate far more characters per entry.

    As for the entry to the database through php, I'm not entirely sure what method you're using to add these. Are they uploading their file and then it reads it as it exists on the server? Is it supposed to read a file they specify with a browse but never actually upload it anywhere? It might be better to just include a text field for them to cut+paste to in a form if it's nothing but text.

    -Adam

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

    attached mail follows:


    Dear all folks, I want to get the url of the previous page that my visitor came from. Is this correct to use http_header? Or what function that will help me do this job? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    Use $HTTP_REFERER http://php.net/manual/en/language.variables.predefined.php

    > -----Original Message----- > From: Jack [mailto:jackyactivelifestyle.com] > Sent: 11 iulie 2001 01:23 > To: php-generallists.php.net > Subject: [PHP] http header > > > Dear all folks, > I want to get the url of the previous page that my visitor > came from. Is this correct to use http_header? Or what > function that will help me do this job? > Jack > jackyactivelifestyle.com > "Love your enemies, it will drive them nuts" >

    attached mail follows:


    It's called HTTP_REFERER

    PHP document:

    HTTP_REFERER The address of the page (if any) which referred the browser to the current page. This is set by the user's browser; not all browsers will set this.

    "Jack" <jackyactivelifestyle.com> wrote in message news:05c201c1098e$ee947fc0$6400a8c0activelifestyle.com... Dear all folks, I want to get the url of the previous page that my visitor came from. Is this correct to use http_header? Or what function that will help me do this job? Jack jackyactivelifestyle.com "Love your enemies, it will drive them nuts"

    attached mail follows:


    Hi,

    >Dear all folks, >I want to get the url of the previous page that my visitor came from. Is this correct to use http_header? Or what function that will help me >do this job?

    the variable $HTTP_REFERER will do the job but not all browsers support it. Manual -> Variables -> predefined variables for more info.

    cheers Johannes

    attached mail follows:


    ----- Original Message ----- From: "Adam" <adamwangallery.com> To: <php-generallists.php.net> Sent: Tuesday, July 10, 2001 12:20 PM Subject: [PHP] Re: Store uploaded files in MySQL-BLOB

    > I would suggest setting the database column to LONGTEXT instead of BLOB > since it can accomidate far more characters per entry. > > As for the entry to the database through php, I'm not entirely sure what > method you're using to add these. Are they uploading their file and then it > reads it as it exists on the server? Is it supposed to read a file they > specify with a browse but never actually upload it anywhere? It might be > better to just include a text field for them to cut+paste to in a form if > it's nothing but text. > > -Adam

    The project is a kind of knowledge base. For each entry a user creates, he should be able to give additional information, such as every kind of file (i.e. not only code files but also images etc). There is an <input type="file" ...> where he selects the file to be uploaded. The php-script is simply supposed to receive the file and put it into the proper database-column (which is a MEDIUMBLOB by the way, should be enough space, or what's your opinion?).

    Tom

    attached mail follows:


    > The project is a kind of knowledge base. For each entry a user creates, he > should be able to give additional information, such as every kind of file > (i.e. not only code files but also images etc). > There is an <input type="file" ...> where he selects the file to be > uploaded. The php-script is simply supposed to receive the file and put it > into the proper database-column (which is a MEDIUMBLOB by the way, should be > enough space, or what's your opinion?).

    in my opinion you'd save yourself some major hassle by allowing them to ftp files like this directly to a server's directory via form based ftp. then perhaps add a column that adds filenames to itself with the UPDATE sql query type. this should be enough info for you to write php that could handle a listing of these dynamicly. I'm still not entirely sure the details but this is what I would do in the same situation. A db engine is for text, a server is for storing files. IMHO

    -Adam

    attached mail follows:


    I use php4.0.6, zip file. I install PHP in Netscape as shellcgi, it ran Ok. But now I want to install it as NSAPI, I do all thing but php not run. ( I do the same as introducing in readme.txt) I installed PHP in Netscape Enterprise Web Server run on Win2000 advance server. Please tell me how to overcome... Thank alot

    attached mail follows:


    define a variable to be set on refresh along with the URL that erases the cookie by setting it's expire to time() minus a month or so. If you don't want the url varibale passer to show then have it set the cookie then to a header redirect to $PHP_SELF.

    <?php

    if ($refresh) { setcookie('cookiename', '',(time()-259200000),'/',$HTTP_HOST,0); }

    if ($refresh) { header("location:" . $PHP_SELF); exit; }

    ?>

    use that in the beginning of your page and be sure to add a ?refresh= to your refreshing url.

    hope this helps with what i know about the subject.

    attached mail follows:


    hi all!

    i'm looking for a very basic and simple web based mail checker which just downloads pop email and thats it. tne i could change the look and feel, plus delete the messages (off the database) however i want.

    anyone have something?

    reason being i've already written an addressbook and emailer for my site, but now just want a simple mail checker which just writes the email to a databse and deletes it off the pop server. or maybe someon has some code to help with??

    tIA!

    /sunny

    ____________________________________________________________ Do You Yahoo!? Get your free yahoo.co.uk address at http://mail.yahoo.co.uk or your free yahoo.ie address at http://mail.yahoo.ie

    attached mail follows:


    Hi list members!

    I'm having a strange problem here regarding cookies. First let me explain the scenery: I'm developing a site that have a login system. I'm using PHP , MYSQL and APACHE under MS windows 98 SE. So, when the user login into the first page, I "set up" 2 cookies, one with his name and other with the number of accesses, so, when the user is taken to the main page, I print a message, and inside this message I print the two cookies. Well, the strange thing, is that in the beggining, everything was working FINE...but, without any reason, it stopped to work...it was appearing that the browser wasn't getting the cookie value or not returning it...So, I tried a lot of times and nothing happened!...I tried with Netscape and even with Internet Explorer 5.0...nothing...So, without any reason, AGAIN, it started to work in Netscape...but It don't work in Internet Explorer...noway...

    Any tip? Any experience like this???

    Thanks in advance for any kind of help!!!

    Best Regards,

    attached mail follows:


    Hello, is there an equivalent of the global.asa (ASP) or application.cfm (cold fusion) in PHP?

    attached mail follows:


    > Hello, is there an equivalent of the global.asa (ASP) or > application.cfm

    nope , but usually you can work around that by a sessionstuff b persistent DB connections + storing information there c enviroment vars d ... what do you need it for?

    sebastian

    > -----Ursprüngliche Nachricht----- > Von: Frédéric Mériot [mailto:fredericargyro.net] > Gesendet: Dienstag, 10. Juli 2001 14:33 > An: php-generallists.php.net > Betreff: [PHP] global.asa or application.cfm equivalent? > >

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

    attached mail follows:


    On Tuesday 10 July 2001 04:50, Manisha wrote:

    > I want to develop one payment site, where people will pay their tax. [...] > These reports are very sensitive, so I want high end security (I am out > of USA). I am thinking of using pki (public key infrastructure).

    If it is very sensitive, employ a good security expert. Everything else is a desaster waiting to happen.

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

    I sat laughing snidely into my notebook until they showed me a PC running Linux. And oh! It was as though the heavens opened and God handed down a client-side OS so beautiful, so graceful, and so elegant that a million Microsoft developers couldn't have invented it even if they had a hundred years and a thousand crates of Jolt cola.

    - LAN Times

    attached mail follows:


    How to set the session timeout?

    attached mail follows:


    look in php.ini

    py

    ----- Original Message ----- From: Frédéric Mériot <fredericargyro.net> To: <php-generallists.php.net> Sent: Tuesday, July 10, 2001 1:33 PM Subject: [PHP] Session timeout

    > How to set the session timeout? > > > -- > 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 (again)

    I've got a query which extract titles and categories with a group by on the categorie. Is there a simple way to display rows like this (without doing a second query ):

    Categorie A -titi -toto -tutu

    Categorie B -bibi -nini -fififi

    Categorie C -titi -toto -tutu

    ... etc

    With cold fusion (for those who know) I want to do the same as <CFOUTPUT QUERY="myquery" GROUP="categorie">

    Thanks

    attached mail follows:


    Did you try 'SELECT categorie,item FROM your_table GROUP BY categorie'?

    Ben

    -----Original Message----- From: Frédéric Mériot [mailto:fredericargyro.net] Sent: Tuesday, July 10, 2001 5:41 AM To: PHP General List Subject: [PHP] How to fetch a "group by" Query?

    Hello (again)

    I've got a query which extract titles and categories with a group by on the categorie. Is there a simple way to display rows like this (without doing a second query ):

    Categorie A -titi -toto -tutu

    Categorie B -bibi -nini -fififi

    Categorie C -titi -toto -tutu

    ... etc

    With cold fusion (for those who know) I want to do the same as <CFOUTPUT QUERY="myquery" GROUP="categorie">

    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:


    I have a chunk of code in a webpage that works like this, to rotate some ads.. :

    if ($row = mysql_fetch_array($getads)) { do { $POS = $row[LASTPOS]; $ID = $row[ID]; $POS++; if ($POS > $numads) { $POS = 1; }

    $update = mysql_query("UPDATE adtracker set LASTPOS = '$POS' where ID = '$ID'"); echo $row[LINKLOC];

    } while ($row = mysql_fetch_array($getads));

    }

    so it grabs the last position that ad was in fr