php-general Digest 25 May 2006 18:33:49 -0000 Issue 4148

2006-05-25 Thread php-general-digest-help
php-general Digest 25 May 2006 18:33:49 - Issue 4148 Topics (messages 236872 through 236899): Re: calling JS function from php 236872 by: Ryan Creaser 236873 by: David Tulloh 236874 by: Rabin Vincent 236882 by: Mindaugas L Re: captcha or other

[PHP] calling JS function from php

2006-05-25 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] calling JS function from php

2006-05-25 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();

Re: [PHP] calling JS function from php

2006-05-25 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

Re: [PHP] calling JS function from php

2006-05-25 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] captcha or other recommendations

2006-05-25 Thread Angelo Zanetti
tedd 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

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

2006-05-25 Thread Kevin Waterson
This one time, at band camp, Micky Hulse [EMAIL PROTECTED] wrote: 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: Try

[PHP] Slow query-building function

2006-05-25 Thread George Pitcher
Hi, Last year I switched from using FileMaker Pro to MySQL. One of FileMaker's quirks was that if, in a text field, you searched for say, 'free ass boo', it would find any records with those three substrings in that field (in this example, its 'Free Association Books'). I want to have this

Re: [PHP] Generating thumbnails from tiff images

2006-05-25 Thread mbneto
Jay, I am not quite sure if you've made sarcastic comments but to make things more clear... I'd like to use GD instead of ImageMagick beacuse I would not want to install extra packages if I can. When I mentioned that I use convert I said 'when GD is not available...' So I have alternatives:

Re: [PHP] Generating thumbnails from tiff images

2006-05-25 Thread mbneto
Hi, Is this a non documented api? http://www.php.net/manual/en/ref.image.php does not show this. On 5/23/06, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, May 22, 2006 5:10 pm, mbneto wrote: I am looking for sample code/class that can generate a thumbnail (can be a png/jpeg) image from

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

2006-05-25 Thread Mindaugas L
Yesterday I read this discussion and looked at php manual for mysql_real_escape... There is good example with extra function to check php magic quotes status. I like the idea, because the code is more portable. You don't have to add .htaccess files nor configre php.. Beginner Mindaugas On

[PHP] help needed with pager

2006-05-25 Thread Ross
http://scottishsocialnetworks.org/editor.php http://scottishsocialnetworks.org/editor.phps the pager in this page works except try and choose aberdeen from the area dropdown. You should get 18 answers which is fine except when page 2 is pressed at the bottom the query seems to be scrubbed and

Re: [PHP] calling JS function from php

2006-05-25 Thread Mindaugas L
Hi, print needs escaping, so fix style=\\. Read XHTML requirements. span style=padding-left:14.2cmfont size=2 face=Arial color=#55script type=\text/javascript\; I see you are missing semicolon when calling clientDate(); The same for clientTime(); Javascripts need semicolons at the end of

RE: [PHP] Generating thumbnails from tiff images

2006-05-25 Thread Jay Blanchard
[snip] I'd like to use GD instead of ImageMagick beacuse I would not want to install extra packages if I can. [/snip] GD is an extra package. -- 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-25 Thread afan
I have an access as root user to the server and it shouldn't be a problem to turn Off magic quote, but I really CANNOT do it right now because, as I said earlier, just put live our new (pretty big) web site and there is no chance to put it again under construction for a next couple of weekls (redo

Re: [PHP] help needed with pager

2006-05-25 Thread Rabin Vincent
On 5/25/06, Ross [EMAIL PROTECTED] wrote: http://scottishsocialnetworks.org/editor.php http://scottishsocialnetworks.org/editor.phps the pager in this page works except try and choose aberdeen from the area dropdown. You should get 18 answers which is fine except when page 2 is pressed at the

[PHP] Monitoring Remote Server Services using php !!!

2006-05-25 Thread Phil Martin
Hi everybody, I'm new to the list and also new to php, I hope I can learn many things from here. My first doubt is the following: I'm trying to create a small monitor system, just to suit my needs in monitoring some services in my application. I've found some functions that return to

[PHP] 正规大公司,免费帮您办信用卡

2006-05-25 Thread zfe
如果此mail无法正常显示,请点击 http://www.51credit.com/minisite/cardjoin/index.php 我爱卡首页 | 关于我们 | 联系方式 热门信用卡推荐 中信STAR卡详情 立即申请中信魔力卡详情 立即申请 加菲猫卡详情 立即申请 兴业信用卡详情 立即申请   据最新统计显示,我国内地信用卡累计发行数量达到已超过 1000

Re: [PHP] Monitoring Remote Server Services using php !!!

2006-05-25 Thread chris smith
On 5/25/06, Phil Martin [EMAIL PROTECTED] wrote: Hi everybody, I'm new to the list and also new to php, I hope I can learn many things from here. My first doubt is the following: I'm trying to create a small monitor system, just to suit my needs in monitoring some services in my

[PHP] PHP halts after calling non-existing socket

2006-05-25 Thread Artzi, Yoav \(Yoav\)
After calling a non existing socket PHP halts and doesn't return. It happens when we do it through our web server (AppWeb) or through the command line. The problem is with socket_recvfrom. (see code below) Is this a known bug? a mistake I make in accessing sockets? installation error on my side?

Re: [PHP] Monitoring Remote Server Services using php !!!

2006-05-25 Thread Rabin Vincent
On 5/25/06, Phil Martin [EMAIL PROTECTED] wrote: Hi everybody, I'm new to the list and also new to php, I hope I can learn many things from here. My first doubt is the following: I'm trying to create a small monitor system, just to suit my needs in monitoring some services in my

[PHP] Re: Re: Re: Upload File (binary files?)

2006-05-25 Thread Michelle Konzack
Am 2006-05-15 20:06:06, schrieb Richard Lynch: After you start working for the CIA and actually write a function that *DOES* something with the blob data to search for common facial features or something, you can use this argument... Until then, it's really rather empty. :-) :-):-) I do

[PHP] Re: Re: Upload File (binary files?)

2006-05-25 Thread Michelle Konzack
Am 2006-05-15 17:25:05, schrieb Rory Browne: Bullshit. there are multiple tools for copying files from host to host, including ftp, scp, sftp, rsync, nfs, etc. Planning ahead, is a better way to avoid breaking links than using MySQL to store your images. Right, currently I am using a php5

[PHP] syntax highlighting for Shell scripts and C?

2006-05-25 Thread Michelle Konzack
Hello, since I include source sniplets into some of my webpages I like this syntax highlighting for php scripts... because it make scripts more readable. My question is: Does such thing exist for Shell scripts and C? (It would be realy nice) Thanks Michelle Konzack -- Linux-User

[PHP] str_replace(), and correctly positioned HTML tags

2006-05-25 Thread Dave M G
PHP list, This may be a simple matter. Please feel free to tell me to RTFM if you can direct me to exactly where in the FM to R. Or, alternately, please use simple explanations, as I'm not an experienced PHP coder. I'm building a simple content management system, where users can enter text

[PHP] Can the pic include be based on a variable?

2006-05-25 Thread Tristan
Can the pic include be based on a variable? my client asked me this question. I have a movie that is the header to the site and it pulls in a swf that calls a picture from pic00.jpg. I'm not sure exactly what he means by this. I'm assuming he wants to pass flash a variable name instead of a

[PHP] Re: str_replace(), and correctly positioned HTML tags

2006-05-25 Thread Adam Zey
Dave M G wrote: PHP list, This may be a simple matter. Please feel free to tell me to RTFM if you can direct me to exactly where in the FM to R. Or, alternately, please use simple explanations, as I'm not an experienced PHP coder. I'm building a simple content management system, where users

Re: [PHP] str_replace(), and correctly positioned HTML tags

2006-05-25 Thread tedd
At 12:53 AM +0900 5/26/06, Dave M G wrote: PHP list, This may be a simple matter. Please feel free to tell me to RTFM if you can direct me to exactly where in the FM to R. Or, alternately, please use simple explanations, as I'm not an experienced PHP coder. I'm building a simple content

Re: [PHP] Can the pic include be based on a variable?

2006-05-25 Thread tedd
At 9:54 AM -0600 5/25/06, Tristan wrote: Can the pic include be based on a variable? my client asked me this question. I have a movie that is the header to the site and it pulls in a swf that calls a picture from pic00.jpg. I'm not sure exactly what he means by this. I'm assuming he wants to

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

2006-05-25 Thread Micky Hulse
Koen Martens wrote: You might be better off then by parsing the html file with DOM: http://nl2.php.net/manual/en/ref.dom.php Whoa, that is cool, I had no idea this was something PHP could do! Thanks for the links. :D Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To

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

2006-05-25 Thread Micky Hulse
Kevin Waterson wrote: Try this quicky http://phpro.org/tutorials/Introduction-to-PHP-Regular-Expressions.html Sweet, good links all. Thanks for sharing! :) Have a great day. Cheers, Micky -- 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-25 Thread Eric Butera
On 5/25/06, Micky Hulse [EMAIL PROTECTED] wrote: Kevin Waterson wrote: Try this quicky http://phpro.org/tutorials/Introduction-to-PHP-Regular-Expressions.html Sweet, good links all. Thanks for sharing! :) Have a great day. Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To

[PHP] problems with xml parser

2006-05-25 Thread Merlin
Hi there, I am having some trouble in parsing some XML. No idea where I have that xml parser for php from, but I believe it worked ok in the past. Now I do have a file to parse with following structure: SEARCHRESULTS RESULTSET DATABASE RESULT POS=1 TITLEI want

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

2006-05-25 Thread Adam Zey
Eric Butera wrote: On 5/25/06, Micky Hulse [EMAIL PROTECTED] wrote: Kevin Waterson wrote: Try this quicky http://phpro.org/tutorials/Introduction-to-PHP-Regular-Expressions.html Sweet, good links all. Thanks for sharing! :) Have a great day. Cheers, Micky -- PHP General Mailing List

[PHP] Escaping double quotes

2006-05-25 Thread Pavleck, Jeremy D.
So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes? Something like perls 'qq' function is what I'm looking for.

Re: [PHP] Escaping double quotes

2006-05-25 Thread Dave Goodchild
On 25/05/06, Pavleck, Jeremy D. [EMAIL PROTECTED] wrote: So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes?

Re: [PHP] Escaping double quotes

2006-05-25 Thread siavash1979
So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes? Something like perls 'qq' function is what I'm looking

Re: [PHP] Escaping double quotes

2006-05-25 Thread John Nichel
Pavleck, Jeremy D. wrote: So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes? Something like perls 'qq'

Re: [PHP] Escaping double quotes

2006-05-25 Thread Mindaugas L
or heredeoc syntax :) On 5/25/06, John Nichel [EMAIL PROTECTED] wrote: Pavleck, Jeremy D. wrote: So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to

Re: [PHP] Escaping double quotes

2006-05-25 Thread Shane
Not sure I understand your question correctly. I think you can just use soemthing like: echo 'form action=myform.php method=post'; Mindaugas L wrote: or heredeoc syntax :) On 5/25/06, John Nichel [EMAIL PROTECTED] wrote: Pavleck, Jeremy D. wrote: So I'm writing this page (PHP Newbie

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

2006-05-25 Thread afan
As you said: Filtering. My next queston. I have small form to activate/deactivate member's account. form method=post action=members.php input type=hidden name=username value=?= $Usename ? input type=hidden name=status value=?= $Status ? input type=image name=action value=change

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

2006-05-25 Thread Eric Butera
On 5/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: As you said: Filtering. My next queston. I have small form to activate/deactivate member's account. form method=post action=members.php input type=hidden name=username value=?= $Usename ? input type=hidden name=status value=?= $Status ?

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

2006-05-25 Thread Chrome
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25 May 2006 22:19 To: tedd Cc: Eric Butera; php Subject: Re: [PHP] Filtering (was storing single and double quote in MySQL) As you said: Filtering. My next queston. I have small form to

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

2006-05-25 Thread tedd
At 11:19 PM +0200 5/25/06, [EMAIL PROTECTED] wrote: As you said: Filtering. My next queston. I have small form to activate/deactivate member's account. form method=post action=members.php input type=hidden name=username value=?= $Usename ? input type=hidden name=status value=?= $Status ? input

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

2006-05-25 Thread Chrome
[snip] 1. Anytime you put anything into a dB then use mysql_real_escape_string() function. If you are NOT going to put it in a dB, then you don't need mysql_real_escape_string() function -- understand? [/snip] Untrue... It isn't just inserting into a DB that requires this function... Consider:

Re: [PHP] syntax highlighting for Shell scripts and C?

2006-05-25 Thread Chris
Michelle Konzack wrote: Hello, since I include source sniplets into some of my webpages I like this syntax highlighting for php scripts... because it make scripts more readable. My question is: Does such thing exist for Shell scripts and C? pastebin.com has it and the code is GPL'ed so

Re: [PHP] problems with xml parser

2006-05-25 Thread Chris
Merlin wrote: Hi there, I am having some trouble in parsing some XML. No idea where I have that xml parser for php from, but I believe it worked ok in the past. Now I do have a file to parse with following structure: SEARCHRESULTS RESULTSET DATABASE RESULT POS=1 TITLEI want

[PHP] 5.1.4, mysqli, and fastcgi leaving connections open.

2006-05-25 Thread steve
When using PHP 5.1.4 under FastCGI and using mysqli, we are seeing that the connections do not close (filling up the max_connections limit for MySQL 5.0). In fact, the number of connections to mysql quickly become GREATER than the number of FastCGI processes. Restarting apache (and thus fastcgi)

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

2006-05-25 Thread tedd
At 11:51 PM +0100 5/25/06, Chrome wrote: [snip] 1. Anytime you put anything into a dB then use mysql_real_escape_string() function. If you are NOT going to put it in a dB, then you don't need mysql_real_escape_string() function -- understand? [/snip] Untrue... It isn't just inserting into a DB

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

2006-05-25 Thread steve
Why not reconfigure the webserver to proxy a certain url subdirectory to your php script that can be running on any old port? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2006-05-25 Thread Chrome
is well taken -- thanks for the clarification. tedd -- -- -- http://sperling.com http://ancientstones.com http://earthstones.com __ NOD32 1.1559 (20060525) Information __ This message

[PHP] streamlining php.ini; php.ini is not parsable with parse_ini_file

2006-05-25 Thread D. Dante Lorenso
All, I want to clean up my PHP.ini file on production to be as streamlined as possible so that it's easier to work with and maintain. It is easier to do a diff of my INI and the recommended INI if both files are very similar with whitespace removed, comments cleaned out, and keys sorted,

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

2006-05-25 Thread Chris
tedd wrote: At 11:51 PM +0100 5/25/06, Chrome wrote: [snip] 1. Anytime you put anything into a dB then use mysql_real_escape_string() function. If you are NOT going to put it in a dB, then you don't need mysql_real_escape_string() function -- understand? [/snip] Untrue... It isn't just

Re: [PHP] str_replace(), and correctly positioned HTML tags

2006-05-25 Thread Dave M G
Tedd, Adam, Thank you for your advice. While I'm very grateful for your advice, unfortunately, it seems that the core of what you suggest do not fit my situation. First, with Adam's suggestion that I use br / instead of p. The output I am generating is akin to what csszengarden.com

[PHP] Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in

2006-05-25 Thread Mark Sargent
Hi All, I get the error for line 15 for this code, ?php 15 echo font face='$_SESSION['font']'; 16 echo size='$_SESSION['size']'; 17 echo color='$_SESSION['colour']'; 18 echo $_SESSION['text']; 19 echo /font; 20 ? I have put ' ' quotes around the quotes for each font

Re: [PHP] 5.1.4, mysqli, and fastcgi leaving connections open.

2006-05-25 Thread Chris
steve wrote: When using PHP 5.1.4 under FastCGI and using mysqli, we are seeing that the connections do not close (filling up the max_connections limit for MySQL 5.0). In fact, the number of connections to mysql quickly become GREATER than the number of FastCGI processes. Restarting apache (and

Re: [PHP] Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in

2006-05-25 Thread Ryan Creaser
Mark Sargent wrote: Hi All, I get the error for line 15 for this code, ?php 15 echo font face='$_SESSION['font']'; 16 echo size='$_SESSION['size']'; 17 echo color='$_SESSION['colour']'; 18 echo $_SESSION['text']; 19 echo /font; 20 ? I have put ' ' quotes around

Re: [PHP] Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in

2006-05-25 Thread Mark Sargent
Mark Sargent wrote: Hi All, I get the error for line 15 for this code, ?php 15 echo font face='$_SESSION['font']'; 16 echo size='$_SESSION['size']'; 17 echo color='$_SESSION['colour']'; 18 echo $_SESSION['text']; 19 echo /font; 20 ? I have put ' ' quotes around the

RE: [PHP] syntax highlighting for Shell scripts and C?

2006-05-25 Thread Daevid Vincent
Check out Geshi http://qbnz.com/highlighter/ -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, May 25, 2006 5:54 PM To: Michelle Konzack Cc: PHP - General Subject: Re: [PHP] syntax highlighting for Shell scripts and C? Michelle Konzack wrote: Hello,