[PHP] Re: [Off] Cheap SSL certificates?

2006-02-04 Thread John Nichel

> Richard Lynch wrote:
>> And in the real world, where browsers just blindly chase down CAs and
>>  the basic Security Model is "you pay us $200, and we make sure you
>> are who you say you are, and then we trust you" what real difference
>>  does it make?
>
> Users can remove untrustworthy CA certs from their browsers.
>
>> There are certainly a zillion sites *I* do not trust that have
>> high-priced CA-certified SSL certs...
>>
>> And Joe Sixpack and Betty Buick just look for the little lock symbol
>> to be closed, and guage trustworthiness only on there being no popups
>> warning them it's not secure, and that the site "looks" professional,
>> and a "brand-name" on the logo/domain.
>
> That's why there are organizations like WebTrust - to perform audits as
> to how personal data is used.
>
>> So, why exactly would I pay for a $200 background check on myself,
>> when I already trust myself?  Why not pay $70 for an SSL with no
>> background check on myself, so long as it makes Joe Sixpack and Betty
>>  Buick happy, if it's got 99% ubiquity?
>
> As I said above, users may delete the CA cert from their browser.  This
> means that the CA you pay $70 to would not be trusted - period.  One
> day, many users will know the fact that the certificate should be
> checked before sensitive information is sent through the SSL connection.
>
>> I'm often curious why exactly people think the SSL / CA system is so
>> great, when it seems a whole lot like the Emporer's Clothes to me, or
>> some kind of weird Ponzi scheme to line the pockets of a handful of
>> companies, with very very very little added-value to the end user.
>
> It appears that you never applied for a certificate before, or applied
> for certs from CAs that don't verify information.  Identification is
> extremerly important when it comes to knowing whether or not to trust
> the given public key.

I appears that you haven't been around here long.

> I am not trying to humiliate you, but you may want to study about
> cryptography and its use for the internet.  I operate my own
> web/e-mail server (and have been doing so for some time), and so, I know
> how important it is to make sure a trustworthy CA signs a public key.

O, your own web and email server?  Okay, show of hands; how many
people on this list *do not* run their own servers?

-- 
John C. Nichel IV
Programmer/System Admin
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



[PHP] Serious bug ?

2006-02-04 Thread Bogdan Ribic

Hi all,

  I've found a strange bug with extract($GLOBALS, EXTR_REFS), and it
only shows up if you try to access a non-existent variable or array
member before that. Here's a demo script:


// Uncomment this line to see the problem
// $return = @$_GET['xx'];

function extr_globals() {
  extract($GLOBALS, EXTR_REFS);
};

function test($msg) {
  $x = 'OK';
  $msg = 'wrong';
  return $x;
};


echo test('login') . "\n";
extr_globals();
echo test('login');

If you run this script, it will output two OKs, as it should. If you
however uncomment the first line, one with $_GET assignment, it will
output an OK and then text "wrong". Tested with php 4.3.10 and 5.0.3 on
a windows machine.

What actually happens is that extract($GLOBALS, EXTR_REFS) really messes
up nametables. If you step into test function with debugger, you will
see that all variables inside the function will already be "initialized"
to the value of the parameter $msg, and assigning to one var will
overwrite values in unrelated variables. I repeat, this only happens if
you tried to access non-existent var or array member before that.

So it's a bug. Do I get a PHP T-shirt ? :-)

Boban.


--

   Open source PHP code generator for DB operations
   http://sourceforge.net/projects/bfrcg/

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



Re: [PHP] xml to array

2006-02-04 Thread Brian V Bonini
On Fri, 2006-02-03 at 16:23, Richard Lynch wrote:
> I've got my money on the XML spec REQUIRING an alphabetic start to
> tagnames, and subsequent characters can be alphanumeric...
> 
> In other words, it doesn't work because <0> is not a valid XML tag.


Yeah, that was my instinct too... Just could not find anything to
confirm it after a quick browse through the spec. Though can you find
anything in the spec via a quick browse.. ;-)

However, after a closer look I still can't find (at least in plain
English) anything that says this is NOT OK. Though the parser does
return '[xml_error] => not well-formed (invalid token)'.

Good stuff

-Brian


-- 

s/:-[(/]/:-)/g


BrianGnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] REGEX query

2006-02-04 Thread phplists

Thanks for the options David.

I think I'll go for the last option as I'm determined to get to grips 
with REGEX, and your first choice of REGEX won't work for me as the 
'RV-6' bit can be too variable with what it contains, whereas the \(EX\) 
bit IS more constant...it's only the EX bit that changes.


I knew I had to to escape some characters but got confused as to how 
many times to do each one.

I have tried using your example as follows:

$postScriptData =preg_replace("/\\\(.*?\)\\/","",$postScriptData);

and get the following error:
Warning: No ending delimiter '/' found in...

Any suggestions?

Cheers
Alexis


David Tulloh wrote:


I assume that the text inside can change around a fair bit.  If the
string is of a fixed with or simple format you can just use substr() and
friends, it's simpler and faster.

That said, there is really two approaches that I can see with this string.

You can match on the spaces to extract the 'RV-6', something like
'/\s\S+\s/' should do the trick, that pulls out some non-whitespace
characters from between two whitespace characters, including the
whitespace characters.  Then just add the () on again afterwards.

The other approach would be to use preg_replace to get rid of the \(EX\)
portion by replacing it with an empty string.  Personally I would
probably use the first technique as I generally don't like using replace
functions in this way.  A pattern which should match is '/\\\(.*?\)\\/',
the mess of \ is because \ ( and ) all need to be escaped with a \.


David

phplists wrote:


Hi,

I'm still trying to get to grips with REGEX and have hit a hurdle with
the following:

I have this bit of text:
(\(EX\) RV-6 )

I want to remove the '\(EX\)' part of it
so leaving just: ( RV-6 )

Any suggestions would be most appreciated.

Thanks
Alexis








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



[PHP] system('bell'); ?

2006-02-04 Thread tedd

I simple wrote a small C program that basically sent a bell, 0x07
and it opened my cash drawer. In php I just did system('bell'); and
it worked fine.

Kevin


Hi:

Interesting! The statement system('bell'); is new to me.

If I'm writing code on a hosted domain, and using that statement, 
who's bell am I ringing?


tedd

--

http://sperling.com/

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



[PHP] Using API in other languages

2006-02-04 Thread Eli

Hi,

I have a class in PHP which offers some API functions. I want to access 
this API with other languages (such as C/C++, Java, Perl, etc), so the 
functions will run from PHP.

How can I do that?

-thanks.

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



Re: [PHP] system('bell'); ?

2006-02-04 Thread Gerry Danen
bell is his C program... :)   Outputs an ascii 7 (bell) at the machine
where it runs. It basically outputs a character to stdout or stderr.

He probably has that machine next to his cash drawer...

Gerry

On 2/4/06, tedd <[EMAIL PROTECTED]> wrote:
> >I simple wrote a small C program that basically sent a bell, 0x07
> >and it opened my cash drawer. In php I just did system('bell'); and
> >it worked fine.
> >
> >Kevin
>
> Hi:
>
> Interesting! The statement system('bell'); is new to me.
>
> If I'm writing code on a hosted domain, and using that statement,
> who's bell am I ringing?
>
> tedd
>
> --
> 
> http://sperling.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Gerry
http://portal.danen.org/

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



[PHP] Arrays

2006-02-04 Thread Philip W.
Sorry if this question seems stupid - I've only had 3 days of PHP 
experience.


When using the following string format, I get an error from PHP.

$text['text'] = "String Text" ;

Can someone help me?

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



RE: [PHP] system('bell'); ?

2006-02-04 Thread Dan Harrington

Ask not for whom the bell tolls, it tolls for thee!
 

-Original Message-
From: Gerry Danen [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 04, 2006 12:00 PM
To: tedd
Cc: php-general@lists.php.net
Subject: Re: [PHP] system('bell'); ?

bell is his C program... :)   Outputs an ascii 7 (bell) at the machine
where it runs. It basically outputs a character to stdout or stderr.

He probably has that machine next to his cash drawer...

Gerry

On 2/4/06, tedd <[EMAIL PROTECTED]> wrote:
> >I simple wrote a small C program that basically sent a bell, 0x07 and 
> >it opened my cash drawer. In php I just did system('bell'); and it 
> >worked fine.
> >
> >Kevin
>
> Hi:
>
> Interesting! The statement system('bell'); is new to me.
>
> If I'm writing code on a hosted domain, and using that statement, 
> who's bell am I ringing?
>
> tedd
>
> --
> --
> --
> http://sperling.com/
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
> http://www.php.net/unsub.php
>
>


--
Gerry
http://portal.danen.org/

--
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] system('bell'); ?

2006-02-04 Thread php-mail
Suppose someone had to :)

-Original Message-
From: Dan Harrington [mailto:[EMAIL PROTECTED] 
Sent: 04 February 2006 19:50
To: php-general@lists.php.net
Subject: RE: [PHP] system('bell'); ?


Ask not for whom the bell tolls, it tolls for thee!
 

-Original Message-
From: Gerry Danen [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 04, 2006 12:00 PM
To: tedd
Cc: php-general@lists.php.net
Subject: Re: [PHP] system('bell'); ?

bell is his C program... :)   Outputs an ascii 7 (bell) at the machine
where it runs. It basically outputs a character to stdout or stderr.

He probably has that machine next to his cash drawer...

Gerry

On 2/4/06, tedd <[EMAIL PROTECTED]> wrote:
> >I simple wrote a small C program that basically sent a bell, 0x07 and 
> >it opened my cash drawer. In php I just did system('bell'); and it 
> >worked fine.
> >
> >Kevin
>
> Hi:
>
> Interesting! The statement system('bell'); is new to me.
>
> If I'm writing code on a hosted domain, and using that statement, 
> who's bell am I ringing?
>
> tedd
>
> --
> --
> --
> http://sperling.com/
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
> http://www.php.net/unsub.php
>
>


--
Gerry
http://portal.danen.org/

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


__ NOD32 1.1393 (20060203) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com

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



[PHP] Re: Arrays

2006-02-04 Thread Eli

Philip W. wrote:
Sorry if this question seems stupid - I've only had 3 days of PHP 
experience.


When using the following string format, I get an error from PHP.

$text['text'] = "String Text" ;

Can someone help me?


This seems ok and should not give any error. Mabye the error is of 
something else.

What's the error you get?

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



Re: [PHP] Arrays

2006-02-04 Thread Paul Novitski

At 11:12 AM 2/4/2006, Philip W. wrote:

When using the following string format, I get an error from PHP.

$text['text'] = "String Text" ;


Hi Philip,

If that's literally a line from your script, my guess is that "text" 
is a reserved word and can't be used as a variable name.  Try $sText 
or $sSomethingMeaningful.


In this and future postings, it would help us help you if you share 
all relevant details such as the exact error message you see.



I've gotten into the habit of prefixing all my variable names with their type:

$aSomething - array
$sSomething - string
$iSomething - integer
$nSomething - numeric
$bSomething - Boolean

In a language like PHP in which data typing is so loose, I find that 
prefixing the variable type a) helps me keep variables straight and 
b) prevents me from inadvertantly using reserved words as variable names.


Great resource:
http://php.net/

You can quickly look up details from the reference guide by entering 
key words after the domain name, for example:

http://php.net/array
gets you a page of array functions.

Have fun,
Paul 


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



[PHP] need help to update a mysql table from dynamic form

2006-02-04 Thread Patrick Aljord
could someone please help me on that one? http://hashphp.org/pastebin?pid=6156

basically this is how I do:
I display a mysql table in an html table and I put each value in an
input text box.
At the bottom I put a submit button to update changes.
My question is how do I update everything knowing that I don't know in
advance the name of all the input textbox?

Here is the code to display the table:
 
   
 
   English
   Français
   Español

 ";
 $getdisplaycatname = "select
catid,categoryfr,categoryen,categoryes,categoryar from category";
 $getdisplaycatnameq = mysql_query($getdisplaycatname);
 while ($getcatrow = mysql_fetch_array($getdisplaycatnameq)){
 //$display_category=mysql_result($getcatnameq, 0);
 $showcatid=$getcatrow['catid'];
 $showcat=$getcatrow['categoryfr'];
 $showcaten=$getcatrow['categoryen'];
 $showcates=$getcatrow['categoryes'];
 echo "  
\" value=\"$showcaten\"
size=\"18\"/>
\" value=\"$showcat\"
size=\"18\"/>
\" value=\"$showcates\"
size=\"18\"/>
 
  ";
 }
 echo "
 
   
 
 

 ";
 thanx in advance

Pat

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



Re: [PHP] Using API in other languages

2006-02-04 Thread Rory Browne
I could be wrong on this, but I think your best hope is something
using web services like SOAP, or XML-RPC.

On 2/4/06, Eli <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a class in PHP which offers some API functions. I want to access
> this API with other languages (such as C/C++, Java, Perl, etc), so the
> functions will run from PHP.
> How can I do that?
>
> -thanks.
>
> --
> 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] system('bell'); ?

2006-02-04 Thread Kevin Waterson
This one time, at band camp, tedd <[EMAIL PROTECTED]> wrote:

> Interesting! The statement system('bell'); is new to me.
> 
> If I'm writing code on a hosted domain, and using that statement, 
> who's bell am I ringing?

The server bell, not the client.
I used this method because the cash drawer was plugged into the server in a 
shop front.
each of the terminals could then use a web based POS interface but there was 
only a
single cash drawer.

Kevin

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

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



Re: [PHP] PHP hosting with multiple domains?

2006-02-04 Thread Peter Hoskin

Russell Jones wrote:

Host-Gator has a fantastic, cheap reseller program, although you aren't
sharing space within 1 account.
My real recommendation would be ServerPronto though. $29.95/mo for a
dedicated with 40gig space.
Lovely cogent bandwidth too... you get what you pay for, which in this 
case is almost nothing.


ServerPronto/Infolink have also been listed for spam on several occasions.

Being a former customer, I don't recommend them at all.

 It works great for me, and you can host all the
domains you want. You will have to learn how to use Apache, though.

Russ

  


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



Re: [PHP] need help to update a mysql table from dynamic form

2006-02-04 Thread Sumeet

Patrick Aljord wrote:

could someone please help me on that one? http://hashphp.org/pastebin?pid=6156

basically this is how I do:
I display a mysql table in an html table and I put each value in an
input text box.
At the bottom I put a submit button to update changes.
My question is how do I update everything knowing that I don't know in
advance the name of all the input textbox?

Here is the code to display the table:
 
   
 
   English
   Français
   Español

 ";
 $getdisplaycatname = "select
catid,categoryfr,categoryen,categoryes,categoryar from category";
 $getdisplaycatnameq = mysql_query($getdisplaycatname);
 while ($getcatrow = mysql_fetch_array($getdisplaycatnameq)){
 //$display_category=mysql_result($getcatnameq, 0);
 $showcatid=$getcatrow['catid'];
 $showcat=$getcatrow['categoryfr'];
 $showcaten=$getcatrow['categoryen'];
 $showcates=$getcatrow['categoryes'];
 echo "  
\" value=\"$showcaten\"
size=\"18\"/>
\" value=\"$showcat\"
size=\"18\"/>
\" value=\"$showcates\"
size=\"18\"/>
 
  ";
 }
 echo "
 
   
 
 

 ";
 thanx in advance

Pat



not sure of exactly u r try to do...but i can suggest the following code.

while ($getcatrow = mysql_fetch_array($getdisplaycatnameq)){

  /* assuming getcatrow is an array like
   getcatrow = array( "field1" => "value1",
  "field2" => "value2");

 */

  while( list($key,$value) = each($getcatrow) ) {
echo " size='18'/>";

  }

}

u can then complete the code

--
Sumeet Shroff
http://www.prateeksha.com
Web Design and Ecommerce Development, Mumbai India

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



Re: [PHP] Arrays

2006-02-04 Thread Hugh Danaher

Philip,
You'll often get an error call on a line when there is a problem on the 
previous line.  Say, you forgot to end a line with a semicolon, then it will 
error the next line.

Hugh
- Original Message - 
From: "Philip W." <[EMAIL PROTECTED]>

To: 
Sent: Saturday, February 04, 2006 11:12 AM
Subject: [PHP] Arrays


Sorry if this question seems stupid - I've only had 3 days of PHP 
experience.


When using the following string format, I get an error from PHP.

$text['text'] = "String Text" ;

Can someone help me?

--
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.1.375 / Virus Database: 267.15.1/250 - Release Date: 2/3/2006






--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.1/250 - Release Date: 2/3/2006

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



[PHP] Re: Using API in other languages

2006-02-04 Thread Eli
Is there any other way of doing this without technology like web 
services? mabye a glue extension between those languages?



Rory Browne wrote:
> I could be wrong on this, but I think your best hope is something
> using web services like SOAP, or XML-RPC.
>
> On 2/4/06, Eli <[EMAIL PROTECTED]> wrote:
>
>>Hi,
>>
>>I have a class in PHP which offers some API functions. I want to access
>>this API with other languages (such as C/C++, Java, Perl, etc), so the
>>functions will run from PHP.
>>How can I do that?
>>
>>-thanks.
>>

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



[PHP] Reverse Engineering of Smarty

2006-02-04 Thread Zareef Ahmed
Hi All, 

 Accidentally I got deleted all of my php code in one of my application, I was 
using smarty and its compiled directory has the code in its native format.

Is there any way so I can do some type of reverse engineering to bring back my 
original code?

Any suggestion?

Thanks in advance.

Zareef Ahmed