[PHP] Recurs Directory Delete

2006-07-14 Thread Mark Steudel
I was hoping someone could give me a hand, I'm trying to create a delete folders function that recursively deletes folders and files from a given directory. Here's what I have so far, but its not working I keep getting Warning: rmdir(wwwroot/resources/applications/44/series/25/modules/29)

RE: [PHP] Recurs Directory Delete

2006-07-14 Thread Mark Steudel
I wish, I'm on an IIS box. Mark -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 2:09 PM To: tedd Cc: Mark Steudel; php-general@lists.php.net Subject: Re: [PHP] Recurs Directory Delete On Fri, July 14, 2006 2:07 pm, tedd wrote: At 11:55 AM

RE: [PHP] Recurs Directory Delete

2006-07-14 Thread Mark Steudel
Thanks all for the help, I figured it out: This line was giving me grief :) doh! while( false !== ( $file == readdir( $dir ) ) ) Mark -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 12:12 PM To: Mark Steudel Cc: php-general@lists.php.net

RE: Fwd: [PHP] Recurs Directory Delete

2006-07-14 Thread Mark Steudel
Oooh, that's pretty neat. I was under the same impression as Andrew, that DEL didn't do the same thing as rm -rf ... Thanks, Mark -Original Message- From: Adam Zey [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 4:35 PM To: Andrew Kreps Cc: PHP General Mail List Subject: Re: Fwd:

RE: [PHP] Basic PHP knowledge test

2006-07-20 Thread Mark Steudel
Here's one companies quiz that they gave: With each question, please keep the code short and simple. Make notes on possible caveats and fixes rather than adding a lot of error-checking to your code. 1. Write a PHP script to remove duplicate lines from a file. Do not worry about

[PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
, $eDate[0], 1, $eDate[1] ) ) ); } return $sDate; } Thanks, Mark -- Mark Steudel Web Applications Developer 555 Dayton St Suite A Edmonds, WA 98020 p: 425.741.7014 e: [EMAIL PROTECTED

RE: [PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
: 2011-07-02 Valid In: 8/2006 Out: 2012-01-27 PHP 4.4.0 Valid In: 1/2009 Out: 2011-07-02 Valid In: 8/2006 Out: 2012-01-27 Any work around with these types of dates on php4? Mark -Original Message- From: Mark Steudel Sent: Wednesday, August 02, 2006 9:46 AM To: PHP Mailing Lists Subject

RE: [PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
{ Echo 'true'; } All of those echo true, how do I determine if strtotime has failed or not? Mark -Original Message- From: Mark Steudel Sent: Wednesday, August 02, 2006 9:55 AM To: Mark Steudel; PHP Mailing Lists Subject: RE: [PHP] date(n/Y) strtotime Ok so actually I didn't solve

RE: [PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
Thanks Adam, I had sent out my second email before I had read yours. I'll give yours a go, thanks again. Mark -Original Message- From: Adam Zey [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 11:15 AM To: Mark Steudel Cc: PHP Mailing Lists Subject: Re: [PHP] date(n/Y

[PHP] PHP in Kenya

2006-11-05 Thread Mark Steudel
I'm currently serving in Peace Corps in Kenya and I was looking for other PHP web developers that are doing e-commerce that I could ping about what requirements/paperwork etc is involved in setting up e-commerce accounts in Kenya. Thanks, Mark

[PHP] Coding Practice: Use global $var or pass in by refernce

2006-03-03 Thread Mark Steudel
I was wondering what the general rule on using the global driective versus passing in a variable by reference, why you should or shouldn't, etc. e.g. function () { global $db; $res = $db-query( SQL); } or function ( $db ) { $res = $db-query( SQL); } -- PHP General Mailing

[PHP] Understanding system multiple steps

2006-03-09 Thread Mark Steudel
So I am using system() to try and access sftp from my php scripts. How do I do multiple steps once I've initiated my command e.g. $file = 'filname.txt'; system( C:\sftp\sftp.exe login flags | put .$file ); Im on a windows box, so I don't know if I can do something like this ... anyway any help

[PHP] mktime month

2006-03-10 Thread Mark Steudel
Im a little confused on the number I should use for the month: Take the following: echo date('Ymd', mktime(0, 0, 0, 3, 0, date(Y)) ); I expected it to output: 20060331 But instead it outputs 20060228. In the examples for january in the php manual I get december instead of january. Is

[PHP] phpmailer subject line wierdness

2006-03-27 Thread Mark Steudel
I know that there is a phpmailer list, but it's pretty low volume, so I hoped you all might have some ideas on this. If I set the subject line for a mail like: $mail-Subject = 'Jconnect Passover Registration Confirmation'; The email never send, but if I stick a letter between O and N it goes

[PHP] ojbect substitute for array map?

2006-03-29 Thread Mark Steudel
Is there a substitute function for arraymap that one can use on ojbects? Mark

[PHP] mccabes complexity parser

2006-04-25 Thread Mark Steudel
I was wondering if anyone knew of a program that I could run my scripts through and it would return mccabes complexity metric on it ... Thanks, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Creating EPS files with PHP

2006-05-09 Thread Mark Steudel
Is it possible to create EPS or TIFF files with a image libraries like GD or ImageMagik? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Creating EPS files with PHP

2006-05-09 Thread Mark Steudel
I did, that link didn't seem to actually talk about the ability to create new TIFF images and didn't mention EPS at all, did I miss something on that page? Thanks, Mark -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 09, 2006 2:14 PM To: Mark Steudel

[PHP] mime.magic adding more types

2006-06-19 Thread Mark Steudel
Hi there, I'm writing some code that looks at a video file given to it and writes up the correct embed html and outputs it to the browser. I though that I would use mime_content_type() function to detect the type of each video, but after enabling it, I found that it doesn't have the mime type for

RE: [PHP] Better way of doing this? (menu and submenus)

2006-06-21 Thread Mark Steudel
You could use a recursive function and keep it all in one table. My Table is similar to the one below: ID NAMEPID DISPLAY_ORDER Here's crude recursive function to display this in a list typical of what you used to style a menu. The great thing about this is that you could have

[PHP] running system()

2006-06-28 Thread Mark Steudel
So I'm trying to run some system commands on the windows box I am working on. And I am getting Unable to fork errors. So after some googling I see that its because the internet guest user needs access to cmd.exe, my question is how safe is it to enable this on a production/shared environment?

RE: [PHP] running system()

2006-06-29 Thread Mark Steudel
:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 8:01 PM To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] running system() Mark Steudel wrote: So I'm trying to run some system commands on the windows box I am working on. And I am getting Unable to fork errors. So after some

Re: [PHP] Web based editor

2005-11-27 Thread Mark Steudel
I agree that FCKEditor is kinda slow as well. One of my problems is that it doesn't provide XHTML valid code. But it's a very robust free version. . But it does do some pretty amazing things like allow you to copy and paste from a website directly into the editor, or browse the server etc.  

Re: [PHP] Web based editor

2005-11-27 Thread Mark Steudel
On Sun, Nov 27, 2005 at 12:52:42PM -0800, Mark Steudel wrote: I agree that FCKEditor is kinda slow as well. One of my problems is that it doesn't provide XHTML valid code. But it's a very robust free version. . But it does do some pretty amazing things like allow you

Re: [PHP] Web based editor

2005-11-27 Thread Mark Steudel
Wow cool, looks nice. Our company does a lot of CMS stuff and I'm not a great fan of FCKeditor so far and am always on the look out for something better. -Original Message- From: Greg Donald [EMAIL PROTECTED] To: php-general@lists.php.net Date: Sun, 27 Nov 2005 19:16:47 -0600

RE: [PHP] PhpMailer vs Pear:Mail

2005-11-28 Thread Mark Steudel
Would you mind elaborating on why? -Original Message- From: Richard Heyes [mailto:[EMAIL PROTECTED] Sent: Monday, November 28, 2005 12:53 AM To: Cabbar Duzayak Cc: php-general@lists.php.net Subject: Re: [PHP] PhpMailer vs Pear:Mail Cabbar Duzayak wrote: Could you please tell which

RE: [PHP] Adding links to HTML for a CMS

2005-11-28 Thread Mark Steudel
Store each paragraph text in a database Table 1 = tblPage id Name 1 Welcome Page 2 About Page Table 2 = Content id pageid content 1 1 This is some content in a paragraph 2 1 This is some more content 3 1 This is

Re: [PHP] Writing a mailing list program with php/mysql.

2005-12-03 Thread Mark Steudel
Hi there,   There are TONS of tutorials out there on how to store this information into a database instead of just mailing it to your self, just google php and mysql ... First you'll need to create your database using some sort of mysql console (command line, web based like

RE: [PHP] Mail SMTP settings

2005-12-05 Thread Mark Steudel
Also look at PEAR::Mail. If you search back through this list there was a discussion on peoples preferences. -Original Message- From: Brent Baisley [mailto:[EMAIL PROTECTED] Sent: Monday, December 05, 2005 7:04 AM To: Dan Cc: php-general@lists.php.net Subject: Re: [PHP] Mail SMTP

[PHP] Redirects Safari vs Others

2005-12-05 Thread Mark Steudel
I was wondering if folks have experienced infinite redirection loops with Safari where other browsers don't encounter the same problems. This is what safari spits out http://www.domain.com/microlibrary.php?action=subcategoryid=7top=%2Fpage.p

Re: [PHP] GD Graph tutorial?

2005-12-05 Thread Mark Steudel
You may have alreayd looked at this class, but this one is great for creating graphs:   http://www.aditus.nu/jpgraph/   There are some licensing issues with it so if this is for a company then you probably have to buy a license.   Mark -Original Message- From: Ashley M.

RE: [PHP] What software do you use for writing PHP?

2005-12-06 Thread Mark Steudel
I primarily code in Dreamweaver 8. Two of my favorite features that were added from MX are as follows: 1. Code folding, basically you can collapse blocks of code. If you have to work with other peoples code, matching braces and code folding is an awesome way of just seeing the logical flow of the

RE: [PHP] What software do you use for writing PHP?

2005-12-06 Thread Mark Steudel
of extra clicks. DW's synchornization features are also handy if you are trying to get just the lastest files instead of the whole site. -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 10:11 AM To: Mark Steudel; 'Jeff McKeon'; 'php' Subject: Re

RE: [PHP] Redirects Safari vs Others

2005-12-06 Thread Mark Steudel
To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] Redirects Safari vs Others Probably not a PHP problem. And probably can't help without seeing your redirect code. I've never had a problem with redirects in any browser Safari or otherwise, but I always make sure I redirect

[PHP] Urlencode vs htmlentities

2005-12-06 Thread Mark Steudel
Lets say I have the following: Current URL: http://www.domain.com/page.php?action=list http://www.domain.com/page.php?action=listtop=/page.php?action=listid=3 top=/page.php?action=listid=3 $top = $_SERVER['PHP_SELF'].'?'.$_SERVER['argv']['0'] Now I want to create a URL with a return link in

RE: [PHP] Redirects Safari vs Others

2005-12-06 Thread Mark Steudel
[mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 12:17 PM To: Mark Steudel Cc: PHP General List Subject: Re: [PHP] Redirects Safari vs Others On Dec 6, 2005, at 2:55 PM, Mark Steudel wrote: Sorry it took me so long, I wasn't sure where the problem lay and couldn't get you the exact

RE: [PHP] What software do you use for writing PHP?

2005-12-06 Thread Mark Steudel
Neat, I'll have to check it out. -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 12:14 PM To: Mark Steudel; 'php' Subject: Re: [PHP] What software do you use for writing PHP? When you say SlickEdit has a ftp client built

[PHP] Debuggers on Windows Servers

2005-12-06 Thread Mark Steudel
Anyone out there running debuggers and profilers on your windows boxes? I'd like to start profiling some of my code and use some debuggers. Since we have dev sites on the same box with product sites, I wanted to make sure that before I ask our Sysadmin to install anything that they are stable and

RE: [PHP] Classes/Objects - Books/Links?

2005-12-06 Thread Mark Steudel
I took a look at a lot of books at Barnes and Noble and this I thought was the best intro to classes. I think it does a good job of letting you know both how to do things in HP4 and 5. Professional PHP 5 Publisher: Wrox -Original Message- From: Michael Hulse [mailto:[EMAIL PROTECTED]

RE: [PHP] What software do you use for writing PHP?

2005-12-07 Thread Mark Steudel
' Subject: Re: [PHP] What software do you use for writing PHP? On Dec 6, 2005, at 9:25 AM, Mark Steudel wrote: I primarily code in Dreamweaver 8. Two of my favorite features that were added from MX are as follows: 1. Code folding, basically you can collapse blocks of code. If you have to work

RE: [PHP] broken code....

2005-12-08 Thread Mark Steudel
What happens when you print out journal?: print_r( $journal ); Are your keys the exact case as your table fields? ID vs id or Date vs date -Original Message- From: Eternity Records Webmaster [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 07, 2005 11:31 PM To:

RE: [PHP] broken code....

2005-12-08 Thread Mark Steudel
Good catch: So I normally do $results = $db-query ( SELECT * FROM table ); What is the difference between using the and not using the . -Original Message- From: Ben Blay [mailto:[EMAIL PROTECTED] Sent: Thursday, December 08, 2005 10:27 AM To: php-general@lists.php.net Subject: Re:

RE: [PHP] broken code....

2005-12-11 Thread Mark Steudel
[mailto:[EMAIL PROTECTED] Sent: Friday, December 09, 2005 9:46 AM To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] broken code I believe the difference between using = and = is that the former passes the value by reference, though I've never been clear about the benefits

[PHP] Storing encrypted data into mysql: blob vs bin2hex

2005-12-19 Thread Mark Steudel
I have the following encryption function. And what I wanted to know is, Do I need to convert this to hex before storing this in a mysql database? Or could I store it into a blob and be fine? // from zend code gallery function RC4($keyfile, $data) { //ecncrypt $data with the key in $keyfile with

[PHP] http curl to https is that a secure connection?

2005-12-19 Thread Mark Steudel
I was curious, if have a page at http and it initiates a curl session to a https, is the information sent secure or open because the the curl session is from a unecrypted page? Mark

RE: [PHP] Re: Invalid argument supplied for foreach()

2005-12-19 Thread Mark Steudel
Something that I use to make sure I don't give the user a nicer error If ( is_array( $array ) ) { foreach ( $array as $key = $value ) { echo } } Else { exit('Expecting array') } -Original Message- From: David Robley [mailto:[EMAIL

[PHP] Timezone and DST

2006-01-05 Thread Mark Steudel
Hi All, I've got a little problem where our servers are in PST but the customer operates in Hawaii (-10 GMT). I believe I can just get the time for them by doing something like date(d H i, strtotime('now -2 hours') ); But here's the catch, how should I deal with day light savings ( DST) . In

RE: [PHP] Timezone and DST

2006-01-05 Thread Mark Steudel
Im just using it to set defaults on a QuickForm date element. -Original Message- From: Mike Tuller [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 11:02 AM To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] Timezone and DST Are you just displaying the time

[PHP] Floating numbers truncating to two digits without rounding

2006-01-09 Thread Mark Steudel
I am calculating things like tax and want to format them so they only have 2 digits past the decimal point. I've been using sprintf but just noticed that it tends to round up. I want the same functionlity without rounding. Thanks

RE: [PHP] Floating numbers truncating to two digits without rounding

2006-01-10 Thread Mark Steudel
Thanks for the info -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 3:26 PM To: php-general@lists.php.net; Mark Steudel Subject: Re: [PHP] Floating numbers truncating to two digits without rounding I am calculating things like tax and want

[PHP] [QF] I would like to change the javascript validation function

2006-01-10 Thread Mark Steudel
I want to add a few lines to the javascript validation function and I was wondering if anyone had any easy ideas on the easiest way to do it. Should I dig into the classes and edit there, or is there a way to replace it by extending the class or something. Thanks, Mark

RE: [PHP] [QF] I would like to change the javascript validation function

2006-01-10 Thread Mark Steudel
Sorry wrong list. -Original Message- From: Mark Steudel [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 10:27 AM To: php-general@lists.php.net Subject: [PHP] [QF] I would like to change the javascript validation function I want to add a few lines to the javascript validation

[PHP] Variable variables

2006-01-24 Thread Mark Steudel
I was wondering if you could create variable variables for objects, please see examples below, Im having problems getting it to work. $data['fieldname'] = foo; // without variable variables $res = $db-query( SELECT foo FROM table ); while( $res-fetchInto( $db_data ) )

RE: [PHP] Use VAR string value AS VAR Name

2006-01-25 Thread Mark Steudel
Either try: $sid_pro = p.$sid_pro; or try: input name='.$p{$sid_pro}.' type= 'radio' value='SOLVE_ME'/ -Original Message- From: Fernando Anchorena [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 25, 2006 4:12 PM To: php-general@lists.php.net Subject: [PHP] Use VAR string value AS

RE: [PHP] Use VAR string value AS VAR Name

2006-01-25 Thread Mark Steudel
Sorry I totally didn't read the question fully -Original Message- From: Mark Steudel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 25, 2006 4:28 PM To: php-general@lists.php.net Subject: RE: [PHP] Use VAR string value AS VAR Name Either try: $sid_pro = p.$sid_pro; or try

[PHP] Time estimating for PM's/Clients

2006-02-01 Thread Mark Steudel
I am interested in finding out what standards/formulas other PHP programmers/departments out there are using to accurately provide time estimates on modules to their PM's/Clients. Any suggested reading books or sites? Do time estimate theories in other langauges apply to web and php programming

RE: [PHP] Wysiwyg editors?

2006-02-02 Thread Mark Steudel
Doesn't look like SPAW is XHTML complient, just doing a 10 second glance at the html it generates. -Original Message- From: Angelo Zanetti [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 4:21 AM To: John Nichel Cc: php-general@lists.php.net Subject: Re: [PHP] Wysiwyg editors?

[PHP] unsupported binary characters in database,

2006-02-11 Thread Mark Steudel
I have the following encryption function: function RC4( $data) { //ecncrypt $data with the key in $keyfile with an rc4 algorithm $pwd = implode('', file(/key.php')); $pwd_length = strlen($pwd); for ($i = 0; $i 255; $i++) { $key[$i] = ord(substr($pwd, ($i %

RE: [PHP] unsupported binary characters in database,

2006-02-12 Thread Mark Steudel
Hmmm ... I guess that's an idea. Any other ways of dealing with this? -Original Message- From: Webmaster [mailto:[EMAIL PROTECTED] Sent: Saturday, February 11, 2006 6:06 PM To: Mark Steudel Subject: Re: [PHP] unsupported binary characters in database, Mark Steudel wrote: I have

RE: [PHP] unsupported binary characters in database,

2006-02-13 Thread Mark Steudel
I found another way to deal with this. And that's to run the encrypted string through base64_encode before inserting into database and running base64_decode when pulling it out of the database. Mark -Original Message- From: Mark Steudel [mailto:[EMAIL PROTECTED] Sent: Sunday, February

[PHP] testing text body emails

2006-02-13 Thread Mark Steudel
Im using phpmailer to send emails, with htmlbody and an alternate textbody. Any suggestions on how to test the text only body? Thanks, Mark

[PHP] array_map help

2006-02-17 Thread Mark Steudel
I've got the following code and I am not doing something right. Either my function is wrong, or the way Im using array_map is wrong, as slashes are still making it into the data, and the asdf iosn't getting appended to each value. Thanks, Mark // function to remove stripped slashes function

RE: [PHP] array_map help

2006-02-17 Thread Mark Steudel
Thank you I will give it a try. -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 9:24 AM To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] array_map help Mark Steudel wrote: I've got the following code and I am not doing

RE: [PHP] array_map help

2006-02-17 Thread Mark Steudel
AM To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] array_map help Mark Steudel wrote: I've got the following code and I am not doing something right. Either my function is wrong, or the way Im using array_map is wrong, as slashes are still making it into the data, and the asdf