RE: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Jake McHenry
I've been reading along, very informative :) I found Osama within 20 seconds
and as someone posted already, looking for his head wouldn't be much of a
task for a computer.

Has anyone tried cracking/hacking what Microsoft has done with the animal
pictures? That seems rather easy for even preschoolers, but a human non the
less. They have many people working on this exact subject, and being paid
I'm sure more than what its worth, but is there even a discussion if they
have the answer? Other than the completely blind, anyone can tell what a cat
is, and they could even take it further by added a bark or meow or something
similar. Can a computer tell the difference between a bark and a meow? Each
animal has its unique vocal tones and cry signature... just as a human
(who's not impersonating, which as long as its not a picture of the mocking
bird...), does this help at all? Instead of relying on our own known
dictionary and numbers Everyone knows about animals.. My 0.02

Jake


 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 12, 2007 10:27 PM
 To: Robert Cummings; Tijnema
 Cc: tedd; Stut; Jim Lucas; php-general@lists.php.net
 Subject: Re: [PHP] Going from simple to super CAPTCHA
 
 At 12:29 PM -0400 6/12/07, Robert Cummings wrote:
 On Tue, 2007-06-12 at 18:19 +0200, Tijnema wrote:
   On 6/12/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-06-12 at 12:01 -0400, Robert Cummings wrote:
 On Tue, 2007-06-12 at 11:56 -0400, Robert Cummings wrote:
 
 
  (1 * 100) / 100 = .10 = 10% of the time

 Bad math alert... (1 * 100) / 100 = 10;)

 Still the same answer though, was just mixing what I 
 wrote with what I
 was thinking :)
   
Bleh, what's wrong with me today... it's 1% not 10%. 
 Still within reason
for a spammer.
   
*smacks head to clear the fog*
   
 
   So, that means that you need to allow maximum of 10 
 attempts per few
   minutes, so that there will be 0,1% change ;)
 
 Using Ted's technique I've found the perfect CAPTCHA -- and it's fun
 too:
 
  http://shorl.com/nomojeryprafri
 
 Cheers,
 Rob.
 
 I was wondering when someone would suggest Where's Waldo?
 
 Cheers,
 
 tedd
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.472 / Virus Database: 269.8.14/845 - Release 
 Date: 6/12/2007 6:39 AM
  
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.14/845 - Release Date: 6/12/2007
6:39 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Downloads for subsrcibers only

2007-04-03 Thread Jake McHenry
A while ago I did this, but can't find the file now... I dunno if it would
work for you or not, but it did for me I took the first 10 characters of
the session id and created a symlink to the doc file, or pdf in your case,
then the person got the file. When they logged out, the symlink was deleted.
As long as the original file is not web accessable, no one can ever get it
unless they're logged in. :)

Jake

 -Original Message-
 From: Daevid Vincent [mailto:[EMAIL PROTECTED] 
 Sent: Monday, April 02, 2007 4:10 PM
 To: php-general@lists.php.net
 Cc: 'Mário Gamito'
 Subject: RE: [PHP] Downloads for subsrcibers only
 
 Look at mod_auth_mysql. Then authenticate your pdf directory 
 against that
 database of users. 
 
 Otherwise anyone who knows the direct link to your PDF can 
 download it,
 bypassing all your 'subscription' security. 
 
  -Original Message-
  From: Mário Gamito [mailto:[EMAIL PROTECTED] 
  Sent: Sunday, April 01, 2007 1:54 AM
  To: php-general@lists.php.net
  Subject: [PHP] Downloads for subsrcibers only
  
  Hi,
  
  I made this site in PHP that has a page with some PDFs to download.
  My costumer wants that only subscribed people are allowed 
 to download
  the PDFs.
  
  I've already made the subscrbe and login mechanism.
  
  Now, my question for you is about letting only subscribers 
  download the
  PDFs.
  What is the best approach ?
  Register a session when they login and then in the PDFs page apply a
  
  if email is registered
you can download the PDFs
  else
you can't
  
  Something like this ?
  Or is it there a better way ?
  
  Any help would be appreciated.
  
  Warm Regards
  -- 
  :wq! Mário Gamito
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.24/742 - Release 
 Date: 4/1/2007 8:49 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.25/744 - Release Date: 4/3/2007
5:32 AM
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Why do some pages repeat a previous page's action(s) after redirect?

2007-04-03 Thread Jake McHenry
I've seen this a lot with IE, it even warns you about it, the warning from
IE is:

The page cannot be refreshed without resending the information. Click Retry
to send the information again, or click Cancel to return to the page that
you were trying to view.

And through all my days, when you click cancel, the work offline page
appears instead of the page you were on..  Just another reason not to
use IE But this was the only place I remembered that warning from

Jake
 

 -Original Message-
 From: Chris W. Parker [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 03, 2007 2:39 PM
 To: PHP
 Subject: [PHP] Why do some pages repeat a previous page's 
 action(s) after redirect?
 
 Hello,
  
 I have a form page and a processing page. After submitting 
 the form the
 processing page does whatever it needs to do (insert a 
 record, send back
 validation errors, etc.) After determing what to do it always 
 redirects
 somewhere with header('Location: URL');
 
 But sometimes when I'm back at the form page (after the 
 redirect) and I
 refresh the page it does the previous page's actions again. And again
 and again.
 
 Why would it do that? Shouldn't a refresh just resubmit whatever is in
 the address bar and not go through a certain path?
 
 The only way I've found to make it stop redoing the previous page's
 actions is to put my cursor in the address bar and press enter.
 
 I don't remember seeing this behavior in the past so I wonder 
 if it has
 something to do with Apache's or PHP's configuration.
  
  
 Thanks,
 Chris.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.25/744 - Release 
 Date: 4/3/2007 5:32 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.25/744 - Release Date: 4/3/2007
5:32 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] finding the index name of an associative array

2007-04-01 Thread Jake McHenry
foreach ($myarray as $key = $value)
{
  echo $key = $value;
}


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Man-wai Chang
 Sent: Sunday, April 01, 2007 3:59 AM
 To: php-general@lists.php.net
 Subject: [PHP] finding the index name of an associative array
 
 myarray=array()
 myarray['a']=1
 myarray['b']=1
 myarray['c']=1
 
 Is there an iterative way to find out the array index values ('a', 'b'
 and 'c') of myarray?
 
 -- 
   .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
  / v \  Simplicity is Beauty! May the Force and Farce be with you!
 /( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
   ^ ^   15:58:01 up 8 days 3:10 0 users load average: 1.00 1.00 1.00
 news://news.3home.net news://news.hkpcug.org 
 news://news.newsgroup.com.hk
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.23/740 - Release 
 Date: 3/30/2007 1:15 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Parsing database variables

2007-03-31 Thread Jake McHenry
Yep, that's what I did last night right after I sent the email out... All is
working good now.. THANKS!

Jake
 

 -Original Message-
 From: Jim Lucas [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, March 31, 2007 4:15 AM
 To: Jake McHenry
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Parsing database variables
 
 Jake McHenry wrote:
  Ok, this is working good, except for one problem... I have variable
  $pay_rate   and $pay_rate_bap ... It finds $pay_rate first 
 and then it never
  finds $pay_rate_bap because it changes it to say.. 
 21_bap... Anyone know of
  anything else that may work? I have been messing around 
 with eval, and I
  havn't gotten it to work even once yet... Always comes back 
 with error at
  line 5 of eval'd And line 5 of the paragraph is a blank 
 line... Line 4
  is plain text... Not even a variable until line 12... 
 
 Fine, just switch the order you are adding them to the two 
 different arrays.
 
 instead of this:
 $find[] = '$pay_rate';
 $find[] = '$pay_rate_bap';
 $replace[] = $pay_rate;
 $replace[] = $pay_rate_bap;
 
 do this
 $find[] = '$pay_rate_bap';
 $find[] = '$pay_rate';
 $replace[] = $pay_rate_bap;
 $replace[] = $pay_rate;
 
 find the longer one first
 
  
  I guess next I will play around with preg_replace, but I'm 
 thinking I will
  have the same problem as I did with str_replace... As long 
 as the variable
  names have any kind of similar names Correct? I can 
 resolve this I
  suppose, but the data is already in place and trying to 
 work around it...
  
  Thanks,
  Jake
  
   
  
  -Original Message-
  From: Jim Lucas [mailto:[EMAIL PROTECTED] 
  Sent: Friday, March 30, 2007 7:32 PM
  To: Jake McHenry
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] Parsing database variables
 
  Jake McHenry wrote:
  Hi everyone,
 
  I have been searching and trying to do this for the past 
  hour without
  success yet
 
 
 
  I have a database table with this in it:
 
 
  p$namep
  Period Ending Date: $ppep
  Etc...
 
 
  And in my script, these variables exist and have values. Is 
  there a way for
  me to get the output from mysql_query to use the current 
  script variables in
  place of the same variable name within the database output?
 
 
 
  Thanks,
  Jake
 
  If I read the manual correct about how to setup the input 
  values for str_replace()
  you should be able to do the following.
 
  This is completely untested, since I have now system like 
  yours.  But here is goes...
 
 
  #setup the entries that you want to find.
  $find[] = '$name';
  $find[] = '$ppe';
 
  #setup the values to be replaced.
  #Mind you to keep the indexes the in sync with $find...
  $replace[] = $name;
  $replace[] = $ppe;
 
  echo 'pre';
 
  while ( $row = mysql_fetch_assoc($resultHandle) ) {
 
 $row = str_replace($find, $replace, $row);
 
 // do something with $row.  Display it maybe...
 
 var_dump($row);
 
  }
 
  echo '/pre';
 
  Basically replace $find[0] with $replace[0] in any of the 
  values of the return $row then replace the 
previous $row values with the newly modified values...  
  Then go to the next index of $find[1] and 
  $replace[1] and do the same thing until you are out of indexes.
 
  But this is a much better way of doing this than using 
  eval().  eval is an evil little function!
 
 
 
  -- 
  Enjoy,
 
  Jim Lucas
 
  Different eyes see different things. Different hearts beat on 
  different strings. But there are times 
  for you and me when all such things agree.
 
  - Rush
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  -- 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.23/740 - Release 
  Date: 3/30/2007 1:15 PM
   
 
  
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.23/740 - Release 
 Date: 3/30/2007 1:15 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Alternative/Addition to using a CAPTCHA

2007-03-30 Thread Jake McHenry
 

 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 30, 2007 3:06 PM
 To: Tijnema !; John Comerford
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Alternative/Addition to using a CAPTCHA
 
 At 3:37 PM +0200 3/30/07, Tijnema ! wrote:
 On 3/30/07, John Comerford [EMAIL PROTECTED] wrote:
 I was reading the current tread on CAPTCHA and possible cracks and I
 thought maybe I'd throw this out to the group to see what you think.
 Recently I saw a forum where in order to post you first had 
 to click on
 a div that was placed at a random location on the page, it read
 something like, Click here if you are human.  I was thinking that
 maybe you could put together a system that looks something 
 like this:
 
 http://people.aapt.net.au/JComerford/ClickMe.htm
 
 I was thinking you could use it in a couple of ways:
 
 1) As a replacement to a CAPTCHA image
 2) When you click the image a CAPTCHA image is loaded into 
 the 'Click
 Me' container
 
 The main problem is how to tell the server that the div has been
 clicked, in a way that can't be simulated.  I am not an expect with
 either JS or PHP, but maybe some of the bigger brains out 
 there could
 throw in their 2 cents..
 
 JC
 
 This looks maybe hard to crack, but actually it isn't very hard. All
 the clicking does is calling a javascript function. You still could
 submit the page without clicking the box.
 
 Tijnema
 
 Tijnema  John:
 
 The above link I've already done a long time ago. But check out my 
 dot CAPTCHA here:
 
 http://sperling.com/examples/p-captcha
 


Maybe I'm going blind.. But I don't see a circle on that page anywhere?
Everywhere I click it fails..
Jake



 This does not use javascript, but does use sessions.
 
 As you can see, the blue dot can be placed anywhere on the entrance 
 page. Granted this presents problem for the visually impaired, so I'm 
 not recommending it. But, it's just a proof of concept at this point. 
 Plus, I have not checked this on all browsers. I suspect that some 
 browsers may have problems with alpha channel images -- so your 
 mileage may differ.
 
 In any event, I think this may be a bit more difficult to crack than 
 something that replies upon javascript -- what do you think?
 
 Cheers,
 
 tedd
 
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.23/740 - Release 
 Date: 3/30/2007 1:15 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Parsing database variables

2007-03-30 Thread Jake McHenry
Hi everyone,

I have been searching and trying to do this for the past hour without
success yet



I have a database table with this in it:


p$namep
Period Ending Date: $ppep
Etc...


And in my script, these variables exist and have values. Is there a way for
me to get the output from mysql_query to use the current script variables in
place of the same variable name within the database output?



Thanks,
Jake

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Parsing database variables

2007-03-30 Thread Jake McHenry
Sorry.. Typos... But that's not the point... I looked the function... Dunno
how I missed it Thanks... Do you know if eval() has any size limitations
to it? The database fields are about a page each

Thanks,
Jake
 

 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 30, 2007 4:50 PM
 To: Jake McHenry; php-general@lists.php.net
 Subject: RE: [PHP] Parsing database variables
 
 [snip]
 I have a database table with this in it:
 
 
 p$namep
 Period Ending Date: $ppep
 Etc...
 
 
 And in my script, these variables exist and have values. Is 
 there a way
 for
 me to get the output from mysql_query to use the current script
 variables in
 place of the same variable name within the database output?
 [/snip]
 
 a. Bad HTML, always use a closing tag like /p
 b. Check http://www.php.net/eval
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.23/740 - Release 
 Date: 3/30/2007 1:15 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Parsing database variables

2007-03-30 Thread Jake McHenry
thought about that, I would need to do one ereg for each variable then
correct? as of right now, there are 0 variables in the first field, and 17
in the second...  so it would be 17 ereg replaces... then if i add or change
anything, possibly more...
 
This will work, but was hoping for an easier way...
 
Jake
 


   _  

From: Daniel Brown [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 30, 2007 5:02 PM
To: Jake McHenry
Subject: Re: [PHP] Parsing database variables



Jake, could you use ereg_replace() to do that?

?
//
while($row = mysql_fetch_array($result)) {
$html = ereg_replace($.name,$name,$row['column_name'];
} 

I split the first field of the ereg_replace() input so that it wouldn't
be read by the function as a variable.


On 3/30/07, Jake McHenry HYPERLINK
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: 

Sorry.. Typos... But that's not the point... I looked the function... Dunno 
how I missed it Thanks... Do you know if eval() has any size limitations
to it? The database fields are about a page each

Thanks,
Jake


 -Original Message-
 From: Jay Blanchard [mailto: HYPERLINK
mailto:[EMAIL PROTECTED][EMAIL PROTECTED]
 Sent: Friday, March 30, 2007 4:50 PM
 To: Jake McHenry; HYPERLINK
mailto:php-general@lists.php.netphp-general@lists.php.net
 Subject: RE: [PHP] Parsing database variables 

 [snip]
 I have a database table with this in it:


 p$namep
 Period Ending Date: $ppep
 Etc...


 And in my script, these variables exist and have values. Is 
 there a way
 for
 me to get the output from mysql_query to use the current script
 variables in
 place of the same variable name within the database output?
 [/snip]

 a. Bad HTML, always use a closing tag like /p
 b. Check HYPERLINK http://www.php.net/evalhttp://www.php.net/eval


 --
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.446 / Virus Database: 268.18.23/740 - Release
 Date: 3/30/2007 1:15 PM



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM


--
PHP General Mailing List (HYPERLINK
http://www.php.net/http://www.php.net/)
To unsubscribe, visit: HYPERLINK
http://www.php.net/unsub.phphttp://www.php.net/unsub.php






-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 


RE: [PHP] Parsing database variables

2007-03-30 Thread Jake McHenry
Ok, this is working good, except for one problem... I have variable
$pay_rate   and $pay_rate_bap ... It finds $pay_rate first and then it never
finds $pay_rate_bap because it changes it to say.. 21_bap... Anyone know of
anything else that may work? I have been messing around with eval, and I
havn't gotten it to work even once yet... Always comes back with error at
line 5 of eval'd And line 5 of the paragraph is a blank line... Line 4
is plain text... Not even a variable until line 12... 

I guess next I will play around with preg_replace, but I'm thinking I will
have the same problem as I did with str_replace... As long as the variable
names have any kind of similar names Correct? I can resolve this I
suppose, but the data is already in place and trying to work around it...

Thanks,
Jake

 

 -Original Message-
 From: Jim Lucas [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 30, 2007 7:32 PM
 To: Jake McHenry
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Parsing database variables
 
 Jake McHenry wrote:
  Hi everyone,
  
  I have been searching and trying to do this for the past 
 hour without
  success yet
  
  
  
  I have a database table with this in it:
  
  
  p$namep
  Period Ending Date: $ppep
  Etc...
  
  
  And in my script, these variables exist and have values. Is 
 there a way for
  me to get the output from mysql_query to use the current 
 script variables in
  place of the same variable name within the database output?
  
  
  
  Thanks,
  Jake
  
 
 If I read the manual correct about how to setup the input 
 values for str_replace()
 you should be able to do the following.
 
 This is completely untested, since I have now system like 
 yours.  But here is goes...
 
 
 #setup the entries that you want to find.
 $find[] = '$name';
 $find[] = '$ppe';
 
 #setup the values to be replaced.
 #Mind you to keep the indexes the in sync with $find...
 $replace[] = $name;
 $replace[] = $ppe;
 
 echo 'pre';
 
 while ( $row = mysql_fetch_assoc($resultHandle) ) {
 
   $row = str_replace($find, $replace, $row);
 
   // do something with $row.  Display it maybe...
 
   var_dump($row);
 
 }
 
 echo '/pre';
 
 Basically replace $find[0] with $replace[0] in any of the 
 values of the return $row then replace the 
   previous $row values with the newly modified values...  
 Then go to the next index of $find[1] and 
 $replace[1] and do the same thing until you are out of indexes.
 
 But this is a much better way of doing this than using 
 eval().  eval is an evil little function!
 
 
 
 -- 
 Enjoy,
 
 Jim Lucas
 
 Different eyes see different things. Different hearts beat on 
 different strings. But there are times 
 for you and me when all such things agree.
 
 - Rush
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.23/740 - Release 
 Date: 3/30/2007 1:15 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Alternative/Addition to using a CAPTCHA

2007-03-30 Thread Jake McHenry
 -Original Message-
 From: Tijnema ! [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 30, 2007 6:04 PM
 To: Jake McHenry
 Cc: tedd; php-general@lists.php.net
 Subject: Re: [PHP] Alternative/Addition to using a CAPTCHA
 
 On 3/31/07, Tijnema ! [EMAIL PROTECTED] wrote:
  On 3/30/07, Jake McHenry [EMAIL PROTECTED] wrote:
  
  
-Original Message-
From: tedd [mailto:[EMAIL PROTECTED]
Sent: Friday, March 30, 2007 3:06 PM
To: Tijnema !; John Comerford
Cc: php-general@lists.php.net
Subject: Re: [PHP] Alternative/Addition to using a CAPTCHA
   
At 3:37 PM +0200 3/30/07, Tijnema ! wrote:
On 3/30/07, John Comerford [EMAIL PROTECTED] wrote:
I was reading the current tread on CAPTCHA and 
 possible cracks and I
thought maybe I'd throw this out to the group to see 
 what you think.
Recently I saw a forum where in order to post you first had
to click on
a div that was placed at a random location on the 
 page, it read
something like, Click here if you are human.  I was 
 thinking that
maybe you could put together a system that looks something
like this:

http://people.aapt.net.au/JComerford/ClickMe.htm

I was thinking you could use it in a couple of ways:

1) As a replacement to a CAPTCHA image
2) When you click the image a CAPTCHA image is loaded into
the 'Click
Me' container

The main problem is how to tell the server that the 
 div has been
clicked, in a way that can't be simulated.  I am not 
 an expect with
either JS or PHP, but maybe some of the bigger brains out
there could
throw in their 2 cents..

JC

This looks maybe hard to crack, but actually it isn't 
 very hard. All
the clicking does is calling a javascript function. 
 You still could
submit the page without clicking the box.

Tijnema
   
Tijnema  John:
   
The above link I've already done a long time ago. But 
 check out my
dot CAPTCHA here:
   
http://sperling.com/examples/p-captcha
   
  
  
   Maybe I'm going blind.. But I don't see a circle on that 
 page anywhere?
   Everywhere I click it fails..
   Jake
 
  Hmm, just wanted to say that Jake, is it because i have my 
 resolution
  @ 1600x1200?
 
  Tijnema
 
 Actually, it just doesn't work with IE6, it works with FireFox. :)


That would be my problem then :)
Jake


 
 Tijnema
  
  
  
This does not use javascript, but does use sessions.
   
As you can see, the blue dot can be placed anywhere on 
 the entrance
page. Granted this presents problem for the visually 
 impaired, so I'm
not recommending it. But, it's just a proof of concept 
 at this point.
Plus, I have not checked this on all browsers. I 
 suspect that some
browsers may have problems with alpha channel images -- so your
mileage may differ.
   
In any event, I think this may be a bit more difficult 
 to crack than
something that replies upon javascript -- what do you think?
   
Cheers,
   
tedd
   
--
---
http://sperling.com  http://ancientstones.com  
 http://earthstones.com
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release
Date: 3/30/2007 1:15 PM
   
   
  
   --
   No virus found in this outgoing message.
   Checked by AVG Free Edition.
   Version: 7.5.446 / Virus Database: 268.18.23/740 - 
 Release Date: 3/30/2007
   1:15 PM
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.23/740 - Release 
 Date: 3/30/2007 1:15 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] link on user uploaded pic

2007-03-29 Thread Jake McHenry
Not quite sure what you mean, what you posted is what you need to do to make
the image a link... And that's what you wanted... So.. What are you asking?

Jake
 

 -Original Message-
 From: Tana [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 29, 2007 1:02 PM
 To: php-general@lists.php.net
 Subject: [PHP] link on user uploaded pic
 
 Hi
 
  which is the best way to change this code
 
  img src=images/user_upload/akarmi.jpg
 
 to
 
  a href=images/user_upload/bp_akarmi.jpgimg
  src=images/user_upload/akarmi.jpg/a
 
 in html ?
 
 
  
  Tana
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.20/737 - Release 
 Date: 3/28/2007 4:23 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.20/737 - Release Date: 3/28/2007
4:23 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Audio CAPTCHA review request

2007-03-29 Thread Jake McHenry
Looks good to me... Had to use my laptop since none of my office sets have
speakers, tested it, tried bunch of stuff and it only let me in when I typed
in the code... So seems good :) 

Jake 

 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 29, 2007 12:41 PM
 To: php-general@lists.php.net
 Subject: [PHP] Audio CAPTCHA review request
 
 Hi gang:
 
 If you people would be so kind as to review this:
 
 http://sperling.com/examples/captcha/
 
 and tell me what you think (ease of use, if it works, security, 
 etc.), I would appreciate it.
 
 The point is to be able to get to the Congratulations page by 
 hearing and entering the key. If you can get there some other way or 
 defeat the process, I sure would like to know about it.
 
 I've tested this with a couple of dozen blind users and they find no 
 problems with it. Now, I'll like to test it for the sighted.
 
 It's mixture of a several languages, but there is php in it, so I 
 guess it's on topic.
 
 Cheers,
 
 tedd
 
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.20/737 - Release 
 Date: 3/28/2007 4:23 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.20/737 - Release Date: 3/28/2007
4:23 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] My own captcha from 2 years ago......

2007-03-26 Thread Jake McHenry
 

 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 26, 2007 8:49 AM
 To: php-general@lists.php.net
 Subject: RE: [PHP] My own captcha from 2 years ago..
 
 At 10:02 PM -0400 3/25/07, Jake McHenry wrote:
 Like I said... Even if they have sound turned on.. Which all 
 my sets do...
 Most of them don't have speakers... That was put into effect 
 over a year ago
 due to some people listening to those damn screaming prank 
 things at full
 volume... Anyways... I was searching the php site, and it 
 said there used to
 be a bug that looks somewhat similar to my problem, but it 
 said it was fixed
 long ago... Not sure if this is even close to it or not, but 
 this is the
 first time I've run into a sessions problem.
 
 Just to simplify...
 
 I have this on index.php
 
 ?php
 session_start();
 
 $before = $_SESSION['code'];
 
 echo 'img src=image.php';
 
 $after = $_SESSION['code'];
 
 echo $before .' ' . $after;
 ?
 
 Then in image.php is my captcha... And where the session 
 variable 'code' is
 being created and updated...
 
 In image.php is this:
 
 ?php
 session_start();
 
 ..captcha code..
 $_SESSION['code'] = rand(blahblahblah) to get the random code
 ?
 
 
 When I view index.php, the image displays, with a new code 
 each time...
 Working as it should, but the session variable echos out the 
 previously
 generated value, instead of the current value to match whats in the
 picture... I'm not sure what I've done... But you can see from
 http://nittanytravel.com:8080/$before and $after have 
 the same value...
 
 In that bug report I was reading it said that this happened until
 session_start was called again.. But it said it was fixed 
 back in php4...
 
 Not sure what I missed :(
 
 Thanks,
 Jake
 
 
 Jake:
 
 Clearly, your image.php is not changing the code (key).

What would be this clear image you see? It does change the code, otherwise
it would show the same code in the image.. Which it doesn't... And the
session variable wouldn't have anything in it.. Which it does

Not on windows..

Using mt_rand for the numbers, but that's working fine, if I comment out the
image headers and run the file directly echoing out the session, it works
fine, its only when I call it from another file in the img tag...?

Thanks,
Jake



 
 Your blahblahblah has to be less than 32768 if you're running 
 windows -- maybe that's the problem. But, I would look to my rand() 
 for an answer.
 
 Cheers,
 
 tedd
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.18/733 - Release 
 Date: 3/25/2007 11:07 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 3/25/2007
11:07 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] My own captcha from 2 years ago......

2007-03-26 Thread Jake McHenry
The try again button doesn't work...

And geez I had this working ok the entire time When I saw yours it
hit me... I don't have a form.  It would never echo out the code to
match whats in the picture... When the form is submitted it will check.. But
I didn't have it on a form... I was just playing with the images.. And
trying to get it to echo out whats in the pic So I sat here and did this
for basically nothing... Someone smack me.. lol 

 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 26, 2007 1:11 PM
 To: Brad Fuller; php-general@lists.php.net
 Subject: RE: [PHP] My own captcha from 2 years ago..
 
 At 10:59 AM -0400 3/26/07, Brad Fuller wrote:
 
 echo 'img src=image.php';
 
 This does not run or call image.php.
 
 This line of code sends this output to the browser.
 
 Brad:
 
 Yes, but the browser runs the code by trying to load an image.
 
 Check this out:
 
 http://sperling.com/examples/assorted-captcha/index.php
 
 The first Captcha is the typical type and the image shown is created 
 by captcha.php via a simple img tag:
 
 img src=captcha.php
 
 In this example, the key for this is passed via sessions and is not 
 included in a cookie nor dependant upon the value of the session id.
 
 Refresh the page and new values are shown because it's the tag that 
 causes the captcha.php script to run.
 
 Don't mind the Audio Captcha there, I have a better one.
 
 Cheers,
 
 tedd
 
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.18/733 - Release 
 Date: 3/25/2007 11:07 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 3/25/2007
11:07 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: My own captcha from 2 years ago......

2007-03-26 Thread Jake McHenry
Refresh was at 1 sec... Cause I was just playing with the images... And I
just figured it out... And responded to the list... But again... I had it
working the entire time, but I didn't have a form to submit something to
compare it to, which when I do that, it works, but it will never echo out
what is currently in the pic 

 -Original Message-
 From: Richard Lynch [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 26, 2007 3:49 PM
 To: Jake McHenry
 Cc: 'itoctopus'; php-general@lists.php.net
 Subject: RE: [PHP] Re: My own captcha from 2 years ago..
 
 On Sat, March 24, 2007 11:00 pm, Jake McHenry wrote:
  Index.php
  ?php
  session_start();
  header(Refresh: 1);
 
 I dunno what the heck the Refresh header is, but it would not shock
 me in the least that your sessions are getting lost because your
 browser does the refresh before it processes the cookie that maintains
 session state.
 
 A few zillion PHP CAPTCHA implementations use $_SESSION, so it's got
 to be you messing up somewhere. :-)
 
 -- 
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some indie artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.18/733 - Release 
 Date: 3/25/2007 11:07 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 3/25/2007
11:07 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] My own captcha from 2 years ago......

2007-03-25 Thread Jake McHenry
Do I call the image creation file in an html img tag? I've tried a bunch of
things, and this is the only way I've been able to display the image inline
so far, without the image headers blocking the rest of my output

I've been reading and somewhat interested in the audio and pic captchas..
But audio won't work for my intranet... Hardly any of the sets have
speakers... Productivity solution I guess... 

Jake
 

 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, March 25, 2007 10:33 AM
 To: Jake McHenry; php-general@lists.php.net
 Subject: Re: [PHP] My own captcha from 2 years ago..
 
 At 11:28 PM -0400 3/24/07, Jake McHenry wrote:
 Well, I've been creating my own... Since like two years 
 ago... Lol.. But
 this is the KNOWN name now. Anyways... How can I get the 
 info from the
 image creation script back to my main script? Sessions DO 
 NOT WORK! They
 give me the previous entry instead of the current.. Which 
 obviously won't
 work... This was on the back burner for a long time, but my 
 boss said .
 Oh wow.. That looks cool... And I told him I had started it 
 a long time
 ago.. But never finished it cause he told me to work on 
 something else...
 Anyways... U can see what I mean http://nittanytravel.com:8080/
 
 The numbers surrounding the images displayed are session 
 values created in
 the image scripts...which as you will see are the previous 
 value It may
 be a simple fix.. But once again... I'm tired... And had one 
 too many long
 island iced teas tonight to think about this. And yes... 
 My boss works
 me even on saturdays after happy hour :(
 
 
 Thanks,
 Jake
 
 Jake:
 
 Sessions do work. It's simply a matter of logic. Keep your current 
 key intact until you need a refresh.
 
 Or you can wait just a bit and I'll give you mine. I've been working 
 on an audio Captcha.
 
 Cheers,
 
 tedd
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.18/733 - Release 
 Date: 3/25/2007 11:07 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 3/25/2007
11:07 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What is wrong with this function please?

2007-03-25 Thread Jake McHenry
Ok.. It all looks ok... I did some googling and found that Exchange requires
the Message-ID to be unique Which it really should be anyways... and
yours isn't. try adding time() or something to make it unique :)

Jake


 -Original Message-
 From: Robin Wilson [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, March 25, 2007 2:25 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] What is wrong with this function please?
 
 Thanks for the help
 
 The line returns are specified as \r\n but in the echo they 
 seem to all be 
 on one line. Could that be related to the problem. Also the 
 addresses are 
 specified but seem to have been removed???
 
 This is what I specified:
 $eol=\r\n;
   $mime_boundary=md5(time());
 
   # Common Headers
   $headers .= 'From: '.$fromName.''.$fromaddress.''.$eol;
   $headers .= 'Reply-To: '.$fromName.''.$fromaddress.''.$eol;
   $headers .= 'Return-Path: 
 '.$fromName.''.$fromaddress.''.$eol;// 
 these two to set reply address
   $headers .= Message-ID: 
 .time().@.$_SERVER['SERVER_NAME']..$eol;
   $headers .= X-Mailer: PHP v.phpversion().$eol;  
 // These two to 
 help avoid spam-filters
 
 I followed some tutorials and they all seemed to tell me to 
 do it this way.
 
 The emails seem to work with other clients and only Exchange 
 doesn't like 
 them.
 Tested with Squirrel Mail and they were recieved with the 
 attachment etc.
 
 Do you have any more ideas please?
 Thanks for the help
 
 Robin
 
 Jake McHenry [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 
 
  No sorry, both messages are the same.
  Didn't mean to post it twice. Sorry.
 
  Below is what prints out when I echo the message:
 
  $to
  [EMAIL PROTECTED]
 
  $subject
  Proposal Submission
 
  $headers
  From: 2HostMe Mailer Reply-To: Robin Wilson Return-Path:
  2HostMe Mailer
  Message-ID: X-Mailer: PHP v4.4.2 MIME-Version: 1.0 Content-Type:
  multipart/related; boundary=d49718178131ebc038c576f007a40642
 
 
 Are these all on the same lines just because of echo? Or are 
 they on their
 own lines? Like this:
 
 From: 2HostMe Mailer
 Reply-To: Robin Wilson
 Return-Path: 2HostMe Mailer
 Message-ID: X-Mailer: PHP v4.4.2
 MIME-Version: 1.0
 Content-Type: multipart/related; 
 boundary=d49718178131ebc038c576f007a40642
 
 
 From: should have a from email address, same with reply-to 
 and return-path
 
 
 
  $msg
  --d49718178131ebc038c576f007a40642 Content-Type: image/gif;
  name=betaresource.gif Content-Transfer-Encoding: base64
  Content-Disposition: attachment; filename=betaresource.gif
 
 Same with these, are there any line returns?
 
  R0lGODlhWgAeAPcAAP///25scFNdc1tkc0tcclpibWNpcTtbgi1CWzJIY0
  BaeyU0RjpRbCw9
  UUFXci8/UkxbbUpUYGdwe3Z7gRMqQxg1VB5AZh0+YjpWdjhTcjVNaTBGXjRLZS
  Y3Si1BVzxVcUpn
  iE1rizpQaTJEWTZJXzlNYzFCVUBUajhGVVJlezdDUGNyglNdaBUvShEmPBo5Wh
  9EaiBGbBs7XCFI
  byNMdCJJcR9CZxw8XSFFaiJHbCNJbiBCZChReiZOdSVLcSBBYR8+XSRHaSJDYy
  pQdSdKbSVGZiI3
  TSU6UDtcfSk/VkNliUVkhD9bdyk6TENeekpmgkNbdDxPY1NtiEhedTtNXzhJWk
  1ke0theEVXajA9
  SkJTZE5hdGx+kFxremx2gH6DiBYxSyVNcxo2USlUfB9AXh08WCpWfidQdSJGZh
  cvRSlTeSpUeh06
  VB89WRozShkxRyZJaS1VeylOcCpQchkvRC1UeCVFYi1SdTBYfCM/Wi1QcStNbD
  BUdUVqi0Riflt5
  lFdzjEZbb1t1jT9OXGJ2iUJPW1dlcoiVoSxagitZgC9gii5dhjNlkTdtmjVqlT
  RjjDtvmTptljFb
  fyRDXi9XeTlpkDVhhTlmjCpKZkBulD1lh05yj01rhF55j1NqfWuHnmN8kmmBlU
  paZ4aaq32PnniI
  loKPmiVIYj53oz5ym0R8pS5SbUN2nWGFoG6SrVZvgltzhlJndzxLV2V7jJKqvI
  KVpGx7hoqbqJGg
  q46bpTFadkuDqoahtHSCjImUnKGstJylq8THyTlQX2KAk1txfcDL0ayxtIadqZ
  ieobS6vbzFyLe/
  wcXJyrG2t7i8vJaXl4eIiL/Bv7y+vLW2tbCxsLu8uqusqrq7uMfIwtDQzM3Nyd
  jY1cTEwo6Ojbe2
  saSjoMC+uePh3MnGv83KxO7q4+3o4MPAu726teLazujh1+bf1erk2+nj2tzUyd
  fPxOTc0ezm3uvl
  3dTKvszBttHGu/Hs58G1q8e7sb6wp6ubkrKimbipoJSMiKCSjD1MWCH5BAEAAP
  8ALABaAB4A
  QAj/AB2tGrhKlSRJjxAifMTwkSOHjh4+ajSxIUMEIZZkRICAySYmIENwEuFnkx
  8/IkQA4hQolidP
  xAJNiUUTFpM/OJMwCQGFCRQosP48uVKsmJcBWLhwQZqK1zJ1z04FgwcvSzt11q
  qhg+fOjbt5o8K4
  KKFLGjt18MJEWOfu3bx5XsbAuCrNmbR08Gytg7etFidiaKlQMSVuHah26z5lia
  fuVqF08zZw8OLO
  HQoTUlBYY6cNW7V6927J+tTIoCZLu/qwGuKmjes2rd+MmR1mjNgKuHPjfuGidx
  gcZSi5SUMcxxgL
  bcy4Ud4GiYfnThykmDWrhJQqVkhwSKCkBAgO4Dl0/zChwIQgLIIIaXES3QEJOp
  PsSMvTxwgtXKB0
  0emiS1QuRpBEBAkjouhSQw0xWHOBNTGUEgoiGCSY4AU5TEOEHYqcMQ0eNuhQCC
  I58DGNBtNs0EED
  D6BQQDdQhBBCMK90g9ISU4xzyy+vNAPKIecs0AUIWJxDwJACLWNOL5OcAk86RQ
  ThRiG2kLLJGlOU
  I08psPABRSlcJpGDDIGUE48YeDOKyMEGKL30sgREr9RSCy+paDJIMHK6Qk
  whpyDjSSClmNLJ
  H6KYckUggzAxBSK5INJEBiCwoAsinzQwwqWbdOLMPPjkw88+/dQxyz776OMNP/
  m8AE6n4BBAzz3+
  gP/Djz4vpFBqBS8wgCoHWeSTDzjQXHPPF/hAI6s+qFDgKTT38DPBLJ6ims8+xb
  RQKhJHIAFGPfWA
  Ew44JdzjaTT67CMBA07YcUkj0khyCQKgIAIIMNSE8wQdulRTTSc77LAGGejckM
  MNGJwyzzW/YJBM
  NeFcwQO94YSiyCJn6HCNGzC4MUMy16DjhQIco0MBCi0cgk4BBUTwTQS/fBNOMs
  C40w06T9DyDTrg
  HHCNy78MUkghdkySxyST9EHJHXZUQgceeMix9CSWNPXIGWSIQUMMNNAgQwwyaB
  3DBRdggAE2GFxQ
  Axlo94DHJDv8kEPYd2ygQQYZyJ1BAwukFAJICCz/gdMCgjwQxR9eTDABC6C4Ik
  osVKDwwOOPpGKM
  PfZYyY0odswRxxBFzKGmHJUP8kOHXMtggw0+AEJ5Oea0w4wljMQu+yIMOaJKKr
  jXGcJMxADiiQoF
  YBGFBho08GgTTQw+RSed

RE: [PHP] My own captcha from 2 years ago......

2007-03-25 Thread Jake McHenry
Like I said... Even if they have sound turned on.. Which all my sets do...
Most of them don't have speakers... That was put into effect over a year ago
due to some people listening to those damn screaming prank things at full
volume... Anyways... I was searching the php site, and it said there used to
be a bug that looks somewhat similar to my problem, but it said it was fixed
long ago... Not sure if this is even close to it or not, but this is the
first time I've run into a sessions problem.

Just to simplify...

I have this on index.php

?php
session_start();

$before = $_SESSION['code'];

echo 'img src=image.php';

$after = $_SESSION['code'];

echo $before .' ' . $after;
?

Then in image.php is my captcha... And where the session variable 'code' is
being created and updated...

In image.php is this:

?php
session_start();

..captcha code..
$_SESSION['code'] = rand(blahblahblah) to get the random code
?


When I view index.php, the image displays, with a new code each time...
Working as it should, but the session variable echos out the previously
generated value, instead of the current value to match whats in the
picture... I'm not sure what I've done... But you can see from
http://nittanytravel.com:8080/$before and $after have the same value... 

In that bug report I was reading it said that this happened until
session_start was called again.. But it said it was fixed back in php4... 

Not sure what I missed :(

Thanks,
Jake




 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, March 25, 2007 7:54 PM
 To: Jake McHenry; 'tedd'; php-general@lists.php.net
 Subject: RE: [PHP] My own captcha from 2 years ago..
 
 At 10:49 AM -0400 3/25/07, Jake McHenry wrote:
 Do I call the image creation file in an html img tag? I've 
 tried a bunch of
 things, and this is the only way I've been able to display 
 the image inline
 so far, without the image headers blocking the rest of my output
 
 I've been reading and somewhat interested in the audio and 
 pic captchas..
 But audio won't work for my intranet... Hardly any of the sets have
 speakers... Productivity solution I guess...
 
 Jake
 
 The audio is for visually impaired and unless their also deaf, they 
 have sound turned on.
 
 tedd
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.18/733 - Release 
 Date: 3/25/2007 11:07 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 3/25/2007
11:07 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What is wrong with this function please?

2007-03-24 Thread Jake McHenry
 
 uCJV2vLFemiAHO7AC1fd6s9bLMkXS1IyWljAAiTeIQGHcIsC9pmAbywJiZ4ygC
 FG4cLaBgMWvv8Q 
 lwGikY9o8PAI/VADtw5RAV+k4xsVaEGnXmAIfvADVxS4BwXGAI16/KIMbaAENH
 zxCVSkoVOf+IYN 
 hwENekDjAPSgBwW2hY8DHMLnekACEvAxDzAowQreOMU78nECPQpAAutpxSqO0S
 x96IMCVkBkC/xR 
 LlC9wFqfMkQ/9NEPAfjDHy+Yhd0xKQB+9GMMXoAGqfYRDS6USx/+GIYblNCPyV
 OAEFYQQKkOYPeS 
 2T1bSCCBN8SVDwqcQAJ2t7s/VpDMS1gCE5e4BCtm2IY3wKEOvh8DHN6gBjio4Q
 1hCEMFXLCbTWpy 
 +cu/YhuAQP0gtEH6ylmOGdoAHSdoIQXDWEH/CqowjBOc4AMOQIISeMlLDpigBO
 7nwhas4AAnJDM6 
 J4DEQTSxPnD4Yg53cAeUQAlY5gYGqAfbNwNmcAj6AA39YAViIRa9AQcWMAM3kA
 Y7YAR3EAdokAYW 
 8AXR4A3RoBxloAfrpwROcAIlYEqCAAYiGA0H0AEKIAjMMwImsgGXYgKGkGBXIA
 hVcAIQEEyTgAkK 
 pAm5Rwy2UAl9wAdMOAdzwAfJJQQYiAbgUAYYgAOmgAHgAAMzAANcaAFuIANdIw
 ZrkAiKwAplAA7A 
 gQNBAARGoABw2AEnAgIFwAVTsC9McAXXgAV/oAJe4AquYC8ggDxZcAgGYABZQG
 CxAAufIAhr/wMJ 
 0mAJk7AHtNAf01AEp4ALnQAMcrAJ14AGbMBS2DBVpoBT1MA1UxAMGKAB1cAD75
 ADlxAMK6YIPhAV 
 p2AKnxAMRhAF1aAA79ABYAANWRABXnAOwbAwwNAJ0oAFriIA2QCInRAMpvAE48
 AF5yAABgAOXBAL 
 tNAHebAL0lA0cUALuZAfc1AgoqAN3SANwNAILWUJS9ADNZBTOyUDNfAg1KVT03
 ADQzANKgZU0uBO 
 HnJUfBAOG3AOctgAUYACWNANU+AiwEAK6dAN3TAOhUAOtAAKoDANyfAL6UAFp3
 AO6ZAzBBABexAf 
 wYAIFFYNpZAfe1AgnhAMeaAJ2ZAKjaAIUP/gDAcSCMewIDQwDYGgiqx4Ae+AAR
 ngDGdABHSwBtJg 
 B2KgA6lYBE9ADRkgDcQDAg/QACHgkCEQCM9gClcVAtsQAuPwBQizDcBFDhFwDl
 HwAOfwAANAAEEj 
 NJOYAHdQCZPINHZgB3SQB5bAC7zQCGxwBlZjOjKQBjewAzZwNWHDAxhgDd30A1
 SjCGTQB3uAXEEQ 
 BJSQCZeyCyMwDCawBSNQACqgAlhABVEgGIKBBS0SAhQ3AbfwChrJOI7zOA8wB2
 jAXHIwBwkABHPw 
 A0WQXMr1A2ygCI3gCI3QAz9AA28zXQPDA9N1AY4ZBBiQhRiQAz9QA6NTBHKQA9
 6JAU6SAEYmsAEb 
 wAcKIIMasADqmQFzwxHumQR3gwJxaQBesF2DoAIoQJ4bEBAAOw== Content-Type: 
 multipart/alternative --d49718178131ebc038c576f007a40642 
 Content-Type: 
 text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 
 8bit Dear Robin 
 Wilson Below are the details of the Proposal Submission Form 
 you filled in 
 at 2HostMe Media Services Logo / produktnaam test Thema / slogan: 
 Steekwoorden* Aantal (ca.): Kleur item: Budget (minimum en 
 maximum prijs in 
 euros) tussen euro en euro per produkt item Gewenste 
 leverdatum 27-01-2007 
 Streef Datum Eventueel eigen produkt ideeën Opmerkingen / 
 aanvullende info 
 Content-Type: text/html; charset=iso-8859-1 
 Content-Transfer-Encoding: 8bit 
 Dear Robin Wilson
 
 Below are the details of the Proposal Submission Form you 
 filled in at 
 2HostMe Media Services
 
 Logo / produktnaam test
 Thema / slogan:
 Steekwoorden*
 Aantal (ca.):
 Kleur item:
 Budget (minimum en maximum prijs in euros) tussen euro en 
 euro per produkt 
 item
 Gewenste leverdatum 27-01-2007 Streef Datum
 Eventueel eigen produkt ideeën
 Opmerkingen / aanvullende info
 --d49718178131ebc038c576f007a40642-- 
 
 
 
 Jake McHenry [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 I take it there are no errors... And your using windows... Sending to
  exchange... I guess with seeing what you posted, I would 
 start by echoing
  out what you have in  $to, $subject, $msg, $headers. Are 
 there any errors 
  in
  Exchange logs? Do you see the message coming into Exchange queue?
 
  Jake
 
 
  -Original Message-
  From: Robin Wilson [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 23, 2007 9:53 PM
  To: php-general@lists.php.net
  Subject: [PHP] What is wrong with this function please?
 
  Hello
 
  I'm trying to do a function that emails users and sends an
  attachment. But I
  think something is in the wrong order or something as when 
 I send it
  Exchange discards it.
 
  This is the function which I have put together from 
 various sources:
 
  I would really appreciate any help as I have been up half the
  night and got
  nowhere!
  Thanks
  Robin
 
  function sendMail($to, $toName, $from, $fromName, 
 $subject, $message,
  $uploadfile, $fileName, $fileType, $fileSize) {
   $eol=\r\n;
$mime_boundary=md5(time());
 
# Common Headers
$headers .= 'From: '. $fromName .' '. $from .''.$eol;
$headers .= 'Reply-To: '. $toName .' '. $to .''.$eol;
$headers .= 'Return-Path: '. $fromName.' '. $from
  .''.$eol;// these
  two to set reply address
$headers .= Message-ID:
  .$mime_boundary.@.$_SERVER['SERVER_NAME']..$eol;
$headers .= X-Mailer: PHP v.phpversion().$eol;
  // These two to
  help avoid spam-filters
 
# Boundry for marking the split  Multitype Headers
$headers .= 'MIME-Version: 1.0'.$eol;
$headers .= Content-Type: multipart/related;
  boundary=\.$mime_boundary.\.$eol;
 
   $msg =  ;
 
   if ($uploadfile != ) {
# File for Attachment
 $file_name = substr($uploadfile, (strrpos($uploadfile,
  /)+1));
 
 $handle=fopen($uploadfile, 'rb');
 $f_contents=fread($handle, $fileSize);
 $f_contents=chunk_split(base64_encode($f_contents));
   //Encode The
  Data For Transition using base64_encode();
 fclose($handle);
 
 # Attachment
 $msg .= --.$mime_boundary.$eol;
 $msg .= Content-Type: .$fileType.;
  name=\.$file_name.\.$eol;
 $msg .= Content-Transfer-Encoding: base64.$eol;
 $msg

RE: [PHP] Computing and calculating dates

2007-03-24 Thread Jake McHenry
Change it to the format strtotime needs? Not hard Or mktime(0, 0, 0,
date(m, $date), date(d, $date)+7, date(Y, $date)); for +7 days... Same
with + 14 days Strtotime is usefull, you can just put first day next
month and it just works... Lol... Then you could explode that back into
mktime, or just into a string. There are many ways to do what your
asking :)

Jake

 -Original Message-
 From: Otto Wyss [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, March 24, 2007 4:37 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Computing and calculating dates
 
 Travis Doherty wrote:
  Otto Wyss wrote:
local_formated_date + 7; // days
local_formated_date  local_formated_first_day_next_month;
local_formated_date  (current_date + 14)
 
  etc. Which functions are best suited for such calculations?
 
  O. Wyss
 
  www.php.net/strtotime is probably a good start.
  
 Thanks, strtotime isn't able to parse a european formatted date
 (dd.mm.). How do I get the timestamp of such a date?
 
 O. Wyss
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007 3:27 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007
3:27 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] My own captcha from 2 years ago......

2007-03-24 Thread Jake McHenry
Well, I've been creating my own... Since like two years ago... Lol.. But
this is the KNOWN name now. Anyways... How can I get the info from the
image creation script back to my main script? Sessions DO NOT WORK! They
give me the previous entry instead of the current.. Which obviously won't
work... This was on the back burner for a long time, but my boss said .
Oh wow.. That looks cool... And I told him I had started it a long time
ago.. But never finished it cause he told me to work on something else...
Anyways... U can see what I mean http://nittanytravel.com:8080/

The numbers surrounding the images displayed are session values created in
the image scripts...which as you will see are the previous value It may
be a simple fix.. But once again... I'm tired... And had one too many long
island iced teas tonight to think about this. And yes... My boss works
me even on saturdays after happy hour :(


Thanks,
Jake


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007
3:27 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
$legrow[$data-legs-leg[$k]['legId']]

?? See if that works...

Jake



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, March 24, 2007 11:27 PM
 To: php-general@lists.php.net
 Subject: [PHP] Array Question
 
 Hi All
 
 I am having a bit of trouble with PHP arrays and would 
 appreciate some help.
 
 I currently have the following piece of code
 
   $count=count($data-legs-leg);
   $k=0;
   while($k  $count)
 {
   
 $legrow[$k]=$data-legs-leg[$k]['legId'].$VM.$data-legs-leg
 [$k]['depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-
 legs-leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$V
 M.$data-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'
 ].$VM.$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['mil
 es'].$VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[
 $k]['meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-leg
 s-leg[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
 
   $k++;
   }
 
 This works fine extracting the leg attributes from the legs array and
 putting the data into a new legrow array delimited by $VM.
 
 I can do a print_r($legrow); and I get the rows displayed 
 correctly. I can
 also access any row by using $legrow[n] where n is the key number.
 
 What I want to do is to find a way of indexing the array 
 using the legId
 as the key if possible. In other words I want to extract the 
 row where the
 legId has a particular value where I do not know the row key.
 
 I have been thinking that this might be possible with an 
 associative array
 but my attempts to do this have not worked.
 
 What I have tried is as follows
 
 $count=count($data-legs-leg);
   $k=0;
   while($k  $count)
 {
   
 $legrow[$data-legs-leg[$k]['legId']]=$data-legs-leg[$k][
 'depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-legs-
 leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$VM.$da
 ta-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'].$VM
 .$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['miles'].
 $VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[$k]['
 meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-legs-le
 g[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
 
   $k++;
   }
 
 My thinking is that the $data-legs-leg[$k]['legId'] is the 
 legId and I
 might use that as a key. This however does not work.
 
 I would appreciate some guidance on how I might get this to work.
 
 Regards
 
 Richard Luckhurst
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007 3:27 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007
3:27 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
What if you put $temp = $data-legs-leg[$k]['legId'];
And then put that into $legrow[$temp];

Do you have anything in $temp?

Jake


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, March 24, 2007 11:27 PM
 To: php-general@lists.php.net
 Subject: [PHP] Array Question
 
 Hi All
 
 I am having a bit of trouble with PHP arrays and would 
 appreciate some help.
 
 I currently have the following piece of code
 
   $count=count($data-legs-leg);
   $k=0;
   while($k  $count)
 {
   
 $legrow[$k]=$data-legs-leg[$k]['legId'].$VM.$data-legs-leg
 [$k]['depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-
 legs-leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$V
 M.$data-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'
 ].$VM.$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['mil
 es'].$VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[
 $k]['meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-leg
 s-leg[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
 
   $k++;
   }
 
 This works fine extracting the leg attributes from the legs array and
 putting the data into a new legrow array delimited by $VM.
 
 I can do a print_r($legrow); and I get the rows displayed 
 correctly. I can
 also access any row by using $legrow[n] where n is the key number.
 
 What I want to do is to find a way of indexing the array 
 using the legId
 as the key if possible. In other words I want to extract the 
 row where the
 legId has a particular value where I do not know the row key.
 
 I have been thinking that this might be possible with an 
 associative array
 but my attempts to do this have not worked.
 
 What I have tried is as follows
 
 $count=count($data-legs-leg);
   $k=0;
   while($k  $count)
 {
   
 $legrow[$data-legs-leg[$k]['legId']]=$data-legs-leg[$k][
 'depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-legs-
 leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$VM.$da
 ta-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'].$VM
 .$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['miles'].
 $VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[$k]['
 meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-legs-le
 g[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
 
   $k++;
   }
 
 My thinking is that the $data-legs-leg[$k]['legId'] is the 
 legId and I
 might use that as a key. This however does not work.
 
 I would appreciate some guidance on how I might get this to work.
 
 Regards
 
 Richard Luckhurst
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007 3:27 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007
3:27 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: My own captcha from 2 years ago......

2007-03-24 Thread Jake McHenry
 Sorry.. Was playing around with dates and how long I've been sitting
here watching this generate random numbers. Lol .. The only lines
referring to the captcha are the img lines... As you can tell... Calling
the next script... Should I do it this way? I'm pretty sure that is the
problem, cause the session variable is being created and set in that second
script which is called  Session[security_code] is created in rnum1.php,
and session[code] is created in rnum2.php... Which I didn't include here...
But is the same concept only bigger.

Index.php 
?php
session_start();
header(Refresh: 1);

$before = $_SESSION['security_code'];

echo img src='rnum1.php';

$after = $_SESSION['security_code'];

if (!isset($_SESSION['start_time']))
{
  $_SESSION['start_time'] = time();
}
else
{
  $_SESSION['current_time'] = time();
}

$running_time = mktime(date(H, $_SESSION['current_time'])-date(H,
$_SESSION['start_time']), date(i, $_SESSION['current_time'])-date(i,
$_SESSION['start_time']), date(s, $_SESSION['current_time'])-date(s,
$_SESSION['start_time']), date(m, $_SESSION['start_time']), date(d,
$_SESSION['start_time']), date(Y, $_SESSION['start_time']));

echo 'brBefore: ' . $before . 'brAfter: ' . $after . 'brTime: ' .
date(H:i:s m-d-Y, $running_time) . 'brimg src=rnum2.phpbr' .
$_SESSION['code'];

? 




Rnum1.php

?php
session_start();

header(Content-type: image/png);

$_SESSION['security_code'] = $code = rand(1000,);

//width, height
$im = @ImageCreate(40, 20) or die(There is an error Jake);

// R, G, B
$background_color = ImageColorAllocate($im, 255, 255, 255);

//R, G, B
$text_color = ImageColorAllocate($im, 0, 0, 0);

//font size, left margin, top margin
ImageString($im, 10, 3, 3, $code, $text_color);

//display image
ImagePNG($im);

?










 -Original Message-
 From: itoctopus [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, March 25, 2007 12:49 AM
 To: php-general@lists.php.net
 Subject: [PHP] Re: My own captcha from 2 years ago..
 
 Hey Jake,
 I checked the thing, and I tell you I did lots and lots of 
 captchas in my
 life and they mainly rely on the session.
 Is it possible for you to post the script so that me (or 
 anyone else for
 that matter) fix it for you?
 
 Take care,
 
 --
 itoctopus - http://www.itoctopus.com
 Jake McHenry [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Well, I've been creating my own... Since like two years 
 ago... Lol.. But
  this is the KNOWN name now. Anyways... How can I get 
 the info from the
  image creation script back to my main script? Sessions DO 
 NOT WORK! They
  give me the previous entry instead of the current.. Which 
 obviously won't
  work... This was on the back burner for a long time, but my 
 boss said
 .
  Oh wow.. That looks cool... And I told him I had started it 
 a long time
  ago.. But never finished it cause he told me to work on 
 something else...
  Anyways... U can see what I mean http://nittanytravel.com:8080/
 
  The numbers surrounding the images displayed are session 
 values created in
  the image scripts...which as you will see are the previous 
 value It
 may
  be a simple fix.. But once again... I'm tired... And had 
 one too many long
  island iced teas tonight to think about this. And 
 yes... My boss works
  me even on saturdays after happy hour :(
 
 
  Thanks,
  Jake
 
 
  --
  No virus found in this outgoing message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007
  3:27 PM
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007 3:27 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007
3:27 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
 What is the result your getting?

Jake
 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, March 24, 2007 11:57 PM
 To: Jake McHenry
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] Array Question
 
 Hi Jake
 
 I tried that and got the same result.
 
 Regards
 
 Richard
 
  What if you put $temp = $data-legs-leg[$k]['legId'];
  And then put that into $legrow[$temp];
 
  Do you have anything in $temp?
 
  Jake
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Saturday, March 24, 2007 11:27 PM
  To: php-general@lists.php.net
  Subject: [PHP] Array Question
 
  Hi All
 
  I am having a bit of trouble with PHP arrays and would
  appreciate some help.
 
  I currently have the following piece of code
 
 $count=count($data-legs-leg);
 $k=0;
 while($k  $count)
   {
 
  $legrow[$k]=$data-legs-leg[$k]['legId'].$VM.$data-legs-leg
  [$k]['depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-
  legs-leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$V
  M.$data-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'
  ].$VM.$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['mil
  es'].$VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[
  $k]['meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-leg
  s-leg[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
 
 $k++;
 }
 
  This works fine extracting the leg attributes from the 
 legs array and
  putting the data into a new legrow array delimited by $VM.
 
  I can do a print_r($legrow); and I get the rows displayed
  correctly. I can
  also access any row by using $legrow[n] where n is the key number.
 
  What I want to do is to find a way of indexing the array
  using the legId
  as the key if possible. In other words I want to extract the
  row where the
  legId has a particular value where I do not know the row key.
 
  I have been thinking that this might be possible with an
  associative array
  but my attempts to do this have not worked.
 
  What I have tried is as follows
 
  $count=count($data-legs-leg);
 $k=0;
 while($k  $count)
   {
 
  $legrow[$data-legs-leg[$k]['legId']]=$data-legs-leg[$k][
  'depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-legs-
  leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$VM.$da
  ta-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'].$VM
  .$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['miles'].
  $VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[$k]['
  meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-legs-le
  g[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
 
 $k++;
 }
 
  My thinking is that the $data-legs-leg[$k]['legId'] is the
  legId and I
  might use that as a key. This however does not work.
 
  I would appreciate some guidance on how I might get this to work.
 
  Regards
 
  Richard Luckhurst
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/731 - Release
  Date: 3/23/2007 3:27 PM
 
 
 
  --
  No virus found in this outgoing message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007
  3:27 PM
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007 3:27 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007
3:27 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
Like I said.. I'm half crocked... So I'm trying my best here... Give me some
time...

   What if you put $temp = $data-legs-leg[$k]['legId']; 

Does $temp have anything in it?


Jake


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, March 25, 2007 12:09 AM
 To: Jake McHenry
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] Array Question
 
 Hi Jake
 
 I am getting nothing at all.
 
 Regards
 
 Richard
 
   What is the result your getting?
 
  Jake
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Saturday, March 24, 2007 11:57 PM
  To: Jake McHenry
  Cc: php-general@lists.php.net
  Subject: RE: [PHP] Array Question
 
  Hi Jake
 
  I tried that and got the same result.
 
  Regards
 
  Richard
 
   What if you put $temp = $data-legs-leg[$k]['legId'];
   And then put that into $legrow[$temp];
  
   Do you have anything in $temp?
  
   Jake
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: Saturday, March 24, 2007 11:27 PM
   To: php-general@lists.php.net
   Subject: [PHP] Array Question
  
   Hi All
  
   I am having a bit of trouble with PHP arrays and would
   appreciate some help.
  
   I currently have the following piece of code
  
   $count=count($data-legs-leg);
   $k=0;
   while($k  $count)
 {
  
   $legrow[$k]=$data-legs-leg[$k]['legId'].$VM.$data-legs-leg
   [$k]['depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-
   legs-leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$V
   M.$data-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'
   ].$VM.$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['mil
   es'].$VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[
   $k]['meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-leg
   s-leg[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
  
   $k++;
   }
  
   This works fine extracting the leg attributes from the
  legs array and
   putting the data into a new legrow array delimited by $VM.
  
   I can do a print_r($legrow); and I get the rows displayed
   correctly. I can
   also access any row by using $legrow[n] where n is the 
 key number.
  
   What I want to do is to find a way of indexing the array
   using the legId
   as the key if possible. In other words I want to extract the
   row where the
   legId has a particular value where I do not know the row key.
  
   I have been thinking that this might be possible with an
   associative array
   but my attempts to do this have not worked.
  
   What I have tried is as follows
  
   $count=count($data-legs-leg);
   $k=0;
   while($k  $count)
 {
  
   $legrow[$data-legs-leg[$k]['legId']]=$data-legs-leg[$k][
   'depApt'].$VM.$data-legs-leg[$k]['depTime'].$VM.$data-legs-
   leg[$k]['dstApt'].$VM.$data-legs-leg[$k]['arrTime'].$VM.$da
   ta-legs-leg[$k]['equip'].$VM.$data-legs-leg[$k]['fNo'].$VM
   .$data-legs-leg[$k]['cr'].$VM.$data-legs-leg[$k]['miles'].
   $VM.$data-legs-leg[$k]['elapsed'].$VM.$data-legs-leg[$k]['
   meals'].$VM.$data-legs-leg[$k]['smoker'].$VM.$data-legs-le
   g[$k]['stops'].$VM.$data-legs-leg[$k]['eticket'];
  
   $k++;
   }
  
   My thinking is that the $data-legs-leg[$k]['legId'] is the
   legId and I
   might use that as a key. This however does not work.
  
   I would appreciate some guidance on how I might get 
 this to work.
  
   Regards
  
   Richard Luckhurst
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
   --
   No virus found in this incoming message.
   Checked by AVG Free Edition.
   Version: 7.5.446 / Virus Database: 268.18.17/731 - Release
   Date: 3/23/2007 3:27 PM
  
  
  
   --
   No virus found in this outgoing message.
   Checked by AVG Free Edition.
   Version: 7.5.446 / Virus Database: 268.18.17/731 - Release
  Date: 3/23/2007
   3:27 PM
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
  --
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/731 - Release
  Date: 3/23/2007 3:27 PM
 
 
 
  --
  No virus found in this outgoing message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007
  3:27 PM
 
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/731 - Release 
 Date: 3/23/2007 3:27 PM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007
3:27 PM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php support

2007-03-23 Thread Jake McHenry
Look at phpinfo(), you probably don't have PQSql support installed...

Jake
 

 -Original Message-
 From: Richard Dunne [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 23, 2007 1:31 PM
 To: php-general@lists.php.net
 Subject: [PHP] php support
 
 Can anyone tell me where to get support for this?  php5 
 undefined function pg_connect() 
 Is there a specific mailig list fro users?
 
 Thanks,
 
 Richard Dunne
 
 
  
 __
 __
 Expecting? Get great news right away with email Auto-Check. 
 Try the Yahoo! Mail Beta.
 http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Configure question

2007-03-23 Thread Jake McHenry
I searched the archives... Haven't seen an answer to this yet

Does anyone know why Virtual Directory Support is enabled on windows, but
disabled on unix? And what exactly is it? I know I can enable it by
--enable-maintainer-zts, but it says in configure that it is Thread Safety
for code maintainers only What exactly does this do? I found one
reference by google that says funky stuff may happen with this enabled...??
I haven't tested it, I could try and let everyone know, but thought I would
ask first.


Thanks,
Jake

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Alternatives to PHPLib for authentication, session management, etc

2007-03-23 Thread Jake McHenry
If it still works, then why switch? I wrote my own auth routines Phplib
was last released last summer? That's not TOO old
http://phplib.sourceforge.net/

Jake


 
 Hi.
 
 Been using PHP since the 2.0 days, and been using PHPLib 
 since 2000 as 
 the main method of user authentication (logging in/out during same 
 session), and simultaneously use it to give the users who are 
 logged in different permissions.
 
 Since PHPLib has long ago stopped (at least in my opinion) active 
 development, I am wondering what other systems people use to 
 deal with 
 authentication and permission levels.
 
 I'd love to hear about complete libraries/methods that I could use as 
 a replacement for PHPLib with the minimum of fuss.
 
 
 
 As an example, in the pages I do NOT want to protect, I 
 merely need to 
 create a variable: $AUTHENTICATION = off;
 and my global includes check for that:
 
 if ($AUTHENTICATION != off) {
 page_open(
array(sess = Example_Session,
  auth = Example_Auth,
  perm = Example_Perm));
 }
 
 Which causes PHPLib authentication to be ignored for that 
 page.  Every 
 other page authenticates via the page_open() function.  
 PHPLib does it 
 all behind the sceneswhich makes it very easy.
 
 
 So, basically I'm looking for a system that works better than what 
 I've got w/ PHPLib, that will be fairly easy to maintain  -- as well 
 as drop-in as a replacement in the 100s of websites that I've 
 developed that use that authentication scheme.
 
 Thanks in advance,
 mark
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] High quality image resizing

2007-03-23 Thread Jake McHenry
 
  On Fri, March 23, 2007 10:57 am, Markus Fischer wrote:
  I'm searching for a high quality image resizing facility to be used
  within PHP in an Unix/Linux environment.
 
  Probably everyone will now answer: imagecopyresampled()
 
  However, the quality of that functionality doesn't match the
  expectations of our designers. I've done my tests with 
 PHP4 and GD  
  lib
  2.0.33 and everything produces with them got rejected so far. I was
  also
  going through the comments on php.net regarding self-written  
  Bicubical
  algorithm functions, yet their outcome didn't match.
 
  My next step was to try ImageMagick. The quality is much 
 better when
  using the 'mogrify' tool from this package, yet not good enough  
  for my
  designers.
 
  Of course, their expectations are very high because of their daily
  usage
  of Photoshop. During my research I was running over
  http://resizr.lord-lance.com/ which uses an commercial Windows
  library.
  Using a commercial package would be completely fine for 
 me, however I
  just haven't found anything, thus this message.
 
  Whether the tool is a PHP library or just an ordinary Unix command
  doesn't matter, as long as it is usable from within PHP.
 
 
 What are their expectations and what is the use for the final output?
 
 Also, what are they saying is wrong with the files? (I'm guessing  
 they are to 'fuzzy', that's the main gripe I have with GD. But it  
 doesn't stop me from using it to resize images for a web 
 page, unless  
 you're resizing large images with text down to a 'usable' size.)
 
 Are they just being 'designers' and nothing is going to be good  
 enough but photoshop?
 
 Maybe PHP/Unix isn't the way to go?
 
 Ed
 

Yea.. Go mac if you want the best for pics :) and its still unix :

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What is wrong with this function please?

2007-03-23 Thread Jake McHenry
I take it there are no errors... And your using windows... Sending to
exchange... I guess with seeing what you posted, I would start by echoing
out what you have in  $to, $subject, $msg, $headers. Are there any errors in
Exchange logs? Do you see the message coming into Exchange queue?

Jake


 -Original Message-
 From: Robin Wilson [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 23, 2007 9:53 PM
 To: php-general@lists.php.net
 Subject: [PHP] What is wrong with this function please?
 
 Hello
 
 I'm trying to do a function that emails users and sends an 
 attachment. But I 
 think something is in the wrong order or something as when I send it 
 Exchange discards it.
 
 This is the function which I have put together from various sources:
 
 I would really appreciate any help as I have been up half the 
 night and got 
 nowhere!
 Thanks
 Robin
 
 function sendMail($to, $toName, $from, $fromName, $subject, $message, 
 $uploadfile, $fileName, $fileType, $fileSize) {
  $eol=\r\n;
   $mime_boundary=md5(time());
 
   # Common Headers
   $headers .= 'From: '. $fromName .' '. $from .''.$eol;
   $headers .= 'Reply-To: '. $toName .' '. $to .''.$eol;
   $headers .= 'Return-Path: '. $fromName.' '. $from 
 .''.$eol;// these 
 two to set reply address
   $headers .= Message-ID: 
 .$mime_boundary.@.$_SERVER['SERVER_NAME']..$eol;
   $headers .= X-Mailer: PHP v.phpversion().$eol;  
 // These two to 
 help avoid spam-filters
 
   # Boundry for marking the split  Multitype Headers
   $headers .= 'MIME-Version: 1.0'.$eol;
   $headers .= Content-Type: multipart/related; 
 boundary=\.$mime_boundary.\.$eol;
 
  $msg =  ;
 
  if ($uploadfile != ) {
   # File for Attachment
$file_name = substr($uploadfile, (strrpos($uploadfile, 
 /)+1));
 
$handle=fopen($uploadfile, 'rb');
$f_contents=fread($handle, $fileSize);
$f_contents=chunk_split(base64_encode($f_contents));   
  //Encode The 
 Data For Transition using base64_encode();
fclose($handle);
 
# Attachment
$msg .= --.$mime_boundary.$eol;
$msg .= Content-Type: .$fileType.; 
 name=\.$file_name.\.$eol;
$msg .= Content-Transfer-Encoding: base64.$eol;
$msg .= Content-Disposition: attachment; 
 filename=\.$file_name.\.$eol.$eol; // !! This line needs 
 TWO end of 
 lines !! IMPORTANT !!
$msg .= $f_contents.$eol.$eol;
  }
 
  # Setup for text OR html
$msg .= Content-Type: multipart/alternative.$eol;
 
# Text Version
$msg .= --.$mime_boundary.$eol;
$msg .= Content-Type: text/plain; charset=iso-8859-1.$eol;
$msg .= Content-Transfer-Encoding: 8bit.$eol;
$msg .= strip_tags(str_replace(br, \n, $message)).$eol.$eol;
 
# HTML Version
$msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
$msg .= Content-Transfer-Encoding: 8bit.$eol;
$msg .= $message.$eol.$eol;
 
# Finished
$msg .= --.$mime_boundary.--.$eol.$eol;  // finish 
 with two eol's for 
 better security. see Injection.
 
 
  // Mail it
  mail($to, $subject, $msg, $headers);
 } 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What is wrong with this function please?

2007-03-23 Thread Jake McHenry
Have you changed anything in an hour? I'm too lazy to compare the two
emails...

Jake 

 -Original Message-
 From: Robin Wilson [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 23, 2007 10:46 PM
 To: php-general@lists.php.net
 Subject: [PHP] What is wrong with this function please?
 
 Hello
 
 I'm trying to do a function that emails users and sends an 
 attachment. But I 
 think something is in the wrong order or something as when I send it 
 Exchange discards it.
 
 This is the function which I have put together from various sources:
 
 I would really appreciate any help as I have been up half the 
 night and got 
 nowhere!
 Thanks
 Robin
 
 function sendMail($to, $toName, $from, $fromName, $subject, $message, 
 $uploadfile, $fileName, $fileType, $fileSize) {
  $eol=\r\n;
   $mime_boundary=md5(time());
 
   # Common Headers
   $headers .= 'From: '. $fromName .' '. $from .''.$eol;
   $headers .= 'Reply-To: '. $toName .' '. $to .''.$eol;
   $headers .= 'Return-Path: '. $fromName.' '. $from 
 .''.$eol;// these 
 two to set reply address
   $headers .= Message-ID: 
 .$mime_boundary.@.$_SERVER['SERVER_NAME']..$eol;
   $headers .= X-Mailer: PHP v.phpversion().$eol;  
 // These two to 
 help avoid spam-filters
 
   # Boundry for marking the split  Multitype Headers
   $headers .= 'MIME-Version: 1.0'.$eol;
   $headers .= Content-Type: multipart/related; 
 boundary=\.$mime_boundary.\.$eol;
 
  $msg =  ;
 
  if ($uploadfile != ) {
   # File for Attachment
$file_name = substr($uploadfile, (strrpos($uploadfile, 
 /)+1));
 
$handle=fopen($uploadfile, 'rb');
$f_contents=fread($handle, $fileSize);
$f_contents=chunk_split(base64_encode($f_contents));   
  //Encode The 
 Data For Transition using base64_encode();
fclose($handle);
 
# Attachment
$msg .= --.$mime_boundary.$eol;
$msg .= Content-Type: .$fileType.; 
 name=\.$file_name.\.$eol;
$msg .= Content-Transfer-Encoding: base64.$eol;
$msg .= Content-Disposition: attachment; 
 filename=\.$file_name.\.$eol.$eol; // !! This line needs 
 TWO end of 
 lines !! IMPORTANT !!
$msg .= $f_contents.$eol.$eol;
  }
 
  # Setup for text OR html
$msg .= Content-Type: multipart/alternative.$eol;
 
# Text Version
$msg .= --.$mime_boundary.$eol;
$msg .= Content-Type: text/plain; charset=iso-8859-1.$eol;
$msg .= Content-Transfer-Encoding: 8bit.$eol;
$msg .= strip_tags(str_replace(br, \n, $message)).$eol.$eol;
 
# HTML Version
$msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
$msg .= Content-Transfer-Encoding: 8bit.$eol;
$msg .= $message.$eol.$eol;
 
# Finished
$msg .= --.$mime_boundary.--.$eol.$eol;  // finish 
 with two eol's for 
 better security. see Injection.
 
 
  // Mail it
  mail($to, $subject, $msg, $headers);
 }
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Configure question

2007-03-23 Thread Jake McHenry
I scanned over it quick.. Looks interesting.. Thanks :) I'll get into it
more tomorrow

Jake 

 -Original Message-
 From: Jochem Maas [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 23, 2007 7:58 PM
 To: Jake McHenry
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Configure question
 
 Jake McHenry wrote:
  I searched the archives... Haven't seen an answer to this yet
  
  Does anyone know why Virtual Directory Support is enabled 
 on windows, but
  disabled on unix? And what exactly is it? I know I can enable it by
  --enable-maintainer-zts, but it says in configure that it 
 is Thread Safety
  for code maintainers only What exactly does this do? I found one
  reference by google that says funky stuff may happen with 
 this enabled...??
  I haven't tested it, I could try and let everyone know, but 
 thought I would
  ask first.
 
 I can't really give you an answer that is worth ,
 but this blog post might interest you:
 
 http://blog.libssh2.org/index.php?/archives/22-What-the-heck-i
 s-TSRMLS_CC-anyway.html
 
 also I would recommend searching the internals list archives 
 - stuff like this
 gets discussed there more and more often.
 
  
  
  Thanks,
  Jake
  
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question before upgrading to 5

2007-03-23 Thread Jake McHenry
Yea, that's what I was planning on doing, but the way I had my original
configure options file set up it would have over written php4... Which turns
out after my testing today it would have been ok :) ... But I installed a
new copy of apache and php just to be safe... It only took an extra 10
minutes... No biggie.. 

Thanks 
Jake
 

 -Original Message-
 From: Richard Lynch [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 23, 2007 8:59 PM
 To: Jake McHenry
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] Question before upgrading to 5
 
 On Thu, March 22, 2007 6:23 am, Jake McHenry wrote:
 
  Sorry about the delivery and read requests.. I was tired 
 and forgot to
  turn
  them off for the list..
 
  alternatively you can search for 'Rasmus' and 'ProxyPass' in the
  list
  archive and use Rasmus' rather cool ProxyPass solution to running
  both
  php4 and php5 ... his explanation should give you enough info
  to set it up.
 
 
  I don't need them running parallel, only both installed
 
 In that case, carefully commenting in/out the right LoadModule and so
 on in httpd.conf should let you switch back and forth.
 
 Just be sure to re-start Apache after you change.
 
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question before upgrading to 5

2007-03-22 Thread Jake McHenry

Sorry about the delivery and read requests.. I was tired and forgot to turn
them off for the list..

 alternatively you can search for 'Rasmus' and 'ProxyPass' in the list
 archive and use Rasmus' rather cool ProxyPass solution to running both
 php4 and php5 ... his explanation should give you enough info 
 to set it up.
 

I don't need them running parallel, only both installed

 Tijnema ! wrote:
  On 3/22/07, Jake McHenry [EMAIL PROTECTED] wrote:
  Hi everyone,
 
  I just got done going through all my configure options for 
 php5, and
  finally
  configure finished successfully... I didn't install it yet, have a
  question.
  Can I have both 4 and 5 installed temporarily until I'm sure all my
  scripts
  work ok? They should, I've been careful, but I want to be 
 sure since
  this is
  the only server I currently have. I was going to install a virtual
  copy of
  fedora and do testing, but I don't have time, hopefully someone can
  answer.
  I think I just have to change the prefix to something other than
  default and
  load the new module in httpd. If I had more time I would 
 do this the
  right
  way, but we all know how that goes...
 
  If this will work, I can then just uninstall 4.. Hopefully 
 it won't break
  anything.
 
  I'll post my configure options if anyone would like to 
 double check
 
  Thanks,
  Jake
  
  If you use make install on the second one, it will add the libphp5
  library to your httpd.conf, and then you would have libphp4 and
  libphp5 in your httpd.conf. That is guaranteed to give 
 problems. So if
  you comment out one of the 2, then it works fine.


Yes, I just wanted to make sure I only needed to change the prefix to get
them both installed

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.16/729 - Release Date: 3/21/2007
7:52 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question before upgrading to 5

2007-03-22 Thread Jake McHenry
I don't want 2 instances of apache running,  your over thinking this... I
only asked if I need to change only the prefix, or if there is anything
else, to get both php versions installed. Once I see my scripts are working
ok, or not, I'll be getting rid of php4. I'm not running a dev machine, this
is production, and the only one I have currently, my backup died last week
and I haven't gotten the parts for it yet. Is prefix the only option I need
to change? Or do I need to change these too?

--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-exec-dir=/usr/bin \


Thanks,
Jake

 Jake McHenry wrote:
  Sorry about the delivery and read requests.. I was tired 
 and forgot to turn
  them off for the list..
  
  alternatively you can search for 'Rasmus' and 'ProxyPass' 
 in the list
  archive and use Rasmus' rather cool ProxyPass solution to 
 running both
  php4 and php5 ... his explanation should give you enough info 
  to set it up.
 
  
  I don't need them running parallel, only both installed
 
 I think you missed the point. you would have 2 apaches 
 running, that is correct
 but the trick is to set it up so that they use the same document roots
 for each site that you are trying to convert.
 
 the beauty of this is that you can literally run the same 
 site in php5 and php4
 simulaneously with urls something *like*:
 
 php4.mydevsite.com
 php5.mydevsite.com(ProxyPassed to 'inner' apache)
 
 
 were HOSTS file contains:
 
 127.0.0.1 php4.mydevsite.com php5.mydevsite.com
 
 and both outer and inner apache's use the same docroot for 
 the given site.
 
 obviously it's just one way of setting up a comfortable dev 
 environment - as long
 as you have something that allows you to doo your tihng 
 without to much pain then thats
 the main thing :-)
 
 
 
  
  Tijnema ! wrote:
  On 3/22/07, Jake McHenry [EMAIL PROTECTED] wrote:
  Hi everyone,
 
  I just got done going through all my configure options for 
  php5, and
  finally
  configure finished successfully... I didn't install it 
 yet, have a
  question.
  Can I have both 4 and 5 installed temporarily until I'm 
 sure all my
  scripts
  work ok? They should, I've been careful, but I want to be 
  sure since
  this is
  the only server I currently have. I was going to install 
 a virtual
  copy of
  fedora and do testing, but I don't have time, hopefully 
 someone can
  answer.
  I think I just have to change the prefix to something other than
  default and
  load the new module in httpd. If I had more time I would 
  do this the
  right
  way, but we all know how that goes...
 
  If this will work, I can then just uninstall 4.. Hopefully 
  it won't break
  anything.
 
  I'll post my configure options if anyone would like to 
  double check
  Thanks,
  Jake
  If you use make install on the second one, it will add the libphp5
  library to your httpd.conf, and then you would have libphp4 and
  libphp5 in your httpd.conf. That is guaranteed to give 
  problems. So if
  you comment out one of the 2, then it works fine.
  
  
  Yes, I just wanted to make sure I only needed to change the 
 prefix to get
  them both installed
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Performance: While or For loop

2007-03-22 Thread Jake McHenry
 does this help?

http://www.php.lt/benchmark/phpbench.php

Jake



 -Original Message-
 From: Tijnema ! [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 22, 2007 4:38 PM
 To: PHP
 Subject: [PHP] Performance: While or For loop
 
 Hi,
 
 Does somebody has benchmarks of what is faster, while or for loop?
 
 Thanks,
 
 Tijnema
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Creating an FTP account on the fly from PHP

2007-03-22 Thread Jake McHenry
 
 On 3/22/07, PHP Fusebox [EMAIL PROTECTED] wrote:
  I built a CMS that lets a super user create and manage basic users
  (among lots of other things). I want basic users to get an 
 FTP account
  that is automatically associated with their website user 
 account, and
  managed from my add/edit user form. For example if I create a user
  named [EMAIL PROTECTED] for him to login to my web app, I want my
  users to be able to use their same login name and password to access
  their web folder via FTP.
 
  I am running on LAMP on a CPanel server with ProFTP as the 
 FTP server
  software, but I have no clue how to get PHP to be able to create,
  edit, or delete an FTP account. Can someone point me in the right
  direction?
 
  I can see the Form field names and URLs in the CPanel forms 
 where this
  is set up, but is it safe to CURL these same URLs from my app? That
  seems like a big security risk.
 
 
  Thanks,
  Geoff
 
 Let's start with the end, it is a big security hole, as you would need
 to enter your reseller account info in the curl options. Which might
 be traced somewhere.
 
 I'm not sure how ProFTP is set up, but might it be that it is working
 for every local user? So that if you create a new user on your system,
 that it can also login through FTP. That's quite common for such
 things as CPanel. I never used CPanel or such on my own development
 server so i don't know, but i think it works like above, and you
 should just create a new user with useradd from within PHP with the
 exec function.
 
 Tijnema
 

Make sure your system is secure, users created are in their own group and
can't get to anything... Can't run anything, etc. I made that mistake a long
time ago when I was first starting out.. Ended up with a root kit installed
 Yippe

Jake

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question before upgrading to 5

2007-03-22 Thread Jake McHenry
 I'll think about it.. We only use php for intranet applications I create,
so the server is basically dead at nights, which is when I do most of my
work.



 
 Jake McHenry wrote:
  I don't want 2 instances of apache running,  your over 
 thinking this... I
 
 whatever, I guess we have different opinions about trying to 
 do things 'properly'.
 
 
 
  only asked if I need to change only the prefix, or if there 
 is anything
  else, to get both php versions installed. 
 
 so you have 2 versions of php installed. you can't run the 
 apache module of both
 version simultaneously. so your going to shut down apache on 
 a production box
 and then fiddle the config to run with the php5 module and 
 bring it back up.



The original config is from OS installation, so who knows what I could mess
up by doing this, this is why I'm asking, cause I don't want to screw up
php, apache would be just more to add on to it



 
 then what? you hope that all your sites/code runs okay with 
 php5? if it doesn't
 you can only fix it if you keep running with the broken sites 
 on php5 otherwise you
 can only unfiddle the config and stick with php4. no?
 



Its only 1 line in httpd.conf, just change from php4 module to php5
module. Not that big of a deal



  Once I see my scripts are working
  ok, or not, I'll be getting rid of php4. I'm not running a 
 dev machine, this
  is production, and the only one I have currently, 
 
 you might consider that the machine whose screen your looking 
 at whilst reading this
 is a perfectly good dev machine - you seem to on a windows 
 PC, which of itself is not
 a problem in terms of setting up a dev environment that 
 suitably mirrors the apache/php/DB
 configuration of your production server but you may have 
 issues with 'your' php code itself
 depending the [OS] portability of the code.



Most of my stuff works on windows too, but some of the earlier scripts
accessing files don't work,, I've already considered moving the site to my
desktop while I upgrade the server.. But no



 
 given that the server in question is a production server 
 there is even more reason to
 not disrupt service whilst testing your code on php5 - which 
 is exactly what a second
 [temporary, custom] install of apache would allow you to do. 
 sure it's a bit more work
 but it's also more professional - it means you can update the 
 'real' apache to run php5
 in the safe knowledge that it will *work* with only a few 
 seconds of down time whilst
 you restart the webserver process.
 
  my backup died last week
  and I haven't gotten the parts for it yet. Is prefix the 
 only option I need
  to change? Or do I need to change these too?
 
 no just change prefix. (although I'm not 100% sure about 
 localstatedir - I have never touched myself
 and I do run various machines that have php4 and php5 
 installed [compiled by hand as you are doing])
 
 btw - installing a second apache is rather the same as 
 installing a second copy of
 php in so far as you can also specify a custom prefix to have 
 it install (and read it's config)
 from some other place - so as not to interfere with the 
 production apache.
 



As long as I use prefix, all of these options point to
/prefix/otheroptiondirectories correct? Making prefix the root? So in
the OS installation of PHP and httpd, that's why it left prefix blank, and
put in the values below. So with the config the way it is now... It
would overwrite php4 and I would really be screwed...



  
  --datadir=/usr/share \
  --includedir=/usr/include \
  --libdir=/usr/lib \
  --libexecdir=/usr/libexec \
  --localstatedir=/var \
  --mandir=/usr/share/man \
  --infodir=/usr/share/info \
  --with-exec-dir=/usr/bin \
  
  
  Thanks,
  Jake
  
  Jake McHenry wrote:
  Sorry about the delivery and read requests.. I was tired 
  and forgot to turn
  them off for the list..
 
  alternatively you can search for 'Rasmus' and 'ProxyPass' 
  in the list
  archive and use Rasmus' rather cool ProxyPass solution to 
  running both
  php4 and php5 ... his explanation should give you enough info 
  to set it up.
 
  I don't need them running parallel, only both installed
  I think you missed the point. you would have 2 apaches 
  running, that is correct
  but the trick is to set it up so that they use the same 
 document roots
  for each site that you are trying to convert.
 
  the beauty of this is that you can literally run the same 
  site in php5 and php4
  simulaneously with urls something *like*:
 
  php4.mydevsite.com
  php5.mydevsite.com (ProxyPassed to 'inner' apache)
 
 
  were HOSTS file contains:
 
  127.0.0.1 php4.mydevsite.com php5.mydevsite.com
 
  and both outer and inner apache's use the same docroot for 
  the given site.
 
  obviously it's just one way of setting up a comfortable dev 
  environment - as long
  as you have something that allows you to doo your tihng 
  without to much pain then thats
  the main thing :-)
 
 
 
  Tijnema ! wrote

RE: [PHP] Passing variables

2007-03-22 Thread Jake McHenry
I was going to say the same thing, but was too busy to worry about it



 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 22, 2007 7:14 PM
 To: Tijnema !
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Passing variables
 
 Tijnema ! wrote:
  On 3/22/07, Jeff [EMAIL PROTECTED] wrote:
  I want to thank you all for clearing me up on setting the 
  register_globals
  to ON issue!! I have refrained from doing so and my code 
 is running great
  with the $_GET.
 
  I am having NO trouble passing my single variable to the 
 next page 
  using..
 
  echo A href=\char_edit_form.php?charid=$charid\Edit/A;
 
  as when the next page that load actually shows the 
 character info, so
  basically you can see you are dealing with the correct record.
 
  NOW.
 
  I want to pass two variables to a delete page. The charid 
 and the char 
  name.
  Here is what I have but it will only pass the 1st variable ?charid
 
  echo A href=\delete_char.php?charid=$charid
  ?char=.$myrow[char_name].\Delete/A;
 
  I get the 1st variable using the $charid = 
 (int)$_GET['charid']; (on the
  next page)
 
  I do however NOT get
 
  $charname = $_GET[char] to pull the name out. (on the next page)
 
  I've tried putting a comma, a , a % between the variables ie..
 
  echo A href=\delete_char.php?charid=$charid 
  ?char=.$myrow[char_name].\Delete/A;
 
  but it just won't let me pull the $_GET[char]
 
  I have even tried $_GET['char'] but am under the 
 impression '_' are for
  integers and _ are for text?
  This is bullshit, ' and  do the same.
 
 There's no need to swear at someone for asking a question.
 
 And there is a difference between ' and :
 
 ?php
 $animal = 'dog';
 echo 'I have a $animal as a petbr/\n';
 echo I have a $animal as a petbr/\n;
 ?
 
 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Date functions differences between php 4 and 5

2007-03-22 Thread Jake McHenry

I just asked this a bit ago. Time and Date seem to be the same, but
strtotime is definitly different, as that was what broke in my script in
php4, and I was told it worked as expected in php5.
 

 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 22, 2007 7:18 PM
 To: Paul Nowosielski
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Date functions differences between php 4 and 5
 
 Paul Nowosielski wrote:
  Dear All,
  
  I was wondering if there are any major date function 
 changes between php4 and 
  5.
 
 I don't think so but check the docs: 
 http://www.php.net/manual/en/faq.migration5.php
 
  When I say date function I mean mktime() , date() ,strtotime() etc.
  
  Here is my dilemma, I've upgraded from php4 to php5. there 
 is some very old 
  legacy code that is not working correctly. 
  
  Specifically on our sales calendar.  Some task show up but 
 most don't.
  I have the old site and the new upgraded site on the same db.
  When entering a new task on the calendar, tasks enter w/ 
 the new system show 
  up on the new system and not on the old. Most old tasks 
 don't show up on the 
  new.
 
 That could be a register_globals issue - there's no way for 
 us to know 
 what's going on without seeing the code.
 
 Time to start digging.
 
 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] close session when browser is closed

2007-03-22 Thread Jake McHenry
Also, on a daily basis last week after a windows update glitch... I had to
kill rogue IE processes after it was closed, which I found kept some of my
users logged in, which was fun...

 
 Travis Doherty wrote:
  By default the session cookie expires when the browseris closed.
 this is not always true: f.e. FF requires *all* open windows 
 to be closed to
 forget that session.
 
 If the browser refuses the cookie, sessions won't work anyway.  
 again: this is not always true. Only if  
 session.use_only_cookies = 1
 otherwise the session id can alternatively propagate using 
 the query string
 or hidden input fields.
 (if session.use_trans_sid = 1)
 
 just my 2 cent
 
 -- 
 View this message in context: 
 http://www.nabble.com/close-session-when-browser-is-closed-tf3
 443138.html#a9627180
 Sent from the PHP - General mailing list archive at Nabble.com.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Question after php5

2007-03-22 Thread Jake McHenry
Hi everyone,

I decided I would spend the extra time and install separate copies of apache
and php5. All went successfully, I thought. Apache starts and runs on 8080,
I get pages. But not php pages. I added a php.conf file which is included in
httpd.conf, I just copied the layout of the rest of the include statements
and below is my php.conf file in the conf/extra directory What did I
miss? I'm just trying to echo out hello world, and I get a blank page. In
the logs, I'm getting a 304..?



#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_modulemodules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php



Thanks,
Jake

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question after php5

2007-03-22 Thread Jake McHenry
In my index.php file, I have this:


?php
echo PHP hello world;
?

HTML Hello World


I get the HTML Hello World output, but not the php? So the
conf/extra/php.conf file is somewhat being included, but I'm not getting any
output  And now there is a 200 entry in the log file. So with just php,
I get a 304, with html I get a 200, with both I get a 200 but no php
output. What did I miss???

Thanks,
Jake



 
 Hi everyone,
 
 I decided I would spend the extra time and install separate 
 copies of apache
 and php5. All went successfully, I thought. Apache starts and 
 runs on 8080,
 I get pages. But not php pages. I added a php.conf file which 
 is included in
 httpd.conf, I just copied the layout of the rest of the 
 include statements
 and below is my php.conf file in the conf/extra directory 
 What did I
 miss? I'm just trying to echo out hello world, and I get a 
 blank page. In
 the logs, I'm getting a 304..?
 
 
 
 #
 # PHP is an HTML-embedded scripting language which attempts to make it
 # easy for developers to write dynamically generated webpages.
 #
 
 LoadModule php5_modulemodules/libphp5.so
 
 #
 # Cause the PHP interpreter to handle files with a .php extension.
 #
 AddType application/x-httpd-php .php
 # AddType application/x-httpd-php-source .phps
 
 #
 # Add index.php to the list of files that will be served as directory
 # indexes.
 #
 DirectoryIndex index.php
 
 
 
 Thanks,
 Jake
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007
 7:44 AM
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question after php5 SOLVED... For now

2007-03-22 Thread Jake McHenry
I got it working...  During the php install, it modified httpd.conf with
this: LoadModule php5_modulemodules/libphp5.so .. And I moved
that to my php.conf as it was in apache2 with php4, but it doesn't work in
the newest version of apache that I downloaded.. They must have changed it
so that the module must be loaded before something else in httpd.conf
instead of calling it from an external config file..

Ok.. Now off to testing my scripts to see if they'll work under php5..


Jake





 -Original Message-
 From: Jake McHenry [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 22, 2007 10:43 PM
 To: php-general@lists.php.net
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Question after php5
 
 In my index.php file, I have this:
 
 
 ?php
 echo PHP hello world;
 ?
 
 HTML Hello World
 
 
 I get the HTML Hello World output, but not the php? So the
 conf/extra/php.conf file is somewhat being included, but I'm 
 not getting any
 output  And now there is a 200 entry in the log file. So 
 with just php,
 I get a 304, with html I get a 200, with both I get a 200 but no php
 output. What did I miss???
 
 Thanks,
 Jake
 
 
 
  
  Hi everyone,
  
  I decided I would spend the extra time and install separate 
  copies of apache
  and php5. All went successfully, I thought. Apache starts and 
  runs on 8080,
  I get pages. But not php pages. I added a php.conf file which 
  is included in
  httpd.conf, I just copied the layout of the rest of the 
  include statements
  and below is my php.conf file in the conf/extra directory 
  What did I
  miss? I'm just trying to echo out hello world, and I get a 
  blank page. In
  the logs, I'm getting a 304..?
  
  
  
  #
  # PHP is an HTML-embedded scripting language which attempts 
 to make it
  # easy for developers to write dynamically generated webpages.
  #
  
  LoadModule php5_modulemodules/libphp5.so
  
  #
  # Cause the PHP interpreter to handle files with a .php extension.
  #
  AddType application/x-httpd-php .php
  # AddType application/x-httpd-php-source .phps
  
  #
  # Add index.php to the list of files that will be served as 
 directory
  # indexes.
  #
  DirectoryIndex index.php
  
  
  
  Thanks,
  Jake
  
  -- 
  No virus found in this outgoing message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
  Date: 3/22/2007
  7:44 AM
   
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  -- 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
  Date: 3/22/2007 7:44 AM
   
  
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007
 7:44 AM
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.17/730 - Release 
 Date: 3/22/2007 7:44 AM
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Question before upgrading to 5

2007-03-21 Thread Jake McHenry
Hi everyone,

I just got done going through all my configure options for php5, and finally
configure finished successfully... I didn't install it yet, have a question.
Can I have both 4 and 5 installed temporarily until I'm sure all my scripts
work ok? They should, I've been careful, but I want to be sure since this is
the only server I currently have. I was going to install a virtual copy of
fedora and do testing, but I don't have time, hopefully someone can answer.
I think I just have to change the prefix to something other than default and
load the new module in httpd. If I had more time I would do this the right
way, but we all know how that goes...

If this will work, I can then just uninstall 4.. Hopefully it won't break
anything.

I'll post my configure options if anyone would like to double check

Thanks,
Jake

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.16/729 - Release Date: 3/21/2007
7:52 AM
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Limited text fields on phpMyAdmin?

2007-03-16 Thread Jake McHenry

Hey all,

I have a client that uses phpMyAdmin quite a bit as sort of an end user 
type app, but that's another story altogether (they actually get a lot of 
use out of it when they're PHP app won't give them the data the way they 
want.)


But anyway, they've created a table with 9 fields type 'TEXT' and put 
about a paragraph or two into each field, but seemed to have run up 
against a limit there.


I'm pretty surprised that phpMyAdmin would have that kind of a limit 
there, and have checked out the data for any funkiness that might prevent 
it from displaying, but when they select that table to edit a record it 
displays only the top like describing the table and then stops.


Has anyone experienced anything like this with phpMyAdmin? They are 
running 2.5.7. I know they should upgrade and I keep telling them that, 
but they are one these if it ain't broke don't fix it  outfits and have 
been using the same install for a couple of years, and are pretty set in 
their ways.


Thanks!
Skip
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/




MySQL TEXT fields have a limit of 65,000 bytes. If you insert anything 
larger than that in to a normal TEXT field mySQL will silently truncate your 
data without telling you (meaning software checks are probably a good idea). 
MEDIUMTEXT will store 16 million characters and LONGTEXT can handle over 4 
trillion. Check the mysql docs for exact info, but this should help in 
general. The user should be able to change the field type without loosing 
their data.


Jake 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Limited text fields on phpMyAdmin?

2007-03-16 Thread Jake McHenry




On 3/17/07, Skip Evans [EMAIL PROTECTED] wrote:

Hey all,

I have a client that uses phpMyAdmin quite a bit
as sort of an end user type app, but that's
another story altogether (they actually get a lot
of use out of it when they're PHP app won't give
them the data the way they want.)

But anyway, they've created a table with 9 fields
type 'TEXT' and put about a paragraph or two into
each field, but seemed to have run up against a
limit there.

I'm pretty surprised that phpMyAdmin would have
that kind of a limit there, and have checked out
the data for any funkiness that might prevent it
from displaying, but when they select that table
to edit a record it displays only the top like
describing the table and then stops.

Has anyone experienced anything like this with
phpMyAdmin? They are running 2.5.7. I know they
should upgrade and I keep telling them that, but
they are one these if it ain't broke don't fix it


It is broke, so they should fix :)



I still have a copy of phpMyAdmin 2.2.0, works great, but if the text field 
value is over 65k, it will truncate the data.


define a paragraph or two.




outfits and have been using the same install for

a couple of years, and are pretty set in their ways.

Thanks!
Skip
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Limited text fields on phpMyAdmin?

2007-03-16 Thread Jake McHenry

Hey all,

I have a client that uses phpMyAdmin quite a bit 
as sort of an end user type app, but that's 
another story altogether (they actually get a lot 
of use out of it when they're PHP app won't give 
them the data the way they want.)


But anyway, they've created a table with 9 fields 
type 'TEXT' and put about a paragraph or two into 
each field, but seemed to have run up against a 
limit there.


I'm pretty surprised that phpMyAdmin would have 
that kind of a limit there, and have checked out 
the data for any funkiness that might prevent it 
from displaying, but when they select that table 
to edit a record it displays only the top like 
describing the table and then stops.



I did miss this on my first glance, can you edit other records?




Has anyone experienced anything like this with 
phpMyAdmin? They are running 2.5.7. I know they 
should upgrade and I keep telling them that, but 
they are one these if it ain't broke don't fix it 
 outfits and have been using the same install for 
a couple of years, and are pretty set in their ways.


Thanks!
Skip
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] dst and strtotime

2007-03-13 Thread Jake McHenry

A little more info:

strtotime(last monday)  or yesterday, is correct, but strtotime(last 
sunday) gives me 3/10 (saturday), strtotime(last saturday) gives me 3/9 
(Friday), last friday gives me 3/8 thursday.. etc. maybe it will go 
away after a week??




anyone else have anything to add?

thanks,
Jake






On 3/12/07, Jake McHenry [EMAIL PROTECTED] wrote:


Anyone know of anything I can check? I've been trying different things 
all

afternoon and I'm still getting the wrong date from strtotime. date()
works
fine.

Thanks,
Jake

- Original Message -
From: Jake McHenry [EMAIL PROTECTED]
To: PHP-General php-general@lists.php.net
Sent: Monday, March 12, 2007 12:26 PM
Subject: Re: [PHP] dst and strtotime


 yepper

 date
 Mon Mar 12 12:25:33 EDT 2007



Is this from PHP or from bash?
Sometimes those differ...




2007-03-12 17:34:22
2007-03-12 17:34:22


?php
echo `date +%Y-%m-%d %H:%M:%S`;
echo date(Y-m-d H:i:s);
?





Tijnema




 - Original Message -
 From: Peter Lauri [EMAIL PROTECTED]
 To: 'Jake McHenry' [EMAIL PROTECTED]; 'PHP-General'
 php-general@lists.php.net
 Sent: Monday, March 12, 2007 5:23 PM
 Subject: RE: [PHP] dst and strtotime


 Is your system time correct?

 Best regards,
 Peter Lauri

 www.dwsasia.com - company web site
 www.lauri.se - personal web site
 www.carbonfree.org.uk - become Carbon Free




 -Original Message-
 From: Jake McHenry [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 6:10 PM
 To: PHP-General
 Subject: [PHP] dst and strtotime

 Hi everyone,

 I was hoping a problem like this wouldn't arise, but it happened :(

 After the dst updates on my fedora box, this broke, and worked fine
 before..
 now gives me 3/10 instead of 3/11 for strtotime(last sunday)
 anyone
 know why? 3/10 was saturday!



 $recent_period = strtotime('last sunday');
 echo date(Y-m-d, $recent_period);
 print_r($periods);
 $test_recent_period = array_search($recent_period, $periods);
 if ($test_recent_period == '')
   $recent_period = strtotime('last sunday', $recent_period);





 Thanks,
 Jake

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
fedora-list mailing list
[EMAIL PROTECTED]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] dst and strtotime

2007-03-13 Thread Jake McHenry
yes.

echo date(Y-m-d g:i A T, time());
echo date(Y-m-d g:i A T, strtotime(last sunday));

returns 

2007-03-13 12:38 PM EDT
2007-03-10 11:00 PM EST


Thanks,
Jake



  does return the time() command the right date for you?

  Tijnema

   
  On 3/13/07, Jake McHenry [EMAIL PROTECTED] wrote: 
A little more info:

strtotime(last monday)  or yesterday, is correct, but strtotime(last 
sunday) gives me 3/10 (saturday), strtotime(last saturday) gives me 3/9
(Friday), last friday gives me 3/8 thursday.. etc. maybe it will go
away after a week??


 anyone else have anything to add? 

 thanks,
 Jake




 On 3/12/07, Jake McHenry [EMAIL PROTECTED] wrote:
 
 Anyone know of anything I can check? I've been trying different things
 all
 afternoon and I'm still getting the wrong date from strtotime. date()
 works 
 fine.

 Thanks,
 Jake

 - Original Message -
 From: Jake McHenry  [EMAIL PROTECTED]
 To: PHP-General php-general@lists.php.net
 Sent: Monday, March 12, 2007 12:26 PM 
 Subject: Re: [PHP] dst and strtotime


  yepper
 
  date
  Mon Mar 12 12:25:33 EDT 2007 


 Is this from PHP or from bash?
 Sometimes those differ...



 2007-03-12 17:34:22
 2007-03-12 17:34:22 


 ?php
 echo `date +%Y-%m-%d %H:%M:%S`;
 echo date(Y-m-d H:i:s);
 ?




 Tijnema


 
  - Original Message -
  From: Peter Lauri  [EMAIL PROTECTED]
  To: 'Jake McHenry' [EMAIL PROTECTED]; 'PHP-General'
   php-general@lists.php.net
  Sent: Monday, March 12, 2007 5:23 PM
  Subject: RE: [PHP] dst and strtotime
  
 
  Is your system time correct?
 
  Best regards,
  Peter Lauri
  
  www.dwsasia.com - company web site
  www.lauri.se - personal web site
  www.carbonfree.org.uk - become Carbon Free
 
 
 
 
  -Original Message- 
  From: Jake McHenry [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 12, 2007 6:10 PM
  To: PHP-General 
  Subject: [PHP] dst and strtotime
 
  Hi everyone,
 
  I was hoping a problem like this wouldn't arise, but it happened 
:( 
 
  After the dst updates on my fedora box, this broke, and worked fine
  before..
  now gives me 3/10 instead of 3/11 for strtotime(last sunday) 
  anyone
  know why? 3/10 was saturday!
 
 
 
  $recent_period = strtotime('last sunday'); 
  echo date(Y-m-d, $recent_period);
  print_r($periods);
  $test_recent_period = array_search($recent_period, $periods); 
  if ($test_recent_period == '')
$recent_period = strtotime('last sunday', $recent_period);
 
  
 
 
 
  Thanks,
  Jake
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 --
 PHP General Mailing List (http://www.php.net/ )
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 PHP General Mailing List ( http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 fedora-list mailing list 
 [EMAIL PROTECTED]
 To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Re: [PHP] dst and strtotime

2007-03-13 Thread Jake McHenry
Has or can anyone try this on PHP5 to see if it does the same? I'll upgrade 
if needed, but didn't really want to at the current time..



Thanks
Jake



On Tue, 2007-03-13 at 12:31 -0400, Jake McHenry wrote:


 -Original Message-
 From: Jake McHenry [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 13, 2007 11:22 AM
 To: For users of Fedora; PHP-General
 Subject: Re: [PHP] dst and strtotime

 A little more info:

 strtotime(last monday)  or yesterday, is correct, but
 strtotime(last
 sunday) gives me 3/10 (saturday), strtotime(last saturday) gives me
 3/9
 (Friday), last friday gives me 3/8 thursday.. etc. maybe it will 
 go

 away after a week??



 What is the output of the below?

 echo date(Y-m-d g:i A T, time());
 echo date(Y-m-d g:i A T, strtotime(last sunday));


2007-03-13 12:30 PM EDT
2007-03-10 11:00 PM EST


Funny stuff... I get the same under Ubuntu 6.10 with php 4.4.4 (manual
build).

Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] dst and strtotime

2007-03-13 Thread Jake McHenry

On 3/13/07, Jake McHenry [EMAIL PROTECTED] wrote:



 -Original Message-
 From: Jake McHenry [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 13, 2007 11:22 AM
 To: For users of Fedora; PHP-General
 Subject: Re: [PHP] dst and strtotime

 A little more info:

 strtotime(last monday)  or yesterday, is correct, but
 strtotime(last
 sunday) gives me 3/10 (saturday), strtotime(last saturday) gives me
 3/9
 (Friday), last friday gives me 3/8 thursday.. etc. maybe it will 
 go

 away after a week??



 What is the output of the below?

 echo date(Y-m-d g:i A T, time());
 echo date(Y-m-d g:i A T, strtotime(last sunday));


2007-03-13 12:30 PM EDT
2007-03-10 11:00 PM EST


Hmm, EST and EDT ?
There's the problem i think, as it is 11PM, making it 12PM it means next 
day.

You could fix this with adding 24*60*60 to the result of strtotime() ,
or change it somehow ...

So this would give you the right date:
echo date(Y-m-d g:i A T, strtotime(last sunday) * 24*60*60);


Tijnema




That gives me this:


1903-11-13 2:32 AM EST


Thanks,
Jake 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Jake McHenry

It worked for you? It didn't for me until i changed

if ($s%$d=0)

to

if($s%$d == 0)

Jake


- Original Message - 
From: Jonathan Kahan [EMAIL PROTECTED]

To: Tijnema ! [EMAIL PROTECTED]
Cc: php Lists php-general@lists.php.net
Sent: Tuesday, March 13, 2007 6:08 PM
Subject: Re: [PHP] 2 errors I can not understand



That worked in answering part 1 now i got to figure out part 2

- Original Message - 
From: Tijnema ! [EMAIL PROTECTED]

To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php Lists php-general@lists.php.net
Sent: Tuesday, March 13, 2007 5:55 PM
Subject: Re: [PHP] 2 errors I can not understand



On 3/13/07, Jonathan Kahan [EMAIL PROTECTED] wrote:

Hi all,

Please see my output  below followed by the code. I have been trying for
some to figure out why

1) I can not get a line feed to work in the web page that i am using to
display the output as I am not running from the commad line

Line feed in a browser is made with the HTML tag br
instead of printint \r\n you should try br


2) Why my loop is only executing 3 times when i want it to execute 50

I don't see any error in that loop, on my test server it is executing
50 times...


Any help would be greatly appreciated.

Jonathan

The next line is all that displays on the output html page:

Output: The number 0 is 0 The number 1 is 0 The number 2 is 1 The number 
3

is 1

php script:

html
body
?php
for ($k=0;$k50;$k++)
{
echo (The number .$k. is .isprime($k));
echo \r\n;
}

function isprime ($s)
{
$a=2;

   switch ($s)
   {
   case 0:
   $a=0; break;
   case 1:
   $a=0; break;
   case 2:
   $a=1; break;
   default:
   $d=3;
   while ($d$s)
   {
   if ($s%$d=0)
   {
   $a=0;
   }
   $d+=2;
   }
   }

   if ($a==2)
   {
   $a=1;
   }
return $a;
}
?
/body
/html

tjon2.php 78L, 447C written

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] dst and strtotime

2007-03-12 Thread Jake McHenry

Hi everyone,

I was hoping a problem like this wouldn't arise, but it happened :(

After the dst updates on my fedora box, this broke, and worked fine before.. 
now gives me 3/10 instead of 3/11 for strtotime(last sunday) anyone 
know why? 3/10 was saturday!




$recent_period = strtotime('last sunday');
echo date(Y-m-d, $recent_period);
print_r($periods);
$test_recent_period = array_search($recent_period, $periods);
if ($test_recent_period == '')
 $recent_period = strtotime('last sunday', $recent_period);





Thanks,
Jake 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] dst and strtotime

2007-03-12 Thread Jake McHenry

yepper

date
Mon Mar 12 12:25:33 EDT 2007


- Original Message - 
From: Peter Lauri [EMAIL PROTECTED]
To: 'Jake McHenry' [EMAIL PROTECTED]; 'PHP-General' 
php-general@lists.php.net

Sent: Monday, March 12, 2007 5:23 PM
Subject: RE: [PHP] dst and strtotime



Is your system time correct?

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free





-Original Message-
From: Jake McHenry [mailto:[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 6:10 PM
To: PHP-General
Subject: [PHP] dst and strtotime

Hi everyone,

I was hoping a problem like this wouldn't arise, but it happened :(

After the dst updates on my fedora box, this broke, and worked fine
before..
now gives me 3/10 instead of 3/11 for strtotime(last sunday) anyone
know why? 3/10 was saturday!



$recent_period = strtotime('last sunday');
echo date(Y-m-d, $recent_period);
print_r($periods);
$test_recent_period = array_search($recent_period, $periods);
if ($test_recent_period == '')
  $recent_period = strtotime('last sunday', $recent_period);





Thanks,
Jake

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] dst and strtotime

2007-03-12 Thread Jake McHenry
Anyone know of anything I can check? I've been trying different things all 
afternoon and I'm still getting the wrong date from strtotime. date() works 
fine.


Thanks,
Jake

- Original Message - 
From: Jake McHenry [EMAIL PROTECTED]

To: PHP-General php-general@lists.php.net
Sent: Monday, March 12, 2007 12:26 PM
Subject: Re: [PHP] dst and strtotime



yepper

date
Mon Mar 12 12:25:33 EDT 2007


- Original Message - 
From: Peter Lauri [EMAIL PROTECTED]
To: 'Jake McHenry' [EMAIL PROTECTED]; 'PHP-General' 
php-general@lists.php.net

Sent: Monday, March 12, 2007 5:23 PM
Subject: RE: [PHP] dst and strtotime



Is your system time correct?

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free





-Original Message-
From: Jake McHenry [mailto:[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 6:10 PM
To: PHP-General
Subject: [PHP] dst and strtotime

Hi everyone,

I was hoping a problem like this wouldn't arise, but it happened :(

After the dst updates on my fedora box, this broke, and worked fine
before..
now gives me 3/10 instead of 3/11 for strtotime(last sunday) 
anyone

know why? 3/10 was saturday!



$recent_period = strtotime('last sunday');
echo date(Y-m-d, $recent_period);
print_r($periods);
$test_recent_period = array_search($recent_period, $periods);
if ($test_recent_period == '')
  $recent_period = strtotime('last sunday', $recent_period);





Thanks,
Jake

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] dst and strtotime

2007-03-12 Thread Jake McHenry




On 3/12/07, Jake McHenry [EMAIL PROTECTED] wrote:


Anyone know of anything I can check? I've been trying different things 
all

afternoon and I'm still getting the wrong date from strtotime. date()
works
fine.

Thanks,
Jake

- Original Message -
From: Jake McHenry [EMAIL PROTECTED]
To: PHP-General php-general@lists.php.net
Sent: Monday, March 12, 2007 12:26 PM
Subject: Re: [PHP] dst and strtotime


 yepper

 date
 Mon Mar 12 12:25:33 EDT 2007



Is this from PHP or from bash?
Sometimes those differ...




2007-03-12 17:34:22
2007-03-12 17:34:22


?php
echo `date +%Y-%m-%d %H:%M:%S`;
echo date(Y-m-d H:i:s);
?





Tijnema




 - Original Message -
 From: Peter Lauri [EMAIL PROTECTED]
 To: 'Jake McHenry' [EMAIL PROTECTED]; 'PHP-General'
 php-general@lists.php.net
 Sent: Monday, March 12, 2007 5:23 PM
 Subject: RE: [PHP] dst and strtotime


 Is your system time correct?

 Best regards,
 Peter Lauri

 www.dwsasia.com - company web site
 www.lauri.se - personal web site
 www.carbonfree.org.uk - become Carbon Free




 -Original Message-
 From: Jake McHenry [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 6:10 PM
 To: PHP-General
 Subject: [PHP] dst and strtotime

 Hi everyone,

 I was hoping a problem like this wouldn't arise, but it happened :(

 After the dst updates on my fedora box, this broke, and worked fine
 before..
 now gives me 3/10 instead of 3/11 for strtotime(last sunday)
 anyone
 know why? 3/10 was saturday!



 $recent_period = strtotime('last sunday');
 echo date(Y-m-d, $recent_period);
 print_r($periods);
 $test_recent_period = array_search($recent_period, $periods);
 if ($test_recent_period == '')
   $recent_period = strtotime('last sunday', $recent_period);





 Thanks,
 Jake

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fw: [PHP] dst and strtotime

2007-03-12 Thread Jake McHenry

anyone else have anything to add?

thanks,
Jake






On 3/12/07, Jake McHenry [EMAIL PROTECTED] wrote:


Anyone know of anything I can check? I've been trying different things 
all

afternoon and I'm still getting the wrong date from strtotime. date()
works
fine.

Thanks,
Jake

- Original Message -
From: Jake McHenry [EMAIL PROTECTED]
To: PHP-General php-general@lists.php.net
Sent: Monday, March 12, 2007 12:26 PM
Subject: Re: [PHP] dst and strtotime


 yepper

 date
 Mon Mar 12 12:25:33 EDT 2007



Is this from PHP or from bash?
Sometimes those differ...




2007-03-12 17:34:22
2007-03-12 17:34:22


?php
echo `date +%Y-%m-%d %H:%M:%S`;
echo date(Y-m-d H:i:s);
?





Tijnema




 - Original Message -
 From: Peter Lauri [EMAIL PROTECTED]
 To: 'Jake McHenry' [EMAIL PROTECTED]; 'PHP-General'
 php-general@lists.php.net
 Sent: Monday, March 12, 2007 5:23 PM
 Subject: RE: [PHP] dst and strtotime


 Is your system time correct?

 Best regards,
 Peter Lauri

 www.dwsasia.com - company web site
 www.lauri.se - personal web site
 www.carbonfree.org.uk - become Carbon Free




 -Original Message-
 From: Jake McHenry [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 6:10 PM
 To: PHP-General
 Subject: [PHP] dst and strtotime

 Hi everyone,

 I was hoping a problem like this wouldn't arise, but it happened :(

 After the dst updates on my fedora box, this broke, and worked fine
 before..
 now gives me 3/10 instead of 3/11 for strtotime(last sunday)
 anyone
 know why? 3/10 was saturday!



 $recent_period = strtotime('last sunday');
 echo date(Y-m-d, $recent_period);
 print_r($periods);
 $test_recent_period = array_search($recent_period, $periods);
 if ($test_recent_period == '')
   $recent_period = strtotime('last sunday', $recent_period);





 Thanks,
 Jake

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] why did it stop working?

2007-03-08 Thread Jake McHenry
concatenation changes?? I've noticed this too, you can either do what you 
did, or put {} around variable within quotes..





- Original Message - 
From: Ross [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 4:57 AM
Subject: [PHP] why did it stop working?




Can someone explain to me why this used to work but then stopped

header(Content-length: $size);
header(Content-type: $type);
header(Content-Disposition: attachment; filename=$name);

and this now works

header(Content-length: .$size);
header(Content-type: .$type);
header('Content-Disposition: attachment; filename='.$name.'');
echo $content;


Any suggestions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Intro to PHP question

2007-03-08 Thread Jake McHenry
Sorry, I didn't even think about that. I use many php files as shell 
scripts... and u need this for any interpreter your using if you want to 
execute the file directly from the command line, otherwise you would have to 
type

php scriptname.php from the command line.


- Original Message - 
From: Jonathan Kahan [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 1:43 PM
Subject: Re: [PHP] Intro to PHP question


Hi all,

I went to a website called php-cli.com and found that i needed to type 
#!/usr/bin/php -q in the header line. Once I typed that, my script without 
the HTML tags executed.


Thanks again,

Jonathan
 - Original Message - 
 From: Tijnema !

 To: Jonathan Kahan
 Cc: Dave Goodchild ; php-general@lists.php.net
 Sent: Thursday, March 08, 2007 12:54 PM
 Subject: Re: [PHP] Intro to PHP question


 AFAIK you can't run a php file directly, or you need to add #!/bin/php or 
something to the first line, but you can run it with

 php ../uri.php
 but i suggest you to run it from a webserver like apache.

 *if you don't have it, i can give you a few MB to try PHP out

 Tijnema


 On 3/8/07, Jonathan Kahan [EMAIL PROTECTED] wrote:
   Hi all,

   Dave,

   I am attempting to use html for learning purposes. My goal is to begin 
working on a website.


   Tijnema,

   I tried the below and got the following errors. I can't imagine the 
error on line 3 is a tag issue.


   Jonathan

   [EMAIL PROTECTED] cgi-bin]# ./uri.php
   ./uri.php: line 2: ?php: No such file or directory
   ./uri.php: line 3: syntax error near unexpected token `D'
   ./uri.php: line 3: `$d=date(D);'
   [EMAIL PROTECTED] cgi-bin]# vi uri.php
   [EMAIL PROTECTED]  cgi-bin]# vi uri.php

   ?php
   $d=date(D);
   if ($d==Fri)
 echo Have a nice weekend!;
   else
 echo Have a nice day!;
   ?
 - Original Message - 
 From: Dave Goodchild

 To: Tijnema !
 Cc: Jonathan Kahan ; php-general@lists.php.net
 Sent: Thursday, March 08, 2007 12:43 PM
 Subject: Re: [PHP] Intro to PHP question


 If you are running that from the command line, why do you need html? 
Not sure why you're doing that.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] help with script needed

2007-03-07 Thread Jake McHenry
Are you only using 3 and 5? just echo 3 and 5 instead of Foo and Bar. and 
for both, just have a 3rd condition including both ... if (($i%3 ==0)  
($i%5 == 0)) echo both or foobar..


does this help?

Jake


- Original Message - 
From: Bruce Gilbert [EMAIL PROTECTED]

To: Martin Marques martin@bugs.unl.edu.ar
Cc: Tijnema ! [EMAIL PROTECTED]; PHP-General 
php-general@lists.php.net

Sent: Wednesday, March 07, 2007 4:00 PM
Subject: Re: [PHP] help with script needed



Thanks for the responses so far.

This is what I have come up with
[php]
?php
for( $i=1; $i=100; $i++ )
{
echo $i;
echo br;
if ($i%3 == 0) echo Foo ;
elseif ($i%5 == 0) echo Bar;
}

?
[/php]

and the results can be seen here
http://www.inspired-evolution.com/image_test/numbers_output.php

I actually want the Foo and Bar to replace the numbers they are
dereivatives of and not appear below as they are now, and I also need
to add a third condition for FooBar which would be for numbers that
are both divisible by 3 and 5.

thanks

On 3/7/07, Martin Marques martin@bugs.unl.edu.ar wrote:

Tijnema ! escribió:
 On 3/7/07, Bruce Gilbert [EMAIL PROTECTED] wrote:
 I just need to add code to print something different, say foo if the
 output is a multiple of 5 or 10 for example. How do I go about doing
 this?


 I've seen that question a lot, what i use is fairly simple
 if( intval($number / $multiple) == ($number / $multiple ) )

 try that

Very bad solution. Try the % operator:

if($number % $multiple == 0)

http://www.php.net/manual/en/language.operators.arithmetic.php

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-
Martín Marqués  |   Programador, DBA
Centro de Telemática| Administrador
Universidad Nacional
 del Litoral
-




--
::Bruce::

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] help with script needed

2007-03-07 Thread Jake McHenry

LOL I told'ya I rememberd it from my 2nd semester :)


Ok, this is commonly known as the FizzBuzz problem and is used a lot as a 
university project or interview question. If you can't do it, be afraid!!


http://dev.stut.net/php/fizzbuzz.php

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Links

2007-03-07 Thread Jake McHenry
You have to add the href tags in the html output for the text to be a 
link


in your while statement or whatever your using to obtains the links from the 
database already,


instead of just displaying $link_value, change it to

a href=$link_value$link_value/a


Jake

- Original Message - 
From: StainOnRug [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Wednesday, March 07, 2007 7:19 PM
Subject: [PHP] Links




Hello.. I searched for an answer on the simple quesiton but I am only 
finding

complex answers... I simply just want to add a link in my database so when
my results display you can see the information.. and when they click the
link it takes them to the webpage of the article. I tried inserting
examplesite.com User sees this text   but when the results page shows.. it
doesnt show the hyperlink.. Thank you all very much!



 -Darren

  Thanks again!
--
View this message in context: 
http://www.nabble.com/Links-tf3366303.html#a9365950

Sent from the PHP - General mailing list archive at Nabble.com.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and Frames?

2004-11-29 Thread Jake McHenry
Hi everyone,
Was just wondering if it is possible to create dynamic frames within a page.
Like have 3 output sequences, one for frame source, then 2 for actual pages?
Or do frames have to have an actual page to load? I guess I could output the
html to a file, then have just the src in the php code? I'm kind of
experimenting with a new design, so if this exists, or something close to
it, could someone point me in the right direction?
What I want to do is have links on the left, a header with our logo, then
the right frame will load pdf, doc, or html files depending on which link
the person clicks on. This is simple if it's just html, but I need to have
the person logged in, and the php file is generating the list of links based
on the files contained in the directory. So when the person uploads files,
they are immediatly in the list.
Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and Frames?

2004-11-29 Thread Jake McHenry
- Original Message - 
From: Chris W. Parker [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:26 PM
Subject: RE: [PHP] PHP and Frames?


Jake McHenry mailto:[EMAIL PROTECTED]
   on Monday, November 29, 2004 2:41 PM said:
Was just wondering if it is possible to create dynamic frames within
a page. Like have 3 output sequences, one for frame source, then 2
for actual pages?
Frames and PHP are not interdependent on eachother. Each frame within
the frameset can be a PHP page if you need them to be.
Or do frames have to have an actual page to load?
I'm sorry but I don't understand what you mean by an actual page to
load. A frame within a frameset can load anything the regular browser
window can load.
Also, since this is not really PHP related (unless I'm missing the
point) you might like to try an a general web design list instead. Or
you could email me off list.

Chris.

Right now I only have 1 php file, which is outputing all of the html. Is 
there a way I can have that 1 php file output the frame source page, along 
with the links, header, and target page? As I said, I could have the php 
file output the html to the actual files, but is there a way I have have all 
this in 1 php file? That's what I'm asking I guess

Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: off list RE: [PHP] PHP and Frames?

2004-11-29 Thread Jake McHenry
- Original Message - 
From: Chris W. Parker [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:36 PM
Subject: off list RE: [PHP] PHP and Frames?


Jake McHenry mailto:[EMAIL PROTECTED]
   on Monday, November 29, 2004 3:30 PM said:
Right now I only have 1 php file, which is outputing all of the html.
Is there a way I can have that 1 php file output the frame source
page, along with the links, header, and target page? As I said, I
could have the php file output the html to the actual files, but is
there a way I have have all this in 1 php file? That's what I'm
asking I guess
Oh yeah sure. That's easy.
(mind you, i haven't written a proper frameset in a long time so my tags
might be wrong.)
?php
echo QQQ
frameset
frame name=header ... /
frame name=nav ... /
frame name=content ... /
/frameset
QQQ;
?
You say you want the 'content' frame to load different pages right? Well
then you'll have to pass a value to the frameset page to determine which
page should be loaded.
http://www.yourdomain.com/frameset.php?content=products.pdf
?php
// Remember to always validate input and
// not blindly display any page like I am
// doing here in my example.
$content_page = $_GET['content'];
echo QQQ
frameset
frame name=header ... /
frame name=nav ... /
frame name=content src=$content_page ... /
/frameset
QQQ;
?
Does this help?
Chris.

I think so, I'll work with it.. and see what I come up with.. thanks for the 
help..

Jake
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and Frames?

2004-11-29 Thread Jake McHenry
- Original Message - 
From: M. Sokolewicz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:34 PM
Subject: Re: [PHP] PHP and Frames?


Jake McHenry wrote:
- Original Message - From: Chris W. Parker 
[EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:26 PM
Subject: RE: [PHP] PHP and Frames?


Jake McHenry mailto:[EMAIL PROTECTED]
   on Monday, November 29, 2004 2:41 PM said:
Was just wondering if it is possible to create dynamic frames within
a page. Like have 3 output sequences, one for frame source, then 2
for actual pages?

Frames and PHP are not interdependent on eachother. Each frame within
the frameset can be a PHP page if you need them to be.
Or do frames have to have an actual page to load?

I'm sorry but I don't understand what you mean by an actual page to
load. A frame within a frameset can load anything the regular browser
window can load.
Also, since this is not really PHP related (unless I'm missing the
point) you might like to try an a general web design list instead. Or
you could email me off list.

Chris.

Right now I only have 1 php file, which is outputing all of the html. Is 
there a way I can have that 1 php file output the frame source page, 
along with the links, header, and target page? As I said, I could have 
the php file output the html to the actual files, but is there a way I 
have have all this in 1 php file? That's what I'm asking I guess

Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108
sure, but you'd need to somehow distinguis between situations. The easiest 
would be using a GET var. eg:
frameset src=page.php?id=topframeset src=page.php?id=left

and in the page.php:
switch($_GET['id']) {
case 'top':
// html for top
break;
case 'left':
// html for left
break;
}
etc.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



ok, this helps on what I just emailed.. missed this... I'll try it and let 
you know.

Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and Frames? solved

2004-11-29 Thread Jake McHenry
- Original Message - 
From: Jake McHenry [EMAIL PROTECTED]
To: M. Sokolewicz [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:46 PM
Subject: Re: [PHP] PHP and Frames?


- Original Message - 
From: M. Sokolewicz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:34 PM
Subject: Re: [PHP] PHP and Frames?


Jake McHenry wrote:
- Original Message - From: Chris W. Parker 
[EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]; 
[EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:26 PM
Subject: RE: [PHP] PHP and Frames?


Jake McHenry mailto:[EMAIL PROTECTED]
   on Monday, November 29, 2004 2:41 PM said:
Was just wondering if it is possible to create dynamic frames within
a page. Like have 3 output sequences, one for frame source, then 2
for actual pages?

Frames and PHP are not interdependent on eachother. Each frame within
the frameset can be a PHP page if you need them to be.
Or do frames have to have an actual page to load?

I'm sorry but I don't understand what you mean by an actual page to
load. A frame within a frameset can load anything the regular browser
window can load.
Also, since this is not really PHP related (unless I'm missing the
point) you might like to try an a general web design list instead. Or
you could email me off list.

Chris.

Right now I only have 1 php file, which is outputing all of the html. Is 
there a way I can have that 1 php file output the frame source page, 
along with the links, header, and target page? As I said, I could have 
the php file output the html to the actual files, but is there a way I 
have have all this in 1 php file? That's what I'm asking I guess

Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108
sure, but you'd need to somehow distinguis between situations. The 
easiest would be using a GET var. eg:
frameset src=page.php?id=topframeset src=page.php?id=left

and in the page.php:
switch($_GET['id']) {
case 'top':
// html for top
break;
case 'left':
// html for left
break;
}
etc.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



ok, this helps on what I just emailed.. missed this... I'll try it and let 
you know.

Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Thanks for the help everyone. I got it working the way I wanted. the links 
on the left are auto generated by the php file, which outputs them to the 
content frame, all in one php file. Wasn't as hard as I thought.. like I 
said.. it's been a long day. Probably could have figured it out after some 
sleep

Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: off list RE: [PHP] PHP and Frames?

2004-11-29 Thread Jake McHenry
- Original Message - 
From: Chris W. Parker [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Sent: Monday, November 29, 2004 6:36 PM
Subject: off list RE: [PHP] PHP and Frames?


Jake McHenry mailto:[EMAIL PROTECTED]
   on Monday, November 29, 2004 3:30 PM said:
Right now I only have 1 php file, which is outputing all of the html.
Is there a way I can have that 1 php file output the frame source
page, along with the links, header, and target page? As I said, I
could have the php file output the html to the actual files, but is
there a way I have have all this in 1 php file? That's what I'm
asking I guess
Oh yeah sure. That's easy.
(mind you, i haven't written a proper frameset in a long time so my tags
might be wrong.)
?php
echo QQQ
frameset
frame name=header ... /
frame name=nav ... /
frame name=content ... /
/frameset
QQQ;
?
You say you want the 'content' frame to load different pages right? Well
then you'll have to pass a value to the frameset page to determine which
page should be loaded.
http://www.yourdomain.com/frameset.php?content=products.pdf
?php
// Remember to always validate input and
// not blindly display any page like I am
// doing here in my example.
$content_page = $_GET['content'];
echo QQQ
frameset
frame name=header ... /
frame name=nav ... /
frame name=content src=$content_page ... /
/frameset
QQQ;
?
Does this help?
Chris.




What about the links? what do I assign the frame src of the links to if the 
php file is generating the output?

right now the php file is generating the links, I want to turn that into 
frames, but all in one php file. So if I put the frame src before the html 
output that I have now, how can I output the links in the same php file? and 
the header? I get what you said about the target frame, but not sure how I'm 
going to get the output into the right frames. It's been a long day, maybe 
I'm just not seeing this right?

Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
(570) 748-6611 x108 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] exploding

2004-08-25 Thread Jake McHenry
Hi everyone.

Is there a way to explode by every character in the variable?

Example:

$var = 8;
$test = explode(, $var);

output would be

$test[0] = 0;
$test[1] = 0;
$test[2] = 0;
$test[3] = 0;
$test[4] = 8;


Can I get an array like that?



Thanks,
Jake McHenry

MIS Coordinator
Nittany Travel
http://www.nittanytravel.com
570.748.6611 x108





Re: [PHP] Order by

2004-08-03 Thread Jake McHenry
- Original Message - 
From: Karl-Heinz Schulz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 03, 2004 10:19 PM
Subject: [PHP] Order by


 $specs_query = mysql_query(select title, information from spec where
 product=.$id order by id asc);

 But it will create the error.

 Parse error: parse error, unexpected T_STRING in
/www/docs/view_product.php
 on line 144



start the quotes again...

$specs_query = mysql_query(select title, information from spec where
product=.$id. order by id asc);


Thanks,
Jake McHenry

MIS Coordinator
Nittany Travel
http://www.nittanytravel.com
570.748.6611 x108

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to send SMS

2004-03-28 Thread Jake McHenry
I have one of my scripts set up to just send an email to the sms email
address that ATT provides me. Verizon also does this. Not sure about the
rest. The phone provider then changes from email to whatever the phone
understands

Jake


- Original Message - 
From: saepudin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 29, 2004 12:49 PM
Subject: [PHP] How to send SMS


 How to send sms with PHP and Mysql  and mobil phone Nokia 5110?

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Simple: Whats wrong with this?

2004-03-17 Thread Jake McHenry
 No.

 $correct++;

 Is all you need for the second condition, it automatically sets itself
 back.



Does this always work? In my timesheet app, I have to do $counter = $counter
+ 1, because for some reason the $counter++; doesn't work. It just doesn't
work, no incrementation of the variable. Is there something in php.ini that
can prohibit this from working?

Thanks,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Simple: Whats wrong with this?

2004-03-17 Thread Jake McHenry
I didn't post it, I just added on to someone elses question.

I do use counter++; in other scripts, but it's only in my timesheet app that
it doesn't work. It's very odd, so I just made them all $counter = $counter
+ 1; I didn't have time to mess with it. Was just asking.

$counter is initially set to 0, then after a mysql_query(), in the while
loop for mysql_fetch_array I was trying $counter++; like I do in my other
scripts. But in this case, it didn't work. I just wanted to see if anyone
knew why.

I'll try the pre increment. Maybe that'll work. It wasn't a big deal, as
long as it worked.

Jake



- Original Message - 
From: Adam Voigt [EMAIL PROTECTED]
To: Shane McBride [EMAIL PROTECTED]
Cc: PHP [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 12:05 PM
Subject: RE: [PHP] Simple: Whats wrong with this?


 Well I accidentally deleted your original email, but I didn't see where
 you were getting the counter variable from. Where is the variable being
 stored? You do know that setting $counter++ for one visitor, doesn't
 translate the value of $counter to another, right?



 
  Does this always work? In my timesheet app, I have to do $counter =
$counter
  + 1, because for some reason the $counter++; doesn't work. It just
doesn't
  work, no incrementation of the variable. Is there something in php.ini
that
  can prohibit this from working?
 
  Thanks,
  Jake
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] The convension

2004-03-17 Thread Jake McHenry
- Original Message - 
From: noginn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 4:29 PM
Subject: [PHP] The  convension


 I have read a range of comments on php.net manual where people have
 mentioned this, along with it being in the 'print' functions page itself.
 I have tryed to use it in some context before but without success, I
 have always been getting an error on some sort.

 For example;
 ?php
 $text = END
 This uses the here document syntax to output
 multiple lines with $variable interpolation. Note
 that the here document terminator must appear on a
 line with just a semicolon no extra whitespace!
 END;

 print $text;
 ?

 I would get this error when running the above script.

 *Notice*: Undefined variable: variable in
 *C:\WWW\Apache2\htdocs\php\testprint.php* on line *4*
 This uses the here document syntax to output multiple lines with
 interpolation. Note that the here document terminator must appear on a
 line with just a semicolon no extra whitespace!

 I am a little confused at this point as I followed a comment on the
 manual which had not been corrected by anyone.

 I am running PHP 4.3.4

 -- 
 /* remember not to open virii please :) */
 if (!gotbrain(receiver)) {
 openattachment(coolprogram.exe.jpg.pif);
 }

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



It works fine on my set, I use it quite often:

$announcements = EndAnnouncements
pbufont face=$fontface size=$fontsize
color=$fontcolorAnnouncements/u/b/p

!-- ANNOUNCMENTS GO HERE --

liThere is also a problem report section where you can submit any
problem you are having.br

liSoon, the timesheet will also be integrated into the portal, so you
will only need to log in once to access everything./font

!-- END ANNOUNCEMENTS --
EndAnnouncements;


Just have to make sure the EndAnnouncements; is on it's own line, at the
very first position.

$announcements= TEST
  1 1

Those are the only spaces, no spaces between  and TEST


Hope this helps,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Small Problem - could you help me, please?

2004-03-17 Thread Jake McHenry
- Original Message - 
From: Labunski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 5:46 PM
Subject: [PHP] Small Problem - could you help me, please?


 $ip = getenv (REMOTE_ADDR);
 
 function kick() {
 $file_ip = file(log.txt);
 foreach($file_ip as $value_ip ) {
 $kick .= $value_ip;
 }
 return $kick;
 }
 if ($ip == kick()){
 echo Sorry, the access is denied.;
 
 exit;
 }


I'm assuming your log.txt is in format of
xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx

etc, which will create the array in $file_ip. try changing to this:

function kick($ip)
{
  $file_ip = file('log.txt');
  $access = 'yes';
  foreach($file_ip as $value_ip)
  {
if ($ip == $file_ip)
{
  $access = 'no';
 }
  }
}

if (kick($ip) == 'yes')
{
  your_allowed_in;
}
else
{
  your not allowed;
}


that help?

Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Small Problem - could you help me, please?

2004-03-17 Thread Jake McHenry
 I think you want something like:
 
if (in_array($_SERVER['REMOTE_ADDRESS'], file('log.txt')))
die(Sorry, the access is denied.);
 
 - Rob


yes, that'll work too.. just more compact than what I posted :-p

Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Javascript Mouseover Help

2004-03-17 Thread Jake McHenry
Hi everyone,

How can I get around my problem? I have a couple pages that I would like to have 
buttons where the button and background changes when the javascript mouseover event 
happens. My code works fine if the page is .html, but when I try it as php, the 
mouseovers no longer work.

I have the mouseover in another php file which is included in the php file that is 
doing the outputing.


Here is a shortened file:

?php
include('format.php')

if ($_SESSION['auth'] == true)
{
  echo EndHTML
html
body
table
EndHTML;

if ($_SESSION['userlist'] == 'all')
{
  echo tr $tableheaderformattd$_SESSION['username'] is logged in/td/tr;
}

  tr
tdtext, blah blah blah/td
 more
  /tr
/table
/body
/html
EndHTML
}

?

format.php:

$tableheaderformat = EndFormat
id=JMTS bgcolor=#ABCED6 onmouseover=if(document.layers) { 
document.layers['JMTS'].bgColor='#EE' } else { if(document.all) { 
document.all['JMTS'].
style.background='#EE' } else { if(this.style) { this.style.background='#EE' } 
} } onmouseout=if(document.layers) { document.layers['JMTS'].bgColor=
'#ABCED6' } else { if(document.all) { document.all['JMTS'].style.background='#ABCED6' 
} else { if(this.style) { this.style.background='#ABCED6' } } }
EndFormat;





Like I said, if I put it in a regular html file, it works fine. How can I make this 
work?

Thanks,
Jake


Re: [PHP] Javascript Mouseover Help NOT A JAVASCRIPT QUESTION

2004-03-17 Thread Jake McHenry
- Original Message - 
From: Raditha Dissanayake [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 12:35 AM
Subject: Re: [PHP] Javascript Mouseover Help


 Jake McHenry wrote:

 Hi everyone,
 
 How can I get around my problem? I have a couple pages that I would like
to have buttons where the button and background changes when the javascript
mouseover event happens. My code works fine if the page is .html, but when I
try it as php, the mouseovers no longer work.
 
 I have the mouseover in another php file which is included in the php
file that is doing the outputing.
 
 
 Inspecting the javascript console in mozilla will help you get to the
 bottom of the problem. Please post any questions about the errors that
 you see to a javascript newsgroup. It is always a good idea to include
 the scripts using the script src=''  syntax.



It's not a javascript question, or problem. As I said in my original post,
it works fine if it's a regular html file. But when I put it in a variable
in php, then use that variable from an included file, the javascript is not
executed. What can I do to fix this?

Thanks,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: session timeout?

2004-02-25 Thread Jake McHenry
yes, please do

Thanks,
Jake


- Original Message - 
From: Phillip Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 2:37 PM
Subject: [PHP] Re: session timeout?


 i accomplish this with javascript and the current logout script that i had
 written - Javascript calls a countdown and after 10 m inutes of viewing
the
 same page it pops a window and resets the counter; the window it pops asks
 is the user would like to continue or if they would like to be logged out;
 an inactive user will not make a selection so after 60 seconds, that popup
 redirects the parent page to the logout page and closes itself.  if the
user
 chose to keep working then  no problem, the link to keep me logged in
just
 calls the self-close function.

 i'll post code if you're interested.

 ~phillip jackson


 Catalin Trifu [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi,
 
  You have to make the code yourself,
 
  After session_start you should check the session for some
  variable you use to check if the user is logged in
 
  eg:
  ?php
  session_start();
  if( !isset($_SESSION['logged_in']) || $_SESSION['logged_in'] ==
0)
 {
  //u'r busted go to login
  } else {
  //u'r the good guy, come in
  }
  ?
 
  C.
 
 
  Jake McHenry [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  How can I make my site auto log out a user like I've seen on many sites?
  Right now, the users session never expires unless manually logging out
or
  the browser is closed. Also, should I change anything to cover any
 security
  issues? I havn't changed much from the default, only enough to get it
  running for my site.
 
  Here is what I have in my php.ini file:
 
  [Session]
  session.save_handler = files
  session.save_path = /var/www/sessions
  session.use_cookies = 1
  session.name = NittanyTravelSessionCookie
  session.auto_start = 0
  session.cookie_lifetime = 0
  session.cookie_path = /
  session.cookie_domain =
  session.serialize_handler = php
  session.gc_probability = 1
  session.gc_maxlifetime = 1440
  session.referer_check =
  session.entropy_length = 0
  session.entropy_file =
  ;session.entropy_length = 16
  ;session.entropy_file = /dev/urandom
  session.cache_limiter = nocache
  session.cache_expire = 180
  session.use_trans_sid = 1
  url_rewriter.tags =
a=href,area=href,frame=src,input=src,form=fakeentry
 
 
  Thanks,
  Jake

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] session timeout?

2004-02-23 Thread Jake McHenry
How can I make my site auto log out a user like I've seen on many sites? Right now, 
the users session never expires unless manually logging out or the browser is closed. 
Also, should I change anything to cover any security issues? I havn't changed much 
from the default, only enough to get it running for my site.

Here is what I have in my php.ini file:

[Session]
session.save_handler = files
session.save_path = /var/www/sessions
session.use_cookies = 1
session.name = NittanyTravelSessionCookie
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry


Thanks,
Jake

[PHP] fonts

2004-02-18 Thread Jake McHenry
is there a way I can have a special font on a page, and if the viewer doesn't have 
that font, have it auto downloaded and installed?

Thanks,
Jake

Re: [PHP] fonts

2004-02-18 Thread Jake McHenry
- Original Message - 
From: [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 8:07 PM
Subject: Re: [PHP] fonts


 leaving aside the obvious serious security implications of what 
 you're after, you're assuming that you'll be able to accurately 
 determine the OS of the user's machine and have the font set 
 available.  this seems unlikely.
 
 
 
 -- Original Message --
  From: Jake McHenry [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Date: Wednesday, February 18, 2004 07:56:09 PM -0500
  Subject: [PHP] fonts
 
  is there a way I can have a special font on a page, and if the
  viewer doesn't have that font, have it auto downloaded and
  installed?
 
  Thanks,
  Jake
 
 -- End Original Message --
 
 
 



it's for my intranet, figured it might be easier this way instead of
touching every machine. All my machines are either on 98 or XP, which both
will use the same font. I've manually installed it on 4 machines so far, 2
xp and 2 98, but have around 950 left.

can I do it?

Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fonts

2004-02-18 Thread Jake McHenry
- Original Message - 
From: Ryan A [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 10:02 PM
Subject: Re: [PHP] fonts


 Ummm, if displaying just webpages and the font is so important...cant you
 just make image files (ie. JPG) or
 am I missing something?

 -Ryan


 On 2/19/2004 2:36:30 AM, Jake McHenry ([EMAIL PROTECTED]) wrote:
  - Original Message -
  From: [EMAIL PROTECTED]
  To: Jake McHenry [EMAIL PROTECTED]
  Sent: Wednesday, February 18, 2004 8:07 PM
  Subject: Re: [PHP] fonts
 
 
   leaving aside the obvious serious security implications of what
   you're after, you're assuming that
  you'll be able to accurately
   determine the OS of the user's machine
  and have the font set
   available.  this seems unlikely.
  
  
  
   -- Original Message --
From: Jake McHenry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Wednesday, February 18, 2004 07:56:09 PM -0500
Subject: [PHP] fonts
   
is there a way I can have a special font on a page, and if the
viewer
  doesn't have that font, have it auto downloaded and
installed?
   
Thanks,
Jake
  
   -- End Original Message --
  
  
  
 
 
 
  it's
  for my intranet, figured it might be easier this way instead of
  touching every machine. All my machines are either on 98 or XP, which
  both
  will use the same font. I


Image files for the entire website? I want this to be the standard font for
the text of the site.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML and Excel

2004-02-10 Thread Jake McHenry
I implemented the classes found at the link he provided, followed the
directions in the readme and examples

do you want me to post the code as well?

thanks,
Jake


- Original Message - 
From: Phillip Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 11:35 AM
Subject: Re: [PHP] XML and Excel


 Please post your solution to the group for reference.

 ~phillip

 Jake McHenry [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  - Original Message - 
  From: Marek Kilimajer [EMAIL PROTECTED]
  To: Jake McHenry [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Monday, February 09, 2004 12:42 PM
  Subject: Re: [PHP] XML and Excel
 
 
   Create native xls files, there are at least two classes that can help
   you, here is one:
   http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/
  
   Jake McHenry wrote:
Hi everyone. Since my last post of outputing to excel, I have
 converted
  my output to XML, quite happy with myself. It looks perfect. Perfect on
my
  set that is. I have win xp with office xp. Excel with office xp
recognizes
  XML. Office 2000, which the rest of my company is using, doesn't. Does
  anyone know of a way I can take the XML I have now and have office 2000
  recognize it? I feel kinda stupid... lol  Sent out an email to my
 accounting
  department saying it was ready for them and all they get is garbage on
 their
  screen.
   
Anyone know of anything I can do?
   
Thanks,
Jake
  
 
  sweet.. thanks a lot.. took me about 3 hours, but I got it all
converted.
  works great!
 
  Thanks again,
  Jake

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML and Excel

2004-02-10 Thread Jake McHenry
- Original Message - 
From: Phillip Jackson [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 4:53 PM
Subject: Re: [PHP] XML and Excel


 sure; if it doesn't compromise security for you.


 ~Phillip


 - Original Message - 
 From: Jake McHenry [EMAIL PROTECTED]
 To: Phillip Jackson [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, February 10, 2004 1:45 PM
 Subject: Re: [PHP] XML and Excel


  I implemented the classes found at the link he provided, followed the
  directions in the readme and examples
 
  do you want me to post the code as well?
 
  thanks,
  Jake
 
 
  - Original Message - 
  From: Phillip Jackson [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, February 10, 2004 11:35 AM
  Subject: Re: [PHP] XML and Excel
 
 
   Please post your solution to the group for reference.
  
   ~phillip
  
   Jake McHenry [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
- Original Message - 
From: Marek Kilimajer [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, February 09, 2004 12:42 PM
Subject: Re: [PHP] XML and Excel
   
   
 Create native xls files, there are at least two classes that can
 help
 you, here is one:

http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/

 Jake McHenry wrote:
  Hi everyone. Since my last post of outputing to excel, I have
   converted
my output to XML, quite happy with myself. It looks perfect. Perfect
 on
  my
set that is. I have win xp with office xp. Excel with office xp
  recognizes
XML. Office 2000, which the rest of my company is using, doesn't.
Does
anyone know of a way I can take the XML I have now and have office
 2000
recognize it? I feel kinda stupid... lol  Sent out an email to my
   accounting
department saying it was ready for them and all they get is garbage
on
   their
screen.
 
  Anyone know of anything I can do?
 
  Thanks,
  Jake

   
sweet.. thanks a lot.. took me about 3 hours, but I got it all
  converted.
works great!
   
Thanks again,
Jake
  
   -- 
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 



Here's the basics... I have some while loops in there too.. where the index
variable is used.. but this is what was added for the excel output.

Jake






require_once /var/www/excel/class.writeexcel_workbook.inc.php;
require_once /var/www/excel/class.writeexcel_worksheet.inc.php;

$fname = tempnam(/tmp, timesheet.xls);
$workbook = new writeexcel_workbook($fname);
$worksheet = $workbook-addworksheet();

// header format
$header = $workbook-addformat();
$header-set_bold();
$header-set_underline();
$header-set_align('center');

// notes format
$notes = $workbook-addformat();
$notes-set_bold();

// dollar format
$dollar = $workbook-addformat();
$dollar-set_align('right');
$dollar-set_num_format('$ ###,##0.00');

// number format
$number = $workbook-addformat();
$number-set_align('left');
$number-set_num_format('###,##0.00');

$worksheet-set_column(0, 0, 20);
$worksheet-set_column(1, 1, 20);
$worksheet-set_column(2, 2, 8);
$worksheet-set_column(3, 3, 8);
$worksheet-set_column(4, 4, 8);
$worksheet-set_column(5, 5, 8);
$worksheet-set_column(6, 6, 8);
$worksheet-set_column(7, 7, 8);
$worksheet-set_column(8, 8, 8);
$worksheet-set_column(9, 9, 8);
$worksheet-set_column(10, 10, 5);
$worksheet-set_column(11, 11, 7);
$worksheet-set_column(12, 12, 7);
$worksheet-set_column(13, 13, 7);
$worksheet-set_column(14, 14, 7);
$worksheet-set_column(15, 15, 5);
$worksheet-set_column(16, 16, 8);
$worksheet-set_column(17, 17, 10);

$worksheet-write(0, 0,  NAME, $header);
$worksheet-write(0, 1,  LOCATION, $header);
$worksheet-write(0, 2,  REG, $header);
$worksheet-write(0, 3,  VAC, $header);
$worksheet-write(0, 4,  SICK, $header);
$worksheet-write(0, 5,  COMP, $header);
$worksheet-write(0, 6,  MISC, $header);
$worksheet-write(0, 7,  W/O PAY, $header);
$worksheet-write(0, 8,  SEM/FAM, $header);
$worksheet-write(0, 9,  TOTAL, $header);
$worksheet-write(0, 10, ADJ, $header);
$worksheet-write(0, 11, BONUS, $header);
$worksheet-write(0, 12, POST, $header);
$worksheet-write(0, 13, EMP. A/R, $header);
$worksheet-write(0, 14, PRE, $header);
$worksheet-write(0, 15, 401K, $header);
$worksheet-write(0, 16, RATE, $header);
$worksheet-write(0, 17, GROSS, $header);

  $worksheet-write($index, 0,  $fullname);
  $worksheet-write($index, 1,  $location);
  $worksheet-write($index, 2,  $regularhours);
  $worksheet-write($index, 3,  $vachours);
  $worksheet-write($index, 4,  $sickhours);
  $worksheet-write($index, 5,  $comphours);
  $worksheet

[PHP] XML and Excel

2004-02-09 Thread Jake McHenry
Hi everyone. Since my last post of outputing to excel, I have converted my output to 
XML, quite happy with myself. It looks perfect. Perfect on my set that is. I have win 
xp with office xp. Excel with office xp recognizes XML. Office 2000, which the rest of 
my company is using, doesn't. Does anyone know of a way I can take the XML I have now 
and have office 2000 recognize it? I feel kinda stupid... lol  Sent out an email to my 
accounting department saying it was ready for them and all they get is garbage on 
their screen.

Anyone know of anything I can do?

Thanks,
Jake

Re: [PHP] XML and Excel

2004-02-09 Thread Jake McHenry
- Original Message - 
From: Marek Kilimajer [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, February 09, 2004 12:42 PM
Subject: Re: [PHP] XML and Excel


 Create native xls files, there are at least two classes that can help
 you, here is one:
 http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/

 Jake McHenry wrote:
  Hi everyone. Since my last post of outputing to excel, I have converted
my output to XML, quite happy with myself. It looks perfect. Perfect on my
set that is. I have win xp with office xp. Excel with office xp recognizes
XML. Office 2000, which the rest of my company is using, doesn't. Does
anyone know of a way I can take the XML I have now and have office 2000
recognize it? I feel kinda stupid... lol  Sent out an email to my accounting
department saying it was ready for them and all they get is garbage on their
screen.
 
  Anyone know of anything I can do?
 
  Thanks,
  Jake


sweet.. thanks a lot.. took me about 3 hours, but I got it all converted.
works great!

Thanks again,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: excel output question

2004-02-08 Thread Jake McHenry
- Original Message - 
From: Phillip Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 07, 2004 4:37 AM
Subject: Re: [PHP] Re: excel output question


 I would do it like this:

 $build =  '%s','%s','%s','%s'\n;
 $build = sprintf($build,$field1,$field2,$field3,$fieldN);

 you could also try escaping the comma. if this doesn't work you can always
 just dump to html tables and save the file as *.xls (excel spreadsheet);
 excel understands html tables and simple markup as spreadsheet data.

 ie:

 html
 table
 tr
 tdfield1/tdtdfield2/tdtdfield3/tdtdfield4/td
 /tr
 tr
 tdvalue1/tdtdvalue2/tdtdvalue3/tdtdvalue4/td
 /tr
 /table
 /html


 ~phillip
 Jake McHenry [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  - Original Message - 
  From: Paul Furman [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, February 07, 2004 1:56 AM
  Subject: [PHP] Re: excel output question
 
 
   Single quote everything should work.
  
   Jake McHenry wrote:
  
Hi everyone. I'm outputing payroll information to an excel csv file,
 and
  when anyone get's paid over 1k, the amount is split into two fields
 because
  of the comma in the amount. Is there anyway I can tell excel that this
  particular comma is not a deliminator?
   
Thanks,
Jake
  
   -- 
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
  like this?
 
  output =
 

'$fullname',,'$location',,'$regularhours','$vachours','$sickhours','$compho
 

urs','$mischours','$wopyhours','$sefahours','$biweekly[0]','$adjustedtime',,
  ,,,'$sub401k
  ','$payrate','$gross5'\n;
 
  That just filled my spreadshit with quotes around everything... still
the
  amounts larger than 1k are in 2 columns..
 
  did I do something wrong?
 
  Thanks,
  Jake

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


This is in a simple while loop, data is coming from a mysql database.
Creating a seperate function would too time consuming changing all of the
existing code for what this page is doing. It orignally was in html form in
an xls file, but when the file was opened, there were no cell borders
anymore. If anyone can tell me how to turn on the cell boarders in an xls
html outputted file, that would also work. This is the only reason I went
back to a csv file.

Thanks,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: excel output question

2004-02-07 Thread Jake McHenry
- Original Message - 
From: Paul Furman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 07, 2004 1:56 AM
Subject: [PHP] Re: excel output question


 Single quote everything should work.

 Jake McHenry wrote:

  Hi everyone. I'm outputing payroll information to an excel csv file, and
when anyone get's paid over 1k, the amount is split into two fields because
of the comma in the amount. Is there anyway I can tell excel that this
particular comma is not a deliminator?
 
  Thanks,
  Jake

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



like this?

output =
'$fullname',,'$location',,'$regularhours','$vachours','$sickhours','$compho
urs','$mischours','$wopyhours','$sefahours','$biweekly[0]','$adjustedtime',,
,,,'$sub401k
','$payrate','$gross5'\n;

That just filled my spreadshit with quotes around everything... still the
amounts larger than 1k are in 2 columns..

did I do something wrong?

Thanks,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: excel output question

2004-02-07 Thread Jake McHenry
- Original Message - 
From: Phillip Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 07, 2004 4:37 AM
Subject: Re: [PHP] Re: excel output question


 I would do it like this:

 $build =  '%s','%s','%s','%s'\n;
 $build = sprintf($build,$field1,$field2,$field3,$fieldN);

 you could also try escaping the comma. if this doesn't work you can always
 just dump to html tables and save the file as *.xls (excel spreadsheet);
 excel understands html tables and simple markup as spreadsheet data.

 ie:

 html
 table
 tr
 tdfield1/tdtdfield2/tdtdfield3/tdtdfield4/td
 /tr
 tr
 tdvalue1/tdtdvalue2/tdtdvalue3/tdtdvalue4/td
 /tr
 /table
 /html


 ~phillip
 Jake McHenry [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  - Original Message - 
  From: Paul Furman [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, February 07, 2004 1:56 AM
  Subject: [PHP] Re: excel output question
 
 
   Single quote everything should work.
  
   Jake McHenry wrote:
  
Hi everyone. I'm outputing payroll information to an excel csv file,
 and
  when anyone get's paid over 1k, the amount is split into two fields
 because
  of the comma in the amount. Is there anyway I can tell excel that this
  particular comma is not a deliminator?
   
Thanks,
Jake
  
   -- 
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
  like this?
 
  output =
 

'$fullname',,'$location',,'$regularhours','$vachours','$sickhours','$compho
 

urs','$mischours','$wopyhours','$sefahours','$biweekly[0]','$adjustedtime',,
  ,,,'$sub401k
  ','$payrate','$gross5'\n;
 
  That just filled my spreadshit with quotes around everything... still
the
  amounts larger than 1k are in 2 columns..
 
  did I do something wrong?
 
  Thanks,
  Jake

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


This is in a simple while loop, data is coming from a mysql database.
Creating a seperate function would too time consuming changing all of the
existing code for what this page is doing. It orignally was in html form in
an xls file, but when the file was opened, there were no cell borders
anymore. If anyone can tell me how to turn on the cell boarders in an xls
html outputted file, that would also work. This is the only reason I went
back to a csv file.

Thanks,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] excel output question

2004-02-06 Thread Jake McHenry
Hi everyone. I'm outputing payroll information to an excel csv file, and when anyone 
get's paid over 1k, the amount is split into two fields because of the comma in the 
amount. Is there anyway I can tell excel that this particular comma is not a 
deliminator?

Thanks,
Jake

Re: [PHP] Logging on to a web based application

2004-01-30 Thread Jake McHenry
- Original Message - 
From: Shaun [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 30, 2004 1:38 PM
Subject: [PHP] Logging on to a web based application


 Hi,

 We are trying to develop a web based system where users a charged per
 office. I would be grateful to hear anyone's experience in creating such
 applications and how the users are managed. Our main concern is how we
stop
 a client paying for one office use and distributing their password to
other
 offices...

 Many thanks

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



You can base it on thier ip address if it's static limiting to that one
addy, or only allow them so many connections per day, or let them access no
matter what and record their IP address and charge them more if they access
from more than one location. just some ideas

Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] variable container?

2004-01-26 Thread Jake McHenry
Is there some global variable container that I can print_r out to show me all the 
variables that are being used on a page? In my efforts of converting from globals over 
to sessions, I've been getting a little mis organized with my code, and would like to 
know of all variables that are in use on each page.

Thanks,
Jake


Re: [PHP] Re: variable container?

2004-01-26 Thread Jake McHenry
- Original Message - 
From: Jas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 26, 2004 5:43 PM
Subject: [PHP] Re: variable container?


 http://us4.php.net/manual/en/function.var-dump.php
 HTH
 Jas

 Jake McHenry wrote:
  Is there some global variable container that I can print_r out to show
me all the variables that are being used on a page? In my efforts of
converting from globals over to sessions, I've been getting a little mis
organized with my code, and would like to know of all variables that are in
use on each page.
 
  Thanks,
  Jake
 

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


I want a list of all variables used. I tried just putting var_dump() but got
an error. I'd like to see a list of all variables being used in the script,
then I can start cleaning original code and what I have added. Some strange
results lead me to believe I'm declaring the variables more than once with
different values, and I'd like to know if there is a way that I can just get
a dump of ALL the variables in use. Unless I'm using the function wrong.
Please advise.

Thanks,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: variable container?

2004-01-26 Thread Jake McHenry
- Original Message - 
From: John Nichel [EMAIL PROTECTED]
To: Jake McHenry [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, January 26, 2004 6:11 PM
Subject: Re: [PHP] Re: variable container?


 Jake McHenry wrote:
 snip
  I want a list of all variables used. I tried just putting var_dump() but
got
  an error. I'd like to see a list of all variables being used in the
script,
  then I can start cleaning original code and what I have added. Some
strange
  results lead me to believe I'm declaring the variables more than once
with
  different values, and I'd like to know if there is a way that I can just
get
  a dump of ALL the variables in use. Unless I'm using the function wrong.
  Please advise.

 There are your 'super-globals', like $_POST, $_GET, $_REQUEST,
 $_SESSION, etc.  If I'm not mistaken, phpinfo() will show you all of
 those, as well as php/web server configuration.

 -- 
 By-Tor.com
 It's all about the Rush
 http://www.by-tor.com


yes, but they're not converted into those yet. all of the variables are with
register_globals = on and they're all global vars. I'm converting them all
over to session vars, this is why I need to know the list.

Thanks,
Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: variable container?

2004-01-26 Thread Jake McHenry
- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 26, 2004 6:12 PM
Subject: Re: [PHP] Re: variable container?


 Hello Jake,

 On 26 Jan 2004 at 17:55, Jake McHenry wrote:

  I want a list of all variables used. I tried just putting var_dump() but
got
  an error. I'd like to see a list of all variables being used in the
script,
  then I can start cleaning original code and what I have added. Some
strange
  results lead me to believe I'm declaring the variables more than once
with
  different values, and I'd like to know if there is a way that I can just
get
  a dump of ALL the variables in use. Unless I'm using the function wrong.
  Please advise.

 I don't think you can print out *all* the variables in *all* scopes and
their values, but you
 can certainly get a list of all the variables in the global scope (i.e.
all variables except the
 ones created inside functions and classes). print_r ($GLOBALS) will give
you all the
 super-global arrays ($_POST, $_GET, $_SERVER etc) as well as all user
variables
 created in the global scope. Look for *RECURSION* in the output; that's
where you'll
 find the user variables.

 Hope this helps,

 Erik


I think this may be it. I'll try it and let everyone know.

Thanks!

Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] odd and even numbers

2004-01-16 Thread Jake McHenry
I have a random number being generated from 1 to 501, is there an easy way for me to 
tell if the result is an odd or even number?

Thanks,
Jake

  1   2   >