RE: [PHP] Congratulations You Win

2003-10-08 Thread Dan Joseph
Excellent!  We all win again!  Retirement here I come!

-Dan Joseph

 -Original Message-
 From: Francis Weeny [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 08, 2003 10:39 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Congratulations You Win
 
 
 SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. 
 ALFONSTRAAT B56, 
 1002 BS AMSTERDAM, THE NETHERLANDS. 
 TO THE MANAGER 
 FROM: THE DESK OF THE PROMOTIONS MANAGER, 
 INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT, 
 REF: OYL /26510460037/02 
 BATCH: 24/00319/IPD 
 ATTENTION: 
 RE/ AWARD NOTIFICATION; FINAL NOTICE 
 We are pleased to inform you of the announcement 
 today,  7th October2003 of winners of the SUNSWEETWIN PROMO
 LOTTERY,THE 
 NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003
 
 Your company,is attached to ticket number 
 023-0148-790-459, with serial number 5073-11 drew 
 the lucky numbers 43-11-44-37-10-43, and consequently 
 won the lottery in the 3rd category. 
 You have therefore been approved for a lump sum pay 
 out of US$5,500.000.00 in cash credited to file REF 
 NO. OYL/25041238013/02. This is from total prize money
 of 
 US$80,400,000.00 shared among the seventeen
 international winners in
 this category. All participants were selected through
 a computer 
 ballot
 system drawn form 25,000 names from Australia, New 
 Zealand, America, Europe, North America and Asia as
 part of 
 International Promotions Program, which is conducted 
 annually. 
 CONGRATULATIONS! 
 Your fund is now deposited with a Security company 
 insured in your name. Due to the mix up of 
 some numbers and names, we ask that you keep this
 award strictly 
 from 
 public notice until your claim has 
 been processed and your money remitted to your
 account. 
 This is part of our security protocol to avoid 
 double claiming or unscrupulous acts by participants
 of 
 this program.  
 We hope with a part of you prize, you will 
 participate in our end of year high stakes US$1.3
 billion 
 International Lottery. 
 To begin your claim, please contact your claim 
 agent; Mr Francis weeny at this email address below.
 [EMAIL PROTECTED]
 For due processing and remittance of your prize 
 money to a designated account of your choice. 
 Remember, all prize money must be claimed not later 
 than 17th October 2003. After this date, all funds will 
 be returned as unclaimed. 
 NOTE: In order to avoid unnecessary delays and 
 complications, please remember to quote your 
 reference and batch numbers in every one of your 
 orrespondences with your agent. 
 Furthermore, should there be any 
 change of your address, do inform your claims agent 
 as soon as possible. 
 Congratulations again from all our staff and thank 
 you for being part of our promotions program. 
 
 Sincerely, 
 Clark Wood
 THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE
 NETHERLANDS.
 NB. Any breach of confidentiality on the part of 
 the winners will result to disqualification. 
 SORRY FOR THE LATE INFORMATION THANKS 
 CLARK  WOOD
 
 
  
 
 -- 
 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[2]: [PHP] dynamic - static

2003-10-08 Thread Veniamin Goldin
Hello Mike,

Thank you for your help,

As I wrote already this issue is mainly because of search engines
incompatibility with dynamic content sites (to be more exact - with
urls containing get parameters, in my case ex. index.shtml?lang=enmenu_id=23)

Which of your described solution would you suggest for my situation ?

Turck MMCache already installed. Now I need to do something with my urls.
There are also problem emulating search engine friendly urls using /
instead of  because I use SSI, so I can not use post method in
forms, while using GET it will be a bit difficult to handle all params
correctly, or I'm wrong ?

Thanks again.

Dear All,

Does anybody have any solutions, which makes possible to produce static
pages of all dynamic cms once a day and can be easily integrated into
already made site?

MM Why do you need to do this? Is it because of hosting restrictions,
MM performance concerns, or portability/mirroring (which is a form of hoting
MM restriction I suppose)?

MM There are a number of ways to approach this problem...

MM If your sole concern is performance, judicious use of caching could be
MM your answer. You can cache your code using PHP Accelerator or Turck
MM MMCache, which helps with load times, or you can cache your data by
MM implementing a caching layer between your application and your database. I
MM believe PEAR has some classes designed for this. They basically all boil
MM down to memoizing function return values with the serialize/unserialize
MM functions, and storing those results in files. I have used this method in
MM applications to great effect - a cascading cache that stores database
MM results, page components like navigation areas, and entire pages is a
MM great performance enhancer, but you need to know how to mark and remove
MM stale data dynamically.

MM If you need a static version of your site due to hosting restrictions, you
MM can used a spider such as wget (I think has been mentioned in this thread)
MM to crawl your site and generate a local copy for you. Wget is an excellent
MM one, because it has options like --page-requisites and --convert-links
MM which make it easy to generate a self contained site mirror. This approach
MM requires that your dynamic links all have a slash-syntax, like
MM index.php/foo/bar/etc/. It's very easily implementable in a series of Make
MM rules - I use this method for www.stamen.com, where rolling out a new
MM version of the site is a simple matter of 'make clean; make live'.

MM You can also use the 'page fault' method, which is my personal favorite.
MM Let Apache's mod_rewrite handle your caching and URL-rewriting:
MM 1) user requests page foo/index.html
MM 2) if foo/index.html does not exist in filesystem, Apache knows to
MMredirect this request to bar.php
MM 3) bar.php performs actions needed to generate contents of
MMfoo/index.html, and also creates the file
MM 4) bar.php returns contents of foo/index.html
MM 5) subsequent requests for foo/index.html just return that file,
MMbypassing PHP entirely.
MM This one's sort of a balancing act though. It has been suggested here that
MM you can use Apache's ErrorDocument directive to direct the request to
MM bar.php, but this has the unfortunate side-effect of returning a 404
MM status code with the response. Not really a problem with a normal browser,
MM but when those responses are (for example) XML files used by flash, the
MM 404 causes it to error out regardless of the content of the response. A
MM better method is to use a string of RewriteCond's, like so:
MM RewriteCond %{REQUEST_FILENAME} !-f [OR]
MM RewriteCond %{REQUEST_FILENAME} -d
MM RewriteCond %{REQUEST_FILENAME}/index.html  !-f
MM RewriteRule ^.*$bar.php
MM Obviously, this method is totally incompatible with any form of actual
MM dynamic content, but you're asking for ways to generate static output, so
MM I assume that's not an issue. The difficulty with this one is the same as
MM with any caching system as above - finding and flushing stale data. I do
MM this by rolling the cache deletion code into the editing functions, but
MM you can also use a cronjob to find and flush files older than some cutoff
MM time period.

MM -
MM michal migurski- contact info and pgp key:
MM sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread LiteSpeed Information
Ryan,

Thank you for your interest.
Our recommendation is, to setup your server environment with Apache 
first, make sure every thing works, then run LiteSpeed in parallel on 
different port, sharing the document root, then stop Apache and switch 
LiteSpeed to port 80. If anything goes wrong, switch back to Apache. The 
migration could be easier after we finish the Apache conversion tool. :-)
For JSP and Servlets, a external Servlet engine is required, Tomcat or 
Jetty is fine.
The biggest advantage of  running LiteSpeed in front of a servlet engine 
is, the servlet engine is protected from being abused, the quality of 
service can be much better.

If you need help with anything, just let us know.

Best regards,
LiteSpeed Team
Ryan A wrote:

Hi,
I am thinking of using LiteSpeed on a dedicated account that our company has
reciently purchased (P4 2.0GHZ, Linux, 80gb space, 100gb bandwidth.etc),
anybody out there already using it and facing any problems?
One of the main reasons we want to use it is because of PHP/JSP and
Servlets.
Cheers,
-Ryan
 

 

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


Re: [PHP] Re: configuration class - skeleton code for first OOP adventure

2003-10-08 Thread anders thoresson
I'm not a OO expert but I think you could include the 
SetConfigurationFile
() function in your contructor. And if it fails inside the constructor 
exit
to your other class controlling errors.
 You mean that I don't need a separate function for setConfigurationFile, 
but could rather include the controlling code in my constructor?

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


[PHP] Check for page change efficiently [was Re: Creating a blogrolling/link management system]

2003-10-08 Thread Chris
[EMAIL PROTECTED] (Paul Van Schayck) wrote in
news:[EMAIL PROTECTED]: 

  First of all you need to check with the website you are going to check
 if they really enjoy all bandwith required. And people will not see
 their banners anymore.

I'm not sure I understand-- I want to check to see if their page has 
changed once each day and, if so, I will highlight that link in my list... 
I doubt most web sites would have a problem with one hit per day :)

I am not scraping and redisplaying content...

My question boils down to the most efficient method to detect whether a 
page has been modified recently...

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



Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Leif K-Brooks
LiteSpeed Information wrote:

Thank you for your interest.
Our recommendation is, to setup your server environment with Apache 
first, make sure every thing works, then run LiteSpeed in parallel on 
different port, sharing the document root, then stop Apache and switch 
LiteSpeed to port 80. If anything goes wrong, switch back to Apache. 
The migration could be easier after we finish the Apache conversion 
tool. :-)
I suppose you're waiting for it before switching yourself?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Check for page change efficiently [was Re: Creating a blogrolling/link management system]

2003-10-08 Thread Paul van Schayck
Hello,

[EMAIL PROTECTED] (Chris) wrote
 I'm not sure I understand-- I want to check to see if their page has 
 changed once each day and, if so, I will highlight that link in my
 list... I doubt most web sites would have a problem with one hit per
 day :)

Don't know much about blogs ;). I though those things were on one page 
with hunders of blogs.

 I am not scraping and redisplaying content...

Not but people don't have to view their page anymore and see their adds. 
Instead of cheking with their page, they check with your page.

 My question boils down to the most efficient method to detect whether
 a page has been modified recently...

Socket connection, look at the second comment of the filemtime() 
function:
http://php.net/manual/en/function.filemtime.php

Polleke

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



Re: [PHP] Re: configuration class - skeleton code for first OOP adventure

2003-10-08 Thread Paul van Schayck
[EMAIL PROTECTED] (Anders Thoresson) wrote
You mean that I don't need a separate function for
setConfigurationFile, 
but could rather include the controlling code in my constructor?

Yup.

Polleke

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



Re[2]: [PHP] dynamic - static

2003-10-08 Thread Mike Migurski
As I wrote already this issue is mainly because of search engines
incompatibility with dynamic content sites (to be more exact - with urls
containing get parameters, in my case ex. index.shtml?lang=enmenu_id=23)

Which of your described solution would you suggest for my situation ?

Turck MMCache already installed. Now I need to do something with my urls.
There are also problem emulating search engine friendly urls using /
instead of  because I use SSI, so I can not use post method in forms,
while using GET it will be a bit difficult to handle all params
correctly, or I'm wrong ?

If all you need to do is change your URLs, the easiest method by far is to
change them all to something like 'index.php/lang/en/menu_id/23' -- you'd
need to add a parser function at the beginning, though.

Try isolating the '/lang/en...' by comparing $_SERVER['SCRIPT_NAME']
against $_SERVER['REQUEST_URI'] and then exploding the result and setting
your request variables accordingly.

I have never tried this with SSI, so I have no idea what sort of problems
you may run into - you may be better off going with PHP includes all the
way through. I have also recently read (on a different list)  that Google
in fact does crawl URLs with GET parameters, but I have not verified this
and tend to avoid it as a matter of superstition.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] Re: PHP CSS

2003-10-08 Thread David Otton
On Wed, 8 Oct 2003 08:49:17 -0700, you wrote:

On Wed, 08 Oct 2003 20:34:51 +0600
Raditha Dissanayake [EMAIL PROTECTED] wrote:

 Raquel Rice wrote:

 Well, yes ... in a way.  The plan is to have a main site, where
 users can have a subsite off the main site.  I want to give the
 users the ability to customize, to an extent, their own subsite
 if they wish, while the main site retains the look I give it.
 
 Couple of days of ago we had a nice thread on the use of XSLT.
 This is a situation where XSLT would be an ideal solution.

Where would you suggest I begin my education?

I think he's suggesting parsing and rewriting the CSS files - treating them
as INI files. Personally, I think XSLT os overkill for this, but then I
think it's a pig's ear fullstop.

Write a script that opens your CSS file, parses the current CSS settings out
of it, and displays them as a form. The user then updates and submits new
values, and the script writes the new values the the CSS file.

I'd bet money that a PHP class for reading and writing CSS files already
exists, too.

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



Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread LiteSpeed Information

Our recommendation is, to setup your server environment with Apache 
first, make sure every thing works, then run LiteSpeed in parallel on 
different port, sharing the document root, then stop Apache and 
switch LiteSpeed to port 80. If anything goes wrong, switch back to 
Apache. The migration could be easier after we finish the Apache 
conversion tool. :-)


I suppose you're waiting for it before switching yourself?
Not at all. It is pretty easy to convert from Apache to LiteSpeed 
manually, depends on what features being used, it could be as easy as 
changing the document root.
What the conversion tool does is that it analyzes Apache's configuration 
file and set our XML configuration file accordingly, it takes care of 
details as much as it can. It is handy if you have a lot virtual servers 
and/or complicate rules for access control. We try to make server 
administration as easy as possible.
There is an Apache migration guide in our documentation already.

What we are waiting for are extra security features: chroot(almost 
done) and auto-ban. They are not available on Apache either we believe.

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


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Leif K-Brooks
LiteSpeed Information wrote:

What we are waiting for are extra security features: chroot(almost 
done) and auto-ban. They are not available on Apache either we believe.
If they aren't available with Apache either, why are you still using it?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


[PHP] Credit Card Validation

2003-10-08 Thread Nathan Taylor
Hey guys (and gals),

I am sure this has been asked many times before, but I couldn't seem to find a recent 
PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or it 
doesn't exist.

My question is pretty obvious, I was wondering what the process for validating a 
credit cards with both preprocessing by the form to determine the pattern validity and 
post processing by a bank to confirm the actual card validity.

Your help would be greatly appreciated.

Best Wishes,
Nathan Taylor

[PHP] Saving Form Data

2003-10-08 Thread PHP
Hi,
Is there anyway of saving a form with layout and data, without knowing what the fields 
are?
I would like to be able to have the use Upload there own form. Then that form can be 
later viewed and filled out by someone else and be able to save all the data that was 
entered.
I can do this easy enough with Text and Textarea type fields, but things like selects, 
radios, etc I can't think of a way to save them. 
Basically It would be like save a screen capture of the filled out form for 
viewing/altering later.

Thanks for any help.

RE: [PHP] Saving Form Data

2003-10-08 Thread Jay Blanchard
[snip]
Is there anyway of saving a form with layout and data, without knowing
what the fields are?
I would like to be able to have the use Upload there own form. Then
that form can be later viewed and filled out by someone else and be able
to save all the data that was entered.
I can do this easy enough with Text and Textarea type fields, but things
like selects, radios, etc I can't think of a way to save them. 
Basically It would be like save a screen capture of the filled out form
for viewing/altering later.
[/snip]

If the form method is POST all of the data is in the $_POST array which
could be saved to a text file, if GET all of the data is in the $_GET
array. You would have to read out of the saved text file to re-populate
the form for editing or viewing later

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



Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Jason Wong
On Thursday 09 October 2003 00:44, Robert Cummings wrote:

 *heheh* That's like the smarty template site not using smarty. Or back
 in the day when hotmail was owned by Microsoft but still running off
 linux.

I believe it's still the case. The frontend runs on MS servers but the backend 
which handles the mail is still using BSD after several desperate attempts to 
convert over to Windows failed.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
One lawyer can steal more than a hundred men with guns.
-- The Godfather
*/

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



RE: [PHP] Credit Card Validation

2003-10-08 Thread Craig Lonsbury
this is a good explanation of the validation you can do.
http://www.beachnet.com/~hstiles/cardtype.html

if you are trying to validate client-side you'll need javascript,
which is why there may not be anything on phpbuilder

i have no idea about the bank side, but post any info you find out
back here, it is coming up soon for me =)

hth,
Craig

-Original Message-
From: Nathan Taylor [mailto:[EMAIL PROTECTED]
Sent: October 8, 2003 2:04 PM
To: php-general
Subject: [PHP] Credit Card Validation


Hey guys (and gals),

I am sure this has been asked many times before, but I couldn't seem to
find a recent PHP4-based thread in the logs at phpbuilder.com; so either
I'm incompetent or it doesn't exist.

My question is pretty obvious, I was wondering what the process for
validating a credit cards with both preprocessing by the form to
determine the pattern validity and post processing by a bank to confirm
the actual card validity.

Your help would be greatly appreciated.

Best Wishes,
Nathan Taylor

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



[PHP] Re: Check for page change efficiently [was Re: Creating a blogrolling/link management system]

2003-10-08 Thread Kevin Stone

Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 [EMAIL PROTECTED] (Paul Van Schayck) wrote in
 news:[EMAIL PROTECTED]: 
 
   First of all you need to check with the website you are going to check
  if they really enjoy all bandwith required. And people will not see
  their banners anymore.
 
 I'm not sure I understand-- I want to check to see if their page has 
 changed once each day and, if so, I will highlight that link in my list... 
 I doubt most web sites would have a problem with one hit per day :)
 
 I am not scraping and redisplaying content...
 
 My question boils down to the most efficient method to detect whether a 
 page has been modified recently...

Chris,

This is just a thought.. I have never employed this method personally.. but I suppose 
you could read the page into a string and use the md5() function to generate a 
hexidecimal value based on that string.  Store the hex value in a database and compare 
it against the new value generated the next day.  If anything on the page has been 
modified the values should not match.  Even the most minute change should trigger a 
new value.  Obviously you won't know *what* has been modified only that the page *has* 
been modified

There are some pitfalls to keep in mind such as if the page contains dynamic content, 
if there is a server error, or if the page has been removed.  Thanks to Network 
Solutions evil Sitefinder you may find it difficult if not impossible to predict what 
will be read by your script if the page goes missing.  But this will all show up in 
the hex value and you won't know if the page is still relevant until you personally 
visit the links.

http://www.php.net/manual/en/function.md5.php

Good luck,
Kevin


Re: [PHP] PDFlib Page Dimensions and Word Wrap

2003-10-08 Thread Jason Wong
On Wednesday 08 October 2003 23:34, Roger Spears wrote:

 I have read the http://us4.php.net/manual/en/ref.pdf.php and am unable
 to find a solution for what I'm trying to do.  I've also tried googling
 for what I'm trying to do.  No luck there either.  I've also downloaded
 the PDFlib docs but no luck there.

 When using PDFlib you specify page dimensions.  Why then, does it not
 automatically wrap words/texts/sentences to the next line?  Is there
 something I'm missing to have PDFlib automatically do this?  No matter
 the amount of text in the variable I'm trying to print in the pdf, it
 just runs off the right side of the pdf document.

I don't there are any such automatic niceties in the raw PDFlib. In any case 
if you want something that's easier to use try

  google  php pdf class

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
System going down in 5 minutes.
*/

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



Re: [PHP] Credit Card Validation

2003-10-08 Thread Becoming Digital
There are a few classes in the Repository.  Check the link below.
http://phpclasses.promoxy.com/browse.html/class/19.html

Not to discount PHP Builder, but I generally find less useful info there than I do at 
DevShed.com, DevArticles.com, etc.  The structure of the site certainly doesn't make 
the process any easier.

Edward Dudlik
Becoming Digital
www.becomingdigital.com



- Original Message - 
From: Nathan Taylor [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Wednesday, 08 October, 2003 16:03
Subject: [PHP] Credit Card Validation


Hey guys (and gals),

I am sure this has been asked many times before, but I couldn't seem to find a recent 
PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or it 
doesn't exist.

My question is pretty obvious, I was wondering what the process for validating a 
credit cards with both preprocessing by the form to determine the pattern validity and 
post processing by a bank to confirm the actual card validity.

Your help would be greatly appreciated.

Best Wishes,
Nathan Taylor

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



Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread LiteSpeed Information

If they aren't available with Apache either, why are you still using it?
No doubt, Apache is a good web server, everyone use it. ;-)

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


Re: [PHP] configuration class - skeleton code for first OOP adventure

2003-10-08 Thread Marek Kilimajer
anders thoresson wrote:
foreach ($changedValues as $changedValue)
{
  $new_contents = ereg_replace($changedValue[old], 
$changedValue[new], $contents);
  $contents = $new_contents;
}
This will not work. For example if you have:

option1 = value;
option2 = value2;
then ereg_replace('value', 'changed', $contents); will make it:

option1 = changed;
option2 = changed2;
Marek

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


Re: [PHP] Saving Form Data

2003-10-08 Thread PHP
Unfortuanetly that would only work for Text and Textarea types.
It wouldn't really for for a select, bcause how do you know which option of
the form was selected?
How do you select the correct option without knowing what the other options
are?
Ex, a user uploads a form with a select type like so:

select name=Month
option value=JanJan/option
option value=FebFeb/option
/select.

Your post value would be Month=Feb, if Feb was selected when the form was
filled out.

Now, I load the form again, I know that Month = Feb, but how to I now make
the form preselect the Option? I would somehow have to parse the form data
and look for the select of Month and then look through all the options for
Feb and insert a selected statement in the form in that spot.

- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]; php [EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 12:58 PM
Subject: RE: [PHP] Saving Form Data


 [snip]
 Is there anyway of saving a form with layout and data, without knowing
 what the fields are?
 I would like to be able to have the use Upload there own form. Then
 that form can be later viewed and filled out by someone else and be able
 to save all the data that was entered.
 I can do this easy enough with Text and Textarea type fields, but things
 like selects, radios, etc I can't think of a way to save them.
 Basically It would be like save a screen capture of the filled out form
 for viewing/altering later.
 [/snip]

 If the form method is POST all of the data is in the $_POST array which
 could be saved to a text file, if GET all of the data is in the $_GET
 array. You would have to read out of the saved text file to re-populate
 the form for editing or viewing later

 -- 
 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] Re: Check for page change efficiently [was Re: Creating a blogrolling/link management system]

2003-10-08 Thread Paul van Schayck
[EMAIL PROTECTED] (Kevin Stone) wrote
Hello Kevin.

 This is just a thought.. I have never employed this method
 personally.. but I suppose you could read the page into a string and
 use the md5() function to generate a hexidecimal value based on that
 string.  Store the hex value in a database and compare it against the
 new value generated the next day.  If anything on the page has been
 modified the values should not match.  Even the most minute change
 should trigger a new value.  Obviously you won't know *what* has been
 modified only that the page *has* been modified 

 There are some pitfalls to keep in mind such as if the page contains
 dynamic content, if there is a server error, or if the page has been
 removed.  Thanks to Network Solutions evil Sitefinder you may find it
 difficult if not impossible to predict what will be read by your
 script if the page goes missing.  But this will all show up in the hex
 value and you won't know if the page is still relevant until you
 personally visit the links. 

Too much pittfals and too slow! Really the socket connection only 
retreiving the headers is really the best way. 

This function is what you need:

function fileStamp($domain, $file)
{
$file = / . $file;
$fp = fsockopen ($domain, 80, $errno, $errstr, 30);
$header = HEAD $file HTTP/1.0\r\nHost: $domain\r\n\r\n;
if (!$fp){
   echo $errstr ($errno);
   return false;
}
fputs ($fp, $header);
while (!feof($fp)) {
   $output .= fgets ($fp,128);
}
fclose ($fp);
$begin = strpos($output, Last-Modified: ) + 15;
if($begin==15) //no last-modified (like yahoo.com)
   return false;
$end = strpos($output, \n, $begin);
$time = substr($output, $begin, $end-$begin-1);
return strtotime($time);
} 

Polleke

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



Re: [PHP] Saving Form Data

2003-10-08 Thread Marek Kilimajer
PHP wrote:
Hi,
Is there anyway of saving a form with layout and data, without knowing what the fields are?
I would like to be able to have the use Upload there own form. Then that form can be later viewed and filled out by someone else and be able to save all the data that was entered.
I can do this easy enough with Text and Textarea type fields, but things like selects, radios, etc I can't think of a way to save them. 
Basically It would be like save a screen capture of the filled out form for viewing/altering later.

Thanks for any help.


radio:
input type=radio name=name value=1?= ($_POST['name']=='1' ? ' 
checked': '') ?
input type=radio name=order_type value=2?= ((!$_POST['name'] || 
$_POST['name']=='2') ? ' checked': '') ?

select:
select name=name
option value=1?= ($_POST['name']=='1' ? ' selected': '') ? ONE 
/option
option value=2?= ($_POST['order_type']=='2' ? ' selected': '') ? 
TWO /option

checkbox:
input type=checkbox name=name value=1?= ($_POST['name']=='1' ? ' 
checked': '') ?

You cannot save file input that easily, you have to keep the file on the 
server and give the user oportunity to change it.

Marek

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


Re: [PHP] Saving Form Data

2003-10-08 Thread PHP
Thanks,
I thought of this, unfortuanetly the user uploading the form would have no
clue in being able to build the form with the $_POST tags already in it.

 PHP wrote:
  Hi,
  Is there anyway of saving a form with layout and data, without knowing
what the fields are?
  I would like to be able to have the use Upload there own form. Then
that form can be later viewed and filled out by someone else and be able to
save all the data that was entered.
  I can do this easy enough with Text and Textarea type fields, but things
like selects, radios, etc I can't think of a way to save them.
  Basically It would be like save a screen capture of the filled out form
for viewing/altering later.
 
  Thanks for any help.


 radio:
 input type=radio name=name value=1?= ($_POST['name']=='1' ? '
 checked': '') ?
 input type=radio name=order_type value=2?= ((!$_POST['name'] ||
 $_POST['name']=='2') ? ' checked': '') ?

 select:
 select name=name
 option value=1?= ($_POST['name']=='1' ? ' selected': '') ? ONE
 /option
 option value=2?= ($_POST['order_type']=='2' ? ' selected': '') ?
 TWO /option

 checkbox:
 input type=checkbox name=name value=1?= ($_POST['name']=='1' ? '
 checked': '') ?

 You cannot save file input that easily, you have to keep the file on the
 server and give the user oportunity to change it.

 Marek

 -- 
 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] Saving Form Data

2003-10-08 Thread Marek Kilimajer
PHP wrote:
Thanks,
I thought of this, unfortuanetly the user uploading the form would have no
clue in being able to build the form with the $_POST tags already in it.

I lost you. What are you trying to do?

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


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Leif K-Brooks
LiteSpeed Information wrote:

No doubt, Apache is a good web server, everyone use it. ;-)
What the heck?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Johnson, Kirk

  No doubt, Apache is a good web server, everyone use it. ;-)
 
 What the heck?

Is this thread headed somewhere?

Kirk

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



RE: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Robert Cummings
On Wed, 2003-10-08 at 16:48, Johnson, Kirk wrote:
 
   No doubt, Apache is a good web server, everyone use it. ;-)
  
  What the heck?
 
 Is this thread headed somewhere?

Into the future? :/

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



Re: [PHP] Saving Form Data

2003-10-08 Thread PHP
Here is the real life idea:
A Supervisor, knows nothing about php, creates a simple form, say a time
sheet, in something like FrontPage.
He then uploads that form to the server.
An employee then looks at a page on the server that will retrieve the form
data that the supervisor made, and automatically fill in the form action and
submit buttons.
The employee then fills out the time sheet and submits it.

Easy to do so far, the hard part:
The supervisor can now get the form data that was filled out. BUT, he sees
the data in the same form he created but pre-filled with all the employees
data.
I know it would be easy to simple print out a list of all the form values
and fields like:
Hours = 5
Day 1 Week 1 = 2
Day 2 Week 1 = 1

But it doesn't look as nice as the looking at the same form but with the
values pre-filled in.

Now, I can do this easily enough with and input type=Text fields and
textarea fields. The hard but is the multiple choice type form fields,
like selects.

I think I need some kind of HTML parser that will break up the supervisors
form, then insert any values need for the form values and then re-display
the form data.


 PHP wrote:
  Thanks,
  I thought of this, unfortuanetly the user uploading the form would have
no
  clue in being able to build the form with the $_POST tags already in it.
 
 

 I lost you. What are you trying to do?

 -- 
 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] LiteSpeed Web Server 1.1

2003-10-08 Thread LiteSpeed Information

No doubt, Apache is a good web server, everyone use it. ;-)
 

What the heck?
   

Is this thread headed somewhere?
 

Sorry about this, Kirk. This thread should stop here. We can discuss it 
off the list if needed.




[PHP] Re: Check for page change efficiently [was Re: Creating a blogrolling/link management system]

2003-10-08 Thread Kevin Stone

Paul Van Schayck [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 [EMAIL PROTECTED] (Kevin Stone) wrote
 Hello Kevin.
 
  This is just a thought.. I have never employed this method
  personally.. but I suppose you could read the page into a string and
  use the md5() function to generate a hexidecimal value based on that
  string.  Store the hex value in a database and compare it against the
  new value generated the next day.  If anything on the page has been
  modified the values should not match.  Even the most minute change
  should trigger a new value.  Obviously you won't know *what* has been
  modified only that the page *has* been modified 
 
  There are some pitfalls to keep in mind such as if the page contains
  dynamic content, if there is a server error, or if the page has been
  removed.  Thanks to Network Solutions evil Sitefinder you may find it
  difficult if not impossible to predict what will be read by your
  script if the page goes missing.  But this will all show up in the hex
  value and you won't know if the page is still relevant until you
  personally visit the links. 
 
 Too much pittfals and too slow! Really the socket connection only 
 retreiving the headers is really the best way. 
 
 This function is what you need:
 
 function fileStamp($domain, $file)
 {
 $file = / . $file;
 $fp = fsockopen ($domain, 80, $errno, $errstr, 30);
 $header = HEAD $file HTTP/1.0\r\nHost: $domain\r\n\r\n;
 if (!$fp){
echo $errstr ($errno);
return false;
 }
 fputs ($fp, $header);
 while (!feof($fp)) {
$output .= fgets ($fp,128);
 }
 fclose ($fp);
 $begin = strpos($output, Last-Modified: ) + 15;
 if($begin==15) //no last-modified (like yahoo.com)
return false;
 $end = strpos($output, \n, $begin);
 $time = substr($output, $begin, $end-$begin-1);
 return strtotime($time);
 } 
 
 Polleke

Slow?  Hogwash.  You're pining over microseconds.  Besides most of the time is taken 
opening the file which you're doing anyway.  Except that the socket method relies on 
header information that may or may not be there.  I agree it would be ideal if you 
could use that information but your fileStamp() function isn't going to work for all 
files on all servers.

- Kevin


[PHP] Re: Credit Card Validation

2003-10-08 Thread Manuel Lemos
Hello,

On 10/08/2003 05:03 PM, Nathan Taylor wrote:
I am sure this has been asked many times before, but I couldn't seem
to find a recent PHP4-based thread in the logs at phpbuilder.com; so
either I'm incompetent or it doesn't exist.
My question is pretty obvious, I was wondering what the process for
validating a credit cards with both preprocessing by the form to
determine the pattern validity and post processing by a bank to
confirm the actual card validity.
In these pages you may find several classes that solve both of your 
problems:

http://www.phpclasses.org/payment

http://www.phpclasses.org/credit



--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] configuration class - skeleton code for first OOP adventure

2003-10-08 Thread Burhan Khalid
anders thoresson wrote:

My first larger project is growing out of control. I've spent some weeks 
reading OOP tutorials, and feel ready to make my first dive into a new 
programming style. One of the things that led me this way was the need 
for user configuration of my project. Therefor, I'll start with a class 
that let's me read and write a configuration file.
Save yourself a lot of headache learn how to use PEAR and OOP all in one 
fell swoop by using PEAR::Config

http://pear.php.net

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HTML Printing problem.

2003-10-08 Thread Burhan Khalid
php coder wrote:

Issue:
HTML files are to large to print from the browser. We are creating 
reports that are ++5 mg in size. This is a real problem for the browser. 
Define real problem. Is your site timing out because the files are too 
large? I've never heard of a browser having problems with 5 meg files. 
Try accidentally clicking on a link and having mozilla open it (for a 
binary file) and you'll see what I mean. It will keep opening the file 
(regardless of size).

We are on a network and can print directly from the server but this 
means we must convert the html to some printer friendly format. We are 
using many new standards such as tbody and thead tags to give us 
consistent header on each page of a printed document. This seems to 
cause problems with most conversions that we have seen.
Well first of all -- this has little to do with PHP.

Printing is something controlled by the user. About the only thing you 
can do as far as HTML and printing go is window.print(); print 
stylesheets (that can also define page breaks, repeating sections); or 
if you can somehow guarantee that only IE users will access the page, 
you can use IE's printing templates (that allow more control, such as 
standard headers/footers).

I think if you were to change your document to a different standard -- 
like XML -- then you can use that file (with XSLT) to control display 
(which would allow you more tuned control over repeated sections) and 
XML-FO to generate different files (like PDF) which allow more stringent 
control and consistent formatting.

Obviously if your format is causing your headaches, you need to change 
formats.  Trying to trick it into doing something might not be the best 
solution.

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Hotmail servers, Was RE: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Andrew Whyte

I hate to continue this thread at all, but...

 -Original Message-
 From: Jason Wong [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 9 October 2003 6:04 AM
 To: [EMAIL PROTECTED]
 
 On Thursday 09 October 2003 00:44, Robert Cummings wrote:
 
  *heheh* That's like the smarty template site not using 
 smarty. Or back 
  in the day when hotmail was owned by Microsoft but still 
 running off 
  linux.
 
 I believe it's still the case. The frontend runs on MS 
 servers but the backend which handles the mail is still using 
 BSD after several desperate attempts to convert over to 
 Windows failed.

iirc, It deffinitly is still the case, MS bought out Hotmail which
always ran on a bunch of FreeBSD servers, at one point tried switching 
it over to IIS/Win2k, and it couldn't keep up, so went back to FreeBSD.

There is also good rumour about that MS have fully ported .NET to
FreeBSD
so that they can use the .NET framework for coding, and FreeBSD to
continue
running Hotmail.

Of course, this could all be just rumour... but it's interesting to
ponder. :-)

-Andrew

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



Re: [PHP] Hotmail servers, Was RE: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread DPCMA Metalito
Why don´t we stop talking about Microsoft and products that they don´t own? 
Reason: Can you imagine that Microsoft would show interest about PHP? Can 
you imagine Ms Visual PHP? we´ll get a non-working scripting non-free 
language while Microsoft think ASP it´s better than PHP and is not a 
threat wewill be able to sleep during nights and safe from this kind of 
nightmares .

cheers!.


DPC




From: Andrew Whyte [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Hotmail servers, Was RE: [PHP] LiteSpeed Web Server 1.1
Date: Thu, 9 Oct 2003 07:58:08 +1000
I hate to continue this thread at all, but...

 -Original Message-
 From: Jason Wong [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 9 October 2003 6:04 AM
 To: [EMAIL PROTECTED]

 On Thursday 09 October 2003 00:44, Robert Cummings wrote:

  *heheh* That's like the smarty template site not using
 smarty. Or back
  in the day when hotmail was owned by Microsoft but still
 running off
  linux.

 I believe it's still the case. The frontend runs on MS
 servers but the backend which handles the mail is still using
 BSD after several desperate attempts to convert over to
 Windows failed.
iirc, It deffinitly is still the case, MS bought out Hotmail which
always ran on a bunch of FreeBSD servers, at one point tried switching
it over to IIS/Win2k, and it couldn't keep up, so went back to FreeBSD.
There is also good rumour about that MS have fully ported .NET to
FreeBSD
so that they can use the .NET framework for coding, and FreeBSD to
continue
running Hotmail.
Of course, this could all be just rumour... but it's interesting to
ponder. :-)
-Andrew

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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


Re: Re[4]: [PHP] Re: PHP CSS

2003-10-08 Thread erythros
it sounds like she using the ini as a user css. so wouldn't it be simpler to
just rename the ini to css, rather than use php to get values from the ini
and apply them to the current css?
 then all she has to do is follow davids adivce for the users css files:

snip
Write a script that opens your CSS file, parses the current CSS settings out
of it, and displays them as a form. The user then updates and submits new
values, and the script writes the new values the the CSS file.
/snip

Tom Rogers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I don't think so, the original question was how to get PHP variables into
a
  style sheet, though your way would work for a separate style sheet for
each
 user.

 BTW I added .ass (active style sheet :)as a file extension for PHP
processing to
 apache for this sort of function but I now use templates so it is
redundant.
 -- 
 regards,
 Tom

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



Re: [PHP] Hotmail servers, Was RE: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Dennis Sterzenbach
Dpcma Metalito [EMAIL PROTECTED] wrote :
 Why don´t we stop talking about Microsoft and products that they don´t
own?
 Reason: Can you imagine that Microsoft would show interest about PHP?
Can
 you imagine Ms Visual PHP? we´ll get a non-working scripting non-free
 language while Microsoft think ASP it´s better than PHP and is not
a
 threat wewill be able to sleep during nights and safe from this kind
of
 nightmares .

ACK
It's almost horrible to imagine what will be, if Microsoft
assmilated technologies like PHP. I still got in mind a cite of David
Stutz,
former a leading engineer of Microsoft. He wrote it in his open letter
to
Microsoft (see
http://www.synthesist.net/writing/onleavingms.html ):
Stop looking over your shoulder and invent something!

This tells everything one needs to know about Microsoft, I guess.

So far,
  Dennis

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



Re: [PHP] Credit Card Validation

2003-10-08 Thread Nathan Taylor
The fact is I just pulled up google and typed in PHP-General Archives and clicked the 
first thing I came up with.  Thanks for the link though.
  - Original Message - 
  From: Becoming Digital 
  To: php-general 
  Sent: Wednesday, October 08, 2003 4:10 PM
  Subject: Re: [PHP] Credit Card Validation


  There are a few classes in the Repository.  Check the link below.
  http://phpclasses.promoxy.com/browse.html/class/19.html

  Not to discount PHP Builder, but I generally find less useful info there than I do 
at DevShed.com, DevArticles.com, etc.  The structure of the site certainly doesn't 
make the process any easier.

  Edward Dudlik
  Becoming Digital
  www.becomingdigital.com



  - Original Message - 
  From: Nathan Taylor [EMAIL PROTECTED]
  To: php-general [EMAIL PROTECTED]
  Sent: Wednesday, 08 October, 2003 16:03
  Subject: [PHP] Credit Card Validation


  Hey guys (and gals),

  I am sure this has been asked many times before, but I couldn't seem to find a 
recent PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or 
it doesn't exist.

  My question is pretty obvious, I was wondering what the process for validating a 
credit cards with both preprocessing by the form to determine the pattern validity and 
post processing by a bank to confirm the actual card validity.

  Your help would be greatly appreciated.

  Best Wishes,
  Nathan Taylor

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



Re: [PHP] Credit Card Validation

2003-10-08 Thread Nathan Taylor
I'll take a look through that and do as much further research as is possible.  Thanks.
  - Original Message - 
  From: Craig Lonsbury 
  To: Nathan Taylor ; php-general 
  Sent: Wednesday, October 08, 2003 4:04 PM
  Subject: RE: [PHP] Credit Card Validation


  this is a good explanation of the validation you can do.
  http://www.beachnet.com/~hstiles/cardtype.html

  if you are trying to validate client-side you'll need javascript,
  which is why there may not be anything on phpbuilder

  i have no idea about the bank side, but post any info you find out
  back here, it is coming up soon for me =)

  hth,
  Craig

  -Original Message-
  From: Nathan Taylor [mailto:[EMAIL PROTECTED]
  Sent: October 8, 2003 2:04 PM
  To: php-general
  Subject: [PHP] Credit Card Validation


  Hey guys (and gals),

  I am sure this has been asked many times before, but I couldn't seem to
  find a recent PHP4-based thread in the logs at phpbuilder.com; so either
  I'm incompetent or it doesn't exist.

  My question is pretty obvious, I was wondering what the process for
  validating a credit cards with both preprocessing by the form to
  determine the pattern validity and post processing by a bank to confirm
  the actual card validity.

  Your help would be greatly appreciated.

  Best Wishes,
  Nathan Taylor

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



[PHP] File upload meter

2003-10-08 Thread Hardik Doshi
Hi Group,

It's really nice to see the file upload meter
developed by Doru Theodor Petrescu
(http://pdoru.from.ro/). He did a nice job. He created
serveral patches for the php 4 to enable the file
upload meter.

I was just wondering what will happen to the file
upload meter once the php 5.0 will release? Is PHP
community planning to put file upload meter code
permanently in every distributions of the php?

Please let me know about my queries. I really want to
use this feature but worrying for the future php
releases.

Thanks

Regards,
Hardik Doshi

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



[PHP] Re: [PHP-DEV] File upload meter

2003-10-08 Thread Curt Zirzow
* Thus wrote Hardik Doshi ([EMAIL PROTECTED]):
 Hi Group,
 
 It's really nice to see the file upload meter
 developed by Doru Theodor Petrescu
 (http://pdoru.from.ro/). He did a nice job. He created
 serveral patches for the php 4 to enable the file
 upload meter.
 
 I was just wondering what will happen to the file
 upload meter once the php 5.0 will release? Is PHP
 community planning to put file upload meter code
 permanently in every distributions of the php?
 
 Please let me know about my queries. I really want to
 use this feature but worrying for the future php
 releases.

You might get better and more authorative feedback if you post this
question to the php-dev list.

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: Re[2]: [PHP] Re: PHP CSS

2003-10-08 Thread Curt Zirzow
On Wed, 8 Oct 2003 09:44:53 -0700, Raquel Rice raquel- 
[EMAIL PROTECTED] wrote:

On Thu, 9 Oct 2003 02:00:20 +1000
Tom Rogers [EMAIL PROTECTED] wrote:
You don't need to call your style sheets .css they can be just as
easily called.php and even have a querystring attached like
subsite.php?user=fred
That way just use php as normal and return a style sheet just as
you would a html page.
Thank you!  I think that is exactly what I needed!
Hello Raquel..

Browse your site with the included php file that generates the css, and
watch your web logs.  If the browser is requesting that file with a 
response status of 200 everytime, I would strongly suggest you fix that.

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


Re: [PHP] function to show time passed since event

2003-10-08 Thread Nathan Taylor
Sure, this isn't tough at all as long as you keep track of your times.

When the user logs in store the time() in a cookie or database. Then to check the time 
since do this

?php

$oldtime = 1065658402;
$difference = time() - $oldtime;
$timesince = time() - $difference;

echo Now: .date(m/d/y g:ia).br /\n;
echo Then: .date(m/d/y g:ia, $timesince).br /\n;

?


That should be right, I think...
  - Original Message - 
  From: Chris W. Parker 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 08, 2003 7:34 PM
  Subject: [PHP] function to show time passed since event


  Hiya.

  Tried searching google with no luck on this one.

  I'd like a function that when passed a time will spit back in plain
  english how much time has passed.

  i.e.

  You logged in one hour ago.


  ?php

  echo You logged in .timepassed('2002-08-05 11:24:52')..;

  ?


  Anyone got da hookup?


  Thanks,
  Chris.

  p.s. Now with signature!

  --
  Don't like reformatting your Outlook replies? Now there's relief!
  http://home.in.tum.de/~jain/software/outlook-quotefix/

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



[PHP] imagepsloadfont on mac os x

2003-10-08 Thread Michael Winston
Hi-

I'm trying to get imagepsloadfont() to work.  I'm on OS X and know next 
to nothing about font types or how the Mac might handle them 
differently.

Basically, using the below code, I'm trying to call up Skia.dfont, one 
of the fonts that comes with OS X.  The code I'm using is straight from 
the manual, with my font path substituted:

?php
header (Content-type: image/jpeg);
$im = imagecreate (350, 45);
$black = imagecolorallocate ($im, 0, 0, 0);
$white = imagecolorallocate ($im, 255, 255, 255);
$font = imagepsloadfont (/Libarary/Fonts/Skia.dfont); // or locate 
your .pfb files on your machine
imagepstext ($im, Testing... It worked!, $font, 32, $white, $black, 
32, 32);
imagepsfreefont ($font);
imagejpeg ($im, , 100); //for best quality...your mileage may vary
imagedestroy ($im);
?

However, I get the message error loading font.  I've compiled 
--with-gd --with-t1lib, etc. so I know the command is recognized.

This is driving me nuts.  Any clues?

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


Re: [PHP] File upload meter

2003-10-08 Thread Raditha Dissanayake
Hi
I remembers seeing something about this in Zend.com sometime back but 
sadly i have forgotten which one it was. I can assure you it most 
certainly isn't my progress meter because the architecture is different :-)

best regards

Hardik Doshi wrote:

Hi Radhitha,

Can you please let me know which file upload meter
code (the one i mentiond or megaupload) will be
included in the V5?
Thanks

Hardik

--- Raditha Dissanayake [EMAIL PROTECTED] wrote:
 

Hi,
These guys have done a good job and I think it's
planned to be included 
in V5.

Till then i invite you to take a look at 
http://www.sourceforge.net/projects/megaupload/ 
where you can download 
a system that works without PHP having to be
patched.

best regards
raditha.
Steve Murphy wrote:

   

David Enderson also developed an upload meter and
 

contacted PHP about
   

including it.
 

http://www.mail-archive.com/[EMAIL PROTECTED]/msg02155.html
   

Long and short, PHP never included it. This
 

functionality is requested and
   

can be included easily. I'm in the process of
 

developing documentation and
   

rpm packaging for Dave's meter and I've already had
 

7 clients call me about
   

it, (IMO) I think its time more projects like this
 

are needed and PHP should
   

do a better job of incorporating them and less time
 

holding conferences.
   

Murph

Oh go here
 

(http://www.pfohlsolutions.com/projects/upload) to
see what's
   

available (not much right now) from Enderson's
 

project. Note this is not the
   

official site.

 

--
Raditha Dissanayake.

http://www.radinks.com/sftp/  |  http://www.raditha/megaupload/
Lean and mean Secure FTP applet with  |  Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB  |  with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] pasted text from word

2003-10-08 Thread Justin French
Hi all,

I'm interested in alternative solutions (to those found in the comments 
on http://au.php.net/htmlspecialchars) for dealing with text pasted 
into a textarea from Word et al.

I want a way of 'dumbing down' certain characters (like quotes) before 
putting them through my own smart quotes engine, and convert other 
characters to their appropriate HTML entity.

htmlspecialchars() doesn't seem to be converting a few test chars I 
have (like curly quotes)

I'm interested in hearing of a few different methods to overcome the 
evil MS Word text :)

Justin

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


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Eugene Lee
On Wed, Oct 08, 2003 at 11:56:51AM -0400, LiteSpeed Information wrote:
: 
: We glad to introduce you LiteSpeed Web Server 1.1.

So it is basically like TUX, a kernel-based web server?

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



Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread LiteSpeed
So it is basically like TUX, a kernel-based web server?
No, it runs completely in user space and be able to match TUX's 
performance for static content.

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


Re: [PHP] Re: PHP CSS

2003-10-08 Thread Raditha Dissanayake
Hi David,

I think he's suggesting parsing and rewriting the CSS files - treating them
as INI files.
Nopes definitely not.

Personally, I think XSLT os overkill for this, but then I
think it's a pig's ear fullstop.
Yes everyone is entitled to his opinion.  :-)

Write a script that opens your CSS file, parses the current CSS settings out
of it, and displays them as a form. The user then updates and submits new
values, and the script writes the new values the the CSS file.
I'd bet money that a PHP class for reading and writing CSS files already
exists, too.
 

I would agree with you that there are ways in which you can dynamically 
generate CSS  etc with PHP. I have been down that road three four years 
back. But raquel wants to separate these things out.

First there was barly and hops, then someone made a better way of 
consumin it - beer.

best regards.

--
Raditha Dissanayake.

http://www.radinks.com/sftp/  |  http://www.raditha/megaupload/
Lean and mean Secure FTP applet with  |  Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB  |  with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php unlink a file - is it possible?

2003-10-08 Thread Alex Shi
Hi,

How can have a php script unlink/delete a file uploaded via FTP? 
Usually a ftp-uploaded file belongs to the ftp user, and a php
script is running by apache/nobody. Seems like there shouldn't
be any way to do this...OK, my situation is that I want a php script
to this: it can move bulk uploaded (ftp) file to certain directories 
and then remove the original files, something just like a move.
If anyone knows on how to move or delete a file, please give 
me a hand. Thanks in advance!

Alex

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



Re: [PHP] shell_exec question

2003-10-08 Thread John Nichel
Is there a .htaccess file in (or above) the directory that the script is 
in?  If so, look to see if safe mode is turned on there.

Chris Blake wrote:

On Wed, 2003-10-08 at 15:23, Marek Kilimajer wrote:

Then check your httpd.conf for php_(admin_)?(flag|value)



OK, so I`ve tried all the suggestions posted, thanks guys...but then I
went and deleted the php.ini file in /etc, and still when I use
phpinfo(); it gives me the usual phpinfo page...
So where is the info coming from...another php.ini located somewhere
else on my drive ?
A search revealed naddaso I`m out of ideas right now.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Evan Nemerson
Wha? chroot is a good thing to have, even though it's not available in 
apache... and they're not using it, yet- they want to be...

Maybe I misunderstood you?



On Wednesday 08 October 2003 12:51 pm, Leif K-Brooks wrote:
 LiteSpeed Information wrote:
  What we are waiting for are extra security features: chroot(almost
  done) and auto-ban. They are not available on Apache either we believe.

 If they aren't available with Apache either, why are you still using it?

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
Know me? Know me??? What the hell does that mean, know me, you want to know 
me? Well you don't know me, and you'll never know me. Nobody knows me, or 
you, or eachother. Nobody in this world knows anybody else. You'll never know 
me. Ever.

-Rules of Attraction

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



[PHP] Appropriate Content

2003-10-08 Thread Evan Nemerson
Hey everyone.

I just saw the lightspeed 1.1 release announcement. I know it's not in the 
rules right now, but I don't think product announcements are really 
appropriate for php-general. I can see, Hey we've got this new server and we 
need PHP people to beta test it., but not Hey we've got this new server and 
we need people to buy it.

I would suggest major releases only (litespeed 1.0 announcement ok, 1.1 not), 
but that draws an awefully subjective line...

Anyways, IMHO product announcements should be outlawed here. Thoughts?



-- 
Evan Nemerson
[EMAIL PROTECTED]

--
Truth, like gold, is to be obtained not by its growth, but by washing away 
from it all that is not gold. 

-Leo Nikolaevich Tolstoy

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



Re: [PHP] php unlink a file - is it possible?

2003-10-08 Thread Evan Nemerson
Unless you change the permissions of the file, the run the FTP as nobody, run 
apache as the ftp user, run apache as root (can't believe I even said that... 
blasphemy!), etc., it shouldn't be possible.

If you find a way to do it w/out any of the above, I'd suggest you email the 
Apache Software Foundation and/or the FTP software people, as well as 
[EMAIL PROTECTED], [EMAIL PROTECTED], etc.

That being said, would it be feasible to set up a cron job to do this w/ the 
PHP CLI running as an appropriatly privledged user?


On Wednesday 08 October 2003 08:11 pm, Alex Shi wrote:
 Hi,

 How can have a php script unlink/delete a file uploaded via FTP?
 Usually a ftp-uploaded file belongs to the ftp user, and a php
 script is running by apache/nobody. Seems like there shouldn't
 be any way to do this...OK, my situation is that I want a php script
 to this: it can move bulk uploaded (ftp) file to certain directories
 and then remove the original files, something just like a move.
 If anyone knows on how to move or delete a file, please give
 me a hand. Thanks in advance!

 Alex

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
Who controls the past controls the future. Who controls the present controls 
the past.

-George Orwell

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



Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread John Nichel
Did I miss the PHP question in this post?

LiteSpeed Information wrote:

We glad to introduce you LiteSpeed Web Server 1.1.

About:
LiteSpeed Web Server is a full-featured, high-performance, secure, and 
easy-to-use Web server that runs on Unix and Linux. It supports 
HTTP/1.1, SSL, CGI, FastCGI, PHP, JSP, Servlets, GZIP compression, 
.htaccess, IP level throttling, connection accounting, DoS attack 
prevention, and instant recovery mechanisms. Installation is very easy 
with pre-built binary. Administration and configuration is very easy 
through a Web interface.

Changes since 1.0.3:
HTTP authentication was re-engineered. An authentication cache was 
added. Permissions can now be granted based on usernames or group names. 
An Apache-like required directive was added. Context level access 
control was implemented. .htaccess support and an .htaccess cache were 
added. SSL Toolkit was updated to OpenSSL 0.9.7c to address security 
issues in version 0.9.7b.

Our benchmark shows that  it is 2-5 times faster than Apache with static 
content, PHP performance meets or exceeds that of Apache's mod_php. SSL 
performance is doubled at least..

LiteSpeed Standard Edition is FREE for any purpose of use and we'd like 
to hear your feedback.

For more information please visit 
http://litespeedtech.com/index.html?php-general

Best regards,
LiteSpeed Team
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Robert Cummings
On Thu, 2003-10-09 at 00:09, John Nichel wrote:
 Did I miss the PHP question in this post?
 

Oh nooo, if you look real close you can see it buried way down
near the bottom. :/

  content, PHP performance meets or exceeds that of Apache's mod_php. SSL 
  performance is doubled at least..

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Robert Cummings
On Wed, 2003-10-08 at 23:51, Evan Nemerson wrote:
 Hey everyone.
 
 I just saw the lightspeed 1.1 release announcement. I know it's not in the 
 rules right now, but I don't think product announcements are really 
 appropriate for php-general. I can see, Hey we've got this new server and we 
 need PHP people to beta test it., but not Hey we've got this new server and 
 we need people to buy it.
 
 I would suggest major releases only (litespeed 1.0 announcement ok, 1.1 not), 
 but that draws an awefully subjective line...
 
 Anyways, IMHO product announcements should be outlawed here. Thoughts?

Personally I like product announcements whether they be commercial, open
source or whatnot. However, IMHO, the whole LightSpeed thing just
doesn't seem to be sufficiently on topic. 

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



Re: [PHP] Re: Check for page change efficiently [was Re: Creating a blogrolling/link management system]

2003-10-08 Thread Curt Zirzow
* Thus wrote Kevin Stone ([EMAIL PROTECTED]):
 
 Paul Van Schayck [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
  [EMAIL PROTECTED] (Kevin Stone) wrote
  Hello Kevin.
  
   This is just a thought.. I have never employed this method
   personally.. but I suppose you could read the page into a string and
   use the md5() function to generate a hexidecimal value based on that
   string.  Store the hex value in a database and compare it against the
   new value generated the next day.  If anything on the page has been
   modified the values should not match.  Even the most minute change
   should trigger a new value.  Obviously you won't know *what* has been
   modified only that the page *has* been modified 
  
  [...]
  
  Too much pittfals and too slow! Really the socket connection only 
  retreiving the headers is really the best way. 
  
  This function is what you need:
  
  function fileStamp($domain, $file)
  {
  [...]
  return strtotime($time);
  } 
  
 
 Slow?  Hogwash.  You're pining over microseconds.  Besides most of the time is taken 
 opening the file which you're doing anyway.  Except that the socket method relies on 
 header information that may or may not be there.  I agree it would be ideal if you 
 could use that information but your fileStamp() function isn't going to work for all 
 files on all servers.
 
Ok. no need to argue here.  Both methods arn't correct or the most
efficient.  If you want to keep a copy of the file you use the GET
method otherwise for just checking modification state use the HEAD
method.

First time getting a page, there are some headers you want to pay
attention to: 
  ETag:
  Last-modified:
  [cache directives]
  Expires:
  Content-Length:

And keep these values stored somewhere.

Then when checking to see if the document is changed or should be
re-requested:

  if the document has expired the document should be re-requested
  to see if it has changed, otherwise you are safe to assume that
  it is the same.  Do note that when calculating this, the expired
  time is the server time, so you should keep note (when 
  retrieving the information) the time difference for the
  calculation.

  if you dont have a last-modified or etag, the document *should* 
  be considered modified!

  (observe cache directives)

  if the document has a query string  you must check if it has been
  modified.

To get the document:
  (HEAD|GET) $url_value HTTP/1.1

  host: $host
  ...other misc headers
  
  If you have an ETag, add a request header
If-Match: $etag_value

  if you have last modified add request header
If-Modified-Since: $last_modified_value

  if the content-length is available send request header:
Content-Length: $content_length_value

The response:

  HTTP/1.1 304 Document not modified
-woot.. it isn't modified.

  HTTP/1.1 200 OK
- it should be considered modified

  [other responses could be returned]

If a GET was requested the document will follow the headers.  And
well, thats all there is to it. Assignment is due next week :)
  

Reference: [1] http://www.w3.org/Protocols/rfc2616/rfc2616.html

HTH.

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Curt Zirzow
* Thus wrote Robert Cummings ([EMAIL PROTECTED]):
 On Wed, 2003-10-08 at 23:51, Evan Nemerson wrote:
  Hey everyone.
  
  I just saw the lightspeed 1.1 release announcement. I know it's not in the 
  rules right now, but I don't think product announcements are really 
  appropriate for php-general. I can see, Hey we've got this new server and we 
  need PHP people to beta test it., but not Hey we've got this new server and 
  we need people to buy it.
  
  I would suggest major releases only (litespeed 1.0 announcement ok, 1.1 not), 
  but that draws an awefully subjective line...
  
  Anyways, IMHO product announcements should be outlawed here. Thoughts?
 
 Personally I like product announcements whether they be commercial, open
 source or whatnot. However, IMHO, the whole LightSpeed thing just
 doesn't seem to be sufficiently on topic. 

hmm.. now where have I heard the term InterJinn from :)


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Curt Zirzow
* Thus wrote Evan Nemerson ([EMAIL PROTECTED]):
 Hey everyone.
 
 I just saw the lightspeed 1.1 release announcement. I know it's not in the 
 rules right now, but I don't think product announcements are really 
 appropriate for php-general. I can see, Hey we've got this new server and we 
 need PHP people to beta test it., but not Hey we've got this new server and 
 we need people to buy it.
 
 I would suggest major releases only (litespeed 1.0 announcement ok, 1.1 not), 
 but that draws an awefully subjective line...
 
 Anyways, IMHO product announcements should be outlawed here. Thoughts?

I dont know about outlawed, perhaps 'strongly discourged' is a more
friendly name :)

The thing is though I skipped over the litespeed thing like I did
that lotto post; Until, that is, a 30+ thread got involved :)


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Evan Nemerson
For the record, in case anyone is misunderstanding me, I don't think 
commercial / F/OSS should matter in this regard. Product announcements are 
product announcments.

Anyone else have an opinion?




On Wednesday 08 October 2003 09:19 pm, Robert Cummings wrote:
 On Wed, 2003-10-08 at 23:51, Evan Nemerson wrote:
  Hey everyone.
 
  I just saw the lightspeed 1.1 release announcement. I know it's not in
  the rules right now, but I don't think product announcements are really
  appropriate for php-general. I can see, Hey we've got this new server
  and we need PHP people to beta test it., but not Hey we've got this new
  server and we need people to buy it.
 
  I would suggest major releases only (litespeed 1.0 announcement ok, 1.1
  not), but that draws an awefully subjective line...
 
  Anyways, IMHO product announcements should be outlawed here. Thoughts?

 Personally I like product announcements whether they be commercial, open
 source or whatnot. However, IMHO, the whole LightSpeed thing just
 doesn't seem to be sufficiently on topic.

 Cheers,
 Rob.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
A leader is the wave pushed ahead by the ship.

-Leo Nikolaevich Tolstoy

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Jason Wong
On Thursday 09 October 2003 12:37, Evan Nemerson wrote:
 For the record, in case anyone is misunderstanding me, I don't think
 commercial / F/OSS should matter in this regard. Product announcements are
 product announcments.

 Anyone else have an opinion?

This is a well trodden debate. See archives for more opinions.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Others can stop you temporarily, only you can do it permanently.
*/

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Tom Rogers
Hi,

Thursday, October 9, 2003, 1:51:22 PM, you wrote:
EN Hey everyone.

EN I just saw the lightspeed 1.1 release announcement. I know it's not in the 
EN rules right now, but I don't think product announcements are really 
EN appropriate for php-general. I can see, Hey we've got this new server and we
EN need PHP people to beta test it., but not Hey we've got this new server and
EN we need people to buy it.

EN I would suggest major releases only (litespeed 1.0 announcement ok, 1.1 not),
EN but that draws an awefully subjective line...

EN Anyways, IMHO product announcements should be outlawed here. Thoughts?



EN -- 
EN Evan Nemerson
EN [EMAIL PROTECTED]

EN --
EN Truth, like gold, is to be obtained not by its growth, but by washing away 
EN from it all that is not gold. 

EN -Leo Nikolaevich Tolstoy


I personally like to hear about anything even slightly involving PHP. if it is
of no immediate interest then I ignore it. Sometimes it makes a welcome change
to all the 'chatter' :)

(Before anybody screams the 'chatter' has taught me a lot over the last few years)

-- 
regards,
Tom

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



[PHP] About PHP introduction

2003-10-08 Thread Uma Shankari T.

Hello,
 
   I need to give a presentation about php  mysql. Can any one please 
tell me the url there i can find useful stuffs about php  mysql ??

Regards,
Uma 
   

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



[PHP] Re: Any idea how to do this?

2003-10-08 Thread Manisha Sathe
I am a newbie to php specially sessions part. I read a lot about it.

On my site user needs to login. The session will be created and some info
will be stored into it. Session will be ON for some predefined time (given
in ini file e.g 30 mins). The session will die after that time ( according
to what I understood).

 But what if I want system something like - till user closes his browser or
logout - he should remain 'Login', even after 30 mins. Is there any thing
like session_time_out event handler ? -- after time out  again take session
values and restore it ? If user closes his browser or presses 'Logout'
button then only session ends till then he remains 'LogOn'

Manisha



Paul Van Schayck [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 [EMAIL PROTECTED] (Ryan A) wrote in
  So I have decided that I am going to try to make the same thing on our
  site but offer it free to the public...only problem is...I dont know
  where to start and was hopeing someone here can give me tips/urls or
  links to boost me on my way...

 You know PHP? Take a look at the image functions:
 http://www.php.net/manual/en/ref.image.php

 You can do all sort of things with images.

 Polleke

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Chris Shiflett
I tend to think that PHP-specific product announcements are fine, so long as
they are courteous enough to prefix the subject with [ANNOUNCE] as is standard
on many lists. This allows those who don't want this content an easy way to
filter (whether automatically or manually by scanning subjects).

I also tend to distinguish between open source and commercial software in this
regard. It seems like a misuse of a list such as this to use it for marketing
and/or general advertising purposes for a commercial product. I think the best
way to market something like that is what Mr. Cummings is doing. Contribute to
the list and include a brief description of your product in your signature. The
more you contribute, the more people hear about your product. Everyone wins.
:-)

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] About PHP introduction

2003-10-08 Thread Chris Shiflett
--- Uma Shankari T. [EMAIL PROTECTED] wrote:
 Can any one please tell me the url there i can find useful stuffs
 about php  mysql ??

That's a vague question, but...

http://www.php.net/
http://www.mysql.com/

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



[PHP] want to restart session after time out

2003-10-08 Thread Manisha Sathe
Hi,

I want to make use of sessions. Very new to this part. I read a lot about
it. Now know how to register / start etc.

I understand that session terminates after time out (specified in php.ini
file e.g 30 mins).  But I do not want session to be terminated like this. I
want to terminate session only if user closes the browser or clicks 'LogOut'
button. After 30 mins I still want to keep all session values as it is.

Is there any way out ?

Regards
Manisha

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



[PHP] Re: Any idea how to do this?

2003-10-08 Thread Manisha Sathe
sorry, wrong posting



Manisha Sathe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am a newbie to php specially sessions part. I read a lot about it.

 On my site user needs to login. The session will be created and some info
 will be stored into it. Session will be ON for some predefined time (given
 in ini file e.g 30 mins). The session will die after that time ( according
 to what I understood).

  But what if I want system something like - till user closes his browser
or
 logout - he should remain 'Login', even after 30 mins. Is there any thing
 like session_time_out event handler ? -- after time out  again take
session
 values and restore it ? If user closes his browser or presses 'Logout'
 button then only session ends till then he remains 'LogOn'

 Manisha



 Paul Van Schayck [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hello,
 
  [EMAIL PROTECTED] (Ryan A) wrote in
   So I have decided that I am going to try to make the same thing on our
   site but offer it free to the public...only problem is...I dont know
   where to start and was hopeing someone here can give me tips/urls or
   links to boost me on my way...
 
  You know PHP? Take a look at the image functions:
  http://www.php.net/manual/en/ref.image.php
 
  You can do all sort of things with images.
 
  Polleke

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Evan Nemerson
For those who don't remember,
http://marc.theaimsgroup.com/?l=php-generalm=106390994201654w=2

Which brings up an good point. Robert had the courtesy to put [ANNOUNCMENT] in 
the header. Perhaps a guideline that says something like Product 
announcements are acceptable, provided the subject is prepended with the 
string '[ANNOUNCEMENT]'?



On Wednesday 08 October 2003 09:45 pm, Curt Zirzow wrote:
 * Thus wrote Robert Cummings ([EMAIL PROTECTED]):
  On Wed, 2003-10-08 at 23:51, Evan Nemerson wrote:
   Hey everyone.
  
   I just saw the lightspeed 1.1 release announcement. I know it's not in
   the rules right now, but I don't think product announcements are really
   appropriate for php-general. I can see, Hey we've got this new server
   and we need PHP people to beta test it., but not Hey we've got this
   new server and we need people to buy it.
  
   I would suggest major releases only (litespeed 1.0 announcement ok, 1.1
   not), but that draws an awefully subjective line...
  
   Anyways, IMHO product announcements should be outlawed here. Thoughts?
 
  Personally I like product announcements whether they be commercial, open
  source or whatnot. However, IMHO, the whole LightSpeed thing just
  doesn't seem to be sufficiently on topic.

 hmm.. now where have I heard the term InterJinn from :)


 Curt

-- 
Evan Nemerson
[EMAIL PROTECTED]

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



Re: [PHP] About PHP introduction

2003-10-08 Thread Evan Nemerson
What kind of presentation? If it helps,
http://www.coeus-group.com/qwik-e-wiki.php/lamp

It's a wiki, so if you do find some useful information, please contribute.


On Wednesday 08 October 2003 09:54 pm, Uma Shankari T. wrote:
 Hello,

I need to give a presentation about php  mysql. Can any one please
 tell me the url there i can find useful stuffs about php  mysql ??

 Regards,
 Uma

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
First they came for the Communists, and I didn't speak up, because I wasn't a 
Communist. Then they came for the Jews, and I didn't speak up, because I 
wasn't a Jew. Then they came for the Catholics, and I didn't speak up, 
because I was a Protestant. Then they came for me, and by that time there was 
no one left to speak up for me.

-Martin Niemoller

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Evan Nemerson
Sounds good to me, what do other people think?

Definitely agree with the contribute and get free ad space idea.



On Wednesday 08 October 2003 09:57 pm, Chris Shiflett wrote:
 I tend to think that PHP-specific product announcements are fine, so long
 as they are courteous enough to prefix the subject with [ANNOUNCE] as is
 standard on many lists. This allows those who don't want this content an
 easy way to filter (whether automatically or manually by scanning
 subjects).

 I also tend to distinguish between open source and commercial software in
 this regard. It seems like a misuse of a list such as this to use it for
 marketing and/or general advertising purposes for a commercial product. I
 think the best way to market something like that is what Mr. Cummings is
 doing. Contribute to the list and include a brief description of your
 product in your signature. The more you contribute, the more people hear
 about your product. Everyone wins.

 :-)

 Chris

 =
 My Blog
  http://shiflett.org/
 HTTP Developer's Handbook
  http://httphandbook.org/
 RAMP Training Courses
  http://www.nyphp.org/ramp

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things.

-Rene Descartes

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Evan Nemerson
I don't recall it coming up (I've been here for a while), and except for 
http://marc.theaimsgroup.com/?l=php-generalm=102078334230534w=2 I can't 
find it any the archive. Can you provide URL or a hint for what to search 
for?

According to that message, Rasmus approves of open-source non-commercial 
posts. IMHO there should be an indiscriminate rule...



On Wednesday 08 October 2003 09:48 pm, Jason Wong wrote:
 On Thursday 09 October 2003 12:37, Evan Nemerson wrote:
  For the record, in case anyone is misunderstanding me, I don't think
  commercial / F/OSS should matter in this regard. Product announcements
  are product announcments.
 
  Anyone else have an opinion?

 This is a well trodden debate. See archives for more opinions.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
...the whole idea of revenge and punishment is a childish daydream. Properly 
speaking, there is no such thing as revenge. Revenge is an act which you want 
to commit when you are powerless and because you are powerless: as soon as 
the sense of impotence is removed, the desire evaporates also. 

-George Orwell

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



Re: [PHP] want to restart session after time out

2003-10-08 Thread Chris Shiflett
--- Manisha Sathe [EMAIL PROTECTED] wrote:
 I want to make use of sessions. Very new to this part. I read a lot
 about it. Now know how to register / start etc.
 
 I understand that session terminates after time out (specified in
 php.ini file e.g 30 mins).  But I do not want session to be
 terminated like this. I want to terminate session only if user
 closes the browser or clicks 'LogOut' button. After 30 mins I still
 want to keep all session values as it is.

Please read this:

www.php.net/sessions

Pay special attention to Table 1, Session configuration options. These settings
are also each explained in detail.

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Robert Cummings
On Thu, 2003-10-09 at 00:45, Curt Zirzow wrote:
 * Thus wrote Robert Cummings ([EMAIL PROTECTED]):
  On Wed, 2003-10-08 at 23:51, Evan Nemerson wrote:
   Hey everyone.
   
   I just saw the lightspeed 1.1 release announcement. I know it's not in the 
   rules right now, but I don't think product announcements are really 
   appropriate for php-general. I can see, Hey we've got this new server and we 
   need PHP people to beta test it., but not Hey we've got this new server and 
   we need people to buy it.
   
   I would suggest major releases only (litespeed 1.0 announcement ok, 1.1 not), 
   but that draws an awefully subjective line...
   
   Anyways, IMHO product announcements should be outlawed here. Thoughts?
  
  Personally I like product announcements whether they be commercial, open
  source or whatnot. However, IMHO, the whole LightSpeed thing just
  doesn't seem to be sufficiently on topic. 
 
 hmm.. now where have I heard the term InterJinn from :)

Must have been some place on the Internet, it's been spreading like a
virus :)

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



Re: [PHP] Appropriate Content

2003-10-08 Thread Chris Shiflett
--- Evan Nemerson [EMAIL PROTECTED] wrote:
 Robert had the courtesy to put [ANNOUNCMENT] in the header.

Yes, a courtesy which is appreciated by many. :-)

The prefix is traditionally [ANNOUNCE], however, at least on several other
mailing lists I subscribe to.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] want to restart session after time out

2003-10-08 Thread Evan Nemerson
Well you can change the default from 30 mins to something larger, but that has 
security consequences...

The problem with only closing when the user closes their browser is there's no 
way of knowing when that happens. Sessions are kind of a hack over HTTP, 
which is pretty much a stateless protocol. There's Connection: keep-alive, 
but not every browser supports it, and I don't think there's a way to hook 
into it from PHP. Plus, things can happen to TCP/IP connections.


On Wednesday 08 October 2003 10:05 pm, Manisha Sathe wrote:
 Hi,

 I want to make use of sessions. Very new to this part. I read a lot about
 it. Now know how to register / start etc.

 I understand that session terminates after time out (specified in php.ini
 file e.g 30 mins).  But I do not want session to be terminated like this. I
 want to terminate session only if user closes the browser or clicks
 'LogOut' button. After 30 mins I still want to keep all session values as
 it is.

 Is there any way out ?

 Regards
 Manisha

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
Know me? Know me??? What the hell does that mean, know me, you want to know 
me? Well you don't know me, and you'll never know me. Nobody knows me, or 
you, or eachother. Nobody in this world knows anybody else. You'll never know 
me. Ever.

-Rules of Attraction

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



[PHP] Variable Nightmare

2003-10-08 Thread richard cook
Hi all,
I have a problem that I cant solve, any help would be welcomed!


I have a form which is repeated by a for loop, the form has one element an
input field. The problem im having is the name of this field for example ive
used the following to name it:

for loop here

input name=value?php echo $x;? type=text size=4 maxlength=2
value=?=$cart_Array[$x][1]? /

}

So the input name will increase with each loop like so:

value1
value2
value3
...

This works fine, the source code from the generated page looks as it should.
So the big question is how do I get to the variable name when the form is
processed, ive tried everything i know. if I use hard coding it works :

$myNewVar = $value1;

But the whole point of this is that the values need to be pulled out of
another for loop:

for loop blah
$myNewVar = $valueX;
}




I hope im explaining this well.



Regards

R

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



Re: [PHP] want to restart session after time out

2003-10-08 Thread Chris Shiflett
--- Evan Nemerson [EMAIL PROTECTED] wrote:
 Well you can change the default from 30 mins to something larger,
 but that has security consequences...

I am speaking to myself as much as anyone, but we should all try to develop the
habit of explaining any such consequences that we mention. To do otherwise
doesn't really educate the many people who read these responses, whether now or
in an archive. It only adds to the mystery of certain topics (such as
security).

 Sessions are kind of a hack over HTTP, which is pretty much a
 stateless protocol. There's Connection: keep-alive, but not every
 browser supports it, and I don't think there's a way to hook into it
 from PHP.

Well, persistent connections aren't really intended to provide stateful
transactions (and they don't).

My favorite example to use is Google, because there are two resources that make
up the front page: the HTML and the logo. With previous versions of HTTP,
unless a persistent connection was specifically requested, a separate TCP
connection was established for each transaction. This meant two TCP connections
would be created and destroyed just to render Google. Imagine more elaborate
sites, and you can see how this can really cause performance problems. By
making persistent connections the default (HTTP/1.1), a single TCP connection
can be established, and until all necessary resources are received, the same
connection is used. This makes much more sense. The Connection header allows
you to specify the desired behavior.

Oh, and every major browser I am aware of does support it, but hopefully you
can now see that it is not associated with sessions or even stateful
transactions.

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] Variable Nightmare

2003-10-08 Thread Ryan Thompson
The server probably has global variables turn off

Try $_GET['value1'], $_GET['value2']

If you using post method then replace $_GET with $_POST


On Thursday 09 October 2003 00:51, richard cook wrote:
 Hi all,
 I have a problem that I cant solve, any help would be welcomed!


 I have a form which is repeated by a for loop, the form has one element an
 input field. The problem im having is the name of this field for example
 ive used the following to name it:

 for loop here

 input name=value?php echo $x;? type=text size=4 maxlength=2
 value=?=$cart_Array[$x][1]? /

 }

 So the input name will increase with each loop like so:

 value1
 value2
 value3
 ...

 This works fine, the source code from the generated page looks as it
 should. So the big question is how do I get to the variable name when the
 form is processed, ive tried everything i know. if I use hard coding it
 works :

 $myNewVar = $value1;

 But the whole point of this is that the values need to be pulled out of
 another for loop:

 for loop blah
 $myNewVar = $valueX;
 }




 I hope im explaining this well.



 Regards

 R

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
A computer scientist is someone who fixes
 things that aren't broken --Unknown

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



Re: [PHP] Variable Nightmare

2003-10-08 Thread Larry_Li
Yes. PHP supports this feature you need.
for loop $i
{
 $temp=value.$i;
 $myNewVar = $$temp;
}

Hope it help.







Ryan Thompson [EMAIL PROTECTED]
10/09/2003 01:38 PM
 
To: richard cook [EMAIL PROTECTED], 
[EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] Variable Nightmare
 


The server probably has global variables turn off

Try $_GET['value1'], $_GET['value2']

If you using post method then replace $_GET with $_POST


On Thursday 09 October 2003 00:51, richard cook wrote:
 Hi all,
 I have a problem that I cant solve, any help would be welcomed!


 I have a form which is repeated by a for loop, the form has one element 
an
 input field. The problem im having is the name of this field for example
 ive used the following to name it:

 for loop here

 input name=value?php echo $x;? type=text size=4 maxlength=2
 value=?=$cart_Array[$x][1]? /

 }

 So the input name will increase with each loop like so:

 value1
 value2
 value3
 ...

 This works fine, the source code from the generated page looks as it
 should. So the big question is how do I get to the variable name when 
the
 form is processed, ive tried everything i know. if I use hard coding it
 works :

 $myNewVar = $value1;

 But the whole point of this is that the values need to be pulled out of
 another for loop:

 for loop blah
 $myNewVar = $valueX;
 }




 I hope im explaining this well.



 Regards

 R

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
A computer scientist is someone who fixes
 things that aren't broken --Unknown

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




Re: [PHP] Appropriate Content

2003-10-08 Thread Evan Nemerson
I'd say [ANNOUNCEMENT] is fine... it's an easy regex ;). [ANNOUNCMENT] would 
be quite annoying, though!

D'oh! My email client even includes a spell-checker (though it won't work 
on-the-fly... how passé ;) )...


On Wednesday 08 October 2003 10:04 pm, Robert Cummings wrote:
 On Thu, 2003-10-09 at 01:12, Chris Shiflett wrote:
  --- Evan Nemerson [EMAIL PROTECTED] wrote:
   Robert had the courtesy to put [ANNOUNCMENT] in the header.
 
  Yes, a courtesy which is appreciated by many. :-)
 
  The prefix is traditionally [ANNOUNCE], however, at least on several
  other mailing lists I subscribe to.

 Hmmm, I copied it from a previous announcement from a day or so before.
 I figured it was correct since nobody complained :) Also, I don't think
 I mispelled it as shown above *grin*.

 Cheers,
 Rob.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
If there is no higher reason--and there is none--then my own reason must be 
the supreme judge of my life.

-Leo Nikolaevich Tolstoy

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



Re: [PHP] Variable Nightmare

2003-10-08 Thread Evan Nemerson
Okay I think this is what you want. If you want $myNewVarX too you should be 
able to figure it out.

Check out php.net/manual/en/language.variables.variable.php

for loop blah
$myNewVar = ${'value'.$x};

Also, you may want to consider just naming every field value[], which 
results in $_POST['value'] (or $_GET['value']) being an array of your values.



On Wednesday 08 October 2003 09:51 pm, richard cook wrote:
 Hi all,
 I have a problem that I cant solve, any help would be welcomed!


 I have a form which is repeated by a for loop, the form has one element an
 input field. The problem im having is the name of this field for example
 ive used the following to name it:

 for loop here

 input name=value?php echo $x;? type=text size=4 maxlength=2
 value=?=$cart_Array[$x][1]? /

 }

 So the input name will increase with each loop like so:

 value1
 value2
 value3
 ...

 This works fine, the source code from the generated page looks as it
 should. So the big question is how do I get to the variable name when the
 form is processed, ive tried everything i know. if I use hard coding it
 works :

 $myNewVar = $value1;

 But the whole point of this is that the values need to be pulled out of
 another for loop:

 for loop blah
 $myNewVar = $valueX;
 }




 I hope im explaining this well.



 Regards

 R

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
A leader is the wave pushed ahead by the ship.

-Leo Nikolaevich Tolstoy

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



Re: [PHP] want to restart session after time out

2003-10-08 Thread Evan Nemerson
Comments inline

On Wednesday 08 October 2003 10:23 pm, Chris Shiflett wrote:
 --- Evan Nemerson [EMAIL PROTECTED] wrote:
  Well you can change the default from 30 mins to something larger,
  but that has security consequences...

 I am speaking to myself as much as anyone, but we should all try to develop
 the habit of explaining any such consequences that we mention. To do
 otherwise doesn't really educate the many people who read these responses,
 whether now or in an archive. It only adds to the mystery of certain topics
 (such as security).

Well, they _can_ always ask if they don't understand. I agree that it's best 
to give as much information as possible, but that takes a LOT of time. If we 
don't assume any prior knowledge, answering anything would be a huge pain.

That being said, I agree that in this case I should have elaborated... It's 
probably a reach for a lot of list readers.

If you have long sessions, the likelyhood that someone will be able to steal 
the session ID and imitate the user increases drastically. It's called 
session hijacking, and any google search (or archive search, probably) will 
yield a wealth of information.


  Sessions are kind of a hack over HTTP, which is pretty much a
  stateless protocol. There's Connection: keep-alive, but not every
  browser supports it, and I don't think there's a way to hook into it
  from PHP.

 Well, persistent connections aren't really intended to provide stateful
 transactions (and they don't).

They most certainly are not, but if they could _theoretically_ be used that 
way. Practicality, however, forbids it. IMO it's a Bad Idea, but still worth 
mentioning. Actually, now I'm thinking about writing a POC just to see if it 
can be done, even in a laboratory setting.


 My favorite example to use is Google, because there are two resources that
 make up the front page: the HTML and the logo. With previous versions of
 HTTP, unless a persistent connection was specifically requested, a separate
 TCP connection was established for each transaction. This meant two TCP
 connections would be created and destroyed just to render Google. Imagine
 more elaborate sites, and you can see how this can really cause performance
 problems. By making persistent connections the default (HTTP/1.1), a single
 TCP connection can be established, and until all necessary resources are
 received, the same connection is used. This makes much more sense. The
 Connection header allows you to specify the desired behavior.

Wow they finally have one image! IIRC, for a long time the logo was several 
small images that looked like a single image. That way, the whitespace around 
the letters didn't have to be included in the image. IMHO that was a cool 
solution. They still avoid superfluous line breaks, which makes me happy...


 Oh, and every major browser I am aware of does support it, but hopefully
 you can now see that it is not associated with sessions or even stateful
 transactions.

Okay well then here's another reason not to rely on keep-alive: Users can't 
copy a URL and paste as an argument to wget -c (or any of the download 
managers). I'm sure there are many, many more reasons, but I sincerely doubt 
I'd have to convice anyone not to use keep-alive for sessions.


 Hope that helps.

 Chris

 =
 My Blog
  http://shiflett.org/
 HTTP Developer's Handbook
  http://httphandbook.org/
 RAMP Training Courses
  http://www.nyphp.org/ramp

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
Who controls the past controls the future. Who controls the present controls 
the past.

-George Orwell

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



[PHP] duplicating databases

2003-10-08 Thread Steve Buehler
	I am running PHP/MySQL for a program that I am writing.  We will have 
100's or 1000's of databases that will be duplicates in structure.  The 
problem is when I make a change to the database, I have to go to every 
database manually and make the change.  All of the databases start with 
a_ and are on the same server.  I would like to be able to have one 
master database and then run a script when I make a change to it that will 
get the structure of the master database and check all of the other 
databases to make sure that their structures match.  If not, it will make 
the change to the other databases.  Does anybody know if there is all ready 
a program out there that would do this?  Can anybody point me in the right 
direction?  Or if it is only a few lines of script that somebody all ready 
has to do this, can you share it?

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


[PHP] Re: duplicating databases

2003-10-08 Thread Cal Evans
Check out sqlyog. (www.sqlyog.com) It has a structure sync tool.  After 
making the first change, you could generate a script to make the change 
to the next database and then take that script and parameterize it so 
that a PHP script could use it to update all of your database.

HOWEVER,

A better way to do this may be to re-think your entire schema.  Instead 
of keeping the data in separate but identical databases, put it all in 
one database but add a key (owner, database, etc) to each table. Then in 
your selects, simply add to your where clause AND ownerID=x. This way 
you only have 1 database but your data is kept separate. (Until MySQL 
comes out with views, then it gets a lot easier.)

HTH,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere.
Steve Buehler wrote:
I am running PHP/MySQL for a program that I am writing.  We will 
have 100's or 1000's of databases that will be duplicates in structure.  
The problem is when I make a change to the database, I have to go to 
every database manually and make the change.  All of the databases start 
with a_ and are on the same server.  I would like to be able to have 
one master database and then run a script when I make a change to it 
that will get the structure of the master database and check all of the 
other databases to make sure that their structures match.  If not, it 
will make the change to the other databases.  Does anybody know if there 
is all ready a program out there that would do this?  Can anybody point 
me in the right direction?  Or if it is only a few lines of script that 
somebody all ready has to do this, can you share it?

Thank You
Steve

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


<    1   2