Re: [PHP] calling JS function from php

2006-05-24 Thread Rabin Vincent
On 5/25/06, suresh kumar <[EMAIL PROTECTED]> wrote: I am facing one problem in my project.I am trying to call a javascript function from php.but it not executing.this is my code. You can't "call" a javascript function from php. What you can do is output javascript code that calls a javascript

Re: [PHP] calling JS function from php

2006-05-24 Thread David Tulloh
suresh kumar wrote: > I am facing one problem in my project.I am trying to call a javascript > function from php.but it not executing.this is my code. > This is not a php problem, php produces a text file which is interpreted by the browser as html and javascript. Have a look at your html/ja

Re: [PHP] calling JS function from php

2006-05-24 Thread Ryan Creaser
suresh kumar wrote: I am facing one problem in my project.I am trying to call a javascript function from php.but it not executing.this is my code. function clientTime() { var cNow = new Date(); var cHour = cNow.getHours(); var cMin = cNow.getMinutes(); v

[PHP] calling JS function from php

2006-05-24 Thread suresh kumar
I am facing one problem in my project.I am trying to call a javascript function from php.but it not executing.this is my code. function clientTime() { var cNow = new Date(); var cHour = cNow.getHours(); var cMin = cNow.getMinutes(); var hour= cHour +

Re: [PHP] 3DES w/ openssl_{csr,pkey}_new ?

2006-05-24 Thread Chris
Brian A. Seklecki wrote: RSA and DSA are different types of key formats. They do not imply protecting the private keywith an encryption algorithm. If you look at gendsa(1) or genrsa(1), you will see that passphrase protection is optional to both, and that there a good many choices. default_m

Re: [PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Graham Anderson
thanks :) that helps g On May 24, 2006, at 3:19 PM, Brady Mitchell wrote: This works: $rs= $this->conn->GetAll("SELECT title FROM content WHERE page_id= ?", $id); You can't iterate through an array like you are trying to do. Using the GetAll() function returns an array, you have to use

Re: [PHP] preg_replace learning resources? Regex tuts? Tips? (and yes, I have been rtfm)

2006-05-24 Thread Micky Hulse
Ryan A wrote: http://weblogtoolscollection.com/regex/regex.php HTHs...Cheers, Yeah, looks like a great resource, thanks! :) Cheers, m -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace learning resources? Regex tuts? Tips? (and yes, I have been rtfm)

2006-05-24 Thread Ryan A
--- Micky Hulse <[EMAIL PROTECTED]> wrote: > Micky Hulse wrote: > > Any good links to tutorials and/or resources that > teach one how to scrub > > urls with PHP and regex? > Hey, Am learning from here: http://weblogtoolscollection.com/regex/regex.php found it via google (note: Am in NO

Re: [PHP] Upload files problems

2006-05-24 Thread Ryan Creaser
Ing. Tomás Liendo wrote: Hi! When the users of my system try to go up files of more than 460 K, they receive the message: Fatal error: Maximum execution time of 90 seconds exceeded in c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php on line 2 I'm using the following

[PHP] Re: Syntax to call a class' methods in your own class

2006-05-24 Thread Stephen Lake
Here's a link to a series of 4 articles that explain aggregation in PHP.as this sounds like what you want to do. http://www.devshed.com/c/a/PHP/Object-Interaction-in-PHP-Introduction-to-Aggregation-part-1/ HTH Steve "Graham Anderson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

[PHP] Re: Syntax to call a class' methods in your own class

2006-05-24 Thread Stephen Lake
Here's a link to a series of 4 articles that explain aggregation in PHP.as this sounds like what you want to do. http://www.devshed.com/c/a/PHP/Object-Interaction-in-PHP-Introduction-to-Aggregation-part-1/ HTH Steve "Graham Anderson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTE

[PHP] Upload files problems

2006-05-24 Thread Ing. Tom�s Liendo
Hi! When the users of my system try to go up files of more than 460 K, they receive the message: Fatal error: Maximum execution time of 90 seconds exceeded in c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php on line 2 I'm using the following method to up load the files:

Re: [PHP] How to disable PHP's POST caching?

2006-05-24 Thread Curt Zirzow
On Wed, May 24, 2006 at 05:44:56PM -0400, Adam Zey wrote: > Curt Zirzow wrote: > >On Tue, May 23, 2006 at 06:37:27PM -0400, Adam Zey wrote: > > > >>The data going from client->server needs to be sent over an HTTP > >>connection, which seems to limit me to PUT and POST requests, since > >>they're

Re: [PHP] How to disable PHP's POST caching?

2006-05-24 Thread Curt Zirzow
On Tue, May 23, 2006 at 03:51:51PM -0400, Adam Zey wrote: > PHP seems to cache POST data, and waits for the entire POST to finish > sending before it makes it available to php://input. > > I'd like to be able to read the post data from php://input while the > client is still uploading it. How can I

RE: [PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Brady Mitchell
> This works: > $rs= $this->conn->GetAll("SELECT title FROM content WHERE > page_id= ?", > $id); You can't iterate through an array like you are trying to do. Using the GetAll() function returns an array, you have to use the Execute() function to be able to iterate through $rs like you are tryi

Re: [PHP] preg_replace learning resources? Regex tuts? Tips? (and yes, I have been rtfm)

2006-05-24 Thread Micky Hulse
Micky Hulse wrote: Any good links to tutorials and/or resources that teach one how to scrub urls with PHP and regex? Ah, missed this in the comment section of the manual: Looks like a good place to start. :) -- PHP General Mailing List (h

[PHP] Filtering (was storing single and double quote in MySQL)

2006-05-24 Thread tedd
At 4:28 PM +0200 5/24/06, [EMAIL PROTECTED] wrote: after these very helpfull comments, I rad (again) Shiflett's (and few others) Security articles about filtering input and output. And more I read - less is clear :( and At 6:07 PM +0200 5/24/06, [EMAIL PROTECTED] wrote: Ok. Looks like I DID m

[PHP] preg_replace learning resources? Regex tuts? Tips? (and yes, I have been rtfm)

2006-05-24 Thread Micky Hulse
Hi all, I have been rtfm on preg_replace, and I am a bit turned-off by how complex reg-exing appears to be anyway, I would like to spend some time learning how I would convert a file full of links that look like: Fake Link 1 Fake Link 2 Fake Link 3 Fake Link 4 And make them look like

[PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Graham Anderson
What is the correct syntax for calling methods from other classes into your own class ? Example: Calling the ADODB class with: $this->conn=&ADONewConnection('mysql'); This works: $rs= $this->conn->GetAll("SELECT title FROM content WHERE page_id= ?", $id); This fails: while (!$rs->$this->

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread tedd
At 8:14 PM +0200 5/24/06, [EMAIL PROTECTED] wrote: if magic_quotes_gpc is On, does it add slashes in front of quotes when submit through form? Mean, if I submit in input form (text) afan's "crazy" web, after echo $_POST['record']; I'll get afan\'s \"crazy\" web. Is this because of magic_quote_gps

Re: [PHP] How to disable PHP's POST caching?

2006-05-24 Thread Adam Zey
Curt Zirzow wrote: On Tue, May 23, 2006 at 06:37:27PM -0400, Adam Zey wrote: The data going from client->server needs to be sent over an HTTP connection, which seems to limit me to PUT and POST requests, since they're the only ones that allow significant quantities of data to be sent by the c

Re: [PHP] How to disable PHP's POST caching?

2006-05-24 Thread Curt Zirzow
On Tue, May 23, 2006 at 06:37:27PM -0400, Adam Zey wrote: > > The data going from client->server needs to be sent over an HTTP > connection, which seems to limit me to PUT and POST requests, since > they're the only ones that allow significant quantities of data to be > sent by the client. Idea

Re: [PHP] Looping through a Db query result twice in PEAR

2006-05-24 Thread Curt Zirzow
On Wed, May 24, 2006 at 02:28:33PM -0600, Phillip S. Baker wrote: > Greetings All, > > I have a problem that I usually solve in MySQL pretty easily, but using > PEAR identifiers are not working. > Any suggestions. > I want to loop through a result set in two different while loops that > are not

Re: [PHP] Serialize

2006-05-24 Thread tedd
At 10:50 AM +0100 5/24/06, [EMAIL PROTECTED] wrote: Hi, Is a serialized array a "safe" string to insert into a mysql text field? Or is a function such as mysql_real_escape_string always needed? regards Simon. Simon: If you want to store a serialized array in mysql, then you must use mysql

RE: [PHP] Looping through a Db query result twice in PEAR

2006-05-24 Thread Warren Vail
Shouldn't it be; $sql="Some query"; $result = $conn->query($sql); //V VVV while ($row = $conn->fetchArray($result)) { echo $row['hey']; } // V VVV while ($row2 = $conn->fetchArray($result)) { echo $row2['otherhey'];

[PHP] Looping through a Db query result twice in PEAR

2006-05-24 Thread Phillip S. Baker
Greetings All, I have a problem that I usually solve in MySQL pretty easily, but using PEAR identifiers are not working. Any suggestions. I want to loop through a result set in two different while loops that are not nested. I am able to do in it MySQl as follows $sql="Some query"; $result =

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread Eric Butera
On 5/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: if magic_quotes_gpc is On, does it add slashes in front of quotes when submit through form? Mean, if I submit in input form (text) afan's "crazy" web, after echo $_POST['record']; I'll get afan\'s \"crazy\" web. Is this because of magic_quo

Re: [PHP] Question about set_time_out and shell_exec

2006-05-24 Thread Rabin Vincent
On 5/24/06, Suhas <[EMAIL PROTECTED]> wrote: Hi, I am trying to write a script which will avoid browser timeout problem and in that process I have created 2 files FILE1.php: set_time_out(1); echo shell_exec("/usr/local/bin/php -f FILE2.php &"); FILE2.php: @mail($to,$sub,$msg); sleep(60); @mail

[PHP] Re: parsing/replacing for special MS Word characters

2006-05-24 Thread Al
I Dan McCullough wrote: I have a friend who I wrote some very simple publishing software, basically he takes his writtings and puts them online. Well his writtings are in Word and so he has alot of special characters that he inputs, some unknowingly, into the database. Are there any classes or

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread afan
if magic_quotes_gpc is On, does it add slashes in front of quotes when submit through form? Mean, if I submit in input form (text) afan's "crazy" web, after echo $_POST['record']; I'll get afan\'s \"crazy\" web. Is this because of magic_quote_gps is On? -afan > Security wise, it is best to turn

Re: [PHP] Can a script run twice?

2006-05-24 Thread Lester Caine
Robert Cummings wrote: Apparently the problem isn't solvable by using tokens, sessions, locking, and such. So why not just check the dB to see if the current record has already been entered? If so, don't do it again. Isn't this a solution? Or is there something here that I'm not understanding?

Re: [PHP] Can a script run twice?

2006-05-24 Thread Robert Cummings
On Wed, 2006-05-24 at 13:45, tedd wrote: > At 12:38 PM -0400 5/24/06, Robert Cummings wrote: > >On Wed, 2006-05-24 at 09:44, tedd wrote: > >-snip- > > > Back to the posters problem, which is duplicate dB entries caused by > >> double clicking. > >> > >> Apparently the problem isn't solvable by u

Re: [PHP] Can a script run twice?

2006-05-24 Thread tedd
At 12:38 PM -0400 5/24/06, Robert Cummings wrote: On Wed, 2006-05-24 at 09:44, tedd wrote: -snip- > Back to the posters problem, which is duplicate dB entries caused by double clicking. Apparently the problem isn't solvable by using tokens, sessions, locking, and such. So why not just check

RE: [PHP] Can a script run twice?

2006-05-24 Thread Robert Cummings
On Wed, 2006-05-24 at 13:02, tedd wrote: > At 9:58 AM -0400 5/24/06, Jim Moseby wrote: > > > > >> Apparently the problem isn't solvable by using tokens, sessions, > >> locking, and such. So why not just check the dB to see if the current > >> record has already been entered? If so, don't do it

RE: [PHP] Can a script run twice?

2006-05-24 Thread tedd
At 9:58 AM -0400 5/24/06, Jim Moseby wrote: > Apparently the problem isn't solvable by using tokens, sessions, locking, and such. So why not just check the dB to see if the current record has already been entered? If so, don't do it again. Isn't this a solution? Or is there something here

Re: [PHP] parsing/replacing for special MS Word characters

2006-05-24 Thread André Medeiros
When my clients use word to compose the contents of a website, I always recommend them to paste the contents onto notepad and only then pass them to the RTE on the browser so that the text looses all it's formatting. Sucks, but it's the only way I know. Since then, they started formatting using p

RE: [PHP] parsing/replacing for special MS Word characters

2006-05-24 Thread Jef Sullivan
Start here... http://www.php.net/manual/en/function.preg-replace.php Jef -Original Message- From: Dan McCullough [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 8:35 AM To: PHP LIST Subject: [PHP] parsing/replacing for special MS Word characters I have a friend who I wrote so

Re: [PHP] Can a script run twice?

2006-05-24 Thread Robert Cummings
On Wed, 2006-05-24 at 09:44, tedd wrote: > At 7:19 AM +0100 5/24/06, Stut wrote: > >PHP is not 'sequential' and I have no idea where you got that > >impression. If the browser puts in a request to the server, the > >server will execute that request as soon as sufficient resources are > >free to

Re: [PHP] Can a script run twice?

2006-05-24 Thread Robert Cummings
On Wed, 2006-05-24 at 02:19, Stut wrote: > Lester Caine wrote: > > The double click 'problem' was a sideline to the original problem, which > > I found while trying to track things. The original problem *IS* that PHP > > can run two copies of a script in parallel and the second copy does NOT > >

[PHP] Question about set_time_out and shell_exec

2006-05-24 Thread Suhas
Hi, I am trying to write a script which will avoid browser timeout problem and in that process I have created 2 files FILE1.php: set_time_out(1); echo shell_exec("/usr/local/bin/php -f FILE2.php &"); FILE2.php: @mail($to,$sub,$msg); sleep(60); @mail($to,$sub,$msg); I run File1.php thr' browser

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread afan
Ok. Looks like I DID miss the point :) I thought that with mysql_real_escape_string() HAVE TO add slash in front of a quote and THAT's filtering. :( Ok. slash SHOULDN'T be in DB! :) >> But, also, I thought, mysql_real_escape_string() is "filter" for >> everything, e.g. lets have three links (ad

[PHP] Re: Embedding PHP 5 in a C application

2006-05-24 Thread Adam Zey
D. Dante Lorenso wrote: All, Can anybody give me a pointer on where I might start to learn how to embed Zend2/PHP 5 inside a stand-alone C application? I realize that by asking a question like this it might imply I am not prepared enough to do handle the answer, but ignoring that, is there a

Re: [PHP] Embedding PHP 5 in a C application

2006-05-24 Thread Adrian
I think you can use the 'embed' SAPI for that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread Eric Butera
But, also, I thought, mysql_real_escape_string() is "filter" for everything, e.g. lets have three links (add, delete, edit) as Add new Edit Delete and was doing this way: #index.php it means that $action I will never store in DB, neither show on screen. I then wrong to $action = mysql_real_escap

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread Brad Bonkoski
in your php.ini file what is the value of: magic_quotes_gpc? (hint: should be off, if it is on, then you are add slashes twice...) -Brad [EMAIL PROTECTED] wrote: ok. I just made one test and if you can then explain something to me: I entered in form (textarea) afan's "crazy" web and stored in d

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread John Nichel
[EMAIL PROTECTED] wrote: ok. I just made one test and if you can then explain something to me: I entered in form (textarea) afan's "crazy" web and stored in db using mysql-real_escape_string(). in DB, it's stored with slashes: afan\'s \"crazy\" web Then I pulled that from DB on three different w

[PHP] Embedding PHP 5 in a C application

2006-05-24 Thread D. Dante Lorenso
All, Can anybody give me a pointer on where I might start to learn how to embed Zend2/PHP 5 inside a stand-alone C application? I realize that by asking a question like this it might imply I am not prepared enough to do handle the answer, but ignoring that, is there a document out there? I

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread afan
ok. I just made one test and if you can then explain something to me: I entered in form (textarea) afan's "crazy" web and stored in db using mysql-real_escape_string(). in DB, it's stored with slashes: afan\'s \"crazy\" web Then I pulled that from DB on three different ways: $query = mysql_query("

Re: [PHP] How to disable PHP's POST caching?

2006-05-24 Thread Adam Zey
Stut wrote: Adam Zey wrote: Tunelling arbitrary TCP packets. Similar idea to SSH port forwarding, except tunneling over HTTP instead of SSH. A good example might be encapsulating an IRC (or telnet, or pop3, or ssh, etc) connection inside of an HTTP connection such that incomming IRC traffic

Re: [PHP] RE: Can php convert doc to HTML?

2006-05-24 Thread André Medeiros
So, here's what you need. http://ftp.45.free.net/pub/catdoc/catdoc-0.94.2.zip This converts doc files to .txt, although I'm not sure that it will keep the format intact. Take care. On 5/24/06, Finner, Doug <[EMAIL PROTECTED]> wrote: On 5/23/06, Martin Alterisio <[EMAIL PROTECTED]> wrote: > >

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread John Nichel
[EMAIL PROTECTED] wrote: after these very helpfull comments, I rad (again) Shiflett's (and few others) Security articles about filtering input and output. And more I read - less is clear :( Before, I used addslash() before I insert data in database and strislshe() to show them on screen. Later

[PHP] parsing/replacing for special MS Word characters

2006-05-24 Thread Dan McCullough
I have a friend who I wrote some very simple publishing software, basically he takes his writtings and puts them online. Well his writtings are in Word and so he has alot of special characters that he inputs, some unknowingly, into the database. Are there any classes or samples of what others ha

RE: [PHP] date iteration

2006-05-24 Thread Jef Sullivan
Richard is correct, the format for the mktime() is hours/minutes/seconds/month/day/year. My code suggestion is based on the start date being entered as follows -- 05242006, and the display is to be 05/24/2006. My suggestion is the following... function generateDates($first, $duration) { $

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread afan
after these very helpfull comments, I rad (again) Shiflett's (and few others) Security articles about filtering input and output. And more I read - less is clear :( Before, I used addslash() before I insert data in database and strislshe() to show them on screen. Later found it's not good and sta

RE: [PHP] Can a script run twice?

2006-05-24 Thread Jim Moseby
> > Apparently the problem isn't solvable by using tokens, sessions, > locking, and such. So why not just check the dB to see if the current > record has already been entered? If so, don't do it again. > > Isn't this a solution? Or is there something here that I'm > not understanding? ...or m

Re: [PHP] captcha or other recommendations

2006-05-24 Thread tedd
Hi all. I've been playing with captcha for one of my sites. It works well but have had a few issues integrating it into the site and sometimes it appears not to work/show the textfield and graphic. Anyway are there any other suggestions for something with similiar functionality as captcha an

Re: [PHP] Can a script run twice?

2006-05-24 Thread tedd
At 7:19 AM +0100 5/24/06, Stut wrote: PHP is not 'sequential' and I have no idea where you got that impression. If the browser puts in a request to the server, the server will execute that request as soon as sufficient resources are free to do so. PHP does not 'lock' the session between request

[PHP] RE: Can php convert doc to HTML?

2006-05-24 Thread Finner, Doug
On 5/23/06, Martin Alterisio <[EMAIL PROTECTED]> wrote: > > If that's the case, why don't you just use the "export as web page" or > "save as web page" tools of MS Word (if you don't have it anymore you > can as someone who still has it, or I think OpenOffice also has a similar tool). > > Becaus

Re: [PHP] 3DES w/ openssl_{csr,pkey}_new ?

2006-05-24 Thread Brian A. Seklecki
RSA and DSA are different types of key formats. They do not imply protecting the private keywith an encryption algorithm. If you look at gendsa(1) or genrsa(1), you will see that passphrase protection is optional to both, and that there a good many choices. default_md is actually something from

Re: [PHP] Serialize

2006-05-24 Thread Robin Vickery
On 24/05/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, Is a serialized array a "safe" string to insert into a mysql text field? Or is a function such as mysql_real_escape_string always needed? No, it's not at all a safe string to insert into a mysql text field. mysql_real_escap_string()

Re: [PHP] Serialize

2006-05-24 Thread Andrei
It's not safe... if the array contains strings which contain ' or " might screw your query... it's safe to escape the string result from serialize... Andy [EMAIL PROTECTED] wrote: Hi, Is a serialized array a "safe" string to insert into a mysql text field? Or is a function such as

Re: [PHP] Serialize

2006-05-24 Thread chris smith
On 5/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, Is a serialized array a "safe" string to insert into a mysql text field? Or is a function such as mysql_real_escape_string always needed? *Always* escape your data. What if your array contains a quote? -- Postgresql & php tutorials

[PHP] Serialize

2006-05-24 Thread phplist
Hi, Is a serialized array a "safe" string to insert into a mysql text field? Or is a function such as mysql_real_escape_string always needed? regards Simon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can a script run twice?

2006-05-24 Thread Lester Caine
Robert Cummings wrote: I've put in a trap for the double click ( and yes it *IS* browser dependent ) and that works fine, but we will have to see if it makes any difference to the original 'race' problem :( Good luck :) Actually the main problem was I was not updating the _SESSION variable

Re: [PHP] captcha or other recommendations

2006-05-24 Thread Angelo Zanetti
Angelo Zanetti wrote: Hi all. I've been playing with captcha for one of my sites. It works well but have had a few issues integrating it into the site and sometimes it appears not to work/show the textfield and graphic. Anyway are there any other suggestions for something with similiar fun

[PHP] captcha or other recommendations

2006-05-24 Thread Angelo Zanetti
Hi all. I've been playing with captcha for one of my sites. It works well but have had a few issues integrating it into the site and sometimes it appears not to work/show the textfield and graphic. Anyway are there any other suggestions for something with similiar functionality as captcha and