php-general Digest 8 Feb 2005 11:30:31 -0000 Issue 3274
Topics (messages 208215 through 208243):
Strange key behaviour
208215 by: Johannes Reichardt
208218 by: Guillermo Rauch
Re: array_map() problems
208216 by: Greg Donald
208220 by: Guillermo Rauch
208221 by: Jeffery Fernandez
Favorite Linux Distribution
208217 by: The Disguised Jedi
208224 by: Greg Donald
208225 by: Tony
Re: Retrieving an URL paramter via fsockopen
208219 by: Manuel Lemos
Re: [EMAIL PROTECTED] Favorite Linux Distribution
208222 by: The Disguised Jedi
208236 by: Matthew Weier O'Phinney
208237 by: g.lams.itcilo.org
208238 by: Gareth Williams
Your day
208223 by: jengo.phpgroupware.org
Secure system calls -- how
208226 by: Niels
How do I collect the keywords a user entered when searching for my site
208227 by: Tim Burgan
208230 by: Andre Dubuc
ncurses woes...
208228 by: Grimes, Dean
208233 by: Greg Donald
Re: Storing CCN's Again...
208229 by: trlists.clayst.com
208231 by: daniel.electroteque.org
208234 by: Greg Donald
208240 by: Marek Kilimajer
208241 by: Jochem Maas
Re: PHP/5.0.3 & MySQL 5.0.2 Stored procedure (OUT)
208232 by: Curt Zirzow
Re: Server Uptime
208235 by: Greg Donald
Highlighting a stored value as 'selected'
208239 by: Alp
208242 by: RaTT
timestamp problem?
208243 by: Balu Stefan
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 ---
Hey there!
i have a routine like this:
$myarray['1'] = 'a�sldfjkas�ldkjf';
foreach($myarray as $key => $value) {
echo $key{0}; // outputs nothing
echo substr($key,0); // outputs 1 like intended
}
Any ideas why this is like that? I am using
php 4.3.11-dev
- Johannes
--- End Message ---
--- Begin Message ---
On Tue, 08 Feb 2005 00:19:20 +0100, Johannes Reichardt
<[EMAIL PROTECTED]> wrote:
> Hey there!
Hi Johannes
>
> i have a routine like this:
>
> $myarray['1'] = 'a�sldfjkas�ldkjf';
>
> foreach($myarray as $key => $value) {
> echo $key{0}; // outputs nothing
> echo substr($key,0); // outputs 1 like intended
> }
>
> Any ideas why this is like that? I am using
$key is just a string, not an array.
You should call it as $key.
foreach($myarray as $key => $value) {
echo $key // outputs 1
}
Good luck,
-Guillermo
>
> php 4.3.11-dev
>
> - Johannes
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Tue, 08 Feb 2005 09:37:11 +1100, Jeffery Fernandez
<[EMAIL PROTECTED]> wrote:
> I have the following 2 functions which I intend to clean GPC off slashes
> if magic_quotes_gpc is turned on.
>
> function StripGpcSlashes()
> {
> if (get_magic_quotes_gpc())
> {
> $_POST = array_map('StripSlashesDeep', $_POST);
> $_GET = array_map('StripSlashesDeep', $_GET);
> $_COOKIE = array_map('StripSlashesDeep', $_COOKIE);
> }
> }
>
> function StripSlashesDeep($value)
> {
> $value = is_array($value)
> ? array_map('StripSlashesDeep', $value)
> : stripslashes($value);
>
> return $value;
> }
>
> However when I call $this->StripGpcSlashes(); from within a class, I get
> the following error:
> */ array_map(): The first argument, 'StripSlashesDeep', should be either
> NULL or a valid callback /*
>
> Anyone have suggestions as to what I am doing wrong ?
Mine works fine, but I don't use it in any classes:
set_magic_quotes_runtime(0);
if(get_magic_quotes_gpc() == 0){
$_GET = isset($_GET) ? array_map("slashes", $_GET) : array();
$_POST = isset($_POST) ? array_map("slashes", $_POST) : array();
$_COOKIE = isset($_COOKIE) ? array_map("slashes", $_COOKIE) : array();
}
function slashes($var){
if(is_array($var))
return array_map("slashes", $var);
else
return addslashes($var);
}
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
Hi Jeffery,
To use a class method as a valid callback, you should pass an array like
$_POST = array_map(array($this, 'StripSlashesDeep'), $_POST);
Hope this helps,
-Guillermo
On Mon, 7 Feb 2005 17:10:32 -0600, Greg Donald <[EMAIL PROTECTED]> wrote:
> On Tue, 08 Feb 2005 09:37:11 +1100, Jeffery Fernandez
> <[EMAIL PROTECTED]> wrote:
> > I have the following 2 functions which I intend to clean GPC off slashes
> > if magic_quotes_gpc is turned on.
> >
> > function StripGpcSlashes()
> > {
> > if (get_magic_quotes_gpc())
> > {
> > $_POST = array_map('StripSlashesDeep', $_POST);
> > $_GET = array_map('StripSlashesDeep', $_GET);
> > $_COOKIE = array_map('StripSlashesDeep', $_COOKIE);
> > }
> > }
> >
> > function StripSlashesDeep($value)
> > {
> > $value = is_array($value)
> > ? array_map('StripSlashesDeep', $value)
> > : stripslashes($value);
> >
> > return $value;
> > }
> >
> > However when I call $this->StripGpcSlashes(); from within a class, I get
> > the following error:
> > */ array_map(): The first argument, 'StripSlashesDeep', should be either
> > NULL or a valid callback /*
> >
> > Anyone have suggestions as to what I am doing wrong ?
>
> Mine works fine, but I don't use it in any classes:
>
> set_magic_quotes_runtime(0);
> if(get_magic_quotes_gpc() == 0){
> $_GET = isset($_GET) ? array_map("slashes", $_GET) : array();
> $_POST = isset($_POST) ? array_map("slashes", $_POST) : array();
> $_COOKIE = isset($_COOKIE) ? array_map("slashes", $_COOKIE) : array();
> }
>
> function slashes($var){
> if(is_array($var))
> return array_map("slashes", $var);
> else
> return addslashes($var);
> }
>
> --
> Greg Donald
> Zend Certified Engineer
> http://destiney.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Guillermo Rauch wrote:
Hi Jeffery,
To use a class method as a valid callback, you should pass an array like
$_POST = array_map(array($this, 'StripSlashesDeep'), $_POST);
Hope this helps,
-Guillermo
Ah thanks Guillermo,
I just about figured it out when you posted. It works now :-)
cheers,
Jeffery
On Mon, 7 Feb 2005 17:10:32 -0600, Greg Donald <[EMAIL PROTECTED]> wrote:
On Tue, 08 Feb 2005 09:37:11 +1100, Jeffery Fernandez
<[EMAIL PROTECTED]> wrote:
I have the following 2 functions which I intend to clean GPC off slashes
if magic_quotes_gpc is turned on.
function StripGpcSlashes()
{
if (get_magic_quotes_gpc())
{
$_POST = array_map('StripSlashesDeep', $_POST);
$_GET = array_map('StripSlashesDeep', $_GET);
$_COOKIE = array_map('StripSlashesDeep', $_COOKIE);
}
}
function StripSlashesDeep($value)
{
$value = is_array($value)
? array_map('StripSlashesDeep', $value)
: stripslashes($value);
return $value;
}
However when I call $this->StripGpcSlashes(); from within a class, I get
the following error:
*/ array_map(): The first argument, 'StripSlashesDeep', should be either
NULL or a valid callback /*
Anyone have suggestions as to what I am doing wrong ?
Mine works fine, but I don't use it in any classes:
set_magic_quotes_runtime(0);
if(get_magic_quotes_gpc() == 0){
$_GET = isset($_GET) ? array_map("slashes", $_GET) : array();
$_POST = isset($_POST) ? array_map("slashes", $_POST) : array();
$_COOKIE = isset($_COOKIE) ? array_map("slashes", $_COOKIE) : array();
}
function slashes($var){
if(is_array($var))
return array_map("slashes", $var);
else
return addslashes($var);
}
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello all -
I've been a list member for a while, helped out some people, and asked
some questions. But, today I have a completely off topic, but
somewhat relevant question for y'all.
What is your favorite Linux distribution? What would you recommend
for my situation?
I'm brand new to Linux. I'm just trying to learn how it works, but I
think I'll catch on quick. I'm looking for the one with the most
capability, and also one to run my development instance of Apache 2.0
on.
I've been looking at either RedHat or Fedora. Is this a good choice?
I'm truly drawing a blank, and I've searched Google, but never really
found anything extremely useful. Please help me, an old Windows
veteran, escape the Microsoft box!
Thanks a ton!!
--
The Disguised Jedi
[EMAIL PROTECTED]
PHP rocks!
"Knowledge is Power. Power Corrupts. Go to school, become evil"
Disclaimer: Any disclaimer attached to this message may be ignored.
This message is Certified Virus Free
--- End Message ---
--- Begin Message ---
On Mon, 7 Feb 2005 16:25:28 -0700, The Disguised Jedi
<[EMAIL PROTECTED]> wrote:
> Hello all -
>
> I've been a list member for a while, helped out some people, and asked
> some questions. But, today I have a completely off topic, but
> somewhat relevant question for y'all.
>
> What is your favorite Linux distribution? What would you recommend
> for my situation?
*BSD is not Linux but for a server it's grand. You might consider it
an option as well.
These are some distros I've used heavily over the years:
Easy -> hard to install:
Mandrake
Suse
RedHat
Debian
FreeBSD
Gentoo
LinuxFromSratch
Most stable -> least stable:
FreeBSD
Debian
Suse
RedHat
Gentoo
LinuxFromSratch
Mandrake
Best performance:
FreeBSD
Gentoo
LinuxFromScratch
Best hardware support:
Suse
Redhat
I read somewhere where there are like 1100 Linux distros out there
now, so you might want to try a few. And there are several BSD
distros as well depending if you want security, hardware support, or a
little of both. Most anything released in the last year has included
or will support Apache2 and PHP5. If not it probably will soon.
I run Gentoo and FreeBSD at home and Suse at work.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
I would basically agree with Greg's summary, "Easy -> Hard"
and "More Stable -> Less Stable".
It is worth mentioning a relative new Linux distro called "Ubuntu".
I have used Red Hat / Fedora for a few years. I have slowly grown
tired of "dependency hell" and broken packages.
I have tried Debian based Linux(s) and found them far easier to
maintain using apt-get than RPM based Linux distros. Ubuntu is a
Debian based distro tweeked for the desktop. It also runs a little
more bleeding edge than Debian, although I have found it very stable.
I use Ubuntu (i386) Athlon desktop and Ubuntu (PPC) my Apple iBook. I
have Apache, MySQL, PostgreSQL, PHP, Python, Perl, ... installed and
all running well for my development.
http://www.ubuntulinux.org/
You can even get a free CD from them...
http://www.ubuntulinux.org/support/documentation/faq/shipit
Tony
On Mon, 7 Feb 2005 18:17:55 -0600, Greg Donald <[EMAIL PROTECTED]> wrote:
> On Mon, 7 Feb 2005 16:25:28 -0700, The Disguised Jedi
> <[EMAIL PROTECTED]> wrote:
> > Hello all -
> >
> > I've been a list member for a while, helped out some people, and asked
> > some questions. But, today I have a completely off topic, but
> > somewhat relevant question for y'all.
> >
> > What is your favorite Linux distribution? What would you recommend
> > for my situation?
>
> *BSD is not Linux but for a server it's grand. You might consider it
> an option as well.
>
> These are some distros I've used heavily over the years:
>
> Easy -> hard to install:
> Mandrake
> Suse
> RedHat
> Debian
> FreeBSD
> Gentoo
> LinuxFromSratch
>
> Most stable -> least stable:
> FreeBSD
> Debian
> Suse
> RedHat
> Gentoo
> LinuxFromSratch
> Mandrake
>
> Best performance:
> FreeBSD
> Gentoo
> LinuxFromScratch
>
> Best hardware support:
> Suse
> Redhat
>
> I read somewhere where there are like 1100 Linux distros out there
> now, so you might want to try a few. And there are several BSD
> distros as well depending if you want security, hardware support, or a
> little of both. Most anything released in the last year has included
> or will support Apache2 and PHP5. If not it probably will soon.
>
> I run Gentoo and FreeBSD at home and Suse at work.
>
> --
> Greg Donald
> Zend Certified Engineer
> http://destiney.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
I gotta have more cowbell!
--- End Message ---
--- Begin Message ---
Hello,
on 02/07/2005 08:47 PM Larry Laffer said the following:
who can give me a solution or at least a hint for the following problem:
I have to get an URL parameter with an fsockopen connection.
I can connect with fsockopen an given link and get back this link with
an URL parameter cnr=xxxxxx
Who can I do this?
And who can I "read" this URL parameter?
You may want to try this HTTP client class that can be used submit HTTP
requests either via POST of GET, passing whatever parameters you want:
http://www.phpclasses.org/httpclient
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
I also forgot to mention my hardware.
P4 2.8 GHz - Notebook
60 GB HDD w/ 15 GB seperate partition for the linux
CD-RW 24x
WLAN for main connection
Thanks for the responses i've already received!
On Mon, 7 Feb 2005 16:31:46 -0700, Chad Leigh -- Shire. Net LLC
<[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I like gentoo for Linux. However, you may be best served by FreeBSD.
> www.freebsd.org
>
> Chad
>
>
--
The Disguised Jedi
[EMAIL PROTECTED]
PHP rocks!
"Knowledge is Power. Power Corrupts. Go to school, become evil"
Disclaimer: Any disclaimer attached to this message may be ignored.
This message is Certified Virus Free
--- End Message ---
--- Begin Message ---
* The Disguised Jedi <[EMAIL PROTECTED]>:
> I also forgot to mention my hardware.
>
> P4 2.8 GHz - Notebook
> 60 GB HDD w/ 15 GB seperate partition for the linux
> CD-RW 24x
> WLAN for main connection
Almost identical to what I'm writing this on... except my partitions are
all linux... ;-)
In getting ready for the linux install on this machine, I went over to
http://www.linux-laptop.net -- this should be your first stop if you're
using a laptop. See if you can find what others have written about
getting it up and running; if you're lucky, you'll see several distros,
and be able to compare, or somebody will have written a comparison of
several.
>From what I've been able to see, Kanotix has been a favorite for a
number of laptops with similar configurations. It's a livecd, so you'll
be able to test it out without installing -- which will give you a good
idea if your hardware will work with it.
Then, install away!
(Me? I run gentoo.)
> Thanks for the responses i've already received!
>
>
> On Mon, 7 Feb 2005 16:31:46 -0700, Chad Leigh -- Shire. Net LLC
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi
>>
>> I like gentoo for Linux. However, you may be best served by FreeBSD.
>> www.freebsd.org
>>
>> Chad
--
Matthew Weier O'Phinney
[EMAIL PROTECTED]
http://weierophinney.net/matthew
--- End Message ---
--- Begin Message ---
Pretty difficult question as it's a question of taste :-)
If your are new to linux and want to keep your windows (dual-boot),
Mandrake would be my advice: in a class with users without experience of
linux, they all have been able to install Mandrake (10.1) dual booting
windows without a problem in -/+ 2 hours. I also have it on my laptop
since 2/3 years now and it works pretty well
Fedora Core is really nice, but if I'm not wrong, there is no possibility
in the graphical installation to redimension your windows partition (by
the way always do a backup and a defrag before)
ga�l
The Disguised Jedi <[EMAIL PROTECTED]> wrote on 08/02/2005
00.25.28:
> Hello all -
>
> I've been a list member for a while, helped out some people, and asked
> some questions. But, today I have a completely off topic, but
> somewhat relevant question for y'all.
>
> What is your favorite Linux distribution? What would you recommend
> for my situation?
>
> I'm brand new to Linux. I'm just trying to learn how it works, but I
> think I'll catch on quick. I'm looking for the one with the most
> capability, and also one to run my development instance of Apache 2.0
> on.
>
> I've been looking at either RedHat or Fedora. Is this a good choice?
> I'm truly drawing a blank, and I've searched Google, but never really
> found anything extremely useful. Please help me, an old Windows
> veteran, escape the Microsoft box!
>
> Thanks a ton!!
>
> --
> The Disguised Jedi
> [EMAIL PROTECTED]
>
> PHP rocks!
> "Knowledge is Power. Power Corrupts. Go to school, become evil"
>
> Disclaimer: Any disclaimer attached to this message may be ignored.
> This message is Certified Virus Free
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> " from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
I would agree with the Mandrake recommendation.
I first installed it a few years back, to help me get started in the
Linux/Unix world, and had very little trouble with it. It's hardware
recognition has always been very impressive. Since first installing
Mandrake, I have often thought I should 'grow up' and try a more
serious distribution, but I always end up coming back. Being Mandrake,
it's as easy as you want to configure stuff, and being Linux, it's
also as hard as you want. I've rarely had dependency problems, but
then I don't really go in for exotic configurations.
On 8 Feb 2005, at 08:21, [EMAIL PROTECTED] wrote:
Pretty difficult question as it's a question of taste :-)
If your are new to linux and want to keep your windows (dual-boot),
Mandrake would be my advice: in a class with users without experience
of
linux, they all have been able to install Mandrake (10.1) dual booting
windows without a problem in -/+ 2 hours. I also have it on my laptop
since 2/3 years now and it works pretty well
Fedora Core is really nice, but if I'm not wrong, there is no
possibility
in the graphical installation to redimension your windows partition (by
the way always do a backup and a defrag before)
ga�l
The Disguised Jedi <[EMAIL PROTECTED]> wrote on 08/02/2005
00.25.28:
Hello all -
I've been a list member for a while, helped out some people, and asked
some questions. But, today I have a completely off topic, but
somewhat relevant question for y'all.
What is your favorite Linux distribution? What would you recommend
for my situation?
I'm brand new to Linux. I'm just trying to learn how it works, but I
think I'll catch on quick. I'm looking for the one with the most
capability, and also one to run my development instance of Apache 2.0
on.
I've been looking at either RedHat or Fedora. Is this a good choice?
I'm truly drawing a blank, and I've searched Google, but never really
found anything extremely useful. Please help me, an old Windows
veteran, escape the Microsoft box!
Thanks a ton!!
--
The Disguised Jedi
[EMAIL PROTECTED]
PHP rocks!
"Knowledge is Power. Power Corrupts. Go to school, become evil"
Disclaimer: Any disclaimer attached to this message may be ignored.
This message is Certified Virus Free
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Congratulations!,
your best friend.
--- End Message ---
--- Begin Message ---
Hi list,
I'm doing an intranet website for managing users. I need to be able to
change passwords, move files and folders around and that kind of thing.
What is the best way?
Obviously I can't run the webserver as root. In an earlier version I wrote
update information to a table and had a cronjob scan that. But that
solution is no longer good enough -- I need to call system functions
directly.
I can't find any thorough articles on this subject, but surely someone here
has some ideas or some pointers.
Thanks,
Niels
--- End Message ---
--- Begin Message ---
Hello,
How do I collect the keywords a user entered when searching for my site?
I want to write some code that will retrieve the keywords entered in a
search engine that were used to find my site.
Is it possible to also detect what my site's search engine ranking was
for the entered keywords also?
Tim
--- End Message ---
--- Begin Message ---
On Monday 07 February 2005 10:02 pm, Tim Burgan wrote:
> Hello,
>
>
> How do I collect the keywords a user entered when searching for my site?
>
> I want to write some code that will retrieve the keywords entered in a
> search engine that were used to find my site.
>
> Is it possible to also detect what my site's search engine ranking was
> for the entered keywords also?
>
>
> Tim
Hi Tim,
http://awstats.sourceforge.net/
An excellent web-stats analyzer - also prints out keywords/keyphrases by
analyzing web logs. Suppose you could do the same, using some code ideas from
the prog.
http://www.mikes-marketing-tools.com
You can get search engine ranking using keywords/phrases from your site.
Hth,
Andre
--- End Message ---
--- Begin Message ---
Hi,
Anybody out there doing any work with ncurses? I've been playing around with
ncurses trying to figure it all out. I have had pretty good luck but I am
finding a few issues and would like to know if other users are having the
same problems. One of the problems I'm having is with function keys and
arrow keys. I can trap on them OK but I haven't been able to keep the system
from displaying their escape sequences on the screen. When this happens it
corrupts the screen and skews the display. Also, I'm having some weirdness
with mvwaddstr, I logged a bug on bugs.php.net #31876. I have test programs
for anyone interested in taking a stab at some of the problems I've
encountered. I've read all the documentation I could get my hands....that
took about 10 minutes!
Thanks,
Dean
--- End Message ---
--- Begin Message ---
On Mon, 7 Feb 2005 21:07:00 -0600, Grimes, Dean <[EMAIL PROTECTED]> wrote:
> I've read all the documentation I could get my hands....that
> took about 10 minutes!
http://php.net/ncurses seems like more than 10 minutes reading to me,
but maybe I'm slow. I learned about ncurses using it with C, but then
later I discovered the PHP ncurses functions are mostly the same.
Here's the docs I read:
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
On 7 Feb 2005 Jochem Maas wrote:
> > IE, is their a way to get PHP to overwrite the memory
> > used by variables at the termination of a script?
>
> don't know about that but.... best not to accept the CCNs in the
> first place. let the user enter it at authorize.net.
I think this is an extraordinary (and unjustified) level of paranoia.
The memory issue is moot on a dedicated server, and probably on a
shared server as well. On a dedicated server if you can't control the
access well enough to prevent unauthorized people from running programs
to go poking through memory, you've got bigger problems to solve. On
either kind of server the chances of finding a card number are remote
to start with, and even if found it is likely to come with no
associated address or cardholder information.
Also there are far easier ways to get CC numbers than to hope one will
be left lying around in memory. For one thing, a crook can generate CC
numbers very easily -- the check-digit algorithm is published, and the
bank ID numbers at the start I think are readily available as well. Of
course many of those generated will be wrong, but there have to be
enough right ones that a generated number is far easier for them to get
than a number left lying around in memory.
As for not accepting them on your own web page at all, I don't think
commercial enterprises are obligated to go to a level of security that
is that far beyond the norm, and it manifestly does not work in many
site designs where the provider's page simply is not adequate or
appropriate. The basic approach of using SSL from client to server and
again from server to CC processor, and then not storing the full
number, should be plenty good enough, and is for tens of thousands of
commercial web sites. I have never heard of any signifcant problem
with card numbers being stolen from sites operating this way, nor of
any liability assigned by the CC companies to people following these
(clearly industry standard) practices.
--
Tom
--- End Message ---
--- Begin Message ---
No the most secure way, but I had a client who was determined not to use
paypal and store cc'sand do them offline. I am using SSL + Mysql encode to do
this. Ie
encode(cc_number,md5('secret'))
--- End Message ---
--- Begin Message ---
On Mon, 07 Feb 2005 22:25:46 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I think this is an extraordinary (and unjustified) level of paranoia.
cat /dev/mem | strings | egrep "^[0-9]+$"
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
Greg Donald wrote:
On Mon, 07 Feb 2005 22:25:46 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
I think this is an extraordinary (and unjustified) level of paranoia.
cat /dev/mem | strings | egrep "^[0-9]+$"
cat: /dev/mem: Permission denied
:)
You need root access. If anyone gains root on your providers server, he
has simpler ways to find the CCNs
--- End Message ---
--- Begin Message ---
Marek Kilimajer wrote:
Greg Donald wrote:
On Mon, 07 Feb 2005 22:25:46 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
I think this is an extraordinary (and unjustified) level of paranoia.
This was aimed at me. I personally wouldn't touch a CCN with a barge pole,
I did say it was 'best' not to accept them at all, although accepting them and
immediately passing them on via an SSL link (e.g. with cURL) is probably
'good enough' - at least, apparently, 10,000s of merchant seem to think so.
cat /dev/mem | strings | egrep "^[0-9]+$"
nice bit of magic tho, Greg :-)
cat: /dev/mem: Permission denied
:)
You need root access. If anyone gains root on your providers server, he
has simpler ways to find the CCNs
getting root is often quite trivial for anyone with a fair bit of knowledge
& determination,
mostly because for alot of vulnerabilities there are 'make'n'run' exploits
which
any numpty can use.
besides which anyone ever here of 'an inside job' - i.e. when the CCNs go
wandering from
your DB/encrypted zipfile/index.html, its the sysadmin who you should be
looking at first
(e.g. its often alot easier to bribe a sysadmin than it is to hack into a
server).
--- End Message ---
--- Begin Message ---
* Thus wrote Ian Porter:
> Hi,
>
> I am just wondering how to obtain the result from a mysql procedure OUT
> parameter within PHP e.g.
>
> MYSQL
> create procedure test_out(OUT testvar int)
> BEGIN
> select max_connections into testvar from mysql.user limit 1;
> END
>
> PHP
>
> $query = 'call test_out('.$test_val.')';
> $query_handle = mysql_query($query);
You should really be using the mysqli* interface to mysql. It
provides better ways to execute things like that.
http://php.net/mysqli
Curt
--
Quoth the Raven, "Nevermore."
--- End Message ---
--- Begin Message ---
On Mon, 7 Feb 2005 16:21:26 -0600, Brad Ciszewski <[EMAIL PROTECTED]> wrote:
> What is the function, or how do you make a script that displays the server's
> uptime?
php -r 'system("uptime");'
or
<?php
echo `uptime`;
?>
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
Is there an easier way to display/highlight the value stored in the database
for a select option? Such as:
Stored value is 'center'. The statement is:
print '<select name="colalign">';
print '<option value="left">Left';
print '<option value="center">Center';
print '<option value="right">Right';
print '</select>';
I can have 3 sets of the above tied to 'if's but would rather ask for an
easier or better way.
Thanks in advance.
Alp
--- End Message ---
--- Begin Message ---
Hello Alp
Try something like,
<?php
//DB fields as an array
$db_fields = array('left' => 'left',
'center' => 'center',
'right' => 'right');
function drop($array,$sel_name='',$sel_field='',$css=''){
$dropdown = "<select name=\"$sel_name\" $css>\n";
foreach($arr as $key => $val){
$sel = ($sel_field == $key)?' selected="selected"':'';
$dropdown .= "\t".'<option
value="'.$key.'"'.$sel.'>'.$val.'</option>'."\n";
}
$dropdown .= "</select>\n";
return $dropdown;
}
usage:
echo drop($db_fields,'test_select','center');
?>
HTH
Jarratt
On Tue, 8 Feb 2005 17:14:24 +0800, Alp <[EMAIL PROTECTED]> wrote:
> Is there an easier way to display/highlight the value stored in the database
> for a select option? Such as:
> Stored value is 'center'. The statement is:
> print '<select name="colalign">';
> print '<option value="left">Left';
> print '<option value="center">Center';
> print '<option value="right">Right';
> print '</select>';
>
> I can have 3 sets of the above tied to 'if's but would rather ask for an
> easier or better way.
>
> Thanks in advance.
>
> Alp
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
First of all, hello everybody,
I am having some problems generating timestamps.
I have a simple application, the user selects a month, a day and a year
and submits
it's data.
Now, I want that date to be stransformed into a unixtimestamp. To do
that
I use strtotime('m/d/y') for 01 January 2011 it would be:
strtotime('01/01/2011')
Now, a fiew days ago, the timestamp generated by this was: 1293840000
After a hardware failure, I reinstalled my linux with the same
settings...
now, a timestap of 01/01/2011 is returned as: 1293832800
What am I doing wrong?
# ls -al /etc/localtime
lrwxrwxrwx 1 root root 36 Feb 7 19:54 /etc/localtime ->
/usr/share/zoneinfo/Europe/Bucharest
# date
Tue Feb 8 13:29:15 EET 2005
# echo $TZ
Europe/Bucharest
#
Also mktime generates the second timestamp ...damn, I really don't know
why there are two different
timestamps for the same date.
--
Stefan, a simple CRUX Linux user.
Linux registered user: #272012
[Linux is Friendly. It's just selective about who his friends are.]
--
This message was scanned for spam and viruses by BitDefender
For more information please visit http://linux.bitdefender.com/
--- End Message ---