Re: [PHP] pdf and send to printer question

2007-06-20 Thread Frank Arensmeier
Mike. I would start by confirming that the pdf library has been enabled/loaded successfully. Call phpinfo() and look for the pdf library. It should be there. Since I am on Mac OS X, I am not sure what php_cpdf.dll/php_pdf.dll really is (pdflib? - why two libraries?). Anyway, the error you

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Tijnema
On 6/19/07, Dan [EMAIL PROTECTED] wrote: I modified your code to work with what I'm doing and this is what I got: $post_data = name=wowlikes=true; $fp = fsockopen(localhost,8080); fwrite($fp,POST /Project1.dll HTTP/1.1\r\nHost: localhost\r\nContent-Length:

[PHP] Pixy - An Open-Source Vulnerability Scanner for PHP Applications

2007-06-20 Thread Nenad Jovanovic
The Secure Systems Lab at the Technical University of Vienna has released the newest version of Pixy, an open-source vulnerability scanner. Here are some of the highlights: - detection of SQL injection and XSS vulnerabilities in PHP source code - automatic resolution of file inclusions -

[PHP] PHP error catching

2007-06-20 Thread Miguel J. Jiménez
Hi. I have been asked to try to catch the php error generated when the PHP script exceed execution time, but I do not know if that can be done... Any ideas? Mainly I want to show a custimized error page instead of that error (kind of Sorry but we are busy right now or something similar)

Re: [PHP] PHP error catching

2007-06-20 Thread Stut
Miguel J. Jiménez wrote: Hi. I have been asked to try to catch the php error generated when the PHP script exceed execution time, but I do not know if that can be done... Any ideas? Mainly I want to show a custimized error page instead of that error (kind of Sorry but we are busy right now or

[PHP] Threading

2007-06-20 Thread Darren Whitlen
I'm currently creating a socket cerver class, similar to Twisted for python. I have a simple socket server working now, but would like to extend it using threads. I've done a fair bit of research on threads in PHP in the past, but coming up to the conclusion that there is no way to have real

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Jochem Maas
Dan wrote: I've looked arround and I can't find any mention of ISAPI COM, it's a pretty low level way of making applications, it would be upto the ISAPI code to 'publish' a COM interface to its functionality. in php you merely start a COM session by creating a COM object that inits the

Re: [PHP] Threading

2007-06-20 Thread Richard Heyes
I've done a fair bit of research on threads in PHP in the past, but coming up to the conclusion that there is no way to have real multi threading in PHP. There's no way full stop. Would anybody here know of any way to use threads in PHP that I may have missed? I'm hoping to find a way that

[PHP] Re: patched

2007-06-20 Thread martin
See the file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] strtotime returns 00:00 for 7am

2007-06-20 Thread Phil Princely
Hi all I'm new to this list. I hope this hasn't been discussed already. using this code: function test_time($time_string) { echo strftime(%X %A, %b %e\n, strtotime($time_string)); } test_time('now'); test_time('4pm + 2 Hours'); test_time('now + 2 fortnights'); test_time('last Monday');

Re: [PHP] Re: If statement duplicating mysql records?

2007-06-20 Thread Jason Pruim
On Jun 19, 2007, at 5:10 PM, Roberto Mansfield wrote: Jason Pruim wrote: Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight }// End of Level 4 else

Re: [PHP] If statement duplicating mysql records?

2007-06-20 Thread Jason Pruim
On Jun 19, 2007, at 4:20 PM, Jim Lucas wrote: Jason Pruim wrote: Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight echo TRTD bgcolor=.$Level4.$row[0] /td;

[PHP] Date

2007-06-20 Thread Ron Piggott
How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ;

Re: [PHP] Date

2007-06-20 Thread Stut
Ron Piggott wrote: How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ; Depends what $start_date looks like. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] Date

2007-06-20 Thread Jim Moseby
How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ; Can you give us an example of $start_date? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Date

2007-06-20 Thread Zoltán Németh
2007. 06. 20, szerda keltezéssel 09.35-kor Ron Piggott ezt írta: How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ; depends on what format do you have $start_date in if you have something like

Re: [PHP] Date

2007-06-20 Thread Fredrik Thunberg
Ron Piggott skrev: How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ; Of course depending on what $start_date looks like, but this should work most of the time: $timestamp = strtotime( $start_date

RE: [PHP] Date

2007-06-20 Thread Jim Moseby
How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ; ?PHP $start_date='2007-06-20'; $parts=explode('-',$start_date); $start_year = $parts[0]; $start_month = $parts[1]; $start_day = $parts[2];

Re: [PHP] Date

2007-06-20 Thread Dan Shirah
If you are pulling $start_date from a database, depending on the format you could use something like the following: Assuming the data is 20070215. Connect and query your database, get the result and assign it to a variable. $start_date = $my_result_row['start_date']; $start_year =

[PHP] Re: Hey, where can i get your chat script?

2007-06-20 Thread Daniel Brown
On 6/20/07, Sascha Braun, CEO @ ejackup.com [EMAIL PROTECTED] wrote: I wrote an ajax chat on my own too, but it only supports private chats in a new window. The poor thing is, that it is tied to my application, because it shows, pictures of the chatters, but this might be possible to change.

Re: [PHP] If statement duplicating mysql records?

2007-06-20 Thread Jim Lucas
Jason Pruim wrote: On Jun 19, 2007, at 4:20 PM, Jim Lucas wrote: Jason Pruim wrote: Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight echo TRTD

Re: [PHP] Chat system

2007-06-20 Thread Daniel Brown
On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi Daniel, Thanks. How can the user chooses the nickname? How about the list of connected users? On 6/19/07, Daniel Brown [EMAIL PROTECTED] wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi, I am looking for a simple php chat

RE: [PHP] Date

2007-06-20 Thread tg-php
Don't forget that in cases like the one below, you can use the list() function to tighten things up a bit: $start_date='2007-06-20'; list($start_year, $start_month, $start_day) = explode('-',$start_date); I prefer using the date functions that some of the other people mentioned and only use

Re: [PHP] If statement duplicating mysql records?

2007-06-20 Thread Daniel Brown
On 6/20/07, Jim Lucas [EMAIL PROTECTED] wrote: I would look at your result set and see if you had multiple lines returned. One person mentioned that you might be using a JOIN in you SQL call. This could lead to multiple lines. Start investigating your SQL statement I would suggest.

Re: [PHP] If statement duplicating mysql records?

2007-06-20 Thread Jason Pruim
On Jun 20, 2007, at 10:56 AM, Daniel Brown wrote: On 6/20/07, Jim Lucas [EMAIL PROTECTED] wrote: I would look at your result set and see if you had multiple lines returned. One person mentioned that you might be using a JOIN in you SQL call. This could lead to multiple lines. Start

Re: [PHP] If statement duplicating mysql records?

2007-06-20 Thread Daniel Brown
On 6/20/07, Jason Pruim [EMAIL PROTECTED] wrote: Hey Jim, You're right it is the system you helped me get started with, Just wanted to add a little color coding for the different levels :) Here is the sql query: $sql = SELECT * FROM tasks WHERE completed='0' order by id; $sql .= AND

[PHP] Catch result from an external web page

2007-06-20 Thread Rahul Sitaram Johari
Ave, Basically I¹m throwing an account number to a webpage on an external website ­ And I want to catch the result in some sort ­ to find out if the account number exists. Let¹s say I have this form: FORM ACTION=http://www.somewhere.com/acc.asp; METHOD=post NAME=frm input TYPE=TEXT

Re: [PHP] Catch result from an external web page

2007-06-20 Thread Robert Cummings
On Wed, 2007-06-20 at 11:16 -0400, Rahul Sitaram Johari wrote: Ave, Basically I¹m throwing an account number to a webpage on an external website ­ And I want to catch the result in some sort ­ to find out if the account number exists. Let¹s say I have this form: FORM

Re: [PHP] Catch result from an external web page

2007-06-20 Thread Rahul Sitaram Johari
AWESOME!!! Never worked with Curl before - but looks like a solution to my problem from what I'm reading. Thanks! I'll write back if I run into snags. On 6/20/07 11:25 AM, Robert Cummings [EMAIL PROTECTED] wrote: On Wed, 2007-06-20 at 11:16 -0400, Rahul Sitaram Johari wrote: Ave,

[PHP] phpinfo displays blank page

2007-06-20 Thread Jeff Schwartz
When I run phpinfo() nothing is displayed. It used to work. I recently upgraded to 5.2.1 but I can't be sure that's exactly when phpinfo stopped working. Has anyone else run into this? Thanks, Jeff - Fussy? Opinionated? Impossible to please?

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Daniel Brown
On 6/20/07, Jeff Schwartz [EMAIL PROTECTED] wrote: When I run phpinfo() nothing is displayed. It used to work. I recently upgraded to 5.2.1 but I can't be sure that's exactly when phpinfo stopped working. Has anyone else run into this? Thanks, Jeff -

Re: Re[2]: [PHP] Comparing string to array

2007-06-20 Thread Robin Vickery
On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote: Hi Robin, Tuesday, June 19, 2007, 8:28:50 PM, you wrote: On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote: $userparam = test['sam'][]; // How to check if $userparam exists in the $_POST array // and get all the values

[PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Tijnema
Hi all, Just received a mail from phpclasses, which pointed to this very interesting article[1]. Seems good to know for starters ;) The experts around here probably already know this way of exploits. Tijnema [1] http://www.phpclasses.org/blog/post/67-PHP-security-exploit-with-GIF-images.html

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Jochem Maas
Daniel Brown wrote: On 6/20/07, Jeff Schwartz [EMAIL PROTECTED] wrote: When I run phpinfo() nothing is displayed. It used to work. I recently upgraded to 5.2.1 but I can't be sure that's exactly when phpinfo stopped working. Has anyone else run into this? lots of people :-) what did you

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Daniel Brown
On 6/20/07, Tijnema [EMAIL PROTECTED] wrote: Hi all, Just received a mail from phpclasses, which pointed to this very interesting article[1]. Seems good to know for starters ;) The experts around here probably already know this way of exploits. Tijnema [1]

Re: [PHP] Chat system

2007-06-20 Thread Jochem Maas
Daniel Brown wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi Daniel, ... I'm adding all of that stuff in. As of now, the user can change their name by typing: /nick name but there may still be some bugs. I've only put about two hours of work into it so

Re: [PHP] Chat system

2007-06-20 Thread Daniel Brown
On 6/20/07, Jochem Maas [EMAIL PROTECTED] wrote: Daniel Brown wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi Daniel, ... I'm adding all of that stuff in. As of now, the user can change their name by typing: /nick name but there may still be some bugs.

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Jochem Maas
Daniel Brown wrote: On 6/20/07, Tijnema [EMAIL PROTECTED] wrote: Hi all, Just received a mail from phpclasses, which pointed to this very interesting article[1]. Seems good to know for starters ;) The experts around here probably already know this way of exploits. Tijnema [1]

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Daniel Brown
On 6/20/07, Jochem Maas [EMAIL PROTECTED] wrote: Daniel Brown wrote: On 6/20/07, Tijnema [EMAIL PROTECTED] wrote: Hi all, Just received a mail from phpclasses, which pointed to this very interesting article[1]. Seems good to know for starters ;) The experts around here probably already

[PHP] AppCache - An implementation of an Application Scope in PHP using Memcache

2007-06-20 Thread Chris Dary
Hey guys, Just wanted to ask your opinion - I just wrote up and released as Open Source a class called AppCache. AppCache is an easy to use class implementation of an Application scope in PHP, using Memcached as the backend. If any of you have any criticisms or concerns, (or hey, even a few

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Jeff Schwartz
Thanks for getting back to me so quickly. I checked the archives and viewed the source before I posted the problem. The source is empty except for the junk IE puts into it. Is there a specific log or error file I should check? I upgraded from 4.x. I also ran php phpinfo.php

RE: [PHP] phpinfo displays blank page

2007-06-20 Thread Warren Vail
For what it's worth, this can happen if you have a error in your PHP script. Say like invoking a non-existing function php_info(); instead of phpinfo(); with errors and warnings going to a log file or something like that. Warren Vail -Original Message- From: Jeff Schwartz [mailto:[EMAIL

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Tijnema
On 6/20/07, Jeff Schwartz [EMAIL PROTECTED] wrote: Thanks for getting back to me so quickly. I checked the archives and viewed the source before I posted the problem. The source is empty except for the junk IE puts into it. Is there a specific log or error file I should check? I upgraded

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Daniel Brown
On 6/20/07, Tijnema [EMAIL PROTECTED] wrote: On 6/20/07, Jeff Schwartz [EMAIL PROTECTED] wrote: Thanks for getting back to me so quickly. I checked the archives and viewed the source before I posted the problem. The source is empty except for the junk IE puts into it. Is there a specific

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Dan
Whoops, it turned out just to be a line wrapping problem, it was putting an extra space in. I have it working now, but after every request I get back the returning header in my result to it looks like this: HTTP/1.1 200 OK Content-Length: 184 Content-Type: text/html Server: Microsoft-IIS/7.0

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Guillaume Theoret
Thanks for the link. I got worried for a second that my code could be exploited so I did a quick check to make sure that mime-types were correct. (I check the mime type to make sure it's an image, not the file extension.) I renamed a .jpg file .jpg.php and uploaded it and got application/x-php

Re: [PHP] unlink before imagepng?

2007-06-20 Thread Brian Dunning
Can do, but I would be calling clearstatcache() very often, many times per second, as often as these graphics are being edited. Would that still be appropriate for the server? On Jun 19, 2007, at 8:07 AM, Greg Donald wrote: On 6/17/07, Brian Dunning [EMAIL PROTECTED] wrote: If I write an

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Nathan Nobbe
do you have other php files that produce html output still working (after the upgrade)? if not, there is probly something wrong w/ the new php installation. is this the same phpinfo script you were using before the upgrade? if not there may be a problem w/ the phpinfo script. -nathan On

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread tedd
At 12:53 PM -0400 6/20/07, Daniel Brown wrote: No, not the upload and execution, per se, but rather using images to contain processable PHP code. -- Daniel P. Brown Daniel: Wow! Now that's something I would like to see -- you do have a demo? As far as legitimate reasons, how about

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Tijnema
On 6/19/07, Dan [EMAIL PROTECTED] wrote: Whoops, it turned out just to be a line wrapping problem, it was putting an extra space in. I have it working now, but after every request I get back the returning header in my result to it looks like this: HTTP/1.1 200 OK Content-Length: 184

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Daniel Brown
On 6/20/07, tedd [EMAIL PROTECTED] wrote: At 12:53 PM -0400 6/20/07, Daniel Brown wrote: No, not the upload and execution, per se, but rather using images to contain processable PHP code. -- Daniel P. Brown Daniel: Wow! Now that's something I would like to see -- you do have a demo? As

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread tedd
At 2:32 PM -0400 6/20/07, Guillaume Theoret wrote: Thanks for the link. I got worried for a second that my code could be exploited so I did a quick check to make sure that mime-types were correct. (I check the mime type to make sure it's an image, not the file extension.) I renamed a .jpg file

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Tijnema
On 6/20/07, tedd [EMAIL PROTECTED] wrote: At 2:32 PM -0400 6/20/07, Guillaume Theoret wrote: Thanks for the link. I got worried for a second that my code could be exploited so I did a quick check to make sure that mime-types were correct. (I check the mime type to make sure it's an image, not

Re: [PHP] unlink before imagepng?

2007-06-20 Thread Greg Donald
On 6/20/07, Brian Dunning [EMAIL PROTECTED] wrote: Can do, but I would be calling clearstatcache() very often, many times per second, as often as these graphics are being edited. Would that still be appropriate for the server? I certainly wouldn't use it if I didn't need it. -- Greg Donald

Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-20 Thread Robert Cummings
On Wed, 2007-06-20 at 15:12 -0400, Daniel Brown wrote: On 6/20/07, tedd [EMAIL PROTECTED] wrote: At 12:53 PM -0400 6/20/07, Daniel Brown wrote: No, not the upload and execution, per se, but rather using images to contain processable PHP code. -- Daniel P. Brown Daniel:

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Jeff Schwartz
You're right, that works. So why doesn't my script work? All it contains is: ?php phpinfo(); ? Tijnema [EMAIL PROTECTED] wrote: On 6/20/07, Jeff Schwartz wrote: Thanks for getting back to me so quickly. I checked the archives and viewed the source before I posted the problem. The

Re: [PHP] phpinfo displays blank page

2007-06-20 Thread Tijnema
On 6/21/07, Jeff Schwartz [EMAIL PROTECTED] wrote: You're right, that works. So why doesn't my script work? All it contains is: ?php phpinfo(); ? Hard to say, as this just *should* work. What you can try is to hook up the processor with some debugger The strace program will do the job I

[PHP] Counting Capital Letters

2007-06-20 Thread Richard Davey
Hi, I've written a short regexp which will *count* how many capital letters are in a given string (the woefully simple: '/[A-Z]/') Although it's an English language web site, I'm curious how you'd count capital letters that span beyond just the standard A-Z. For example characters such as the

Re: [PHP] POST adding extra characters

2007-06-20 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Hi.. when using POSTon a text box to send info its adding an extra \ character. form action=script.php method=POST TEXTAREA NAME=save COLS=100 ROWS=15 dry-run: filter: account-id = '10002' select: key /textarea PbrINPUT TYPE=submit VALUE=submit /FORM/a That

Re: [PHP] POST adding extra characters

2007-06-20 Thread chris
Thanks Jim worked a treat - Original Message - From: Jim Lucas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Thursday, June 21, 2007 4:03 AM Subject: Re: [PHP] POST adding extra characters [EMAIL PROTECTED] wrote: Hi.. when using POSTon a text box to

[PHP] Program Execution and reading results

2007-06-20 Thread makhan
I am using php to write inputs I receive from browser into a text file.Than I use shell_exec() to execute a program on server that writes those inputs from the text file and write its output to another text file. Now after my program has written its output I want to read this text file from php

Re: [PHP] Program Execution and reading results

2007-06-20 Thread Paul Scott
On Wed, 2007-06-20 at 21:42 -0700, makhan wrote: Now after my program has written its output I want to read this text file from php and send it back to the browser. Can someone please guide me how I can do this. This seems like an overly complex way of doing something that sounds quite

Re: [PHP] POST adding extra characters

2007-06-20 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Thanks Jim worked a treat - Original Message - From: Jim Lucas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Thursday, June 21, 2007 4:03 AM Subject: Re: [PHP] POST adding extra characters [EMAIL PROTECTED] wrote: Hi.. when using