[PHP] #2003 - The server is not responding

2007-07-17 Thread Ryan Lao
I uninstalled my old versions of apache, mysql and php then installed wamp 
on my computer. everything seems to be working when i access localhost, 
except when i go to phpmyadmin. I get this error on screen "MySQL said: 
#2003 - The server is not responding"... so i updated the config.php file 
but still i get the same error. does this have to do with the old password 
or username that i used before with my old mysql? or is it something else 
entirely? some help would really be appreciated 

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



Re: [PHP] Creating thumbnails

2007-07-17 Thread elk dolk


Stephen <[EMAIL PROTECTED]> wrote:
Subject: Re: [PHP] Creating thumbnails

 Vanessa Vega wrote:
> Good day to all!
>
> I would like to ask for some help with creating automatically  thumbnail 
> pictures using PHP..
What about security issues ? people can look at your source code to see the 
path and image name and place it in the address bar to access the image 
directly without loading your script. How can you prevent them?


   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. 

[PHP] rewrite hyperlink tags with a regular expression containing forbidden words

2007-07-17 Thread Nicolas Quirin
Hi,

i'm french, i'm using regular expressions in php in order to rewrite hyperlink 
tags in a specific way before apache output is beeing sent to client.

Purpose is to replace href attribute of any A html tag by a javascript function 
calling an ajax loader.

Currently I have wrote that:

  $pattern = '/(.*?)<\\/a>/i';
  $replacement = '$5';
  $html_mark = preg_replace($pattern, $replacement, $html_mark);

it works, but it's too permissive, it replaces too much links (some links with 
some get parameters must stay unchanged)

I don't really understand my pattern...it's a little strange for me...lol

I wouldn't like to rewrite links that contains any of the following words in 
get parameters (query string):

  noLoader
  noLeftCol
  skipallbutpage
  skipservice

i would like to rewrite only link that begin with 'http://dev.netdoor.fr' or '.'

examples:

http://dev.netdoor.fr/index.php?page=./comptes/index.php&noLoader&noLeftCol&idx=6&bdx=423&skipservice";>test
 

=>must be not rewritted!

name

=>must be rewritted like this :

name


Please help me...:0)

best regards

nicolas


[PHP] Dynamic refresh dropdown list

2007-07-17 Thread C.R.Vegelin
I have a selection form with multiple dropdown lists, let's say A, B and C.
If the dropdown list B is changed, then dropdown list C should be updated.
To get this done, I use a small javascript
function reload(form)
{  var val=form.B.options[form.B.options.selectedIndex].value; 
   self.location='myForm.php?B=' + val ;
}
called by
 

This works fine, BUT all other dropdown lists are also reset.
So if I select another A, then another B, then also A is reset to its prior 
value.
Any idea how I can refresh a specific dropdown, 
without affecting all the other dropdowns ?

TIA, Cor

RE: [PHP] Dynamic refresh dropdown list

2007-07-17 Thread Sichta, Daniel
Look for AJAX ! 

DS

-Original Message-
From: C.R.Vegelin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 12:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Dynamic refresh dropdown list

I have a selection form with multiple dropdown lists, let's say A, B and
C.
If the dropdown list B is changed, then dropdown list C should be
updated.
To get this done, I use a small javascript
function reload(form)
{  var val=form.B.options[form.B.options.selectedIndex].value; 
   self.location='myForm.php?B=' + val ;
}
called by
 

This works fine, BUT all other dropdown lists are also reset.
So if I select another A, then another B, then also A is reset to its
prior value.
Any idea how I can refresh a specific dropdown, 
without affecting all the other dropdowns ?

TIA, Cor

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



[PHP] magic quotes

2007-07-17 Thread Phil Princely

Hi all,

I've been having a problem with a setting on a test server and
production server. My test server has magic_quotes_gpc off, but the
production server has it turned on. I've no access to the php.ini for
the production server and don't want to change the setting on my test
server.

Searching on the internet, I found some ways to deal with this kind of thing:

use a .htaccess file to turn magic_quotes off by saving a text file
with the line:

magic_quotes_gpc off

Or making a function to strip slashes like this:

if (magic_quote_gpc()) {
stripslashes_array($_GET);
stripslashes_array($_POST);
stripslashes_array($_REQUEST);
stripslashes_array($_COOKIE);
}

What do people on this list usually do with this kind of problem. To
me, the .htaccess seems the easiest solution, since I don't have to
change any scripts.

cheers

Phil P.

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



[PHP] Re: Pirate PHP books online?

2007-07-17 Thread Man-wai Chang
[EMAIL PROTECTED] wrote:
> I don't see why people need to buy the books. I learned PHP buy
> borrowing one book from the library, then using php.net for more
> advanced functions.

I am basically on the same route, peeking codes from experienced. But I
still wanna believe that there is/was really a good book on PHP. :)
Anyway, I have bought about 4 PHP books.

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   19:15:01 up 5 days 21:19 0 users load average: 0.01 0.05 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

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



Re: [PHP] magic quotes

2007-07-17 Thread Richard Heyes

What do people on this list usually do with this kind of problem. To
me, the .htaccess seems the easiest solution, since I don't have to
change any scripts.


Use a .htaccess file, or if performance is any sort of concern, put it 
in the server configuration files and turn off .htaccess files.


Failing that you could do it in the script with your 
stripslashes_array() function, but you should only do it when you need 
to. eg. There's no point using it on $_COOKIE if you're not using $_COOKIE.


--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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



[PHP] problem with pcode function

2007-07-17 Thread Ross
I have this postcode selector working on my localhost but remotely it gives 
a parse error. It should only call the function when the postcode is 
submitted. Any ideas?


The error is:

Parse error: parse error, unexpected T_NEW in 
/homepages/3/d154908384/htdocs/legalsuk/consultants/nearest.php on line 26





http://services.postcodeanywhere.co.uk/xml.aspx?";;
  $url .= "&action=stored_nearest";
  $url .= "&origin=" . urlencode($origin);
  $url .= "&units=" . urlencode($units);
  $url .= "&distance=" . urlencode($distance);
  $url .= "&items=" . urlencode($items);
  $url .= "&account_code=" . urlencode($account_code);
  $url .= "&license_code=" . urlencode($license_code);
  $url .= "&machine_id=" . urlencode($machine_id);

  //Make the request
  $data = simplexml_load_string(file_get_contents($url));

  //Check for an error
  if ($data->Schema['Items']==2)
 {
 throw new exception ($data->Data->Item['message']);
 }

  //Create the response
  foreach ($data->Data->children() as $row)
 {
  $rowItems="";
  foreach($row->attributes() as $key => $value)
  {
  $rowItems[$key]=strval($value);
  }
$output[] = $rowItems;
 }

  //Return the result
  return $output;

}
}
?>

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>






table {
width:400px;
}
th {
text-align:right;

text-decoration:none;
font-weight:normal;
}
td{
width:400px;

}









 

 

  




  





  Find Your Nearest Consultant by Entering Your Postcode Below
  
  
  
  
 

   
  
  


  
 

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



[PHP] no default value

2007-07-17 Thread Man-wai Chang

Is there a parameter in php.ini that requires all variables to be
explicitly initialized, rather than being automatically assigned the
value of false?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   20:00:01 up 5 days 22:04 0 users load average: 0.00 0.00 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread John Meyer



On Monday 16 July 2007, Richard Davey wrote:

  

As a published author I would *rather* people read a PDF of my work,
than not read it at all because they couldn't afford the printed
version. But that is my choice to make, not yours.

I would never be so two-faced as to rant about pirates and 'stealing'
software, but I hate with a vengeance those who claim what they've done
*isn't* stealing. That's just insanity. When it comes down to it, it
IS black or white - you either paid for it, or you didn't, and anyone
who claims there is some "middle ground" based on the digital nature
of the item is living in a fucking fantasy world. Wake up and smell
the coffee.

Really?  Did you cite and pay every source you used in your book?  And 
what about those of us who downloaded books that we've bought?
Seriously, I think you need to get a grip yourself.  When and if you 
become that popular, and when and if PHP becomes that popular, then you 
can discuss rampant pirating of PHP books online.  But until then, it's 
more theoretical.


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



RE: [PHP] magic quotes

2007-07-17 Thread Steve Perkins
Talking about .htaccess, anyone know an easy way of configuring os
(generally linux/windows) alternative settings in the same .htaccess ?
Mainly for paths (eg: include_path), so I can just upload a whole directory
at a time from my (Windows) development machine to a (Linux) production
server without having to worry about different .htaccess files for each.

Ta
Steve

-Original Message-
From: Richard Heyes [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2007 12:25
To: Phil Princely
Cc: php-general@lists.php.net
Subject: Re: [PHP] magic quotes

> What do people on this list usually do with this kind of problem. To 
> me, the .htaccess seems the easiest solution, since I don't have to 
> change any scripts.

Use a .htaccess file, or if performance is any sort of concern, put it in
the server configuration files and turn off .htaccess files.

Failing that you could do it in the script with your
stripslashes_array() function, but you should only do it when you need to.
eg. There's no point using it on $_COOKIE if you're not using $_COOKIE.

--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--
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] $_POST

2007-07-17 Thread Dan Shirah

I'm using PHP 5.2 and $_POST works just fine.

On 7/17/07, Robert Cummings <[EMAIL PROTECTED]> wrote:


On Tue, 2007-07-17 at 14:20 +1000, Nathan Wallis wrote:
> Hey,
>
> Just wondering if anyone can help me out.  I have been used to using
$_POST
> but from what I can tell it isn't supported in PHP 5.  What do you use
> instead?

Could you point us to the literature that says it's not supported in
PHP5 because some of us here are probably extremely surprised.

$_POST works fine in PHP5.

Cheers,
Rob.
--
...
SwarmBuy.com - http://www.swarmbuy.com

   Leveraging the buying power of the masses!
...

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




Re: [PHP] magic quotes

2007-07-17 Thread Arpad Ray

Phil Princely wrote:

What do people on this list usually do with this kind of problem. To
me, the .htaccess seems the easiest solution, since I don't have to
change any scripts.


I would certainly turn it off in php.ini or apache config files if 
possible (the .htaccess line should be "php_flag magic_quotes_gpc off" 
by the way).
However, if you end up doing it at runtime, then it's best to use 
Environment/magic_quotes_gpc_off.php in PHP_Compat.
magic_quotes_gpc has been very inconsistent between PHP versions so a 
generic stripslashes_array() function is unwise.


Arpad

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



Re[2]: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Richard Davey
Hi John,

Tuesday, July 17, 2007, 1:02:15 PM, you wrote:

> Really?  Did you cite and pay every source you used in your book?  And
> what about those of us who downloaded books that we've bought?

Neither of these things apply to my rant, don't quote me out of
context.

> Seriously, I think you need to get a grip yourself.  When and if you 
> become that popular, and when and if PHP becomes that popular, then you
> can discuss rampant pirating of PHP books online.  But until then, it's
> more theoretical.

There's nothing theoretical about what is happening today, right this
second, and affecting genuine authors as has been demonstrated in this
thread (and I'm not talking about myself here):

http://marc.info/?l=php-general&m=118462486109342&w=2

The only part of it that could be classed as theoretical is what the
net *result* of these actions are, not that it is happening.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

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



Re: [PHP] $_POST

2007-07-17 Thread Daniel Brown

On 7/17/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Tue, 2007-07-17 at 14:20 +1000, Nathan Wallis wrote:
> Hey,
>
> Just wondering if anyone can help me out.  I have been used to using $_POST
> but from what I can tell it isn't supported in PHP 5.  What do you use
> instead?

Could you point us to the literature that says it's not supported in
PHP5 because some of us here are probably extremely surprised.

$_POST works fine in PHP5.

Cheers,
Rob.
--
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

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




   Nate, check your EGPCS settings (variables_order) to make sure you
have a P in there.

   If that doesn't work, there's another configuration or scripting
error somewhere, because I assure you, the $_POST superglobal works
just fine in every version of PHP since 4.1.0.

   Also, you can try doing a dump of $GLOBALS.  This way will show
them cleanly, but won't print_r() the arrays, of course:

 $v) {
   echo "".$p.":         ".$v."\n";
}
?>

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

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



[PHP] PHP-5.2.3 and "Internal Server Error"

2007-07-17 Thread Paul Scott

On one of our test boxen, we recently upgraded to PHP-5.2.3 and all of a
sudden started getting Internal Server Errors. The Apache log file tells
me that there is a premature end of script error on index.php, which is
simply an entry point script to an MVC framework.

I have checked that there is no whitespace after the closing ?> tag and
all, and have removed almost everything that I can think of that may be
causing something like this. 

It seems to choke on the call to ob_start()...

Anyone have any ideas that may shed some light on this one?

Appreciate any helpful tips.

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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

Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Daniel Brown

On 7/16/07, Larry Garfield <[EMAIL PROTECTED]> wrote:

I am not going to defend copyright infringement, but theft is depriving
someone of something they used to have and no longer have.  If someone
pirates a copy of your book that would have purchased it otherwise, then they
have not taken anything away from you that you had.


   Actually, "theft" is the act of unlawful taking by deceptive practices.

   And it's not just for tangible items either --- we've all
experienced theft-of-services first-hand, I'm sure.  With my web
hosting company, it's a common occurrence for people to attempt
theft-of-service through fraudulent activity, et cetera.

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

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



Re: [PHP] Dynamic refresh dropdown list

2007-07-17 Thread Daniel Brown

On 7/17/07, Sichta, Daniel <[EMAIL PROTECTED]> wrote:

Look for AJAX !

DS

-Original Message-
From: C.R.Vegelin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 17, 2007 12:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Dynamic refresh dropdown list

I have a selection form with multiple dropdown lists, let's say A, B and
C.
If the dropdown list B is changed, then dropdown list C should be
updated.
To get this done, I use a small javascript
function reload(form)
{  var val=form.B.options[form.B.options.selectedIndex].value;
   self.location='myForm.php?B=' + val ;
}
called by
 

This works fine, BUT all other dropdown lists are also reset.
So if I select another A, then another B, then also A is reset to its
prior value.
Any idea how I can refresh a specific dropdown,
without affecting all the other dropdowns ?

TIA, Cor

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




   Cor,

   That's a JavaScript issue, not a PHP issue, so it should really go
to the proper list.  However, at first glance, I'd say that you should
call your specific element because, as you have it right now, you're
resetting the whole form, which is causing all fields within said form
to be reset in tandem.

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

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



Re: [PHP] PHP-5.2.3 and "Internal Server Error"

2007-07-17 Thread Daniel Brown

On 7/17/07, Paul Scott <[EMAIL PROTECTED]> wrote:


On one of our test boxen, we recently upgraded to PHP-5.2.3 and all of a
sudden started getting Internal Server Errors. The Apache log file tells
me that there is a premature end of script error on index.php, which is
simply an entry point script to an MVC framework.

I have checked that there is no whitespace after the closing ?> tag and
all, and have removed almost everything that I can think of that may be
causing something like this.

It seems to choke on the call to ob_start()...

Anyone have any ideas that may shed some light on this one?

Appreciate any helpful tips.

--Paul


All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm


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



   Check your Apache error_log file.  It will either be in the same
directory as the index.php script or in the logs/ subdirectory of
Apache's installation, by default.

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

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



Re: [PHP] Pirate PHP books online?

2007-07-17 Thread tedd

At 11:12 PM +0800 7/16/07, Crayon Shin Chan wrote:

They might be on vacation, they might be in a coma.


Or both.

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 12:16 PM -0400 7/16/07, Tom Ray [Lists] wrote:

Richard Heyes wrote:

 >> Every single

one of us has been guilty of it at some time or another


You can't make that assumption.

Sure he can. Assumptions are like opinions which are like ...well 
you know what I'm getting at...we all have them. And if someone can 
honestly say they've never stolen ANYTHING in their life, I'd be 
hard press to buy it.


Well, anyone who makes that claim is also a liar -- so one can think 
of it as an admission of quilt.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] #2003 - The server is not responding

2007-07-17 Thread Daniel Brown

On 7/16/07, Ryan Lao <[EMAIL PROTECTED]> wrote:

I uninstalled my old versions of apache, mysql and php then installed wamp
on my computer. everything seems to be working when i access localhost,
except when i go to phpmyadmin. I get this error on screen "MySQL said:
#2003 - The server is not responding"... so i updated the config.php file
but still i get the same error. does this have to do with the old password
or username that i used before with my old mysql? or is it something else
entirely? some help would really be appreciated

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




   That's actually a MySQL rather than PHP question, but the error
message gives you the answer in context:

   "The server is not responding"

   1.) Check to make sure it's installed properly.
   2.) Check to ensure that MySQL starts and runs properly without quitting.
   3.) Check the ports on which MySQL's daemon is set to listen.
   4.) Attempt to connect via the shell to MySQL.
   5.) Check your configure.inc.php (I think that's what phpMyAdmin uses)
   5a.) Make sure the IP/hostname is correct
   5b.) If not localhost, make sure the port number is correct
   6.) If connecting to anything other than `localhost` check your
firewall settings

   The username/password combination will have nothing to do with
this particular error, but may become an issue once you've connected
to the server.

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

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



Re: [PHP] Pirate PHP books online?

2007-07-17 Thread Daniel Brown

On 7/17/07, tedd <[EMAIL PROTECTED]> wrote:

At 11:12 PM +0800 7/16/07, Crayon Shin Chan wrote:
>They might be on vacation, they might be in a coma.

Or both.

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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




   I usually try to slip into a nice, comfortable coma while I'm
traveling.  It affords me the feeling of being dead, but without the
maggots and stuff.

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

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 5:24 PM +0100 7/16/07, Richard Heyes wrote:

And assumptions are nothing like opinions.



While they are different words with different meanings, they *can* be 
similar in that both can be based upon uncertainly -- an opinion is 
not necessarily based on fact and neither is an assumption.


I can make an assumption based upon opinion or verse an opinion based 
on an an assumption.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Daniel Brown

On 7/17/07, tedd <[EMAIL PROTECTED]> wrote:

Well, anyone who makes that claim is also a liar -- so one can think
of it as an admission of quilt.


    into the Arts and Crafts competition at the County Fair.  ;-P


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

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



Re: [PHP] no default value

2007-07-17 Thread Daniel Gerzo
On Tue, Jul 17, 2007 at 08:01:59PM +0800, Man-wai Chang wrote:
> 
> Is there a parameter in php.ini that requires all variables to be
> explicitly initialized, rather than being automatically assigned the
> value of false?
> 

Well, I am not aware of such php.ini variable, but I may recomment to
increase your error level and you will be warned when you use
uninicialized variable.

-- 
Best regards,
 Daniel Gerzo

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



Re: [PHP] no default value

2007-07-17 Thread Stut
Man-wai Chang wrote:
> Is there a parameter in php.ini that requires all variables to be
> explicitly initialized, rather than being automatically assigned the
> value of false?

I think you'll find they get assigned the value of null, not false.

There is no setting that enforces such a requirement, but you can get
some of the way there by enabling the display of notices which will tell
you whenever a variable is used without being initialised.

-Stut

-- 
http://stut.net/

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Stut

Daniel Brown wrote:

On 7/16/07, Larry Garfield <[EMAIL PROTECTED]> wrote:

I am not going to defend copyright infringement, but theft is depriving
someone of something they used to have and no longer have.  If someone
pirates a copy of your book that would have purchased it otherwise, 
then they

have not taken anything away from you that you had.


   Actually, "theft" is the act of unlawful taking by deceptive practices.


By that definition, if I walk into a shop, grab a TV off the shelf and 
walk out again I am not committing a theft - there is no deception. The 
definition of theft is not important because copyright theft is not an 
accurate term for what's being discussed, it's actually copyright 
infringement.


However, this discussion is not particularly interesting and certainly 
not relevant to this mailing list so it would be great if we could drop 
it or move it off-list if people really really want to continue with it.


-Stut

--
http://stut.net/

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



[PHP] Re: no default value

2007-07-17 Thread Man-wai Chang

Thank you. This is horrible as a simple typing mistake ($sucess rather
than $success) would waste me some time hunting down the problem. Foxpro
isn't like this

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   21:10:01 up 5 days 23:14 0 users load average: 0.00 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 7:57 PM -0500 7/16/07, Larry Garfield wrote:

I am not going to defend copyright infringement, but theft is depriving
someone of something they used to have and no longer have.


Time.

An author spends his time writing a book, he should be paid for it.

Time.

You spend time coding, and you should be paid for it.

Anyone who takes your work product without compensating you for your 
TIME is stealing, period!


And who is to say how much it is worth and how much you should be 
paid? Should you make millions like the author of Harry Potter or 
nothing like a significant percentage of authors do? You want to pay 
everyone minimum wage, or is there a scale somewhere that would 
suffice, I think not.


One of the reason why authors publish (books, software, music, 
whatever) is that they may make a considerable amount of money from 
their efforts -- AND -- what wrong with that? That helps drive 
creativity and innovation and raises the quality of life for 
everyone. You want to defend taking that away?


Larry, I like your post and consider what you have to say seriously, 
but you're slant on this is just plain wrong.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 8:05 PM -0700 7/16/07, [EMAIL PROTECTED] wrote:

I don't see why people need to buy the books. I learned PHP buy
borrowing one book from the library, then using php.net for more

advanced functions.


That's you -- I need hard copy to look through. I want to feel and 
see the book, put sticky notes on it and use it as reference later. 
Last year I spent more money on books than I did on hardware.


To each their own.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 10:38 AM +0800 7/17/07, Man-wai Chang wrote:
I have to agree with Col on this one. Books are not shareware, 
freeware or open source. They are written for profit and anyone 
wanting to pirate


Not really. You could open a sample book in bookstores, scan the 
chapters to decide whether you are gonna buy it. It's not porn 
magazines wrapped in plastic bag, with a label "18-year-old or more".


There are bookstores that don't customers to preview the books. For 
me, I would not buy a book by just looking at the cover. You gotta 
kidding me or you were too greedy.



Whoa dude. I go to book stores all the time and look over books. 
Those I like, I buy -- and I buy a lot of books.


I don't use words of other's written for profit without paying. To do 
so is stealing.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 7:16 PM +0800 7/17/07, Man-wai Chang wrote:

[EMAIL PROTECTED] wrote:

 I don't see why people need to buy the books. I learned PHP buy
 borrowing one book from the library, then using php.net for more
 advanced functions.


I am basically on the same route, peeking codes from experienced. But I
still wanna believe that there is/was really a good book on PHP. :)
Anyway, I have bought about 4 PHP books.


I have five shelves each measuring 12 feet long filled with computer 
books -- from FORTRAN on.


I have a book case next to me that has three three-foot shelves 
filled with just php, mysql, javascript, css, ajax, html, and 
accessibility books.


I could not function without my reference library -- that's why I 
hate job interviews.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Robert Cummings
On Tue, 2007-07-17 at 09:32 -0400, tedd wrote:
> At 7:16 PM +0800 7/17/07, Man-wai Chang wrote:
> >[EMAIL PROTECTED] wrote:
> >>  I don't see why people need to buy the books. I learned PHP buy
> >>  borrowing one book from the library, then using php.net for more
> >>  advanced functions.
> >
> >I am basically on the same route, peeking codes from experienced. But I
> >still wanna believe that there is/was really a good book on PHP. :)
> >Anyway, I have bought about 4 PHP books.
> 
> I have five shelves each measuring 12 feet long filled with computer 
> books -- from FORTRAN on.
> 
> I have a book case next to me that has three three-foot shelves 
> filled with just php, mysql, javascript, css, ajax, html, and 
> accessibility books.
> 
> I could not function without my reference library -- that's why I 
> hate job interviews.

I have an icon in my taskbar that launches Google. It takes up very
little space. I can find anything I need to know by clicking on it and
entering a few choice keywords :)

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

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



[PHP] Re: no default value

2007-07-17 Thread Al

A good php editor will prevent this type of error.  e.g,. phpEdit does auto 
variable completion.

Assume you've assigned $success=foo.  Later you key $sup... the editor competes it for you as 
$success.


Man-wai Chang wrote:

Thank you. This is horrible as a simple typing mistake ($sucess rather
than $success) would waste me some time hunting down the problem. Foxpro
isn't like this



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



Re[2]: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Richard Davey
Hi John,

Tuesday, July 17, 2007, 2:01:42 PM, you wrote:

> So it isn't as black and white as you say. There apparently is a
> place where you can not only copy, but redistribute, and as long as
> you gave proper credit, you don't have to pay.

Citing a reference in a book to another is not the same as reproducing that
ENTIRE book wholesale, page for page, illustration for illustration.

Compare oranges with oranges please.

> First off, I'd like to know where you got that 2,000 number.  Closest I
> could find was 456 on TPB, and I'm guessing that's 456 people that have
> downloaded the torrent.  Not necessarily 456 that have completely 
> downloaded the book.

I didn't post that figure, but it doesn't matter if the actual numbers
are 2000 or just 2, it doesn't change a thing.

You said this problem was theoretical, I've proven it blatantly isn't.

I am not standing on some pulpit preaching here, I did my fair share
of cracking and spreading back in the 8/16 bit day, my slate is far
from clean - but the difference is that I *will not* hide behind any
'copyright is flawed' or 'they can afford it' facade. I'm well aware
that those actions are illegal, and I loath it when people attempt to
argue otherwise. I have far more respect for someone who says "I
copied it because I can't afford to buy it". At least they are honest
about their dishonesty.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

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



Re: [PHP] Array Question

2007-07-17 Thread kvigor
Thanks for all the input.  You've all been pretty informative.  Sorry of 
delayed response to help but was busy.  You all are appreciated.


"Stut" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Richard Lynch wrote:
>> On Wed, July 11, 2007 4:16 pm, Robert Cummings wrote:
 But I'd have to say that the intent is not all that clear, really,
 and
 I'd be leery of this feature, personally.
>>> I wouldn't be leery at all. It's been around for a very long time and
>>> it's documented:
>>>
>>>
>>> http://www.php.net/manual/en/language.types.array.php#language.types.array.casting
>>
>> As soon as I hit send I knew that would be mis-interpreted...
>>
>> Leery is the wrong word.
>>
>> Sorry.
>>
>> It just seems a bit to clever to me...
>>
>> I suspect I'd skim this code a hundred times and not realize what it
>> was doing.
>>
>> But maybe that's just me. :-)
>
> I would have to agree. I'm a big fan of self-documenting code, and this 
> one requires a little bit more knowledge of the intricacies of PHP than I 
> would expect from your 'average' developer.
>
> If performance is going to be an issue (and in terms of cycles I can't see 
> this saving much), buy faster/more hardware - it's far cheaper than 
> developer time!!
>
> -Stut
>
> -- 
> http://stut.net/ 

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



Re: [PHP] Checking Post Data against DB Data

2007-07-17 Thread kvigor
I really like the re-coding it's great.  I'm still new and below code is 
definitely more efficient.

FYI: I do have date field sorry I wasn't so clear.  I just didn't post all 
code.

""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Doing a select to get every record, and then looping through them all,
> concatenating a bunch of stuff together, and then using PHP to test ==
> is not very efficient...
>
> Why not just:
>
> $sql = array_map('mysql_real_insert_string', $POST);
> $query = " select count(*) from central ";
> $query .= " where conName = $sql[conName] ";
> $query .= "   and conAddress = $sql[conAddress] ";
> .
> .
> .
> $query .= "   and SOME_DATETIME_FIELD_WHEN_THEY_REGISTERED >=
> date_sub(now(), interval 1 day) ";
>
> Also note that your are currently comparing the $_POST['timeStamp']
> which is *probably* generated at the time the HTML form was sent with
> time(); which is when the script is processing, which will be MUCH
> less than one day, unless a user opens up the form, walks away for 24
> hours, and then comes back to complete registration...
>
> You need a field in the database from previous registration to compare
> to time().

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Larry Garfield
On Tuesday 17 July 2007, tedd wrote:
> At 7:57 PM -0500 7/16/07, Larry Garfield wrote:
> >I am not going to defend copyright infringement, but theft is depriving
> >someone of something they used to have and no longer have.
>
> Time.
>
> An author spends his time writing a book, he should be paid for it.
>
> Time.
>
> You spend time coding, and you should be paid for it.

Once I have written code or words, the time I have spent on that is gone.  I 
will never get that time back, regardless of whether or not I get paid for it 
after the fact.  Copyright is a system intended to increase the likelihood 
that I will make a financial return on that investment of time, but it is not 
a guarantee nor is it a time machine.  

*There is no right to profit.*  There is only the artificial and 
government-created monopoly on duplication, intended to allow authors and 
creators to *try and profit* from their work.  

> Anyone who takes your work product without compensating you for your
> TIME is stealing, period!

No, they are committing copyright infringement.  If they stoke the CD I had 
the manuscript on, then they would be stealing; they'd be stealing a CD.  
Please, it only cheapens the work to pretend it's something it's not.

> And who is to say how much it is worth and how much you should be
> paid? Should you make millions like the author of Harry Potter or
> nothing like a significant percentage of authors do? You want to pay
> everyone minimum wage, or is there a scale somewhere that would
> suffice, I think not.

Do not put words in my mouth.  I never said anything about how much a person 
should be paid for a copyrighted work.  I said, and the only thing I've said, 
is that copyright is not innate but a completely artificial monopoly, and 
infringing on that completely artificial monopoly is copyright infringement, 
which is not theft.  

> One of the reason why authors publish (books, software, music,
> whatever) is that they may make a considerable amount of money from
> their efforts -- AND -- what wrong with that? That helps drive
> creativity and innovation and raises the quality of life for
> everyone. You want to defend taking that away?

Once again, please DO NOT put words in my mouth.  I said outright that I am 
not supporting copyright infringement.  I also do not support misrepresenting 
the law, the facts, or the Constitution.

> Larry, I like your post and consider what you have to say seriously,
> but you're slant on this is just plain wrong.

I think you are completely misreading what that slant is, based on what you're 
claiming I said when I did not.

-- 
Larry Garfield  AIM: LOLG42 
[EMAIL PROTECTED]   ICQ: 6817012 
 
"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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



Re: [PHP] magic quotes

2007-07-17 Thread Arpad Ray

Phil Princely wrote:

thanks for all the help.

My code was wrong in the first post, I just copied it straight from
the web. This one works:

if (get_magic_quotes_gpc()) {
stripslashes_array($_GET);
stripslashes_array($_POST);
stripslashes_array($_REQUEST);
stripslashes_array($_COOKIE);
}
set_magic_quotes_runtime(0);


set_magic_quotes_runtime() has no effect on magic_quotes_gpc.

function stripslashes_array(&$arr) {
foreach (array_keys($arr) as $k) {
$arr[$k] = stripslashes($arr[$k]);
}
}

This function breaks arrays, ignores keys, and takes into account none 
of PHP's inconsistencies with magic_quotes_gpc.

As I said before, if you need to do it at runtime, use the PHP_Compat code.

Here's the two relevant files, if you can't use the PEAR installer:
http://cvs.php.net/viewvc.cgi/pear/PHP_Compat/Compat/Environment/_magic_quotes_inputs.php?revision=1.3&view=markup
http://cvs.php.net/viewvc.cgi/pear/PHP_Compat/Compat/Environment/magic_quotes_gpc_off.php?revision=1.7&view=markup

I tried searching for setini, but came up with nothing, except this:
setIni('magic_quotes_gpc', 'Off', $inifile); // didn't work: unknown 
function


ini_set() is probably what you're thinking of, but magic_quotes_gpc is 
applied before your script is executed so it will have no effect.

That's why the only option at runtime is to reverse it.

Arpad

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Sancar Saran
I believe, we are here for solving problems. 

Pirating has very very long history. Even Julius Ceasar (hope I wrote correct) 
can't defeat them.

On other way modern life style steals other species resources. Does anyone 
feel guilty about this ?

Also you may want know, more than 4 billion of human poplulation of world can 
live with 10 USD per day, 2 billion of them only earn 2 USD per day.

Yes this is sad, and fixing this is beyond the our abilities.

So could we start to focus more resolvable topics please ?

Regards

Sancar

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



[PHP] Re: installing php5.2.3 on apache2.2 \w mod_fastcgi

2007-07-17 Thread M. Sokolewicz

M. Sokolewicz wrote:

Good day,

I've been struggling with this problem for quite a while now, I've 
looked on google, but to no avail, documentation doesn't help me out 
either. Now, I know this isn't a pure php problem as such, but rather a 
problem in the cooperation of apache2.2, php and fastcgi.


So, here's what I have
I compiled php with --enable-fastcgi
by itself, php works fine.

I've installed mod_fastcgi and apache 2.2.4, which work fine aswell 
(well, apache does, mod_fastcgi is hard to tell :)).


I've got the following in my httpd.conf:
ScriptAlias /fcgi-sys/ /usr/local/apache2/fcgi-sys/

Options ExecCGI
SetHandler fastcgi-script


Action application/x-httpd-php5-2-3 "/fcgi-sys/php-cgi"
AddHandler application/x-httpd-php5-2-3 .php5

So, I start up apache (apachectl -k start), it doesn't show any errors 
or anything. Opening my browser and going to localhost shows the html 
page I expected to see. So that works.

I've made a file phpinfo.php5 with the contents

Now, when I point my browser there, I recieve a 403 Forbidden error:
Forbidden

You don't have permission to access /fcgi-sys/php-cgi/phpinfo.php5 on 
this server.


Thinking this is probably some permissions issue, I've temporarily 
chmodded the php-cgi binary and the php script to 777. After doing that: 
nothing changed, still the same error.


Ok, so I checked apache's error_log, and saw:
[Mon Jul 16 20:09:33 2007] [error] [client 192.168.2.100] client denied 
by server configuration: /usr/local/apache2/fcgi-sys/php-cgi
[Mon Jul 16 20:10:36 2007] [error] [client 192.168.2.100] client denied 
by server configuration: /usr/local/apache2/fcgi-sys/php-cgi
[Mon Jul 16 20:15:04 2007] [error] [client 192.168.2.100] client denied 
by server configuration: /usr/local/apache2/fcgi-sys/php-cgi


ok, that's weird... Well, I decided to google this, and the few pages 
that talked about this (or something close to this) all stated that it 
was due to apache being closed down pretty much by default, and they 
recommended easing the restrictions a bit by adding a .htaccess file in 
the webroot with:


  AllowOverride None
  Order Deny,Allow
  Allow from all


I did that, no help. I even added a

Options +ExecCGI


just in case, but that did not help either.
However, if I (from the commandline) skip apache and simply issue a:
/usr/local/apache2/fcgi-sys/php-cgi 
/usr/local/apache2/htdocs/phpinfo.php5 > phpinfo.html
it will run just fine, showing the exact output I expect, and the 
phpinfo.html file is visible via the browser just fine aswell.


So, I'm guessing this is an issue in apache-configuration or 
fastcgi-configuration, but I'll be damned if I know what to do now...


any pointed would be welcome.

cheers,
- Tul



So, I'm guessing that although fastCGI is one of the recommended ways to 
 go (it's been named a lot on internals lately), there's little 
(understandable) documentation about setting it up (in combination with 
php) around, nor really many people who would have a clue as to what 
might be wrong here? Damn... :(


- Tul

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



Re: [PHP] html emails and plain text dectection

2007-07-17 Thread brian

Ross wrote:

I am using the code to send an html email (phpmailer class) now I need to 
somehow determine if the recipient uses text only email and change email to 
plain. Is this possible?




No. How could your script possibly detect how a person's email client is 
configured?


In any case, you should be sending both parts--plain text & HTML--and 
allowing the recipients to view it as they wish. And sending mail as 
HTML only is a good way to have your messages marked as SPAM.


brian

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



Re: [PHP] Sessions Lose Form Field Data When Back Button Used?

2007-07-17 Thread Instruct ICC

From: Chris <[EMAIL PROTECTED]>
That has to be your code re-setting the session variables or something. PHP 
won't do this automatically for you.


Well I suppose it's "or something".  Try this code.  Name it test.php:



 Test


 
 Field1: 
 Field2: 
 
 



A) With session_start commented out as above:
A1. Go to the test.php page in your browser (using the GET method) by typing 
in the URL.

A2. Enter something in Field1.  (Do not enter anything in Field2.)
A3. Press Submit.
Next to Field2 should have text, "*Required".
A4. Press your Back button in your browser.
Field1 retains its contents.

B) With session_start uncommented so as to be called (Edit test.php to now 
call session_start):

B1. Follow steps A1 to A4 above.
Field1 has lost its contents!

Where did my code reset a session variable?

C) If I add many line break br tags immediately before the submit input tag, 
so that you are required to scroll down to see the Submit button, after step 
A4 you will notice that the page reloads when using sessions, but seems to 
be cached by the browser when not using sessions.


If this is the case, can I instruct PHP to let the browser use its cache 
while still using PHP sessions (i.e. session_start)?


This behavior occurs in (standard?) FF 2.0.0.4, and IE 7.
It did not occur on an obscure FF which also reports version 2.0.0.4, named 
"FrontMotion Firefox Community Edition".  That's also why I thought I could 
dismiss it as user browser settings.


_
http://newlivehotmail.com

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread David Powers

Richard Davey wrote:

First off, I'd like to know where you got that 2,000 number.  Closest I
could find was 456 on TPB, and I'm guessing that's 456 people that have
downloaded the torrent.  Not necessarily 456 that have completely 
downloaded the book.


I didn't post that figure, but it doesn't matter if the actual numbers
are 2000 or just 2, it doesn't change a thing.


I posted the figure 2,000. There are two listings on that site for my 
book, "PHP Solutions". One has been downloaded 457 times. The other has 
been downloaded 1,626 times. Although I'm delighted that my book has 
proved so popular, I would be even more delighted to get some financial 
reward for my efforts.


Fortunately, a lot of honest people have bought legal copies, but 
certainly not enough to put me in the fat-cat league. :(


David Powers

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 9:26 AM -0500 7/17/07, Larry Garfield wrote:

On Tuesday 17 July 2007, tedd wrote:
Once I have written code or words, the time I have spent on that is gone.  I
will never get that time back, regardless of whether or not I get paid for it
after the fact.


Ok, then it would be an acceptable excuse for your employer not to 
give you a paycheck -- after all, you already spent the time, right? 
That doesn't make sense dude.


I don't mean to be putting words in your mouth, but it sounds like 
your claim here is absurd.


I'm not arguing copyright, or any other government bullshit, I'm 
simply saying that we all work for someone and we all should be paid 
for our efforts.


An author of any digital material (code, books, music, whatever) 
should be paid for their effort just like anyone else. The idea that 
because the work product is digital, and thus there was no effort 
expended in making a copy, and thus implies no obligation to the 
author, is just plain wrong.


I've written software all my life and I have on numerous occasions 
run into individuals who ask something like "Can you get me a copy? 
It's not worth it for me to pay for it because reason you want>. I would just like to get a copy."


However, these same people would be outraged if someone took a cent 
from their paycheck.


We can't have double standards because of the medium -- work is work.

If you didn't mean it that way -- my apologies.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread John Meyer

David Powers wrote:

Richard Davey wrote:

First off, I'd like to know where you got that 2,000 number.  Closest I
could find was 456 on TPB, and I'm guessing that's 456 people that have
downloaded the torrent.  Not necessarily 456 that have completely 
downloaded the book.


I didn't post that figure, but it doesn't matter if the actual numbers
are 2000 or just 2, it doesn't change a thing.


I posted the figure 2,000. There are two listings on that site for my 
book, "PHP Solutions". One has been downloaded 457 times. The other 
has been downloaded 1,626 times. Although I'm delighted that my book 
has proved so popular, I would be even more delighted to get some 
financial reward for my efforts.


Fortunately, a lot of honest people have bought legal copies, but 
certainly not enough to put me in the fat-cat league. :(


David Powers

Even though there has been 2,000 "downloads" (very likely of the small 
torrent file), I don't think you've gotten 2,000 complete downloads of 
the  book.  On the 456 downloads, for instance, I noticed only 11 
"seeders".  You aren't really going to be able to download that fast (if 
you are at all) by sipping from 11 sources.  And books have not been the 
fastest of all downloads.


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



Re: [PHP] Pirate PHP books online?

2007-07-17 Thread Eric Butera

On 7/16/07, Dotan Cohen <[EMAIL PROTECTED]> wrote:

I just found some jerk on StumbleUpon with titles like:
PHP Essentials (c)2007 (Neil Smyth)
PHP Cookbook (David Sklar/Adam Trachtenberg)
PHP 5 Power Programming (c)2005 (Andi Gutmans/Stig Bakken/Derick Rethans )
A Programmer's Introduction to PHP 4.0 (c)2000 (W. Jason Gilmore)

And lots of others. They are downloadable PDFs. If the authors want
the address of the site, email me. The pirates can go directly to
Hell.

Dotan Cohen

http://lyricslist.com/
http://what-is-what.com/

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




Oh no!

http://andigutmans.blogspot.com/2006/08/php-5-power-programming-passes-1.html

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread John Meyer

tedd wrote:

At 9:26 AM -0500 7/17/07, Larry Garfield wrote:

On Tuesday 17 July 2007, tedd wrote:
Once I have written code or words, the time I have spent on that is 
gone.  I
will never get that time back, regardless of whether or not I get 
paid for it

after the fact.


Ok, then it would be an acceptable excuse for your employer not to 
give you a paycheck -- after all, you already spent the time, right? 
That doesn't make sense dude.


I don't mean to be putting words in your mouth, but it sounds like 
your claim here is absurd.


I'm not arguing copyright, or any other government bullshit, I'm 
simply saying that we all work for someone and we all should be paid 
for our efforts.


An author of any digital material (code, books, music, whatever) 
should be paid for their effort just like anyone else. The idea that 
because the work product is digital, and thus there was no effort 
expended in making a copy, and thus implies no obligation to the 
author, is just plain wrong.


I've written software all my life and I have on numerous occasions run 
into individuals who ask something like "Can you get me a copy? It's 
not worth it for me to pay for it because you want>. I would just like to get a copy."


And you think that if somehow, somebody was able to magically lock down 
all copies, all of those people would pony up the money and pay you or 
buy that software?  It's the assumption that the music and movie 
industry make that if only they could lock down all those places the 
money would come flowing in.


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



[PHP] double output from trigger_error from command line

2007-07-17 Thread Olav Mørkrid

if i do a trigger_error() when running php scripts from the command
line, each error is echoed twice. this is annoying.

does anyone know how to make each error display only once?

c:\>php -r "trigger_error(\"hello\");"
PHP Notice:  hello in Command line code on line 1

Notice: hello in Command line code on line 1

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



Re[2]: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Richard Davey
Hi John,

Tuesday, July 17, 2007, 3:27:16 PM, you wrote:

>> Citing a reference in a book to another is not the same as
>> reproducing that ENTIRE book wholesale, page for page, illustration
>> for illustration.

> All right, supposing I do a cut copy paste on a section of a book,
> not the whole thing, and send it out to a friend via e-mail. What if
> it's 25 percent? 15 percent? A single section of a single chapter.
> And what if you put a quote on in. That black and white is blurring
> a lot. Maybe we're not oranges to oranges, but certainly we're
> getting to orange juice:

Technically it has still breached the Copyright, Designs and Patents
Act (1988) - from a UK publication at least. I'm sure there is a US
equivalent. Open up a book on your (non-digital) book shelf, take a
look at that page a couple pages in. Chances are it will tell you all
you need to know. Here's an example from a book on my desk:

"No part of this book may be reproduced or transmitted in any form by
any means, electronic, mechanical, photocopying, recording, or
otherwise, without the prior written permission of the publisher."

So no, technically I shouldn't copy and paste it into an email to you.
I see nothing blurred about this quite frankly.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread tedd

At 11:18 AM -0600 7/17/07, John Meyer wrote:

tedd wrote:
I've written software all my life and I have on numerous occasions 
run into individuals who ask something like "Can you get me a copy? 
It's not worth it for me to pay for it because reason you want>. I would just like to get a copy."


And you think that if somehow, somebody was able to magically lock 
down all copies, all of those people would pony up the money and pay 
you or buy that software?  It's the assumption that the music and 
movie industry make that if only they could lock down all those 
places the money would come flowing in.



Nope, I'm just saying that if you want my work, pay for it. If you 
get my work without paying, then you're stealing.


You know, this is a pretty simple and obvious concept. I can imagine 
anyone arguing about it.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Upload Tracker.

2007-07-17 Thread Tanner Postert

i use a program called upload progress meter, it can be downloaded here:

http://pdoru.from.ro/upload-progress-meter/

I just wrote an ajax function to return the % of the download, and filled a
div on each upload. It depends on how often you poll for the %, but most
likely it won't be a smooth transition from 0-100% it will jump, 0, 12, 28,
38, 52, 71, 88, 92, 100, or something similar.

you will have to phpize the function and install it as a dynamic module, but
it works for me.

hope this helps.

On 7/17/07, Tom Ray [Lists] <[EMAIL PROTECTED]> wrote:


I'm a little unsure on how to do this but basically when someone uses a
form to upload a file I want to have a popup window come up and so the
process in percentage of the transfer.  Anyone do this before? Is it
possible in PHP or do I need to do it in javascript or a mixture of both?

Any suggestions, ideas, commands or functions to try to use? I would
greatly appreciate it.

Thanks!

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




Re: [PHP] Displaying HTML characters in real format

2007-07-17 Thread Nisse Engström
On Fri, 13 Jul 2007 01:24:09 -0500 (CDT), "Richard Lynch" wrote:
> 
> htmlspecialchars ONLY escapes four characters: < > & "
> 
> htmlentities escapes ALL characters that need it

What characters other than the four (or five)
NEED escaping, and why?


/Nisse

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



RE: [PHP] double output from trigger_error from command line

2007-07-17 Thread Instruct ICC

if i do a trigger_error() when running php scripts from the command
line, each error is echoed twice. this is annoying.

does anyone know how to make each error display only once?

c:\>php -r "trigger_error(\"hello\");"
PHP Notice:  hello in Command line code on line 1

Notice: hello in Command line code on line 1


My error_reporting level was at 2039 and I did not see the double messages.
But I think you need to manipulate the error_reporting level.
Maybe something like:
php -r "error_reporting(E_ALL ^ E_NOTICE); trigger_error(\"hello\", 
E_USER_ERROR);"


"Show me every report except E_NOTICE, and then trigger an E_USER_ERROR 
which says 'hello'"


Sorry, I didn't reply to the list the first time.

_
http://liveearth.msn.com

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



Re: [PHP] Upload Tracker.

2007-07-17 Thread Paul Novitski

At 7/17/2007 11:46 AM, Tom Ray [Lists] wrote:
I'm a little unsure on how to do this but basically when someone 
uses a form to upload a file I want to have a popup window come up 
and so the process in percentage of the transfer.  Anyone do this 
before? Is it possible in PHP or do I need to do it in javascript or 
a mixture of both?



Upload progress can't be reported using PHP alone, but here's a 
PHP-perl amalgam you can check out:


Mega Upload
http://www.raditha.com/php/progress.php

I haven't used it can can't vouch for it.  When I tried their demo it 
failed but I think for reasons other than the functionality of the 
widget itself.


Paul 


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



[PHP] Re: Dynamic refresh dropdown list

2007-07-17 Thread Manuel Lemos
Hello,

on 07/17/2007 07:57 AM C.R.Vegelin said the following:
> I have a selection form with multiple dropdown lists, let's say A, B and C.
> If the dropdown list B is changed, then dropdown list C should be updated.
> To get this done, I use a small javascript
> function reload(form)
> {  var val=form.B.options[form.B.options.selectedIndex].value; 
>self.location='myForm.php?B=' + val ;
> }
> called by
>  
> 
> This works fine, BUT all other dropdown lists are also reset.
> So if I select another A, then another B, then also A is reset to its prior 
> value.
> Any idea how I can refresh a specific dropdown, 
> without affecting all the other dropdowns ?

You seem to want linked select inputs. Take a look at this forms class.
It comes with a plug-in that does exactly what you want. It links select
inputs, so when the value of one input changes, the following input
switches the group of options without reloading the page. Here is a live
example that you can see in action:

http://www.meta-language.net/forms-examples.html?example=test_linked_select

There is are even variants of this plug-in that can retrieve a dynamic
set of options from a database. There are variants for MySQL or any
other database using Metabase or PEAR::MDB2 database abstraction API.

You can also watch a tutorial video here:

http://www.phpclasses.org/browse/video/1/package/1/section/plugin-linked-select.html

You can download the forms class from here:

http://www.phpclasses.org/formsgeneration

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - 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



[PHP] Upload Tracker.

2007-07-17 Thread Tom Ray [Lists]
I'm a little unsure on how to do this but basically when someone uses a 
form to upload a file I want to have a popup window come up and so the 
process in percentage of the transfer.  Anyone do this before? Is it 
possible in PHP or do I need to do it in javascript or a mixture of both?


Any suggestions, ideas, commands or functions to try to use? I would 
greatly appreciate it.


Thanks!

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



Re: [PHP] Sessions Lose Form Field Data When Back Button Used?

2007-07-17 Thread nor0101


Instruct ICC wrote:
> 
> I have an old PHP page without sessions.  When the user submits the form, 
> and then clicks the browser back button, the prior form data is retained.
> 

What method is your form using, get or post?  If post, usually the browser
would give some sort of warning to the user about the request containing
post data that must be re-sent.

>From a usability standpoint, is clicking the back button on the browser an
expected user behavior?  Just trying to get a better grasp of your
situation.
-- 
View this message in context: 
http://www.nabble.com/Sessions-Lose-Form-Field-Data-When-Back-Button-Used--tf4090131.html#a11657014
Sent from the PHP - General mailing list archive at Nabble.com.

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



[PHP] regular expression and forbidden words

2007-07-17 Thread Nicolas Quirin
Hi,

i'm french, i'm using regular expressions in php in order to rewrite hyperlink 
tags in a specific way before apache output is beeing sent to client.

Purpose is to replace href attribute of any A html tag by a javascript function 
calling an ajax loader.

Currently I have wrote that:

  $pattern = '/(.*?)<\\/a>/i';
  $replacement = '$5';
  $html_mark = preg_replace($pattern, $replacement, $html_mark);

it works, but it's too permissive, it replaces too much links (some links with 
some get parameters must stay unchanged)

I don't really understand my pattern...it's a little strange for me...lol

I wouldn't like to rewrite links that contains any of the following words in 
get parameters (query string):

  noLoader
  noLeftCol
  skipallbutpage
  skipservice

i would like to rewrite only link that begin with 'http://dev.netdoor.fr' or '.'

examples:

http://dev.netdoor.fr/index.php?page=./comptes/index.php&noLoader&noLeftCol&idx=6&bdx=423&skipservice";>test
 

=>must be not rewritted!

name

=>must be rewritted like this :

name


Please help me...:0)

best regards

nicolas


Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Stut

tedd wrote:

At 11:18 AM -0600 7/17/07, John Meyer wrote:

tedd wrote:
I've written software all my life and I have on numerous occasions 
run into individuals who ask something like "Can you get me a copy? 
It's not worth it for me to pay for it because reason you want>. I would just like to get a copy."


And you think that if somehow, somebody was able to magically lock 
down all copies, all of those people would pony up the money and pay 
you or buy that software?  It's the assumption that the music and 
movie industry make that if only they could lock down all those places 
the money would come flowing in.



Nope, I'm just saying that if you want my work, pay for it. If you get 
my work without paying, then you're stealing.


You know, this is a pretty simple and obvious concept. I can imagine 
anyone arguing about it.


Batter up... The issue is not about what is going on and the fact that 
it's illegal and morally questionable - I think most people would agree 
to that if only to the point that they accept that breaking the law is 
morally questionable even if you don't agree with the laws. What you lot 
seem to insist on arguing about is the terminology being used.


There is no such thing as copyright theft. There is such a thing as 
copyright infringement. Unfortunately organisations such as the MPAA and 
the RIAA have decided (in their infinite wisdom) to call it stealing. 
This is almost certainly because it makes it clearer to the lowest 
common denominator (no offense meant to anyone who might take it that way).


IANAL but I'm fairly certain that there is no "official" legal 
definition for copyright theft. The correct phrase for the act of 
pirating something protected by copyright is infringement.


Stealing is wrong m'kay!
Piracy is evil m'kay!
Copyright theft doesn't exist m'kay!
Copyright infringement is illegal m'kay!

Now please let's drop this discussion because it's one of those where 
people will never reach agreement, it'll just drag on and on and on and 
on and on.


-Stut

--
http://stut.net/

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



[PHP] ldap_search(): Partial search results returned: Sizelimit exceeded

2007-07-17 Thread Jay Blanchard
Perhaps mistakenly for a project that I am trying to do I want to list
all users in the Active Directory. It works pretty well with one
exception, the error ldap_search(): Partial search results returned:
Sizelimit exceeded.

Now, I know that I can page through (I would have to figure out a clever
way to display to the user) these.

I have read some stuff that says the limit is hard coded in AD, so there
is no way around it. I just wanted to check with you folks to see if you
had any clever ideas on how to work around this.

TVMIA!

$username = $_SESSION['user'];
$password = $_SESSION['password'];
if(!$ds=ldap_connect("172.17.16.161")){
echo "did not connect...please contact system administrator or
go back to try again";
}

$un = "foobar\\".$username;
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ds, LDAP_OPT_SIZELIMIT, 2000);
if(!$r=ldap_bind($ds, $un, $password)){
echo 'You are not authorized and or, your login information was
incorrect';
} else {
$sr=ldap_search($ds, "dc=domain, dc=local", "mailnickname=");
$info = ldap_get_entries($ds, $sr);
$sr= ldap_search($ds, "dc=domain, dc=local", "mailnickname=*");
$info = ldap_get_entries($ds, $sr);
echo count($info) . "";
for ($i=0; $i";

}

}

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



Re: [PHP] Pirate PHP books online?

2007-07-17 Thread Chris Shiflett
Crayon Shin Chan wrote:
> What makes you think any of the authors are subscribed to this list?

I'm subscribed. :-)

Chris

-- 
Chris Shiflett
http://shiflett.org/

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



[PHP] Re: Upload Tracker.

2007-07-17 Thread Manuel Lemos
Hle

on 07/17/2007 03:46 PM Tom Ray [Lists] said the following:
> I'm a little unsure on how to do this but basically when someone uses a
> form to upload a file I want to have a popup window come up and so the
> process in percentage of the transfer.  Anyone do this before? Is it
> possible in PHP or do I need to do it in javascript or a mixture of both?
> 
> Any suggestions, ideas, commands or functions to try to use? I would
> greatly appreciate it.

That is a bit complicated but it is possible. There is an extension
named uploadprogress that requires PHP 5.2 but it can run with PHP 4.3
and 4.4 using special patches.

To make it useful you can try a plug-in of this forms class that can
display a progress bar while the form with files is being uploaded. Here
is a live example that you can try:

http://www.meta-language.net/forms-examples.html?example=test_upload_progress

This example restricts upload file sizes to 1MB but you can configure
your scripts to upload files of any size.

Here you can watch a tutorial video about this plug-in:

http://www.phpclasses.org/browse/video/1/package/1/section/plugin-upload-meter.html

You may download the class from here:

http://www.phpclasses.org/formsgeneration


-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - 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] Sessions Lose Form Field Data When Back Button Used?

2007-07-17 Thread Chris Shiflett
Instruct ICC wrote:
> I have an old PHP page without sessions. When the user submits the
> form, and then clicks the browser back button, the prior form data
> is retained.
> 
> If I now have that PHP page require another page that uses
> session_start, when the user submits the form, and then clicks the
> browser back button, the prior form data is lost.

This is a characteristic of the caching headers that session_start()
sends. Although not directly related to your question, I think the
following article articulates this in sufficient detail:

http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings

Hope that helps.

Chris

-- 
Chris Shiflett
http://shiflett.org/

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



Re: [PHP] Displaying HTML characters in real format

2007-07-17 Thread Satyam
Unless you have set the character encoding of the document to the same as 
what you have, say, in the database, you would have trouble showing, for 
example,  your last name, with that umlaut.  Anyway, I would read the 
comments for the function because I believe there are some issues beyond the 
characters handled by htmlspecialchars.   I just prefer to set the character 
encoding compatible from end to end.


Satyam



- Original Message - 
From: "Nisse Engström" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, July 17, 2007 9:03 PM
Subject: Re: [PHP] Displaying HTML characters in real format



On Fri, 13 Jul 2007 01:24:09 -0500 (CDT), "Richard Lynch" wrote:


htmlspecialchars ONLY escapes four characters: < > & "

htmlentities escapes ALL characters that need it


What characters other than the four (or five)
NEED escaping, and why?


/Nisse

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



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.10.8/904 - Release Date: 16/07/2007 
17:42





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



Re: [PHP] ldap_search(): Partial search results returned: Sizelimit exceeded

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 4:51 pm, Jay Blanchard wrote:
> Perhaps mistakenly for a project that I am trying to do I want to list
> all users in the Active Directory. It works pretty well with one
> exception, the error ldap_search(): Partial search results returned:
> Sizelimit exceeded.
>
> Now, I know that I can page through (I would have to figure out a
> clever
> way to display to the user) these.
>
> I have read some stuff that says the limit is hard coded in AD, so
> there
> is no way around it. I just wanted to check with you folks to see if
> you
> had any clever ideas on how to work around this.

Totally crude hack...

If you get that message, search for users whose username starts with
'A', then 'B', then 'C', ...

:-)

You could even provide an alpha index at the top/side navbar when
needed, and then have a more natural program flow.

You'd still have an issue if there were "too many" under any one
letter though... :-(

Maybe ask an ActiveDirectory mailing list, if one exists, since it's
really more in their ballpark than PHP's.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Displaying HTML characters in real format

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 2:03 pm, Nisse Engström wrote:
> On Fri, 13 Jul 2007 01:24:09 -0500 (CDT), "Richard Lynch" wrote:
>>
>> htmlspecialchars ONLY escapes four characters: < > & "
>>
>> htmlentities escapes ALL characters that need it
>
> What characters other than the four (or five)
> NEED escaping, and why?

All kinds of stuff, and to keep your site a) readable and b) safe.

For example, some people occasionally find a need to write an o with
an umlaut over it.

And sometimes they might type that right into a database form of some
kind.

And if that's being output, it needs to be converted to an HTML entity
so it will actually show up as an o with an umlaut, instead of, say,
capital A with a tilda followed by a paragraph symbol.

Now, in some cases, if you are using UTF-8 (or UTF-16) and if the
browser is supporting that, and if you've got the right headers and
META tags, most modern browsers will do the right thing...

Or not, in the case of the reply window I'm typing into right now,
which has turned your name into:

Nisse Engström

instead of:
Nisse Engström

Of course, it may get re-converted to who knows what before you see
it, but I'm not seeing the right thing...

There are actually SIMPLER characters involving only ASCII, but I
thought this particular example would drive the idea home better :-)

This script might help as well:



-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Upload Tracker.

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 1:46 pm, Tom Ray [Lists] wrote:
> I'm a little unsure on how to do this but basically when someone uses
> a
> form to upload a file I want to have a popup window come up and so the
> process in percentage of the transfer.  Anyone do this before? Is it
> possible in PHP or do I need to do it in javascript or a mixture of
> both?
>
> Any suggestions, ideas, commands or functions to try to use? I would
> greatly appreciate it.

For this to be a PHP question, you need PHP 5.2 (?) and the new file
upload hook that it supplies.

Otherwise, it's a Javascript/Ajax feature, with PHP being relegated to
not doing much of anything about the progress meter.

Why the BROWSER doesn't provide this feature everybody wants is beyond
my ken...

Surely the browser has some clue how many bytes are uploaded and how
big the file was.

How tricky could it be for Firefox/IE to poke those values into a
couple variables somewhere?

Instead we have a zillion JS hacks by developers generating tons of
traffic back-n-forth to the server to ask it how many bytes it has
received so far...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] PHP-5.2.3 and "Internal Server Error"

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 7:20 am, Paul Scott wrote:
> On one of our test boxen, we recently upgraded to PHP-5.2.3 and all of
> a
> sudden started getting Internal Server Errors. The Apache log file
> tells
> me that there is a premature end of script error on index.php, which
> is
> simply an entry point script to an MVC framework.
>
> I have checked that there is no whitespace after the closing ?> tag
> and
> all, and have removed almost everything that I can think of that may
> be
> causing something like this.
>
> It seems to choke on the call to ob_start()...
>
> Anyone have any ideas that may shed some light on this one?
>
> Appreciate any helpful tips.

Run the same script with php CLI and see what it outputs.

Open the script in various editors to be sure there's no stray
un-printable character in the source.

Set error_reporting to E_ALL.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] regular expression and forbidden words

2007-07-17 Thread Arpad Ray

Nicolas Quirin wrote:

Hi,

i'm french, i'm using regular expressions in php in order to rewrite hyperlink 
tags in a specific way before apache output is beeing sent to client.

Purpose is to replace href attribute of any A html tag by a javascript function 
calling an ajax loader.

Currently I have wrote that:

  $pattern = '/(.*?)<\\/a>/i';
  $replacement = '$5';
  $html_mark = preg_replace($pattern, $replacement, $html_mark);

it works, but it's too permissive, it replaces too much links (some links with 
some get parameters must stay unchanged)

I don't really understand my pattern...it's a little strange for me...lol

I wouldn't like to rewrite links that contains any of the following words in 
get parameters (query string):

  noLoader
  noLeftCol
  skipallbutpage
  skipservice

i would like to rewrite only link that begin with 'http://dev.netdoor.fr' or '.'

examples:

http://dev.netdoor.fr/index.php?page=./comptes/index.php&noLoader&noLeftCol&idx=6&bdx=423&skipservice";>test 


=>must be not rewritted!

name

=>must be rewritted like this :

name


Please help me...:0)

best regards

nicolas



The key here is (?!) - the negative assertion, it should look something 
like this:


$p = '#href="(?:\.|http://dev.netdoor.fr)/index\.php\?page=(?![^"]*(?:noLoader|noLeftCol|skipallbutpage|skipservice))([^"]*)">(.*?)#is';
$r = 'OnClick="javascript:yui_fastLoader(\'./systeme/chargeur.php?page=$1\');">$2';


Arpad

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



Re: [PHP] Re: no default value

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 8:11 am, Man-wai Chang wrote:
> Thank you. This is horrible as a simple typing mistake ($sucess rather
> than $success) would waste me some time hunting down the problem.
> Foxpro
> isn't like this

If it's still horrible after you turn on E_NOTICE, and the errors
telling you that you are using $sucess when you don't have anything
defining it, feel free to try to write a website using Foxpro. :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] magic quotes

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 5:30 am, Phil Princely wrote:
> I've been having a problem with a setting on a test server and
> production server. My test server has magic_quotes_gpc off, but the
> production server has it turned on. I've no access to the php.ini for
> the production server and don't want to change the setting on my test
> server.
>
> Searching on the internet, I found some ways to deal with this kind of
> thing:
>
> use a .htaccess file to turn magic_quotes off by saving a text file
> with the line:
>
>  magic_quotes_gpc off

If you have .htaccess, do this, only use the right line which is more
like:

php_value magic_quotes_gpc off

> Or making a function to strip slashes like this:
>
> if (magic_quote_gpc()) {
> stripslashes_array($_GET);
> stripslashes_array($_POST);
> stripslashes_array($_REQUEST);
> stripslashes_array($_COOKIE);
> }
>
> What do people on this list usually do with this kind of problem. To
> me, the .htaccess seems the easiest solution, since I don't have to
> change any scripts.

This is more useful if you have no .htaccess

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] magic quotes

2007-07-17 Thread Richard Lynch
E.

One thing you CAN do is to put something not unlike this:



Your dev server will be slightly "slower" when it attempts to find the
include files in a path that does not exist.

Your production server will find the files where they belong and bail
out before it tries to find a C drive that has no meaning.

Crude, but effective.

Or you could just install Linux on your dev box and dual boot, which
is WAY easier. :-)

On Tue, July 17, 2007 7:08 am, Steve Perkins wrote:
> Talking about .htaccess, anyone know an easy way of configuring os
> (generally linux/windows) alternative settings in the same .htaccess ?
> Mainly for paths (eg: include_path), so I can just upload a whole
> directory
> at a time from my (Windows) development machine to a (Linux)
> production
> server without having to worry about different .htaccess files for
> each.
>
> Ta
> Steve
>
> -Original Message-
> From: Richard Heyes [mailto:[EMAIL PROTECTED]
> Sent: 17 July 2007 12:25
> To: Phil Princely
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] magic quotes
>
>> What do people on this list usually do with this kind of problem. To
>> me, the .htaccess seems the easiest solution, since I don't have to
>> change any scripts.
>
> Use a .htaccess file, or if performance is any sort of concern, put it
> in
> the server configuration files and turn off .htaccess files.
>
> Failing that you could do it in the script with your
> stripslashes_array() function, but you should only do it when you need
> to.
> eg. There's no point using it on $_COOKIE if you're not using
> $_COOKIE.
>
> --
> Richard Heyes
> +44 (0)844 801 1072
> http://www.websupportsolutions.co.uk
>
> Knowledge Base and HelpDesk software
> that can cut the cost of online support
>
> --
> 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
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] no default value

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 7:01 am, Man-wai Chang wrote:
> Is there a parameter in php.ini that requires all variables to be
> explicitly initialized, rather than being automatically assigned the
> value of false?

No.

There is a parameter in php.ini that tells you when you USE an
uninitialized variable, however.

error_reporting = E_ALL

E_ALL includes E_NOTICE which is off by default which is just plain
daft, if you ask me...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Social Networking Sites OT

2007-07-17 Thread Daevid Vincent
For what it's worth, LinkedIn has been around for years -- one of the
first SNS out there, and it's well written and very useful. It's not a
"myspace whore" thing. It's for professionals. Many employers will look
there for recommendations about you and such, just as valuable as a
resume, cover-letter and traditional refs. I highly recommend joining
it. It's a great way to keep in touch with co-workers and get future
gigs...

D.Vin
http://www.daevid.com  (I have a whole social network link on there)

> -Original Message-
> From: Craige Leeder [mailto:[EMAIL PROTECTED] 
> Sent: Friday, July 13, 2007 10:53 PM
> To: PHP-General
> Subject: Re: [PHP] Social Networking Sites OT
> 
> On 7/14/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
> > If somebody wants the next Web 2.0 killer app, build a
> > meta-social-networking site that lets the user manage all the big
> > social networking sites through a single central interface. :-)
> 
> Is it sad that I thought of that while reading this topic?
> 
> Anyway, I always told myself I'd never sign up for any of those sites,
> and for the longest time, I didn't. However, a few weeks ago I
> registered for my Facebook account, and it's not as bad as I thought.
> I have had random people I've only met once try to add me as a friend,
> but I simply ignore them.
> 
> So my thoughts? I say that they're fine in moderation. Don't let it
> become an addiction, and it's fine.
> 
> -- 
> 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] double output from trigger_error from command line

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 12:21 pm, Olav Mørkrid wrote:
> if i do a trigger_error() when running php scripts from the command
> line, each error is echoed twice. this is annoying.
>
> does anyone know how to make each error display only once?
>
> c:\>php -r "trigger_error(\"hello\");"
> PHP Notice:  hello in Command line code on line 1
>
> Notice: hello in Command line code on line 1

http://php.net/set_error_handler

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: installing php5.2.3 on apache2.2 \w mod_fastcgi

2007-07-17 Thread Richard Lynch
You might want to try on an Apache list, since you could replace PHP
with Perl, Python, or rabid squirrels and you'd be in the same boat...

On Tue, July 17, 2007 10:37 am, M. Sokolewicz wrote:
> M. Sokolewicz wrote:
>> Good day,
>>
>> I've been struggling with this problem for quite a while now, I've
>> looked on google, but to no avail, documentation doesn't help me out
>> either. Now, I know this isn't a pure php problem as such, but
>> rather a
>> problem in the cooperation of apache2.2, php and fastcgi.
>>
>> So, here's what I have
>> I compiled php with --enable-fastcgi
>> by itself, php works fine.
>>
>> I've installed mod_fastcgi and apache 2.2.4, which work fine aswell
>> (well, apache does, mod_fastcgi is hard to tell :)).
>>
>> I've got the following in my httpd.conf:
>> ScriptAlias /fcgi-sys/ /usr/local/apache2/fcgi-sys/
>> 
>> Options ExecCGI
>> SetHandler fastcgi-script
>> 
>>
>> Action application/x-httpd-php5-2-3 "/fcgi-sys/php-cgi"
>> AddHandler application/x-httpd-php5-2-3 .php5
>>
>> So, I start up apache (apachectl -k start), it doesn't show any
>> errors
>> or anything. Opening my browser and going to localhost shows the
>> html
>> page I expected to see. So that works.
>> I've made a file phpinfo.php5 with the contents
>> > phpinfo();
>> ?>
>> Now, when I point my browser there, I recieve a 403 Forbidden error:
>> Forbidden
>>
>> You don't have permission to access /fcgi-sys/php-cgi/phpinfo.php5
>> on
>> this server.
>>
>> Thinking this is probably some permissions issue, I've temporarily
>> chmodded the php-cgi binary and the php script to 777. After doing
>> that:
>> nothing changed, still the same error.
>>
>> Ok, so I checked apache's error_log, and saw:
>> [Mon Jul 16 20:09:33 2007] [error] [client 192.168.2.100] client
>> denied
>> by server configuration: /usr/local/apache2/fcgi-sys/php-cgi
>> [Mon Jul 16 20:10:36 2007] [error] [client 192.168.2.100] client
>> denied
>> by server configuration: /usr/local/apache2/fcgi-sys/php-cgi
>> [Mon Jul 16 20:15:04 2007] [error] [client 192.168.2.100] client
>> denied
>> by server configuration: /usr/local/apache2/fcgi-sys/php-cgi
>>
>> ok, that's weird... Well, I decided to google this, and the few
>> pages
>> that talked about this (or something close to this) all stated that
>> it
>> was due to apache being closed down pretty much by default, and they
>> recommended easing the restrictions a bit by adding a .htaccess file
>> in
>> the webroot with:
>> 
>>   AllowOverride None
>>   Order Deny,Allow
>>   Allow from all
>> 
>>
>> I did that, no help. I even added a
>> 
>> Options +ExecCGI
>> 
>>
>> just in case, but that did not help either.
>> However, if I (from the commandline) skip apache and simply issue a:
>> /usr/local/apache2/fcgi-sys/php-cgi
>> /usr/local/apache2/htdocs/phpinfo.php5 > phpinfo.html
>> it will run just fine, showing the exact output I expect, and the
>> phpinfo.html file is visible via the browser just fine aswell.
>>
>> So, I'm guessing this is an issue in apache-configuration or
>> fastcgi-configuration, but I'll be damned if I know what to do
>> now...
>>
>> any pointed would be welcome.
>>
>> cheers,
>> - Tul
>
>
> So, I'm guessing that although fastCGI is one of the recommended ways
> to
>   go (it's been named a lot on internals lately), there's little
> (understandable) documentation about setting it up (in combination
> with
> php) around, nor really many people who would have a clue as to what
> might be wrong here? Damn... :(
>
> - Tul
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?


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



Re: [PHP] Creating thumbnails

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 4:44 am, elk dolk wrote:
> Stephen <[EMAIL PROTECTED]> wrote:
> Subject: Re: [PHP] Creating thumbnails
>
>  Vanessa Vega wrote:
>> Good day to all!
>>
>> I would like to ask for some help with creating automatically
>> thumbnail
>> pictures using PHP..

Did you even try to Google "PHP automated thumbnail"

Cuz there are only a few million pages about this out there...

> What about security issues ? people can look at your source code to
> see the path and image name and place it in the address bar to access
> the image directly without loading your script. How can you prevent
> them?

You can't, not really...

There are barriers to access you can implement to varying degrees of
success, but if my browser can show the image to me, then I've got the
image, and what I do with it after that point is beyond your control.

Most of the barriers you can implement are crude hacks that will annoy
legitimate users more than they are worth.

If you want to have the hi-res image unavailable, but the thumbnail is
freely available, you pretty much just put the hi-res outside the
webtree and authenticate any way you like...

Google for "PHP authenticate user" should do the trick on that.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Sessions Lose Form Field Data When Back Button Used?

2007-07-17 Thread Richard Lynch
On Mon, July 16, 2007 12:33 pm, Instruct ICC wrote:
> I have an old PHP page without sessions.  When the user submits the
> form,
> and then clicks the browser back button, the prior form data is
> retained.

This is actually almost for sure browser dependent behaviour...

Some browsers will reset to blank, others will "remember" what you
typed last time.

It's got nothing to do with PHP and there is precious little you can
do about it, except trust that users chose the browser they preferred,
and they LIKE it the way it is, whichever way that is.

> If I now have that PHP page require another page that uses
> session_start,
> when the user submits the form, and then clicks the browser back
> button, the
> prior form data is lost.  In fact, I noticed that without the session,
> the
> web page does not reload from the server and is positioned at the
> bottom of
> the page where I left off by the "Submit" form button.  With sessions,
> the
> page actually reloads from the server, so of course the form fields
> are
> empty.  Is this normal behavior?  Can I have the page not reload from
> the
> server?  I thought I could pass the buck onto the user's browser
> setting,
> but the onus is upon my code.

It's still browser-dependent, really, but now your browser isn't doing
what YOU want for your form-filling-in-experience...

There's still nothing you can do about it from PHP, unless you want to
make the user who LIKES it that way have a miserable experience, since
you force their browser to not behave they way they expect it.

> I even modified my code to check for isset($_SESSION) to not call
> session_start again, but no joy.

You have to call session_start() on every request to have sessions
working in that request...  I doubt that you want to skip that for any
page involved in your FORM processing...

Ignore this "problem" for awhile and see if it doesn't go away.
(read: you realize it's not really a problem)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] html emails and plain text dectection

2007-07-17 Thread Richard Lynch
On Mon, July 16, 2007 8:58 am, Ross wrote:
> I am using the code to send an html email (phpmailer class) now I need
> to
> somehow determine if the recipient uses text only email and change
> email to
> plain. Is this possible?

Not really...

I mean, you could send them an email with an HTML "enhanced" (cough,
cough) body that has a "click here" and a plain text link that goes
somewhere else, and if they click on one or the other, you know if
their current email reader, which might not be their usual mail
reader, does or doesn't do HTML enhanced (cough, cough) email...

You really should ask them when they subscribe, so they can CHOOSE if
they want plain text or that bloated blight upon the land known as
HTML enhanced email.

Not that I'm biased or anything :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] multiple random items

2007-07-17 Thread Richard Lynch
On Mon, July 16, 2007 9:40 am, [EMAIL PROTECTED] wrote:
> Hi I have this script which pulls 1 random item from a txt file.
> How would I modify it to pull 10 random items.

To forestall a rather lengthy discussion on what you mean by 10 random
items, I'm actually not going to answer that question.

I'm going to answer "10 unique items selected at random" instead. :-)

[I.e., I assume you don't want the same random quote to appear twice
in one list.]

>  $delim = "\n";
> $quotefile = "names.txt";
> $fp = fopen($quotefile, "r");
> $contents = fread($fp, filesize($quotefile));
> $quote_arr = explode($delim,$contents);
> fclose($fp);
> // generate random quote index

$uniques = array();
while (count($uniques) < 10){

> $quote_index = (mt_rand(1, sizeof($quote_arr)) - 1);

if (isset($uniques[$quote_index])) continue;
$uniques[$quote_index] = $quote_index;

> // get quote at $quote_index and return it
> $herequote = $quote_arr[$quote_index];
> echo "$herequote";

}

> ?>

YMMV

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] html emails and plain text dectection

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 10:41 am, brian wrote:
> Ross wrote:
>
>> I am using the code to send an html email (phpmailer class) now I
>> need to
>> somehow determine if the recipient uses text only email and change
>> email to
>> plain. Is this possible?
>>
>
> No. How could your script possibly detect how a person's email client
> is
> configured?
>
> In any case, you should be sending both parts--plain text & HTML--and
> allowing the recipients to view it as they wish. And sending mail as
> HTML only is a good way to have your messages marked as SPAM.

Correction:

Sending your email as HTML enhanced is a good way to have your
messages marked as SPAM.

Sending your email as HTML only is a GREAT way to have your messages
marked as SPAM.

:-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Richard Lynch
On Mon, July 16, 2007 7:15 am, tedd wrote:
> I have to agree with Col on this one. Books are not shareware,
> freeware or open source. They are written for profit and anyone
> wanting to pirate the books are stealing, plain and simple. And if
> anyone thinks people will buy the book if it's useful to them, then
> that's just silly thinking. While some people may, most won't.
>
> Dotan, I would report the offending link to the publishers, that's
> what the authors would do.

While I would prefer that authors/publishers provide a cheap/free
PDF/eBook version of their book, it is their right, after all their
hard work, to choose in what formats to sell/give it.

I do not think it is "right" for anybody to violate that decision of
theirs, even if you think current laws are "wrong"

Get the laws changed, if that is your intent.

Stealing for some high moral principle only encourages those less
principled to also steal.

It's not like you're fighting for somebody's life or ending
segregation here, after all.

PS
I also work in the music industry, where this is a much bigger problem
(I think) than tech books 99% of the world could only use a doorstop
in the first place. :-)

So I've given this more than a little bit of thought...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Pirate PHP books online?

2007-07-17 Thread Richard Lynch
I believe the entire post may have been tongue in cheek and/or sarcasm...

But I wasn't sure either...

[shrug]

You can be sure that a heck of a lot more important/disturbing things
remain on the 'net than this, either way. :-)

On Mon, July 16, 2007 7:20 am, Mark Kelly wrote:
> Hi.
>
> On Monday 16 July 2007 12:42, Dotan Cohen wrote:
>
>> So, suckers, I'm with you now, and I'll start pirating again.
>
> This is a real shame (not to mention a foolish thing to post to a
> publicly
> archived mailing list). As a user of open source technology you are
> benefiting directly from the PHP developers choice of license, and
> relying
> on people respecting it. It is hypocritical to expect everyone to
> respect
> the PHP license and give you nice tech for free, then turn round and
> ignore a different license just because the authors haven't chosen to
> give
> away their work.
>
>> Anyone know where I can pick up a copy of Ubuntu pirated?
>
> You may have intended this as a joke, but recently there have been
> (unconfirmed from what I can tell) reports of Ubuntu torrent downloads
> with pre-installed trojans. Always get your stuff from the official
> sites.
>
> http://www.funtechtalk.com/trojan-horse-loaded-version-of-ubuntu-704-spreading-over-torrent-sites/
>
> (ugly URL may wrap)
>
> Please reconsider your decision to selectively ignore copyright
> licenses.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Larry Garfield
On Tuesday 17 July 2007, tedd wrote:
> At 9:26 AM -0500 7/17/07, Larry Garfield wrote:
> >On Tuesday 17 July 2007, tedd wrote:
> >Once I have written code or words, the time I have spent on that is gone. 
> > I will never get that time back, regardless of whether or not I get paid
> > for it after the fact.
>
> Ok, then it would be an acceptable excuse for your employer not to
> give you a paycheck -- after all, you already spent the time, right?
> That doesn't make sense dude.

That has absolutely nothing to do with what I'm saying.

> I don't mean to be putting words in your mouth, but it sounds like
> your claim here is absurd.

Except that you are doing so, every time you reply.  

> I'm not arguing copyright, or any other government bullshit, I'm
> simply saying that we all work for someone and we all should be paid
> for our efforts.

I am not disputing that.  The law says that you have a right to require such 
payment in return for a copy of said work.  That is not in dispute.  It also 
has nothing to do with "theft".

> An author of any digital material (code, books, music, whatever)
> should be paid for their effort just like anyone else. The idea that
> because the work product is digital, and thus there was no effort
> expended in making a copy, and thus implies no obligation to the
> author, is just plain wrong.

Please point me to anywhere that I made a distinction between electronic and 
physical media as a recording mechanism for the work.  I didn't.  Again, 
you're making up things that I supposedly said.

> I've written software all my life and I have on numerous occasions
> run into individuals who ask something like "Can you get me a copy?
> It's not worth it for me to pay for it because  reason you want>. I would just like to get a copy."

Ah, so that explains the chip on your shoulder that's apparently so large that 
you are seeing things.

> However, these same people would be outraged if someone took a cent
> from their paycheck.
>
> We can't have double standards because of the medium -- work is work.

Once again, I have not said there should be.  I don't know who you think 
you're responding to, but it's not me.

> If you didn't mean it that way -- my apologies.

How you got from what I said to what you're pretending I said I do not 
comprehend.  Try actually reading what I wrote before you accuse me of trying 
to destroy authors' livelihood, m'kay?

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Larry Garfield
On Tuesday 17 July 2007, tedd wrote:
> >And you think that if somehow, somebody was able to magically lock
> >down all copies, all of those people would pony up the money and pay
> >you or buy that software?  It's the assumption that the music and
> >movie industry make that if only they could lock down all those
> >places the money would come flowing in.
>
> Nope, I'm just saying that if you want my work, pay for it. If you
> get my work without paying, then you're stealing.
>
> You know, this is a pretty simple and obvious concept. I can imagine
> anyone arguing about it.

No, you're infringing copyright.

It's a pretty simple and obvious distinction.  I can't imagine anyone arguing 
the point.

(And it's getting your work without your permission; I routinely give away my 
work and don't ask for any money in return for it, as is my legal right.  
It's called open source.)

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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



Re: [PHP] Pirate PHP books online?

2007-07-17 Thread Richard Lynch
On Mon, July 16, 2007 6:06 pm, David Powers wrote:
> Stut wrote:
> Movie companies and rock artists make
> more money before breakfast than the author of a computer-related book
> is likely to make in a whole year (at least from book royalties).

U. No.

The numbers you see in the newspaper/media are A) what goes into the
record label, not the artist pocket, and B) for incredibly famous rock
"stars" not all rock artists.

You probably have made far more from your book than most rock artists,
and surprisingly more than some of the rock "stars" with particularly
bad contracts, or who have only had one "hit" song.

It is important to be accurate in this area, imho, as there is already
way too much misinformation, oft-repeated by the media.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] text field truncation with sql server

2007-07-17 Thread Richard Lynch
Probably a heredoc would be easiest for what you've got.
http://php.net/>>>

The URL is not a typo.

Though your email client may mangle it... :-)

On Sun, July 15, 2007 5:02 pm, Bruce Cowin wrote:
> Thanks Richard for pointing me in the right direction.  Yes, it is
> mssql I'm using.  And changing the mssql.textlimit and mssql.textsize
> in the php.ini file fixed my problem.
>
> You suggested not using all those echo statements.  What do you
> suggest I use instead?
>
> Thanks again!
>
>
>
> Regards,
>
> Bruce
>
 "Richard Lynch" <[EMAIL PROTECTED]> 13/07/2007 5:58 p.m. >>>
> What is the 3981st character?
>
> Does your database driver, whatever it is, which you've told us is not
> PDO, have any kind of limit in the buffer size of query data
> back/forth?
>
> What driver ARE you using?
> I see mssql in the code, so assume that's it, right?...
>
> Does it happen on every record at 3980?
> If you don't know, add more records with enough length to find out.
>
> PS
> Using all those echo statements probably a pretty bad habit to get
> into, and you probably should be using htmlentities() on each element,
> before you do the nl2br...
>
> If the 3981st character happens to be a '<' that would explain why you
> aren't seeing our data...  Use "View Source" in your browser if you
> don't understand the preceding sentence. :-)
>
> On Thu, July 12, 2007 11:37 pm, Bruce Cowin wrote:
>> I have a simple page that displays a record from the sql server
>> database.  One of the fields is a text field and keeps getting
>> truncated at 3980 characters.  I searched and saw someone had
>> reported
>> this as a PDO bug so I'm not using PDO anymore, but I'm still
>> getting
>> the truncation.  Anyone know about this or have a work around?  Here
>> is the code.  It's the body field that is a text field.  I've
>> checked
>> the field in the database and it definitely has more data than is
>> displayed.
>>
>>  $cn = mssql_connect($myserver, $myuser, $mypwd);
>>  mssql_select_db($mydb, $cn);
>>  $result = mssql_query("select * from emails where id = 
>> $emailid",
>> $cn);
>>  $row = mssql_fetch_array($result, MSSQL_ASSOC);
>>
>>  echo "";
>>  echo "Id: " . $row['id'] . "";
>>  echo "From: " . $row['mailfrom'] . "";
>>  echo "To: " . $row['mailto'] . "";
>>  echo "Cc: " . $row['mailcc'] . "";
>>  echo "Subject: " . $row['subject'] . "";
>>  echo "Date: " . $row['sentdate'] . "";
>>  echo "Body: " . nl2br($row['body']) . "";
>>  echo "";
>>
>> Thanks for any help.
>>
>> Regards,
>>
>> Bruce
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Persistent Objects

2007-07-17 Thread Richard Lynch
On Sun, July 15, 2007 2:25 pm, Wesley Acheson wrote:
> 1. Does the answer below mean no global persistant objects?
> (Application scope) I guess that it does.

Pretty much, yes.

PHP is more Unix-like in quickly spitting out an answer, rather than
MS-like in having some monolithic "answer" object hanging around
forever.

This has pros and cons, of course.

Focusing on the "pros" and the "shared nothing architecture" the point
is that to "scale up" you don't have to do anything but throw more
servers in the web-farm.

There is not single point of failure big-iron-required box that needs
to grow with web traffic to hold the one big "answer" that gets bogged
down under load.

> 2. Is this an un-PHP way of doing things?

Possibly.  I couldn't even read the code posted, really, as it was too
cramped... :-v

> 3. Is what I'm trying to do even worthwhile or should I just create
> each form and its validation rules by hand?  (My gut feeling is that
> its still worth doing as it centralizes form processing and reduces
> redundancy on a code level)

The problem with shoving all forms into one big pile is that you
generally want to customize the validation and processing to such an
extent the the only actual common share code for the form is, errr:

echo "";

:-)

> 4. Which would be more expensive recreating the object each time? Or
> fetching it from the session each time? (I know that this probably
> doesn't have a definative answer)

It really depends on where/how you store session data, but I suspect
that doing "new x()" is way cheaper than creating sessions if you
aren't already using them.

If you already HAVE session data, and you are just tossing one more
item into the $_SESSION array, the extra bytes is probably not all
that significant.

Only a test on your hardware under load will tell you for sure, of
course.

> Anyway my feeling is it probably shouldn't go in the session as its
> not a client object.

What's a client object?

Don't tell me.

Think about it and draw your own conclusions.

:-)


PS
Yes, one can store sessions in memcached.

Another nifty trick is to encrypt your session data, and if it's less
than 4K, just make it be the value of a cookie.  This cookie value
will "travel" with the user even in a distributed server app.
You then only need to read/write memcached for "large" session data.
Some more info here:
http://hostedlabs.com/

PPS
Do give the PHP way a fair shot, and do some real-world testing before
drawing any conclusions wrt the Java way.

But if you're just going to "fight" PHP all the time and do it the
Java way, just go back to Java and be happy :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Multiple Session Buffers

2007-07-17 Thread Richard Lynch
On Sat, July 14, 2007 1:26 pm, Al wrote:
> You guys confirmed my understanding, it can't be done in a reasonable
> manner.
>
> I'm adding a simple CAPTCHA to an existing page and don't want to
> bother tracing the code that
> modifies the session buffer.  It's obvious that the code is resetting
> the buffer, so it messes up my
> saving of the security number.  Obviously, I don't want it exposed
> with GET or shown in the HTML
> source.
>
> I'll just make my own simple session-like buffer with a tmpfile()
> outside the webspace.

I suspect you have a flaw in your basic HTTP interaction logic rather
than whatever it is you think is going wrong...

I'm not sure what you mean by "session buffer" either...

A lot of error_log() statements to see where you are
storing/retrieving your security number will probably help you far
more than trying to re-invent sessions...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Time formatting issues

2007-07-17 Thread Richard Lynch
The date_format function of MySQL should work for time as well...

What are the errors?

What did you use for the time format?

On Sat, July 14, 2007 8:27 am, Melissa wrote:
> I have a DB
>
> with a field type DATE (called TideDATE)
>
> and a field type TIME (one of which is called highFIRST)
>
>
>
> How can I format the time fields from displaying 00:00:00 (a 24 hour
> clock)
> to HH:MM am/pm format?
>
>
>
> The DATE function has all kinds of neat formatters, but I do not find
> any
> for TIME
>
> In DATE, I would say "g:i A"
>
>
>
> If I try it with a TIME field, I get errors!
>
>
>
> I HAVE NEVER USED A NEWSGROUP BEFORE, SO I HOPE I HAVE DONE THIS
> CORRECTLY...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] I am lost

2007-07-17 Thread Richard Lynch
On Sun, July 15, 2007 1:05 pm, Richard Davey wrote:
> Hi Grant,
>
> Saturday, July 14, 2007, 8:07:43 PM, you wrote:
>
>> Previously I had PHP on my older computer using IIS 5.1 it worked
>> fine. But
>> I'm on my new computer using IIS 7 and features like include or
>> completely
>> normal scripts that use to work no longer work. I have try to see if
>> it's
>> the web server and some of the times for the exception of the
>> include
>> function  it is. How would I fix my main server IIS 7, is the new
>> PHP 5.2
>> fully compatible with it? If not when will a fully functional PHP be
>> available for work with IIS 7. In my php.ini file I began by using
>> the
>> recommended file and slightly modifying it enabling gd2, openssl and
>> mysql.
>
> PHP 5.2 works fine on IIS7. You didn't say which version of PHP you
> had before you installed 5.2, but given you said that 'normal scripts
> no longer work', I'll bet it wasn't 5.2, probably even PHP 4. Meaning
> the changes you are seeing are because of the upgrade in PHP, not IIS.
> Without you confirming though, who knows.

So far, you've identified that "include" no longer "works"

Can you describe in what way it no longer works, and provide any error
messages?

Because it definitely does "work" and you've probably just messed up
your include_path.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Unlink file older then 7 days

2007-07-17 Thread Richard Lynch


On Mon, July 16, 2007 8:40 am, Stut wrote:
> Suhas Pharkute wrote:
>> http://us.php.net/manual/en/function.fileatime.php
>>
>> $filename = 'somefile.txt';
>> if (file_exists($filename) && fileatime($filename) <
>> (time()-(7*24*60*60)) )
>> {
>>unlink($filename);
>> }
>>
>> Read docs!
>
> You too! The OP wanted a way to "check the age of all files". The
> fileatime function will return when the file was last accessed.
> Accessing a file is not usually deemed to affect its age, modifying it
> is. The filemtime function is what the OP wants.

Unless he wants filectime, for when the file was created, even if it's
been modified in the past week...

"older" could mean that, in some contexts...

I think finding all the .txt.asc files would best be handled by
http://php.net/glob unless your PHP version is too old and you need to
http://php.net/opendir and http://php.net/readdir to look at each file
in turn...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Alter an Array Key

2007-07-17 Thread Richard Lynch
On Sat, July 14, 2007 8:09 am, Stut wrote:
> Craige Leeder wrote:
>> 1. Don't modify $_POST
>
> Why not?

Other portions of a web application will too easily be "confused" by
what you've modified as the application grows.

Far better to have your "clean" data in a different array than to go
poking altered content into $_POST, imho.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Social Networking Sites OT

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 6:31 pm, Daevid Vincent wrote:
> For what it's worth, LinkedIn has been around for years -- one of the
> first SNS out there, and it's well written and very useful. It's not a
> "myspace whore" thing. It's for professionals. Many employers will
> look
> there for recommendations about you and such, just as valuable as a
> resume, cover-letter and traditional refs. I highly recommend joining
> it. It's a great way to keep in touch with co-workers and get future
> gigs...

I'm not suggesting these sites are not useful.

I'm suggesting that the constant barrage of emails they generate make
them de facto spammers for some recipients at some email addresses,
and offered one such example.

I'm suggesting that some reasonable "standards" they could follow
would address that without significantly impacting their usability for
those who choose to join them.

I'm suggesting that working on these standards NOW before we have 10 X
as many social networking sites clogging your inbox might be worth
your time investment.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] text field truncation with sql server

2007-07-17 Thread Richard Lynch
I lied.

The URL *was* a typo.

http;//php.net/<<<

Sheesh.

Sorry folks!

On Sun, July 15, 2007 5:02 pm, Bruce Cowin wrote:
> Thanks Richard for pointing me in the right direction.  Yes, it is
> mssql I'm using.  And changing the mssql.textlimit and mssql.textsize
> in the php.ini file fixed my problem.
>
> You suggested not using all those echo statements.  What do you
> suggest I use instead?
>
> Thanks again!
>
>
>
> Regards,
>
> Bruce
>
 "Richard Lynch" <[EMAIL PROTECTED]> 13/07/2007 5:58 p.m. >>>
> What is the 3981st character?
>
> Does your database driver, whatever it is, which you've told us is not
> PDO, have any kind of limit in the buffer size of query data
> back/forth?
>
> What driver ARE you using?
> I see mssql in the code, so assume that's it, right?...
>
> Does it happen on every record at 3980?
> If you don't know, add more records with enough length to find out.
>
> PS
> Using all those echo statements probably a pretty bad habit to get
> into, and you probably should be using htmlentities() on each element,
> before you do the nl2br...
>
> If the 3981st character happens to be a '<' that would explain why you
> aren't seeing our data...  Use "View Source" in your browser if you
> don't understand the preceding sentence. :-)
>
> On Thu, July 12, 2007 11:37 pm, Bruce Cowin wrote:
>> I have a simple page that displays a record from the sql server
>> database.  One of the fields is a text field and keeps getting
>> truncated at 3980 characters.  I searched and saw someone had
>> reported
>> this as a PDO bug so I'm not using PDO anymore, but I'm still
>> getting
>> the truncation.  Anyone know about this or have a work around?  Here
>> is the code.  It's the body field that is a text field.  I've
>> checked
>> the field in the database and it definitely has more data than is
>> displayed.
>>
>>  $cn = mssql_connect($myserver, $myuser, $mypwd);
>>  mssql_select_db($mydb, $cn);
>>  $result = mssql_query("select * from emails where id = 
>> $emailid",
>> $cn);
>>  $row = mssql_fetch_array($result, MSSQL_ASSOC);
>>
>>  echo "";
>>  echo "Id: " . $row['id'] . "";
>>  echo "From: " . $row['mailfrom'] . "";
>>  echo "To: " . $row['mailto'] . "";
>>  echo "Cc: " . $row['mailcc'] . "";
>>  echo "Subject: " . $row['subject'] . "";
>>  echo "Date: " . $row['sentdate'] . "";
>>  echo "Body: " . nl2br($row['body']) . "";
>>  echo "";
>>
>> Thanks for any help.
>>
>> Regards,
>>
>> Bruce
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
>
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 9:26 am, Larry Garfield wrote:
> On Tuesday 17 July 2007, tedd wrote:
>> At 7:57 PM -0500 7/16/07, Larry Garfield wrote:
>> >I am not going to defend copyright infringement, but theft is
>> depriving
>> >someone of something they used to have and no longer have.
>>
>> Time.
>>
>> An author spends his time writing a book, he should be paid for it.
>>
>> Time.
>>
>> You spend time coding, and you should be paid for it.
>
> Once I have written code or words, the time I have spent on that is
> gone.  I
> will never get that time back, regardless of whether or not I get paid
> for it
> after the fact.

Last time I checked, most day jobs have a significant lag between time
spent and pay check.

Perhaps your day job should stop paying you, because after you've
spent that time, you'll never get it back?

I choose to spend my time developing an intellectual product because
current laws provide me some reassurance of ROI, just as you choose to
work for your employer because current laws provide you some assurance
of a paycheck showing up.

If you think the laws are wrong, get the laws changed.

But stealling (or whatever you want to call it in semantic name games)
is ILLEGAL, and a violation of the author's reasonable expectations,
and, imho, that alone makes it "wrong" until you can get the law
changed.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Sessions Lose Form Field Data When Back Button Used?

2007-07-17 Thread Instruct ICC

From: Chris Shiflett <[EMAIL PROTECTED]>
This is a characteristic of the caching headers that session_start()
sends. Although not directly related to your question, I think the
following article articulates this in sufficient detail:

http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings

Hope that helps.

Chris

--
Chris Shiflett
http://shiflett.org/


As soon as you said caching headers, it all made sense.

Would adjusting session_cache_limiter before calling session_start maintain 
the old behavior (until we redesign the application to save the user's form 
field data)?


Good stuff at your link.  Thanks.  It helps.

_
Need a brain boost? Recharge with a stimulating game. Play now!  
http://club.live.com/home.aspx?icid=club_hotmailtextlink1


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



  1   2   >