Re: [PHP] Pear Pager

2006-06-08 Thread Chris
weetat wrote: Hi all , Thanks all in this newsgroup for your help. I have question regarding PEAR Pager . http://pear.php.net/support/lists.php -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] php sessions and Google

2006-06-08 Thread Anthony Ettinger
On 6/7/06, tedd [EMAIL PROTECTED] wrote: Can someone shed some light on this for me? How can one do sessions and make Google bots happy? I think what they're getting at is don't use session id's unless they're logged in. -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html --

RE: [PHP] file from database work local, but not on server

2006-06-08 Thread Peter Lauri
Thank you for pointing out the security issue, I am aware of that. Was sloppy not to use %d instead of %s as I did. The database is exactly the same, and the data is correct in $Row['filename']. I did create a copy and put it onto an other server, and there it worked ok. Some files did work well,

Re: [PHP] File downloads

2006-06-08 Thread kartikay malhotra
Thanks to Tedd, Barry, George and others for help over download file problem. I'm going to receive an ACK if the file downloads correctly. In absence of such an ACK, a script would quitely remove the temporary files after a fixed interval of time. Temporary files have unique filenames. New

Re: [PHP] Re: php java intregration

2006-06-08 Thread Vedanta Barooah
hi, i have not tried it in linux, but the stuff worked for me in windows, here are my notes: * PHP 5.1.4 * PECL 5.1.4 (use php_java.dll and php_java.jar from the zip file, this is an extra download) here is my php.ini ; configuration to enable php_java.dll [Java] extension=php_java.dll

[PHP] Restrict uploaded scripts

2006-06-08 Thread Mathias Bundgaard Svesson
Hi! I'm trying to create a CMS where it should be posible to upload script modules. Those modules should mostly be made by myself, but it is posible for others to create scripts too. My question is, is it posible to restrict the modules to their own directory so they don't overwrite some of the

[PHP] Gzinflate on a string that has been base_64 encoded in Windows

2006-06-08 Thread Venky
Greetings! I have a long piece of string that is apparently a PNG image which has been base_64 decoded in an XML file. I can retreive this string without problem. The string is in $mystra $pngdata = base64_decode($mystra); $pngdata = gzinflate($pngdata); When i try to gzinflate it , i get a

[PHP] popup window from php page

2006-06-08 Thread William Stokes
Hello, How do I open a popup window from php code when a web page is loaded? Does it require javascript usage? Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] XPath avg(), min(), max() functions not found

2006-06-08 Thread Alex
Hi all. I'm trying to use XPath avg(), min() and max() functions without success. Others functions like count() or sum() works correctly. Here is the code I'm using (PHP 5.1): ?php $xml_str = ' stats   cards     card name=My card       type name=visits25/type       type name=clicks7/type    

Re: [PHP] popup window from php page

2006-06-08 Thread Rabin Vincent
On 6/8/06, William Stokes [EMAIL PROTECTED] wrote: How do I open a popup window from php code when a web page is loaded? Does it require javascript usage? Yes, this needs to be done with Javascript. Google will help you on this. Rabin -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Restrict uploaded scripts

2006-06-08 Thread chris smith
On 6/8/06, Mathias Bundgaard Svesson [EMAIL PROTECTED] wrote: Hi! I'm trying to create a CMS where it should be posible to upload script modules. Those modules should mostly be made by myself, but it is posible for others to create scripts too. My question is, is it posible to restrict the

[PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread OOzy Pal
How can I run a .php script from the command in Linux? -- OOzy Kubuntu-Dapper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: popup window from php page

2006-06-08 Thread Mindaugas L
Yeah, just echo JavaScript, which opens popup page. Remember php is server side language. On 6/8/06, William Stokes [EMAIL PROTECTED] wrote: Hello, How do I open a popup window from php code when a web page is loaded? Does it require javascript usage? Thanks -Will -- PHP General Mailing List

Re: [PHP] popup window from php page

2006-06-08 Thread Andrei
What PHP does is it outputs HTML code as result. Any other functionality regarding browser commands (such as opening popups) are done using javascript. Andy William Stokes wrote: Hello, How do I open a popup window from php code when a web page is loaded? Does it require

Re: [PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread Dave Goodchild
On 08/06/06, OOzy Pal [EMAIL PROTECTED] wrote: How can I run a .php script from the command in Linux? 1. run /usr/local/bin/php (or wherever the php binary is, run which php to find out) scriptname 2. add the hash bang to the start of the script and run it by typing the scriptname. --

Re: [PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread Rabin Vincent
On 6/8/06, OOzy Pal [EMAIL PROTECTED] wrote: How can I run a .php script from the command in Linux? $ php yourscript.php Rabin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread Brad Bonkoski
$ php script.php OOzy Pal wrote: How can I run a .php script from the command in Linux? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] file from database work local, but not on server

2006-06-08 Thread Jef Sullivan
What happens when you print out the query to the page? Is the query correct? Jef -Original Message- From: Peter Lauri [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 1:10 PM To: php-general@lists.php.net Subject: [PHP] file from database work local, but not on server Best

Re: [PHP] php sessions and Google (Solved)

2006-06-08 Thread tedd
At 12:47 PM +1000 6/8/06, Chris wrote: tedd wrote: At 10:56 AM +1000 6/8/06, Chris wrote: tedd wrote: Hi gang: I've read that php sessions can create problems for Google bots. -snip- Chris: Thanks -- after your lead, I found that my site's session.use_trans_sid was turned off by default. So,

[PHP] Passing variables.

2006-06-08 Thread William Stokes
Hello, I've used like 3 hours to get this done but I can't figure this out. Hope someone here can help. I have a form that a user can use to edit www pages. Page content is stored in DB as a HTML code. First user has to select, from select menu, which page to edit. Then the selected page

[PHP] Re: XPath avg(), min(), max() functions not found

2006-06-08 Thread Rob Richards
Hi Alex, Alex wrote: Hi all. I'm trying to use XPath avg(), min() and max() functions without success. Others functions like count() or sum() works correctly. Here is the code I'm using (PHP 5.1): ?php $xml_str = ' stats cards card name=My card type name=visits25/type type

Re: [PHP] File downloads

2006-06-08 Thread tedd
At 7:47 AM + 6/8/06, kartikay malhotra wrote: New problem: Is there a way for the server to notify the client that a new file has become available for download, provided the client was online in the past X minutes? This could be done... kartikay: First, it's probably best if you start a

[PHP] Re: pop-up window in php???

2006-06-08 Thread Michelle Konzack
Am 2006-05-29 11:56:43, schrieb [EMAIL PROTECTED]: ok, maybe I didn't make my question too clear. I was mostly wondering if there is a way to do it in PHP rather than Javascript. I would prefer only using php. Maybe it can be done, like, 1) Client fill out a form 2) Client klick

Re: [PHP] Passing variables.

2006-06-08 Thread Brad Bonkoski
My Humble suggestion is possibly: upon preview, actually post the edited data to a temp table, and then pull the HTML from the temp table to display the preview page. Currently you are passing the original content to the preview page. And You might want to look to see if javascript has any

[PHP] running php method in the background

2006-06-08 Thread Nic Appleby
Hi there I have a php web script which communicates with a server using sockets. There is a method in which the client listens for messages from the server, and this blocks the client. I need a way to 'fork' a process or to get this method to run in the background so that i can process user

[PHP] server sending notifications to clients

2006-06-08 Thread kartikay malhotra
Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new event occurs, how can the server notify the client about

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Brad Bonkoski
kartikay malhotra wrote: Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new event occurs, how can the

RE: [PHP] file from database work local, but not on server

2006-06-08 Thread tedd
At 9:03 AM +0700 6/8/06, Peter Lauri wrote: Is there anyone with reference of a small example of binary storage and retrieval from database? I have performed working solutions for images before, but this should support any file extensions (with exceptions of course). Peter: Storage and

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Angelo Zanetti
kartikay malhotra wrote: Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new event occurs, how can the

RE: [PHP] server sending notifications to clients

2006-06-08 Thread Jay Blanchard
[snip] Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new event occurs, how can the server notify the client about

RE: [PHP] server sending notifications to clients

2006-06-08 Thread Jim Moseby
Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new event occurs, how can the server notify

[PHP] order of elements in $_POST super global

2006-06-08 Thread Ben Liu
Hello All, I'm using a form (method=POST) to collect 30 boolean values from the end user using a series of checkboxes in the form. The form is arranged in a table so that the 30 check boxes are not a long list but rather three columns (with related items columnized). The problem is when I

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Barry
Angelo Zanetti schrieb: kartikay malhotra wrote: Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new

Re: [PHP] order of elements in $_POST super global

2006-06-08 Thread Dave Goodchild
On 08/06/06, Ben Liu [EMAIL PROTECTED] wrote: Hello All, I'm using a form (method=POST) to collect 30 boolean values from the end user using a series of checkboxes in the form. The form is arranged in a table so that the 30 check boxes are not a long list but rather three columns (with related

[PHP] Re: order of elements in $_POST super global

2006-06-08 Thread Barry
Ben Liu schrieb: Hello All, I'm using a form (method=POST) to collect 30 boolean values from the end user using a series of checkboxes in the form. The form is arranged in a table so that the 30 check boxes are not a long list but rather three columns (with related items columnized). The

[PHP] Re: Passing variables.

2006-06-08 Thread Barry
William Stokes schrieb: Hello, I've used like 3 hours to get this done but I can't figure this out. Hope someone here can help. I have a form that a user can use to edit www pages. Page content is stored in DB as a HTML code. First user has to select, from select menu, which page to edit.

Re: [PHP] order of elements in $_POST super global

2006-06-08 Thread Ben Liu
Hi Dave, No, that is definitely a possibility. Right now I am using a foreach loop to iterate over the $_POST array and determine if each checkbox is checked or not, if it is checked, than a related piece of data is written into the text file. This makes for pretty compact code. I could as you

[PHP] Re: order of elements in $_POST super global

2006-06-08 Thread Ben Liu
I probably should add some more details to my question: The names of the form checkboxes could be changed from ie: bool_careers, bool_speaking, bool_internship, etc. to a single array bool_questions[], for instance. The problem with that is that I am using the form checkbox names later to

[PHP] Re: running php method in the background

2006-06-08 Thread Ben Ramsey
On 6/8/06 10:10 AM, Nic Appleby wrote: I have a php web script which communicates with a server using sockets. There is a method in which the client listens for messages from the server, and this blocks the client. I need a way to 'fork' a process or to get this method to run in the background

[PHP] Re: order of elements in $_POST super global

2006-06-08 Thread Ben Liu
Also, I need to re-order the elements in a custom manner, not simply alphabetical or reverse alphabetical or some logical way like that, more like how the original form is presented, by related fields. More specifically, the form is for a membership system, the system collects typical demographic

[PHP] Re: file( ) function

2006-06-08 Thread Adam Zey
Mayank Maheshwary wrote: Hi, I am facing some trouble with the file( ) function. I understand that it returns the contents of the file in an array. Also, I am able to print the lines using the echo function. However, whenever I try to compare the contents of an array using strcmp, or ==, the

[PHP] Re: running php method in the background

2006-06-08 Thread Adam Zey
Nic Appleby wrote: Hi there I have a php web script which communicates with a server using sockets. There is a method in which the client listens for messages from the server, and this blocks the client. I need a way to 'fork' a process or to get this method to run in the background so that i

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Adam Zey
Barry wrote: Angelo Zanetti schrieb: kartikay malhotra wrote: Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates.

Re: [PHP] order of elements in $_POST super global

2006-06-08 Thread Ron Clark
Ben Liu wrote: Hi Dave, No, that is definitely a possibility. Right now I am using a foreach loop to iterate over the $_POST array and determine if each checkbox is checked or not, if it is checked, than a related piece of data is written into the text file. This makes for pretty compact code.

Re: [PHP] Passing variables.

2006-06-08 Thread tedd
At 4:44 PM +0300 6/8/06, William Stokes wrote: I have a form that a user can use to edit www pages. Page content is stored in DB as a HTML code. First user has to select, from select menu, which page to edit. Then the selected page content html is retrieved to a textarea where it can be edited

[PHP] Re: order of elements in $_POST super global

2006-06-08 Thread Jo�o C�ndido de Souza Neto
Since i remember, when a for POST is sent and a checkbox is not checked, php not receive this $_POST variable. That is, i think you don´t need to use a foreach to know if checkbox was checked or not. Am i wrong? Ben Liu [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hello

Re: [PHP] server sending notifications to clients

2006-06-08 Thread kartikay malhotra
Dear Adam, You can do it without polling. I've seen web applications that open a neverending GET request in order to get updates to the browser instantaneously. Regards, Adam. Kindly elaborate on neverending GET request. Shall I call the script from within itself? Regards KM On 6/8/06, Adam

Re: [PHP] order of elements in $_POST super global

2006-06-08 Thread Ben Liu
Der...of course. Thanks Ron! I knew the answer was simple. :-) -Ben On 6/8/06, Ron Clark [EMAIL PROTECTED] wrote: why not create an array with the keys in the order you want ( $array= array(value1,value2,). Then loop through the array and use the values as keys to the $_POST variable and

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Adam Zey
kartikay malhotra wrote: Dear Adam, You can do it without polling. I've seen web applications that open a neverending GET request in order to get updates to the browser instantaneously. Regards, Adam. Kindly elaborate on neverending GET request. Shall I call the script from within itself?

Re: [PHP] Re: order of elements in $_POST super global

2006-06-08 Thread Ben Liu
Hello João, You are right that the $_POST variable does not receive anything for unchecked boxes. I didn't realize that. But I still need the foreach loop for other reasons: So it looks like this: foreach ($_POST as $key = $data) { $query.=$key, ; } Instead of

RE: [PHP] file from database work local, but not on server

2006-06-08 Thread Peter Lauri
Hi Tedd, Thank you for your answer. I have it working for images already, the problem comes to Excel, PDF's etc. I will do some more testing using your sample, thanks. /Peter -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 9:29 PM To: Peter Lauri;

RE: [PHP] file from database work local, but not on server

2006-06-08 Thread tedd
At 6:22 PM +0700 6/8/06, Peter Lauri wrote: Hi Tedd, Thank you for your answer. I have it working for images already, the problem comes to Excel, PDF's etc. I will do some more testing using your sample, thanks. /Peter Peter: Excel and PDF's are different critters. I'm sure there are people on

Re: [PHP] Re: order of elements in $_POST super global

2006-06-08 Thread Ben Liu
yes, as I said in an earlier post, I used to have 30 if ($key) statements, one for each checkbox, in the order I wanted to write them in. This is not optimal because: (a) it is a ton of code, (b) the checkboxes could in the future increase in number, change order, etc. and then I would have to

Re: [PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread Venky
Even better... if you want to use GET/POST, and access PHP scripts thru the web server, it is recommended to use wget very useful tool, supports http auth, etc. Regards Venky On 08/06/06, Brad Bonkoski [EMAIL PROTECTED] wrote: $ php script.php OOzy Pal wrote: How can I run a .php

[PHP] reset a resource?

2006-06-08 Thread sam
After I've looped through a resource do I have to run the query again to load up 'mysql_fetch_assoc' or is there some kind of reset function I can't find? $q = SELECT * FROM table; $s = mysql_query($q, $pe) or die(mysql_error()); while ($row_s = mysql_fetch_assoc($s)) { echo $i++;

Re: [PHP] reset a resource?

2006-06-08 Thread Brad Bonkoski
Perhaps this will help: http://www.php.net/manual/en/function.mysql-data-seek.php -brad sam wrote: After I've looped through a resource do I have to run the query again to load up 'mysql_fetch_assoc' or is there some kind of reset function I can't find? $q = SELECT * FROM table; $s =

Re: [PHP] reset a resource?

2006-06-08 Thread Ben Liu
sorry, mysql_data_seek() On 6/8/06, sam [EMAIL PROTECTED] wrote: After I've looped through a resource do I have to run the query again to load up 'mysql_fetch_assoc' or is there some kind of reset function I can't find? $q = SELECT * FROM table; $s = mysql_query($q, $pe) or

[PHP] Re: pop-up window in php???

2006-06-08 Thread Chuck Anderson
Michelle Konzack wrote: Am 2006-05-29 11:56:43, schrieb [EMAIL PROTECTED]: ok, maybe I didn't make my question too clear. I was mostly wondering if there is a way to do it in PHP rather than Javascript. I would prefer only using php. Maybe it can be done, like, 1) Client fill

Re: [PHP] Restrict uploaded scripts

2006-06-08 Thread Mathias Bundgaard Svesson
Restrict them not to overwrite other modules or overwrite the CMS itself. Each module should have it's own directory, and it shouldn't be allowed to change anything outside it. tor, 08 06 2006 kl. 21:49 +1000, skrev chris smith: On 6/8/06, Mathias Bundgaard Svesson [EMAIL PROTECTED] wrote: Hi!

Re: [PHP] Restrict uploaded scripts

2006-06-08 Thread tedd
At 10:37 PM +0200 6/8/06, Mathias Bundgaard Svesson wrote: Restrict them not to overwrite other modules or overwrite the CMS itself. Each module should have it's own directory, and it shouldn't be allowed to change anything outside it. tor, 08 06 2006 kl. 21:49 +1000, skrev chris smith: On

Re: [PHP] Gzinflate on a string that has been base_64 encoded in Windows

2006-06-08 Thread Chris
Venky wrote: Greetings! I have a long piece of string that is apparently a PNG image which has been base_64 decoded in an XML file. I can retreive this string without problem. The string is in $mystra $pngdata = base64_decode($mystra); $pngdata = gzinflate($pngdata); When i try to gzinflate

[PHP] binary zero evaluates as true!?

2006-06-08 Thread Jon
Seriously guys... am I completely missing something important here? An empty array evaluates as false. The null character evaluates as false. The STRING 0 even evaluates as false yet a binary zero does not? Even better yet bindec() doesn't appear to be binary safe so it will work for a

[PHP] remove last comma in string

2006-06-08 Thread weetat
Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have tried using

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread D. Dante Lorenso
Jon wrote: Seriously guys... am I completely missing something important here? An empty array evaluates as false. The null character evaluates as false. The STRING 0 even evaluates as false yet a binary zero does not? Even better yet bindec() doesn't appear to be binary safe so it will

Re: [PHP] remove last comma in string

2006-06-08 Thread D. Dante Lorenso
weetat wrote: Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have

Re: [PHP] remove last comma in string

2006-06-08 Thread Chris
weetat wrote: Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread Jon
Are you sure you are evaluating your binary '' properly as you claim? Send a sample code alrightey then. the binary data itself is actually stored in a mysql table. (mysql 5.1.9) the relevant part is the following column: ++- | Field | Type

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread D. Dante Lorenso
Jon wrote: The second thing that needs to be said here is simply a re-statement of the original, this time more verbosely. The list of things in php that evaluate as false is as follows: * the boolean FALSE itself * the integer 0 (zero) * the float 0.0 (zero) * the empty string, and the

[PHP] transfer file

2006-06-08 Thread kristianto adi widiatmoko
can php do transfer file betwen 2 server without using ftp function socket that use ftp port Send instant messages to your online friends http://uk.messenger.yahoo.com

[PHP] Update table to get consecutive Primary keys

2006-06-08 Thread Antonio Bassinger
Hi All! I've a MySQL table: table (id INT NOT NULL AUTO_INCREMENT, flag TINYINT NOT NULL, msgID VARCHAR(30) NOT NULL, msgName VARCHAR(30), size INT NOT

Re: [PHP] Update table to get consecutive Primary keys

2006-06-08 Thread Chris
Antonio Bassinger wrote: Hi All! I've a MySQL table: table (id INT NOT NULL AUTO_INCREMENT, flag TINYINT NOT NULL, msgID VARCHAR(30) NOT NULL, msgName VARCHAR(30),

Re: [PHP] Restrict uploaded scripts

2006-06-08 Thread Mathias Bundgaard Svesson
Wouldn't they still be able to overwrite each other? I don't think I expressed myself clearly. The point of the protection is to keep the scripts from overwriting each other on purpose. It was a protection that would make it posible to upload scripts, even if you were not completly sure they were