[PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
Hi All, We have an application that generates dynamic ebooks. One of the (minor) problems (but yet annoying) is that when a user comes back to an ebook, they have to actually delete the cache and reload the page to not get the cached version which might be wrong because the content or even the

Re: [PHP] PHP - user profile page with pic

2009-02-23 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com --

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread Per Jessen
German Geek wrote: Hi All, We have an application that generates dynamic ebooks. One of the (minor) problems (but yet annoying) is that when a user comes back to an ebook, they have to actually delete the cache and reload the page to not get the cached version which might be wrong because

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
Yes, that's what i thought, but with my FF 3.0 the resources (swf,png,jpg) don't get reloaded. I have to reload the page (after deleting cache). Something to do with the Apache configuration? ?? Thanks for the reply. Tim-Hinnerk Heuer http://www.ihostnz.com Laurence J. Peter - If two wrongs

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread Per Jessen
German Geek wrote: Yes, that's what i thought, but with my FF 3.0 the resources (swf,png,jpg) don't get reloaded. I have to reload the page (after deleting cache). Something to do with the Apache configuration? Hi Tim, Try loading up just a single file in FF - one of your graphics for

[PHP] optimizing space for array of booleans

2009-02-23 Thread leledumbo
Some languages allows to bit-pack structures to save spaces. Since PHP doesn't have native set data type and operations, will array of booleans be optimized as such? If not, how can I achieve the same result? I need to save about 200 boolean values and I guess it's a good idea to use bitsets.

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
2009/2/23 Per Jessen p...@computer.org German Geek wrote: Yes, that's what i thought, but with my FF 3.0 the resources (swf,png,jpg) don't get reloaded. I have to reload the page (after deleting cache). Something to do with the Apache configuration? Hi Tim, Try loading up just a

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread Per Jessen
German Geek wrote: This didn't work. ctrl+i brought up my bookmarks. ?? Do i need a special plugin/extension? Have web developer etc. Nope, this is standard FF. Ctrl+i should give you the Page Info window. Try looking for that in your menubar and pulldowns. -- Per Jessen, Zürich (3.1°C)

Re: [PHP] redirecting output for a spawned child process..

2009-02-23 Thread Alpár Török
You can use a PHP workarround. Install a custom ob_handler, that has a static file descriptor, and writes all output to the file. In order to also see everything, you need to also activate implicit flush. i know that there would be lots of elegant ways to do this on linux in C, but AFAIK php

[PHP] ms-word reading from PHP on linux O.S

2009-02-23 Thread Srinivasa Rao D
Hi all, * How better, i can read ms-word doc files from PHP on LINUX OS*.On searching I got *catdoc* softaware.By using this i can read word doc data as a text. function catdoc_file($fname) { $ret = exec('catdoc -ab '.escapeshellarg($fname) .' 21'); if (preg_match('/^sh: line 1:

RE: [PHP] ms-word reading from PHP on linux O.S

2009-02-23 Thread Bob McConnell
From: Srinivasa Rao D * How better, i can read ms-word doc files from PHP on LINUX OS*.On searching I got *catdoc* softaware.By using this i can read word doc data as a text. It would be helpful to have a little more context. What do you want to do with the text you read this way?

Re: [PHP] adding whitespace to a timestamp

2009-02-23 Thread Andrew Ballard
On Sat, Feb 21, 2009 at 1:28 PM, Eric Sherman copyedit...@gmail.com wrote: I hoping to add a space between the date and the time in this: $thedate = date('M jS g:i A', $postTIME); i.e, between* jS* and *g:i* I've looked around but can't find anything. Thanks Eric Sherman Multi Media

Re: [PHP] optimizing space for array of booleans

2009-02-23 Thread Virgilio Quilario
Some languages allows to bit-pack structures to save spaces. Since PHP doesn't have native set data type and operations, will array of booleans be optimized as such? If not, how can I achieve the same result? I need to save about 200 boolean values and I guess it's a good idea to use bitsets.

[PHP] multiple choice dropdown box puzzle

2009-02-23 Thread PJ
I think this is a tough one... and way above my head: PLEASE READ ALL OF THE ABOVE TO UNDERSTAND WHAT I AM TRYING TO DO. Having a bit of a rough time figuring out how to formulate php-mysql to insert data into fields using a multiple dropdown box in a form. to post I am using the following:

Re: [PHP] multiple choice dropdown box puzzle

2009-02-23 Thread Andrew Ballard
On Mon, Feb 23, 2009 at 10:25 AM, PJ af.gour...@videotron.ca wrote: I think this is a tough one... and way above my head: PLEASE READ ALL OF THE ABOVE TO UNDERSTAND WHAT I AM TRYING TO DO. Having a bit of a rough time figuring out how to formulate php-mysql to insert data into fields using a

Re: [PHP] multiple choice dropdown box puzzle

2009-02-23 Thread Afan Pasalic
PJ wrote: I think this is a tough one... and way above my head: PLEASE READ ALL OF THE ABOVE TO UNDERSTAND WHAT I AM TRYING TO DO. Having a bit of a rough time figuring out how to formulate php-mysql to insert data into fields using a multiple dropdown box in a form. to post I am using the

Re: [PHP] ms-word reading from PHP on linux O.S

2009-02-23 Thread Jim Lucas
Srinivasa Rao D wrote: Hi all, * How better, i can read ms-word doc files from PHP on LINUX OS*.On searching I got *catdoc* softaware.By using this i can read word doc data as a text. function catdoc_file($fname) { $ret = exec('catdoc -ab '.escapeshellarg($fname) .' 21');

[PHP] RecursiveDirectoryIterator and foreach

2009-02-23 Thread Ryan Panning
I have discovered that when I foreach over a RecursiveDirectoryIterator (see example below) the $item actually turns into a SplFileInfo object. I would expect it to be a RecursiveDirectoryIterator. How do I do a hasChildren() on SplFileInfo? However, if I change it to a non-recursive,

[PHP] Re: multiple choice dropdown box puzzle

2009-02-23 Thread Brent Baisley
It's actually a very simple solution, and you should do it all in a single INSERT. Putting INSERTs in a loop will kill your performance when you try to scale. $sql4 = 'INSERT INTO temp (example) VALUES (' . implode('),(', $_POST[categoriesIN]) . ')'; $result4 = mysql_query($sql4, $db); That

Re: [PHP] RecursiveDirectoryIterator and foreach

2009-02-23 Thread Philip Graham
Here's a RecursiveDirectoryIterator class I've written and find quite useful: ?php /** * This class encapsulates an iterator that iterates over all the files in a * directory recursively. Only files that don't begin with a '.' are included * in this iteration. This class essentially wraps an

Re: [PHP] Two troublesome fields (Resolved)

2009-02-23 Thread Terion Miller
Wow do I feel blind..it was that I missed the ISSET part at the topdidn't have it for those two fieldsDOH!! Thanks all Terion Happy Freecycling Free the List !! www.freecycle.org Over Moderation of Freecycle List Prevents Post Timeliness.

Re: [PHP] RecursiveDirectoryIterator and foreach

2009-02-23 Thread Nathan Nobbe
On Mon, Feb 23, 2009 at 9:31 AM, Ryan Panning rpann...@gmail.com wrote: I have discovered that when I foreach over a RecursiveDirectoryIterator (see example below) the $item actually turns into a SplFileInfo object. I would expect it to be a RecursiveDirectoryIterator. How do I do a

Re: [PHP] multiple choice dropdown box puzzle

2009-02-23 Thread Curtis Maurand
You're looking for something like: This gets called 10 times from another function, but this is sort of what you're looking for. This gives me a combo-box. function qselect($mysql_link, $i) { $driverquery = select car_no, drv_name from cars order by car_no + 0; $driverresult =

[PHP] File Write Operation Slows to a Crawl....

2009-02-23 Thread fschnittke
Hi: Newbie here. This is my first attempt at PHP scripting. I'm trying to find an alternative to Lotus Domino's domlog.nsf for logging web transactions. Domino does create an Apache compatible text file of the web transactions, and this is what I’m trying to parse. I started off using a code

[PHP] Re: RecursiveDirectoryIterator and foreach

2009-02-23 Thread Ryan Panning
Ryan Panning wrote: I have discovered that when I foreach over a RecursiveDirectoryIterator (see example below) the $item actually turns into a SplFileInfo object. I would expect it to be a RecursiveDirectoryIterator. How do I do a hasChildren() on SplFileInfo? However, if I change it to a

Re: [PHP] RecursiveDirectoryIterator and foreach

2009-02-23 Thread Ryan Panning
Nathan Nobbe wrote: if youre trying to do recursive iteration whereby you 'flatten' the tree structure, drop the RecursiveDirectoryIterator into a RecursiveIteratorIterator (its for iterating over RecursiveIterators), then you dont have to bother w/ calling hasChildren() at all. you probly also

Re: [PHP] RecursiveDirectoryIterator and foreach

2009-02-23 Thread Ryan Panning
Philip Graham wrote: Here's a RecursiveDirectoryIterator class I've written and find quite useful: ?php /** * This class encapsulates an iterator that iterates over all the files in a * directory recursively. Only files that don't begin with a '.' are included * in this iteration. This

[PHP] Re: multiple choice dropdown box puzzle

2009-02-23 Thread PJ
Here's my test page and, so far, nothing works... ? session_start();// Include sessions_start() in everything include (db1.php); $thisInterface = addNewBooks; if (!isset($_SESSION[addNewBooks])) { $categoriesIN= ; // Save the input variables in session variables

Re: [PHP] RecursiveDirectoryIterator and foreach

2009-02-23 Thread Philip Graham
On February 23, 2009 12:32:26 Ryan Panning wrote: Hi, although I don't think this will work in my situation, there is an interesting piece of code that you have. array_push($this-_dirStack, $this-_curDirIter); Are you able to inject the iterator with more items? I would like to do this with

[PHP] PDO buffered query problem

2009-02-23 Thread Stewart Duncan
Hi there, I'm having some serious problems with the PHP Data Object functions. I'm trying to loop through a sizeable result set (~60k rows, ~1gig) using a buffered query to avoid fetching the whole set. No matter what I do, the script just hangs on the PDO::query() - it seems the query is

[PHP] help installing phpDocumentor

2009-02-23 Thread jim white
I have tried to install phpDocumentor, but am having problems getting it to run. Finding install directions has so far eluded me. Are there any installation instructions for this? Jim White -- James (Jim) B. White tel: (919)-380-9615 homepage: http://jimserver.net/ -- PHP General

RE: [PHP] Re: multiple choice dropdown box puzzle

2009-02-23 Thread Bob McConnell
From: PJ Here's my test page and, so far, nothing works... Please expound on nothing works What do you see in the browser? What do you see in the server logs? ? I strongly recommend changing all of these to ?php per the XHTML specs. That will reduce the ambiguity and possibly prevent

Re: [PHP] help installing phpDocumentor

2009-02-23 Thread Jim Lucas
jim white wrote: I have tried to install phpDocumentor, but am having problems getting it to run. Finding install directions has so far eluded me. Are there any installation instructions for this? Jim White searching google for install phpDocumentor first result is this

Re: [PHP] RecursiveDirectoryIterator and foreach

2009-02-23 Thread Nathan Nobbe
On Mon, Feb 23, 2009 at 10:27 AM, Ryan Panning rpann...@gmail.com wrote: Nathan Nobbe wrote: if youre trying to do recursive iteration whereby you 'flatten' the tree structure, drop the RecursiveDirectoryIterator into a RecursiveIteratorIterator (its for iterating over RecursiveIterators),

Re: [PHP] help installing phpDocumentor

2009-02-23 Thread jim white
Jim Lucas wrote: jim white wrote: I have tried to install phpDocumentor, but am having problems getting it to run. Finding install directions has so far eluded me. Are there any installation instructions for this? Jim White searching google for install phpDocumentor first result

Re: [PHP] help installing phpDocumentor

2009-02-23 Thread Jim Lucas
jim white wrote: Jim Lucas wrote: jim white wrote: I have tried to install phpDocumentor, but am having problems getting it to run. Finding install directions has so far eluded me. Are there any installation instructions for this? Jim White searching google for install

Re: [PHP] help installing phpDocumentor

2009-02-23 Thread jim white
Jim Lucas wrote: jim white wrote: Jim Lucas wrote: jim white wrote: I have tried to install phpDocumentor, but am having problems getting it to run. Finding install directions has so far eluded me. Are there any installation instructions for this? Jim White

Re: [PHP] Re: multiple choice dropdown box puzzle

2009-02-23 Thread Shawn McKenzie
Bob McConnell wrote: From: PJ Here's my test page and, so far, nothing works... Please expound on nothing works What do you see in the browser? What do you see in the server logs? ? I strongly recommend changing all of these to ?php per the XHTML specs. That will reduce the

[PHP] Re: File Write Operation Slows to a Crawl....

2009-02-23 Thread Shawn McKenzie
fschnit...@execulink.com wrote: Hi: Newbie here. This is my first attempt at PHP scripting. I'm trying to find an alternative to Lotus Domino's domlog.nsf for logging web transactions. Domino does create an Apache compatible text file of the web transactions, and this is what I’m trying to

Re: [PHP] help installing phpDocumentor

2009-02-23 Thread Jim Lucas
Back on the list... jim white wrote: Jim Lucas wrote: jim white wrote: Jim Lucas wrote: jim white wrote: I have tried to install phpDocumentor, but am having problems getting it to run. Finding install directions has so far eluded me. Are there any installation

Re: [PHP] File Write Operation Slows to a Crawl....

2009-02-23 Thread Paul M Foster
On Mon, Feb 23, 2009 at 11:59:20AM -0500, fschnit...@execulink.com wrote: Hi: Newbie here. This is my first attempt at PHP scripting. I'm trying to find an alternative to Lotus Domino's domlog.nsf for logging web transactions. Domino does create an Apache compatible text file of the web

[PHP] Having Trouble With Session Variable in Query Statement

2009-02-23 Thread revDAVE
Hi folks, I'm trying to make an update query with a session variable... It creates this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ... Q: the session var shows ok on the page : ID ?php echo $_SESSION['now_poid'];

Re: [PHP] Having Trouble With Session Variable in Query Statement

2009-02-23 Thread Paul M Foster
On Mon, Feb 23, 2009 at 12:34:58PM -0800, revDAVE wrote: Hi folks, I'm trying to make an update query with a session variable... It creates this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ... Q: the

Re: [PHP] Having Trouble With Session Variable in Query Statement

2009-02-23 Thread Philip Graham
On February 23, 2009 15:34:58 revDAVE wrote: Hi folks, //but this does not.. $updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE id=$_SESSION['thisid']; Q: How can I fix it? try : $updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE id={$_SESSION['thisid']}; or even better:

Re: [PHP] Having Trouble With Session Variable in Query Statement

2009-02-23 Thread revDAVE
On 2/23/2009 12:44 PM, Paul M Foster pa...@quillandmouse.com wrote: Don't single quote values inside array brackets when the whole expression is in double quotes. You've got: ... $_SESSION['thisid']; Do this instead: ... $_SESSION[thisid]; AHA - thanks much - that worked! --

Re: [PHP] Having Trouble With Session Variable in Query Statement

2009-02-23 Thread Micah Gersten
Paul M Foster wrote: On Mon, Feb 23, 2009 at 12:34:58PM -0800, revDAVE wrote: Hi folks, I'm trying to make an update query with a session variable... It creates this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or

Re: [PHP] File Write Operation Slows to a Crawl....

2009-02-23 Thread fschnittke
Thanks Paul and Shawn: I can't answer the Why's in your posts, as this is literally my first attempt at PHP, but I will investigate your response and refine my code accordingly. What I did find is that by replacing the following code: $fhandle = fopen(/ramdrive/import_file.txt, w);

[PHP] Re: File Write Operation Slows to a Crawl....

2009-02-23 Thread Shawn McKenzie
Shawn McKenzie wrote: fschnit...@execulink.com wrote: Hi: Newbie here. This is my first attempt at PHP scripting. I'm trying to find an alternative to Lotus Domino's domlog.nsf for logging web transactions. Domino does create an Apache compatible text file of the web transactions, and this

Re: [PHP] File Write Operation Slows to a Crawl....

2009-02-23 Thread Shawn McKenzie
fschnit...@execulink.com wrote: Thanks Paul and Shawn: I can't answer the Why's in your posts, as this is literally my first attempt at PHP, but I will investigate your response and refine my code accordingly. What I did find is that by replacing the following code: $fhandle =

Re: [PHP] File Write Operation Slows to a Crawl....

2009-02-23 Thread fschnittke
Hi Shawn: Yes, good idea, I agree Thanks Fred fschnit...@execulink.com wrote: Thanks Paul and Shawn: I can't answer the Why's in your posts, as this is literally my first attempt at PHP, but I will investigate your response and refine my code accordingly. What I did find is that

Re: [PHP] help installing phpDocumentor

2009-02-23 Thread jim white
Jim Lucas wrote: Back on the list... jim white wrote: Jim Lucas wrote: jim white wrote: Jim Lucas wrote: jim white wrote: I have tried to install phpDocumentor, but am having problems getting it to run. Finding install directions has so far

Re: [PHP] PDO buffered query problem

2009-02-23 Thread Chris
Stewart Duncan wrote: Hi there, I'm having some serious problems with the PHP Data Object functions. I'm trying to loop through a sizeable result set (~60k rows, ~1gig) using a buffered query to avoid fetching the whole set. No matter what I do, the script just hangs on the PDO::query() -

[PHP] Why PHP won

2009-02-23 Thread Daevid Vincent
http://startuplessonslearned.blogspot.com/2009/01/why-php-won.html

Re: [PHP] Re: Securing web services

2009-02-23 Thread Yannick Warnier
Le dimanche 22 février 2009 à 21:29 +, Nathan Rixham a écrit : Yannick Warnier wrote: Hi there, Another Web Service related question. Obviously, Google gives me enough hints to find *many* documents on the topic (searching for securing web services), but I am developing open-source

Re: [PHP] optimizing space for array of booleans

2009-02-23 Thread leledumbo
you should not worry about optimizing boolean values unless you would store them in database. I DO need to store them in a database, that's why I'm asking. I won't care if I only use PHP, since it won't keep my data in memory for a long time. anyways, use bitwise operators I think I've stated

[PHP] Re: multiple choice dropdown box puzzle

2009-02-23 Thread PJ
Brent Baisley wrote: It's actually a very simple solution, and you should do it all in a single INSERT. Putting INSERTs in a loop will kill your performance when you try to scale. $sql4 = 'INSERT INTO test (example) VALUES (' . implode('),(', $_POST[categoriesIN]) . ')'; $result4 =

Re: [PHP] PHP - user profile page with pic

2009-02-23 Thread Virgilio Quilario
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com

Re: [PHP] adding whitespace to a timestamp

2009-02-23 Thread German Geek
Maybe the issue is that you are displaying the output in a browser and spaces are not shown. Try puttung nbsp; instead of a literal space. Tim-Hinnerk Heuer http://www.ihostnz.com Henny Youngman - When I told my doctor I couldn't afford an operation, he offered to touch-up my X-rays.

Re: [PHP] Having trouble with a multidimensional array menu - new and improved

2009-02-23 Thread Daevid Vincent
Okay, I scrapped my multi-array version and have come up with what seems to be a cleaner recursive object way of doing this. The last bit of help I need is in the expandSelectedMenu() part. I need a way to store all the parent nodes above, then traverse them and set their CSS class accordingly as

[PHP] Unexpected results using ksort on arrays in which the keys are mixed alphanumeric strings.

2009-02-23 Thread Clancy
I have been experimenting using four character alphanumeric keys on an array, and when I generated a random set of keys, and then used ksort to sort the array, I was very surprised to find that if the key contained any non-numeric character, or if it started with zero, the key was sorted as a

Re: [PHP] Why PHP won

2009-02-23 Thread Paul M Foster
On Mon, Feb 23, 2009 at 01:39:51PM -0800, Daevid Vincent wrote: http://startuplessonslearned.blogspot.com/2009/01/why-php-won.html I *like* the way this guy thinks. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] ms-word reading from PHP on linux O.S

2009-02-23 Thread Srinivasa Rao D
thanks Lucas.This code is very helpful to me.

Re: [PHP] Why PHP won

2009-02-23 Thread Michael A. Peters
Paul M Foster wrote: On Mon, Feb 23, 2009 at 01:39:51PM -0800, Daevid Vincent wrote: http://startuplessonslearned.blogspot.com/2009/01/why-php-won.html I *like* the way this guy thinks. Paul It was a decent page. Point #2 though - you can use mod_rewrite to do wonders with respect to

Re: [PHP] ms-word reading from PHP on linux O.S

2009-02-23 Thread Per Jessen
Srinivasa Rao D wrote: Hi all, * How better, i can read ms-word doc files from PHP on LINUX OS*. [snip] *Is there are any other softwares that can fetch text from MS-WORD file?.* OpenOffice. -- Per Jessen, Zürich (1.9°C) -- PHP General Mailing List

Re: [PHP] Why PHP won

2009-02-23 Thread Per Jessen
Michael A. Peters wrote: [anip] and you can use DOMDocument to completely construct the page before sending it to the browser - allowing you to translate xhtml to html for browsers that don't properly support xhtml+xml. I suspect you meant translate xml to html? I publish everything in