php-general Digest 19 Jul 2007 18:54:13 -0000 Issue 4912
Topics (messages 259166 through 259185):
Re: Pirate PHP books online?
259166 by: Dotan Cohen
259167 by: Dotan Cohen
259170 by: David Powers
259172 by: Zoltán Németh
259174 by: Daniel Brown
259175 by: Larry Garfield
259176 by: Larry Garfield
259177 by: Jim Moseby
259180 by: Austin Denyer
259181 by: Tijnema
259182 by: tedd
259183 by: tedd
259184 by: tedd
end this thread? Re: [PHP] Re: Pirate PHP books online?
259168 by: tomasz abramowicz
coder needed
259169 by: Danial Subhani
If MySQL column/field values are in an PHP array
259171 by: kvigor
259178 by: M. Sokolewicz
Re: Creating a text file
259173 by: Daniel Brown
session_decode from session handler
259179 by: Ryan Graciano
converting extended chars to plain ascii
259185 by: ahlist
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
On 16/07/07, Mark Kelly <[EMAIL PROTECTED]> 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.
I was being sarcastic. I was rather surprised to see how supportive of
the pirates those who answered were. Of course I will not steal media.
I have no reason to: Most of the software I use (Fedora/Ubuntu,
Firefox, Open Office) are free, and I can afford those that are not
(mostly PocketPC apps such as Pocket Informant, ListPro, etc.). I even
have a valid license for the MS Windows XP that I run in a VMWare
Virtual Machine.
> 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.
Really? I haven;t heard of that. Thanks.
Please reconsider your decision to selectively ignore copyright licenses.
No, I refuse to reevaluate my decision! I will not start pirating,
even if I see that many people on this list support pirates. I will
continue to use the open source tools that I love, not because of the
price, rather, because of the quality.
Dotan Cohen
http://lyricslist.com/
http://what-is-what.com/
--- End Message ---
--- Begin Message ---
On 17/07/07, David Powers <[EMAIL PROTECTED]> wrote:
Crayon Shin Chan wrote:
> What makes you think any of the authors are subscribed to this list?
I am subscribed to this list, and I'm disgusted that somebody posted the
URL to the pirate site. I see that more than 2,000 copies of my "PHP
Solutions: Dynamic Web Design Made Easy" have been downloaded.
Although eBooks are cheaper than the printed version, the royalties to
an author are much higher (no printing, storage, or delivery costs). I'm
not starving, but the loss in revenue is far from trivial, and reduces
the incentive to continue to write.
I have reported the site to my publisher. Even if it's closed down, my
work has already been stolen.
David, I am the OP, and I have not posted the URL to the pirate site.
Nor did I see it posted anywhere. Check the email, maybe someone else
sent it to you directly.
Dotan Cohen
http://lyricslist.com/
http://what-is-what.com/
--- End Message ---
--- Begin Message ---
Dotan Cohen wrote:
David, I am the OP, and I have not posted the URL to the pirate site.
Nor did I see it posted anywhere. Check the email, maybe someone else
sent it to you directly.
Dotan, I'm fully aware that you didn't post the URL, and I apologize if
my post gave the impression that you were the culprit. The URL was
posted by another person approximately six hours after your original
post. It might have been removed from the web interface, but it's
definitely still there in my newsreader.
It has been quite fascinating to read this thread, even though it has
nothing to do with PHP. As an author, I have frequently thought about
the contradiction between the fact that PHP is free and open source, but
I claim copyright and payment for the books I write about it. But it's
no secret that many people involved in developing open source software
make a living selling their knowledge in one way or another, either as
consultants or developers. Although I don't have the skills to
contribute to the core development of PHP, I hope that my books help
others use PHP in a productive and secure manner.
With regard to the argument about free flow of information, all the
information in my books is freely available on the internet. However,
the value to most readers is that I have pulled together that
information, tested it, and presented it in a form that, hopefully,
makes it easier for beginners and intermediate developers to understand.
Since it takes six months to a year to produce a book, I don't think
it's unreasonable to expect readers to pay for it. Unfortunately,
computer books are expensive. Few people realize that only a tiny
proportion of the price goes to the author. That's why unauthorized
distribution cuts so deeply into an author's income.
David Powers
--- End Message ---
--- Begin Message ---
2007. 07. 19, csütörtök keltezéssel 13.28-kor David Powers ezt írta:
> Dotan Cohen wrote:
> > David, I am the OP, and I have not posted the URL to the pirate site.
> > Nor did I see it posted anywhere. Check the email, maybe someone else
> > sent it to you directly.
>
> Dotan, I'm fully aware that you didn't post the URL, and I apologize if
> my post gave the impression that you were the culprit. The URL was
> posted by another person approximately six hours after your original
> post. It might have been removed from the web interface, but it's
> definitely still there in my newsreader.
>
> It has been quite fascinating to read this thread, even though it has
> nothing to do with PHP. As an author, I have frequently thought about
> the contradiction between the fact that PHP is free and open source, but
> I claim copyright and payment for the books I write about it. But it's
> no secret that many people involved in developing open source software
> make a living selling their knowledge in one way or another, either as
> consultants or developers. Although I don't have the skills to
> contribute to the core development of PHP, I hope that my books help
> others use PHP in a productive and secure manner.
>
> With regard to the argument about free flow of information, all the
> information in my books is freely available on the internet. However,
> the value to most readers is that I have pulled together that
> information, tested it, and presented it in a form that, hopefully,
> makes it easier for beginners and intermediate developers to understand.
> Since it takes six months to a year to produce a book, I don't think
> it's unreasonable to expect readers to pay for it. Unfortunately,
> computer books are expensive. Few people realize that only a tiny
> proportion of the price goes to the author. That's why unauthorized
> distribution cuts so deeply into an author's income.
I didn't want to get involved in this thread, though it was interesting
to read...
However, an idea just came into my mind: what if you, as the author,
could offer a download for a price which would be the same as what you
get after a sold paper copy? According to what you just said, it would
be much cheaper for the download than for a paper copy, which might
cause more or less of the downloaders of the pirated file to download it
legally and pay this smaller price to you.
I admit that it won't stop pirating, but it might be good for those who
are willing to pay to you, but either can't afford the paper copy or are
not willing to pay to the publishing company - and it might increase
your revenues a bit too.
greets
Zoltán Németh
>
> David Powers
>
--- End Message ---
--- Begin Message ---
On 7/19/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:
2007. 07. 19, csütörtök keltezéssel 13.28-kor David Powers ezt írta:
> Dotan Cohen wrote:
> > David, I am the OP, and I have not posted the URL to the pirate site.
> > Nor did I see it posted anywhere. Check the email, maybe someone else
> > sent it to you directly.
>
> Dotan, I'm fully aware that you didn't post the URL, and I apologize if
> my post gave the impression that you were the culprit. The URL was
> posted by another person approximately six hours after your original
> post. It might have been removed from the web interface, but it's
> definitely still there in my newsreader.
>
> It has been quite fascinating to read this thread, even though it has
> nothing to do with PHP. As an author, I have frequently thought about
> the contradiction between the fact that PHP is free and open source, but
> I claim copyright and payment for the books I write about it. But it's
> no secret that many people involved in developing open source software
> make a living selling their knowledge in one way or another, either as
> consultants or developers. Although I don't have the skills to
> contribute to the core development of PHP, I hope that my books help
> others use PHP in a productive and secure manner.
>
> With regard to the argument about free flow of information, all the
> information in my books is freely available on the internet. However,
> the value to most readers is that I have pulled together that
> information, tested it, and presented it in a form that, hopefully,
> makes it easier for beginners and intermediate developers to understand.
> Since it takes six months to a year to produce a book, I don't think
> it's unreasonable to expect readers to pay for it. Unfortunately,
> computer books are expensive. Few people realize that only a tiny
> proportion of the price goes to the author. That's why unauthorized
> distribution cuts so deeply into an author's income.
I didn't want to get involved in this thread, though it was interesting
to read...
However, an idea just came into my mind: what if you, as the author,
could offer a download for a price which would be the same as what you
get after a sold paper copy? According to what you just said, it would
be much cheaper for the download than for a paper copy, which might
cause more or less of the downloaders of the pirated file to download it
legally and pay this smaller price to you.
I admit that it won't stop pirating, but it might be good for those who
are willing to pay to you, but either can't afford the paper copy or are
not willing to pay to the publishing company - and it might increase
your revenues a bit too.
greets
Zoltán Németh
>
> David Powers
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The problem with that, though, is that a lot of publishers require
exclusivity, so an author is bound (no pun intended) by contract not
to publish elsewhere - including on their own website.
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--- End Message ---
--- Begin Message ---
On Wednesday 18 July 2007, Jay Blanchard wrote:
> [snip]
> ...all manner of interesting debate...
> [/snip]
>
> What, exactly, is the difference between this particular brand of
> copyright infringement and taking the book from a bookstore without
> paying for it? Am I committing copyright infringement by standing in the
> store and reading the book?
If you go into a bookstore and take a book out without the permission of the
store owner, that is stealing/theft and the victim is the store. (That
permission is implicit in paying for it, since that involves a transfer of
ownership, but it's the lack of permission that makes it illegal rather than
the lack of money transfer.)
If you then xerox that book and sell copies of that xerox to people on the
street, that's copyright infringement and the victim is the copyright holder
(note I said holder, not owner).
If you go into a bookstore, pick up a book, and start reading it while
standing next to the shelf, that may or may not be against store policy.
Some stores actually have cafes where they encourage you to do exactly that,
but others would ask you to leave.
The first two are both illegal, and covered by two entirely different branches
of law with two entirely different sets of reasoning behind them. The third
is not illegal but a matter of policy on private property.
And a side note, while this thread may not have anything to do with PHP code
it is vitally important that those involved in the creation and business of
information and expression understand copyright law. You don't need to be a
professional lawyer, but the amount of misinformation out there about
copyright, on all sides of the debate, is simply mind-boggling. That hurts
everyone, because the law is not always doing what is "right" (by some
definition of right). You can't know that, though, or make an informed
decision about how you wan to license your work, unless you understand what
the law actually is and why it is the way it is. So as PHP professionals,
copyright law is on-topic, even if not code-related.
--
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
--- End Message ---
--- Begin Message ---
On Thursday 19 July 2007, Daniel Brown wrote:
> > I didn't want to get involved in this thread, though it was interesting
> > to read...
> > However, an idea just came into my mind: what if you, as the author,
> > could offer a download for a price which would be the same as what you
> > get after a sold paper copy? According to what you just said, it would
> > be much cheaper for the download than for a paper copy, which might
> > cause more or less of the downloaders of the pirated file to download it
> > legally and pay this smaller price to you.
> > I admit that it won't stop pirating, but it might be good for those who
> > are willing to pay to you, but either can't afford the paper copy or are
> > not willing to pay to the publishing company - and it might increase
> > your revenues a bit too.
> >
> > greets
> > Zoltán Németh
> >
> > > David Powers
> The problem with that, though, is that a lot of publishers require
> exclusivity, so an author is bound (no pun intended) by contract not
> to publish elsewhere - including on their own website.
>
> --
> Daniel P. Brown
That is, however, a very common argument in favor of online distribution. It
cuts out the middle-men, reduces costs, saves trees, and increases the
revenue per unit for the original author/artist. Of course, the copyright
cartels (which includes most book publishers) object to that because they're
the middle-men being cut out, and that's how you get exclusivity contracts,
DRM, and similar anti-artist and anti-consumer bad things.
--
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
--- End Message ---
--- Begin Message ---
>
> The problem with that, though, is that a lot of publishers require
> exclusivity, so an author is bound (no pun intended) by contract not
> to publish elsewhere - including on their own website.
>
The idea of even offering an electronic version should be to drive sales for
the hard copy. Maybe offer a "Condensed Version" electronically, that has
enough content that readers can get enough of a feel for the product to
drive a buying decision. Throughout, make reference to the full version
having more complete content, complete with an "order now" link. This
method worked well for Readers Digest!
JM
--- End Message ---
--- Begin Message ---
Jim Moseby wrote:
>> The problem with that, though, is that a lot of publishers require
>> exclusivity, so an author is bound (no pun intended) by contract not
>> to publish elsewhere - including on their own website.
>>
> The idea of even offering an electronic version should be to drive sales for
> the hard copy. Maybe offer a "Condensed Version" electronically, that has
> enough content that readers can get enough of a feel for the product to
> drive a buying decision. Throughout, make reference to the full version
> having more complete content, complete with an "order now" link. This
> method worked well for Readers Digest!
Or watermark the .pdf with something that uniquely identifies each copy
- this could be done with a script at the time of the order. Maybe the
name of the original buyer, or the order number, etc.
Doesn't prevent the piracy, but does give traceability should you wish
to pursue the pirate.
Regards,
Austin.
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
On 7/19/07, Austin Denyer <[EMAIL PROTECTED]> wrote:
Jim Moseby wrote:
>> The problem with that, though, is that a lot of publishers require
>> exclusivity, so an author is bound (no pun intended) by contract not
>> to publish elsewhere - including on their own website.
>>
> The idea of even offering an electronic version should be to drive sales for
> the hard copy. Maybe offer a "Condensed Version" electronically, that has
> enough content that readers can get enough of a feel for the product to
> drive a buying decision. Throughout, make reference to the full version
> having more complete content, complete with an "order now" link. This
> method worked well for Readers Digest!
Or watermark the .pdf with something that uniquely identifies each copy
- this could be done with a script at the time of the order. Maybe the
name of the original buyer, or the order number, etc.
Doesn't prevent the piracy, but does give traceability should you wish
to pursue the pirate.
Regards,
Austin.
One word:
Useless!
The watermark can be easily removed, and the guy who puts in on the
net will simply remove it, and can't be traced :)
Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info
--- End Message ---
--- Begin Message ---
At 8:48 AM -0500 7/19/07, Larry Garfield wrote:
And a side note, while this thread may not have anything to do with PHP code
it is vitally important that those involved in the creation and business of
information and expression understand copyright law. You don't need to be a
professional lawyer, but the amount of misinformation out there about
copyright, on all sides of the debate, is simply mind-boggling. That hurts
everyone, because the law is not always doing what is "right" (by some
definition of right). You can't know that, though, or make an informed
decision about how you wan to license your work, unless you understand what
the law actually is and why it is the way it is. So as PHP professionals,
copyright law is on-topic, even if not code-related.
--
Larry Garfield AIM: LOLG42
I totally agree -- whenever someone does something you don't think is
right, regardless of what's called, hire an attorney.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
At 8:52 AM -0500 7/19/07, Larry Garfield wrote:
On Thursday 19 July 2007, Daniel Brown wrote:
> The problem with that, though, is that a lot of publishers require
exclusivity, so an author is bound (no pun intended) by contract not
to publish elsewhere - including on their own website.
--
Daniel P. Brown
That is, however, a very common argument in favor of online distribution. It
cuts out the middle-men, reduces costs, saves trees, and increases the
revenue per unit for the original author/artist. Of course, the copyright
cartels (which includes most book publishers) object to that because they're
the middle-men being cut out, and that's how you get exclusivity contracts,
DRM, and similar anti-artist and anti-consumer bad things.
--
Larry Garfield AIM: LOLG42
Bad things?
A publisher, and most other middleman, provide some sort of service
-- and it's reasonable to expect them to protect their investment.
Nobody (except me) works for nothing.
If you want to go on your own, no problem then you handle the
marketing, distributing, advertising, collections, liability,
copyright, security, and all the rest of the responsibilities that
"doing it yourself" entails.
However, understand that if you write the best book ever, it might
not be realized until after you're dead.
So, begins the "trade-off's" that we all have to make.
As a consumer, you want buy the the "best" book? Are you willing to
search the net until you find some "out of the way" author who says
his book is the best and then trust that it is? OR, are you more
comfortable with buying from your local book store where known
publisher place their books? Everything is a trade-off. Risk vs value.
It's one thing to say "If we cut out the middleman, then we can all
buy cheaper books!" -- but it's another to find books worth buying
without a publisher.
I never met a man/profession that didn't provide some improvement to
the overall quality of life -- except of course politicians and
insurance companies.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
At 7:05 PM -0500 7/18/07, Larry Garfield wrote:
On Wednesday 18 July 2007, tedd wrote:
And just because they do, doesn't make it any less accurate either. I
don't care if Hitler agreed with me, there is a fundamental wrongful
act of taking something that is not yours regardless of what you, and
others, may call it.
First "Hitler and the Nazis"[1] reference. You lose! Thanks for playing. :-)
[1] http://en.wikipedia.org/wiki/Godwin's_Law
Just part of the Political Correctness bull.
http://www.reason.com/news/show/32944.html
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
>
> It's like defining good and evil -- at some point in the conversation
> someone is going to use the words God or satan.
>
that's rather narrow minded.
t.
ps. sorry, i just thought i would spam some as well...
--- End Message ---
--- Begin Message ---
Pro-Net have a requirement for ether a full time php/msql coder or a good
freelancer.
Position is to start within two weeks based in London.
If anyone is interested, please contact me 0870 835 6911 or 07900 894 044
Sorry if i'm posting to the wrong list.
Danial Subhani
--- End Message ---
--- Begin Message ---
I created an array using the following:
$in_list = "'".join("','",$cen_chiefs)."'"; //$cen_chiefs is an array
$query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,'
',strCity,' ',strState) IN({$in_list})";
How would I go about adding an AND clause to the above query to return all
rows where strName column values are in $in_list array
I acutally did the above w/ "SELECT * FROM central WHERE CONCAT(strName,'
',strCity,' ',strState)
IN({$in_list}) AND (strName) IN({$in_list}) ORDER BY conName"; // This
return zero rows.
I think I Should I be using strName as a pattern, because strName would be a
partial value of $in_list array values?
Something like: REGEXP '^.....$'
"SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState)
IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName";
//This query doesn't work by the way. This is where I'm stuck.
--- End Message ---
--- Begin Message ---
kvigor wrote:
I created an array using the following:
$in_list = "'".join("','",$cen_chiefs)."'"; //$cen_chiefs is an array
$query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,'
',strCity,' ',strState) IN({$in_list})";
How would I go about adding an AND clause to the above query to return all
rows where strName column values are in $in_list array
I acutally did the above w/ "SELECT * FROM central WHERE CONCAT(strName,'
',strCity,' ',strState)
IN({$in_list}) AND (strName) IN({$in_list}) ORDER BY conName"; // This
return zero rows.
I think I Should I be using strName as a pattern, because strName would be a
partial value of $in_list array values?
Something like: REGEXP '^.....$'
"SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState)
IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName";
//This query doesn't work by the way. This is where I'm stuck.
First of all, let's start by saying that this question is very OT on a
php-list. It would be a lot more appropriate on a mysql list. But, I'll
try to help you anyway. First of all, I have no clue what you're trying
to do. Give some values (ie. what's in $cen_chiefs, what does the
central table look like, and what does strName look like.
The whole problem here, afaics, is that you don't have a clear idea of
what you want. Tell us what you _want_ to do (not HOW, but what the
result should be) and we might be able to help.
Now,
SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState)
IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName
won't work simply because you're saying (php-style): if($foo == $a.'
'.$b && $foo == $a), which obviously will _never_ work :)
--- End Message ---
--- Begin Message ---
On 7/18/07, Ryan Lao <[EMAIL PROTECTED]> wrote:
Thanks for your reply, I want to create individual text files for every form
submitted.
""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> On 7/17/07, Ryan Lao <[EMAIL PROTECTED]> wrote:
> > i made a simple PHP form that would ask for the users complete name, a
> > button that would browse to a file that the user wants to upload, a text
> > area for additional comments, and a submit button. This form works just
> > fine. what i want to achieve next is for my form to also create a text
file
> > when it is submitted. The text file will contain the users complete
name,
> > the filename that was being uploaded and the additional comments from
the
> > user. Can anyone give me some ideas on how to do this?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> Ryan,
>
> Are you trying to create individual files for each form
> submission, or one file that will be appended with new data upon
> submission?
>
> --
> Daniel P. Brown
> [office] (570-) 587-7080 Ext. 272
> [mobile] (570-) 766-8107
Ryan,
Please keep your replies on the list so that others may benefit as well.
Here's a very, very simple example that will handle individual,
unique file creation each time the form is submitted:
<?
if($_POST) {
extract($_POST);
/* Do your file upload routine first, as you have it now.
Then just grab the name of the file that was uploaded
and place it into a variable named $uploadfile. */
$filedir = "records"; // This directory should be writable by
the script.
$filename = date("YmdHis")."_".$firstname."_".$lastname.".txt";
$thefile = $filedir."/".$filename;
$handle = fopen($thefile,"w+"); // The w+ will write to a
file, or create it if it's not there.
$contents = "Name:\t\t".$firstname." ".$lastname."\n";
$contents .= "File:\t\t".$uploadfile."\n"; // This line and
the one above have two tabs to keep in line
$contents .= "Comments:\t".$usercomments;
fwrite($handle,stripslashes($contents));
fclose($handle);
echo "File written successfully!";
exit;
}
?>
<form method="post" action="<?=$_SERVER['PHP_SELF'];?>"
enctype="multipart/form-data">
First Name: <input type="text" name="firstname"><BR />
Last Name: <input type="text" name="lastname"><BR />
File: <input type="file" name="uploadfile"><BR />
Comments: <textarea rows="3" cols="18"
name="usercomments"></textarea><BR />
<input type="submit" value="Send Form">
</form>
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--- End Message ---
--- Begin Message ---
I'm having an issue getting session_decode to work from my session handler in
PHP 5.2.3. Here's a short code snippet that demonstrates what I'm trying to do
(from my read handler) -
public function read($id) {
....
var_dump($data); // prints out the serialized session correctly
$retval = session_decode($data);
var_dump($_SESSION); // prints out "array(0) {}"
echo $retval; // prints false
return $data;
}
In my calling function, $_SESSION is updated with everything that was held in
$data, which means that $data was not corrupt - it worked when I returned it,
but it did not work when I used session_decode. This is a problem because I
want to change my read($id) function so that it decodes $data, adds something
extra to the $_SESSION, then re-encodes $data and returns it.
Thanks,
- Ryan
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
--- End Message ---
--- Begin Message ---
Hello,
A libarary I'm using (the cybersource api if it helps any) is dying
when I pass it "extended" chars - such as bjorn (two dots over the o -
not sure of the actual name of this char -sorry).
For some reason, the newest version of cybersourc's api aborts on this input.
Can anyone recommend a quick way to strip/convert those chars out
before I pass it to cybersources lib?
I store the data as a varchar in mysql and pull it out in a query.
Thanks for ANY advice. I need to get some sort of fix for this asap.
cybersource are no help.
Thanks.
--- End Message ---