Re: [PHP] I need do paging in php, I use ODBC Access

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 7:31 am, Matthew Weier O'Phinney said:
> Actually, LIMIT is in ANSI SQL.

Either the ANSI standard changed, or Rasmus needs to update his Bio...

http://lerdorf.com/bio.php

"...he can be blamed for the ANSI92 SQL-defying LIMIT clause in mSQL 1.x
which has now, at least conceptually, crept into both MySQL and
PostgreSQL."

But, hey, I'm not gonna actually READ the ANSI standard to find out -- I'd
rather worry about what actually *WORKS* than what the SQL standard is,
which, sadly, is seldom easily reconciled with Real-Life (tm).

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] SSL use

2005-04-22 Thread ruel.cima
 hi,

 im handling some important information that needs to be stored in my
 postgresql database via a php script. i´ve been reading the mails sent on
 this mailing list on SSL use. my postgresql server allows SSL connections
 but im not sure how to make use of this.id like to know more about ssl and
 how to take advantage of its security features. any references?

  from my php script, do i need to make a special connection to the database
 or is the same e.g pg_connect(host= localhost dbname=test user=p
 password=p)?

 is my information automatically transfered in an encrypted fashion?

 thnax

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



Re: [PHP] modify array data

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 8:46 am, Jon Aston said:
> Is there a way to easily rotate array data?
>
> what I want to do is
> change from
>
> bob | bill | frank
> joe | jose | sam
> sally | jim | kim
>
> to
> |  | | frank||  |
> |  |bill | | sam|  |
> |bob| | jose  |   | kim|
> |  |joe| |jim   |  |
> |  | | sally || |
>
> is there an easy way to do this?
> the data and arraysize will vary so I was looking for a way that I could
> have php do it without having to make script for different array sizes.

http://php.net/array

Look at array_pop and array_push and count and array_slice and
array_splice and array_shift.

I really don't understand your BEFORE/AFTER diagrams at all, since it
pretty much looks random to me...  In which case you want
http://php.net/shuffle

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] PHP cron sendmail

2005-04-22 Thread Richard Lynch
Somewhat OT...

Okay, maybe a lot OT...

I have these cron jobs on a computer, and I want the email output from them.

But I don't want sendmail running 24/7, and when it does run, I'd just as
soon it *ONLY* processed email and sent it out, without even opening up
port 25 and listening.

I guess the port 25 stuff is not too terribly important, behind 2
firewalls and all, but...

Anyway, I definitely want it to run and process however much it can, but
to STOP at a pre-determined time.

This is for the computer in my sound booth, and I only want it running
when we are not trying to record live music or burn CDs.

I've Google and read a fair amount of stuff, most of which is giving me a
headache rather than suggesting a solution...

Is there some command line flags I can use to make sendmail run and send
out just *ONE* message from the /var/mail/mqueue or whatever, and then
QUIT and do nothing else?

I can take care of shaping the behaviour from that point using cron and
PHP to run sendmail when I want...

THANKS and please reply off-list as I'm sure most folks don't want to read
this.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Can I use $_REQUEST for file uploads?

2005-04-22 Thread Philip Olson
> Thanks for the reponse. I tested again, but it was not the problem
> with ENCTYPE. I am getting file with $_FILES. I think this is due to
> CGI configuration if not with php.ini. Because when I check the
> version by using "PHP -v" command, it shows "4.3.10 (cgi)" but when
> check that using phpinfo() function, it is showing as PHP 4.2.2. Why
> the difference? I am working in that view to find the solution.
> Currently I got a temporary solution. I am jsut copying from $_FILES
> to $_REQUEST at the very begining of the script. Because I can't
> change all the scripts now.

Because you have two different versions of PHP installed. In
otherwords, the CGI version and most likely the module
version.

Now to answer your question, here's a quote from the 
PHP Manual:

 Note: Prior to PHP 4.3.0, $_FILES information was 
   also included in $_REQUEST.

So, $_FILES is no longer part of $_REQUEST.

Regards,
Philip

http://php.net/manual/en/reserved.variables.php#reserved.variables.request

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



[PHP] PHP, Apache, Windows 2003

2005-04-22 Thread Reynier Perez Mira
Hi list:

Recently I installed Windows 2003 Server. Now I try to install Apache 2.0.48 
and PHP 5.0.4. First I install PHP 5.0.4 from source binary to Win32 downloaded 
from www.php.net  . It's means that php5apache2.dll is 
include in this packet. Well when I try to config the httpd.conf file and put 
this LoadModule C:/PHP/php5apache2.dll into Modules config the service doesn't 
start. Why? Some help?

Thanks

 

Reynier Pérez Mira

3ero. Ing. Informática

Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy. 

 



Re: [PHP] Zend Certification Exam

2005-04-22 Thread Aaron Gould
M Saleh EG wrote:
Hi everyone.. kind of OT
 Anyone who's passed it in the list? I'm having my exam on May 7th. Gone 
through the guide book once. Sounds easy according to the guide.
I dont think it's as easy as i'm thinking it is any experience? 
Thanx in advance.
My advice -- take the full amount of time given to you, and go back over 
your answers should you have time left over.

I took it at the "2005 PHP Quebec Conference" (it was part of the fee). 
 I finished it in an hour, but had 90 minutes alotted.  I did not pass, 
and still regret not taking the time to go back over the answers I was 
unsure of.  I think that if I had taken the full time, I would have had 
a better shot.

You'll likely have better luck, as I normally don't do well with exams 
in general.

As an aside, I think the exam needs to mature a bit more. I was confused 
a few times, and found a few questions that involved cases I had 
certainly experienced in five plus years of PHP development. I'm sure 
that'll happen in due time as the certification is only a couple years old.

--
Aaron Gould
Programmer/Systems Administrator
PARTS CANADA
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is it possible to save a file with UTF-8 encoding and no BOM using PHP?

2005-04-22 Thread Rasmus Lerdorf
Jon M. wrote:
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On Thu, April 21, 2005 5:07 pm, Jon M. said:
I am trying to have a file that I generated with PHP saved as UTF-8
without
the BOM (Byte Order Mark). Does PHP do anything like this? I am a 
beginner
with PHP, but very technically experienced otherwise. I'm talking about
the
FILE encoding here -just to be clear.

e.g.  fopen("what_ever_file", "a+") now I want PHP save the file itself
with
UTF-8, NOT system default.
I have searched for hours to find an answer, but have not found any info
on
the subject.
Does PHP have any ability to create a text file saved in UTF-8 
encoding???
Maybe I'm just being dumb, but I think if you UTF-8 encode your data, and
http://php.net/fwrite it, you're gonna get what you want...
Dunno about the Byte-Order-Mark part, but I guess you could strip it out
of the UTF-8 encoded data before writing, if you wanted to.
--
Like Music?
http://l-i-e.com/artists.htm

That was the first thing I tried, and it doesn't seem to work (it always 
saves in windows default encoding). Unless I missing something about what 
you can do with fwrite. Did you actually test that before you replied, and 
found that it would? If so, how? The Byte Order Mark is a part of the binary 
file that is written, how would one go about stripping it out??

BTW, note to PHP developers: If "fwrite" had a "encoding" parameter, e.g. 
"UTF-8", that would be REALLY handy. 
Strings in PHP are binary-safe and character-encoding neutral.  fwrite 
doesn't have a clue what it is writing, it just writes what is in memory.

I'd question why you would want to strip the BOM.  Any modern system 
deals with the byte-order-mark correctly.  But you can simply strip it 
manually if it is present in the first 2 bytes before your fwrite if you 
really need to get rid of it.

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


Re: [PHP] Php defense

2005-04-22 Thread Jochem Maas
Pablo D Marotta wrote:
Hi there..
I`m defending the language, but people here want to migrate to asp..
They just keep on saying "php is not used for huge corporation solutions, there
asp goes better".
Sun has always been traditionally a favorite of huge corporations (banks 
for instance),
... Sun is partnering of late with a company called Zend. certainly gives the
impression that php is making serious moves towards the enterprise.
just thought I'd add that tidbit,  most of the relevant big guns in IT/web-land
have already been mentioned :-)
I know it isn´t correct, but I don´t know much about "well-known" websites
using php technology. (I just don´t navigate enough time to know it)
I think that could help a lot, since this people is highly influenced by that
kind of facts.. (I mean, knowing that other companies trust this language to
I would not so much trust in the code (implicitly), but
put it in the people responsible for developing [on] it.
manage critical information).
remember php is opensource, and your employer has (technically) the
financial means to:
a, employ people who (also) contribute to php development
b, employ people fix/change php behaviour for specific inhouse needs
c, employ people who are responsible for source code auditing of php
that to me is worth more than any support contract from M$.
php might be a good hammer but not everything is a nail, I think its fair to
consider that it might not be the right solution for what ever it is you
are tasked with.
rgds,
Jochem
Does anybody know/have any web-sites listing using php? If you only know a 
few
of those, it could help me too.
Thanks in advance!!
Pablo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Documentation for VAR

2005-04-22 Thread Jochem Maas
Richard Davey wrote:
Hello Satyam,
Friday, April 22, 2005, 3:59:38 PM, you wrote:
S> I've been going through the manual and haven't found 'var'
S> documented anywhere, as far as I found, it is just used, and that's
S> it. It seems it first appears when it talks about Classes, and it
S> is just used in the examples as if everyone knew what var is
S> supposed to do.
It's a "constant initializer" - which is both an accurate and
misleading title at the same time :) It will initialise a variable to
be constant through-out your entire class (meaning any method can
access it) but unlike true PHP constants (those created with define)
the value of the variable can be manipulated from just about anywhere.

indeed in php you can do the following instead:

error_reporting( E_ALL & E_STRICT );
class Test
{
// this first var (commented out) should (I thought) act as if defined
// 'public' - it doesn't given a parse error with php -l, but does when run.
// I haven't run into this problem in 1.5 years of writing php5...
// I must be having a brain freeze :-/
//$myVar;
// publically accessible instances variables
public $myVar1; // not initialized with a value
public $myVar2 = "2"; // initialized with a value
// an instance variable thats only available
// from within _all_ methods of this object.
// .. methods could be defined in subclasses or parent-classes
protected $myVar3 = "3";
// an instance variable that is only available to the
// methods defined in _this_ class
private $myVar4 = "4";
// a variable with class scope (all instances see the same value),
// publically accessible
static $myVar5 = "5";
static public $myVar6 = "6";
// a variable with class scope (all instances see the same value),
// thats only available from within _all_ methods of this object.
static protected $myVar7 = "7";
// a variable with class scope (all instances see the same value),
// thats only available from methods defined in _this_ class
static private $myVar8 = "8";
public function get4() { return $this->myVar4; }
public function get8() { return self::$myVar8; }
}
// basic usage examples:
var_dump( ($t = new Test), $t->myVar2, $t->get4(), Test::$myVar6, $t->get8() );
?>
I can thoroughly recommend php5's much improved object model,
try other variations of calls to the defined 'myVar's, also try doing
with sublcasses, see what does/doesn't work, have fun :-)
It is of course PHP4 only and is depreciated in PHP5.
Best regards,
Richard Davey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: [NOVICE] SSL use

2005-04-22 Thread Michael Fuhr
On Fri, Apr 22, 2005 at 03:02:25PM -0700, -k. wrote:
> > > from my php script, do i need to make a special
> > > connection to the database
> > > or is the same e.g pg_connect(host= localhost
> > >dbname=test user=p
> > > password=p)?
> > 
> > You could add "sslmode=require" to attempt only an
> > SSL connection.
> 
> I have couple related questions:
> 
> Is this necessary if the database is running on the
> same machine (as implied by "host= localhost")? If so
> why?

Probably not; I was simply discussing the mechanism in general.  If
the only users who could sniff the connection are privileged users
who already have access to the filesystem and memory, then encrypting
a connection to localhost wouldn't do much except slow down the
connection.  It would, however, mean you wouldn't have to remember
to change that later if the web server and database were split onto
separate machines.

> Is it possible to make an SSL connection between
> Apache and Postgres using Unix-domain sockets?

I don't think libpq will attempt SSL over a Unix-domain socket.  I
see a comment in fe-connect.c that says "Don't bother requesting
SSL over a Unix socket", although I haven't examined the code to
see if that's the only place such a decision would be made.

BTW, connecting with "host=localhost" makes a TCP connection;
omitting that and making a Unix-domain connection would probably
make the connection more efficient (assuming the system supports
Unix-domain sockets, that is).

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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



Re: [PHP] modify array data

2005-04-22 Thread Brent Baisley
Well, it's just a matter of coming up with the formula for converting 
your data. I briefly tried to come up with one, but gave up after I 
realized there would not be a "center" data piece if you have a 4x4 
array or any even number array for that matter.
I would right down the array positions for before and after and try to 
find the pattern you are looking for. It should be some combination or 
rows, columns and array size (addition, subtraction, multiplicaiton, 
division, absolute values, etc.). If you can't find the pattern, you 
can't write a generic conversion function and neither can PHP or 
anybody.

Your first row maps like this (row,col):
0,0 -> 2,0
0,1 -> 1,1
0,2 -> 0,2
This formula would map the first row appropriately:
row = ColCount - ColNum
col = ColNum
It obviously fails for your second row, but it's just an example.
There is obviously a pattern which the mind can interpret fairly 
quickly. But trying to describe it in exact terms can be difficult.

On Apr 22, 2005, at 11:46 AM, Jon Aston wrote:
Is there a way to easily rotate array data?
what I want to do is
change from
bob | bill | frank
joe | jose | sam
sally | jim | kim
to
|  | | frank||  |
|  |bill | | sam|  |
|bob| | jose  |   | kim|
|  |joe| |jim   |  |
|  | | sally || |
is there an easy way to do this?
the data and arraysize will vary so I was looking for a way that I 
could
have php do it without having to make script for different array sizes.

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

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Zend Certification Exam

2005-04-22 Thread M Saleh EG
Hi everyone.. kind of OT
 Anyone who's passed it in the list? I'm having my exam on May 7th. Gone 
through the guide book once. Sounds easy according to the guide.
I dont think it's as easy as i'm thinking it is any experience? 
Thanx in advance.

-- 
M.Saleh.E.G
97150-4779817


Re: [PHP] problem with the pager class not found

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 5:25 pm, Tomás Rodriguez Orta said:
> Hello friends
>  I  try to use the packet pear, but I have a big problem, the IE show me
> the
>  following Error.
>   Fatal error: Class 'Pager' not found in D:\Angerona\paginas\1.php on
> line
> 9
>  require 'Pager.php';
>  the line 9 --->$pager = new Pager($res, $from, $limit);
>  somebody can help me?
>
>  why the class Pager not found if I include_path at the file php.ini?
>
>  PD: I use php over windows.

The rest of the error message should be telling you what PHP is using for
include_path.

Does that match what you expect?

If not, then you don't have php.ini the way it should be.  Check the
location of php.ini in 

If it *does* match, then maybe your Pager.php file is messed up and the
class is missing a closing bracket, so your script thinks you're still in
the middle of your class definition.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] URL encoding in XSL - Yes, a PHP question

2005-04-22 Thread Brian Dunning

Are you saying to embed that within the XSL? Will it process, and will 
the XSL variable be valid for PHP?

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


RE: [PHP] Re: Php defense

2005-04-22 Thread Ryan A

On 4/22/2005 6:04:49 PM, Chris W. Parker ([EMAIL PROTECTED]) wrote:
> Matthew Weier
> O'Phinney 
> on Friday, April 22, 2005 7:39 AM said:
> 
> > I'm
> not allowed to say what company
> it's for, but we just finished
> > building a site for a Fortune 50 company.
> 
> But what you could do is create an anonymous account somewhere, let's
> 
> say @hotmail.com, and THEN post the name of the company. ;)
> 
> 
> 
> Make sure you do this on a computer that allows anonymous access, like,
> 
> a friend's house! :)
> 
> But then again I guess you'd have to kill all of
> us...
 
He hee hee wicked!

:-D


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 4/20/2005

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



Re: [PHP] Can I use $_REQUEST for file uploads?

2005-04-22 Thread Srinadh Sannidhanam
Hi,
Thanks for the reponse. I tested again, but it was not the problem
with ENCTYPE. I am getting file with $_FILES. I think this is due to
CGI configuration if not with php.ini. Because when I check the
version by using "PHP -v" command, it shows "4.3.10 (cgi)" but when
check that using phpinfo() function, it is showing as PHP 4.2.2. Why
the difference? I am working in that view to find the solution.
Currently I got a temporary solution. I am jsut copying from $_FILES
to $_REQUEST at the very begining of the script. Because I can't
change all the scripts now.

Thanks,
S.Srinadh.

On 4/22/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Thu, April 21, 2005 12:48 pm, Srinadh Sannidhanam said:
> > Hi
> >   When I use $_REQUEST for accessing files uploaded, it is working
> > fine in PHP PHP 4.3.10.
> >  But it is not working in PHP 4.3.4.
> >  $_FILES working in both the versions. Can I use $_REQUEST in PHP
> > 4.3.10 also? Do I need to change any configuration in php.ini?
> > server is Apache/2.0.49
> > Please help me in this regard.
> 
> When $_REQUEST doesn't seem to work with file uploads, it almost always,
> in my experience, means I forgot the ENCTYPE="multipart/form-data" on the
> FORM tag.
> 
> D'oh!
> 
> I did that several times, over the years, before it became a habit to type
> it for file uploads.
> 
> YMMV
> 
> --
> Like Music?
> http://l-i-e.com/artists.htm
> 
>

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



Re: [PHP] Re: reverse MD5 ???

2005-04-22 Thread trlists
> > It's more like a theoretical "hole" that may some day prove to be the
> > first step in a long long long process of understanding something that
> > might maybe some day yield a way to de-crypt MD5.
> 
> That's exactly my point.
> 
> It's similar to how a local root exploit sometimes evolves into a
> remote root exploit once publicized and people begin working on it.
> 
> Disclaimer: There are only about 5 or 6 people in the entire world who
> know anything about encryption.. and sadly I am not one of them.

MD5 is hashing which is not the same as encryption.  Hashing is 
normally defined as a one-way conversion of a plaintext message into a 
fixed-length digest or "hash".  Encryption is normally defined as 
conversion of a plaintext message into ciphertext which cannot be read 
until it is decrypted -- i.e. encryption normally implies the 
possibility of decryption.

In that framework there is no such thing as "decrypting" an MD5 digest, 
because an MD5 digest is not an encrypted version of the message to 
start with.  No amount of CPU power will change this basic fact -- 
though CPU power can be used to do a brute force search for strings 
which will generate a given MD5 value.  However, as stated before, at 
current levels of computing power this is not feasible for messages 
beyond I think 7 or 8 characters long (don't quote me on that).

The recently discovered "hole" is unrelated to the above.  It is that 
under certain conditions it is possible to find two different plaintext 
messages which will generate the same MD5 digest.  This could 
theoretically allow one to spoof a message and have it appear 
legitimate if MD5 is used for the legitimacy check, but it does not 
allow "reversal" of MD5, nor do the authors of articles on this problem 
seem to claim that it could.

--
Tom

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



Re: [PHP] Error Handler

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 3:10 pm, Pinoy Ako said:
> I use the example given at http://ph.php.net/manual/en/ref.errorfunc.php
>
> However, when I tried to call an undefined function, I get the normal
> Fatal
> Error message instead of the custom message I entered in the error handler
> function.

As the User Contributed notes indicate, *SOME* PHP errors simply cannot be
trapped by your custom error handler.

This may, or may not, be one of those cases.

Is an undefined function one of the examples?  If not, try one of those.

Also, did you remember to call http://php.net/set_error_handler as well as
to define the function?

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] [suspicious - maybe spam] URL encoding in XSL - Yes, a PHP question

2005-04-22 Thread Brian Dunning
All the resources I've found on the web for URL encoding values within 
an XSL stylesheet are either .NET or Java, so I'm looking for some help 
with how to do this using PHP's special flavor of XML/XSL.

Within the XSL doc, I've got:

http://www.anrdoezrs.net/click-1692198-5463217?loc={$ItemLink}";>

and $ItemLink needs to be URL encoded. How do I do this on my PHP box? 
Sorry no Java or .NET available...   :)

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


[PHP] Error Handler

2005-04-22 Thread Pinoy Ako
I use the example given at http://ph.php.net/manual/en/ref.errorfunc.php
However, when I tried to call an undefined function, I get the normal Fatal 
Error message instead of the custom message I entered in the error handler 
function.


My System Settings:
Apache 2.0.53
PHP version 5.0.4
Windows XP SP2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: [NOVICE] SSL use

2005-04-22 Thread -k.
> > from my php script, do i need to make a special
> > connection to the database
> > or is the same e.g pg_connect(host= localhost
> >dbname=test user=p
> > password=p)?
> 
> You could add "sslmode=require" to attempt only an
> SSL connection.

I have couple related questions:

Is this necessary if the database is running on the
same machine (as implied by "host= localhost")? If so
why?

Is it possible to make an SSL connection between
Apache and Postgres using Unix-domain sockets?




-k.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Christopher Fulton
> > This isn't about redundancy, it's about enhancing the experience for
> > customers physically located thousands of miles away from the server
> > they are trying to access. So, bring the content closer to them and
> > drop their wait times massively. It's easy for those of us sat on the
> > end of cable connections to become complacent about this IMHO (i.e.
> > "the Internet is fast enough now that you don't need to do this"), but
> > in reality that's not really yet the case.

Here is something I have done in the past to speed up php/mysql pages
(should work with other databases though).  Basically, I noticed that
the majority of our database calls were read calls, rather than write
calls.  So, in all of the locations globally, I set up "read-only"
database servers, and also replicated the php code to all of the
sites, then still did all of the writes to the "master" server but,
all of the reads from each local "read-only" server.

Not sure if this is necessairily the "best" way to do things, but it
worked well for me, and sped things up quite a bit.  This does mean
you have 2 database connections always, 1 for reading, and 1 for
writing.

For mysql, look more at their website for how to set up replication
machines.  As far as the code goes, I just have a process that
straight copy's it from my "master" server.

-Chris

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



[PHP] OT [Anonymous Browsing] WAS: Re: [PHP] Re: Php defense

2005-04-22 Thread Jason Barnett
Chris W. Parker wrote:
> Matthew Weier O'Phinney 
> on Friday, April 22, 2005 7:39 AM said:
> 
> 
>>I'm not allowed to say what company it's for, but we just finished
>>building a site for a Fortune 50 company.
> 
> 
> But what you could do is create an anonymous account somewhere, let's
> say @hotmail.com, and THEN post the name of the company. ;)
> 
> Make sure you do this on a computer that allows anonymous access, like,
> a friend's house! :)
> 
> But then again I guess you'd have to kill all of us...

As always Firefox to the rescue.  I find more good tips on web browsing
at Mozilla's online discussion board than just about anywhere else.
Here's a great link to read up on if you want to browse more securely
(who doesn't?):

http://forums.mozillazine.org/viewtopic.php?t=240548

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



Re: [PHP] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] URL encoding in XSL - Yes, a PHP question

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 3:33 pm, Brian Dunning said:
>> >   $ItemLink = urlencode($ItemLink);
>> ?>
>
> Are you saying to embed that within the XSL? Will it process, and will
> the XSL variable be valid for PHP?

No.

I got NO IDEA how you would do this in XML.

Sorry, maybe ask on an XML list. :-^

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Is it possible to save a file with UTF-8 encoding and no BOM using PHP?

2005-04-22 Thread Jon M.
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> On Thu, April 21, 2005 5:07 pm, Jon M. said:
>> I am trying to have a file that I generated with PHP saved as UTF-8
>> without
>> the BOM (Byte Order Mark). Does PHP do anything like this? I am a 
>> beginner
>> with PHP, but very technically experienced otherwise. I'm talking about
>> the
>> FILE encoding here -just to be clear.
>>
>> e.g.  fopen("what_ever_file", "a+") now I want PHP save the file itself
>> with
>> UTF-8, NOT system default.
>>
>> I have searched for hours to find an answer, but have not found any info
>> on
>> the subject.
>>
>> Does PHP have any ability to create a text file saved in UTF-8 
>> encoding???
>
> Maybe I'm just being dumb, but I think if you UTF-8 encode your data, and
> http://php.net/fwrite it, you're gonna get what you want...
>
> Dunno about the Byte-Order-Mark part, but I guess you could strip it out
> of the UTF-8 encoded data before writing, if you wanted to.
>
> -- 
> Like Music?
> http://l-i-e.com/artists.htm


That was the first thing I tried, and it doesn't seem to work (it always 
saves in windows default encoding). Unless I missing something about what 
you can do with fwrite. Did you actually test that before you replied, and 
found that it would? If so, how? The Byte Order Mark is a part of the binary 
file that is written, how would one go about stripping it out??

BTW, note to PHP developers: If "fwrite" had a "encoding" parameter, e.g. 
"UTF-8", that would be REALLY handy. 

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



Re: [PHP] problem with the pager class not found

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 6:23 pm, Matthew Weier O'Phinney said:
>> If it *does* match, then maybe your Pager.php file is messed up and the
>> class is missing a closing bracket, so your script thinks you're still
>> in
>> the middle of your class definition.
>
> I'm guessing this is probably *not* the case... it's a PEAR package, and
> if it's considered stable, this is *highly* unlikely. (Plus, if it's the
> stable version, then I'm running it on my production servers, and I
> *know* it's working fine!)

In that case, I'd be looking for some kind of conditional around the
require 'Pager.php' that is making it not actually get included at all...

Put print statements right before and after the require line and be sure.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Re: [NOVICE] SSL use

2005-04-22 Thread Michael Fuhr
On Fri, Apr 22, 2005 at 04:38:29PM -0400, ruel.cima wrote:
> 
>  im handling some important information that needs to be stored in my
>  postgresql database via a php script. i've been reading the mails sent on
>  this mailing list on SSL use. my postgresql server allows SSL connections
>  but im not sure how to make use of this.id like to know more about ssl and
>  how to take advantage of its security features. any references?

The documentation index has a few entries for "SSL".  Here are some
useful links for 8.0:

http://www.postgresql.org/docs/8.0/interactive/ssl-tcp.html
http://www.postgresql.org/docs/8.0/interactive/libpq.html#LIBPQ-CONNECT
http://www.postgresql.org/docs/8.0/interactive/client-authentication.html#AUTH-PG-HBA-CONF

> from my php script, do i need to make a special connection to the database
> or is the same e.g pg_connect(host= localhost dbname=test user=p
> password=p)?

You could add "sslmode=require" to attempt only an SSL connection.

If the connection should always be encrypted, then you could edit
the server's pg_hba.conf and allow only "hostssl" connections.  In
that case you shouldn't need to specify "sslmode=require" when you
connect, although doing so serves as a safety measure against
pg_hba.conf misconfiguration, and as a reminder that the connection
should be encrypted.

> is my information automatically transfered in an encrypted fashion?

Yes, assuming you've successfully negotiated an SSL connection.  To
be sure, you could use a sniffer like tcpdump or ethereal to look
at the traffic.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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



Re: [PHP] problem with the pager class not found

2005-04-22 Thread Matthew Weier O'Phinney
* Richard Lynch <[EMAIL PROTECTED]>:
> On Fri, April 22, 2005 5:25 pm, Tomás Rodriguez Orta said:
> > Hello friends
> >  I  try to use the packet pear, but I have a big problem, the IE
> >  show me the following Error.
> >   Fatal error: Class 'Pager' not found in D:\Angerona\paginas\1.php
> >   on line 9
> >  require 'Pager.php';
> >  the line 9 --->$pager = new Pager($res, $from, $limit);
> >  somebody can help me?
> >
> >  why the class Pager not found if I include_path at the file php.ini?
> >
> >  PD: I use php over windows.
>
> The rest of the error message should be telling you what PHP is using for
> include_path.
>
> Does that match what you expect?
>
> If not, then you don't have php.ini the way it should be.  Check the
> location of php.ini in 

I have to second Richard on this -- check your php.ini file, and make
sure that the directory where PEAR and/or the PEAR::Pager class are
located are in your include_path. Then, once you are sure of that, make
sure that Pager.php is at the top of one of the paths in your
include_path.

> If it *does* match, then maybe your Pager.php file is messed up and the
> class is missing a closing bracket, so your script thinks you're still in
> the middle of your class definition.

I'm guessing this is probably *not* the case... it's a PEAR package, and
if it's considered stable, this is *highly* unlikely. (Plus, if it's the
stable version, then I'm running it on my production servers, and I
*know* it's working fine!)

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



Re: [PHP] PHP, Apache, Windows 2003

2005-04-22 Thread Ryan J. Cavicchioni
Hello,

What is the exact error message the Apache is giving you?

- Ryan

Reynier Perez Mira wrote:

>Hi list:
>
>Recently I installed Windows 2003 Server. Now I try to install Apache 2.0.48 
>and PHP 5.0.4. First I install PHP 5.0.4 from source binary to Win32 
>downloaded from www.php.net  . It's means that 
>php5apache2.dll is include in this packet. Well when I try to config the 
>httpd.conf file and put this LoadModule C:/PHP/php5apache2.dll into Modules 
>config the service doesn't start. Why? Some help?
>
>Thanks
>
> 
>
>Reynier Pérez Mira
>
>3ero. Ing. Informática
>
>Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy. 
>
> 
>
>
>  
>

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



RE: [PHP] Re: Php defense

2005-04-22 Thread Chris W. Parker
Matthew Weier O'Phinney 
on Friday, April 22, 2005 7:39 AM said:

> I'm not allowed to say what company it's for, but we just finished
> building a site for a Fortune 50 company.

But what you could do is create an anonymous account somewhere, let's
say @hotmail.com, and THEN post the name of the company. ;)

Make sure you do this on a computer that allows anonymous access, like,
a friend's house! :)

But then again I guess you'd have to kill all of us...

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



[PHP] problem with the pager class not found

2005-04-22 Thread Tomás Rodriguez Orta
Hello friends
 I  try to use the packet pear, but I have a big problem, the IE show me the
 following Error.
  Fatal error: Class 'Pager' not found in D:\Angerona\paginas\1.php on line
9
 require 'Pager.php';
 the line 9 --->$pager = new Pager($res, $from, $limit);
 somebody can help me?

 why the class Pager not found if I include_path at the file php.ini?

 PD: I use php over windows.

 best regards TOMAS



-
Este correo fue escaneado en busca de virus con el MDaemon Antivirus 2.27
en el dominio de correo angerona.cult.cu  y no se encontro ninguna coincidencia.

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



[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] URL encoding in XSL - Yes, a PHP question

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 3:18 pm, Brian Dunning said:
> All the resources I've found on the web for URL encoding values within
> an XSL stylesheet are either .NET or Java, so I'm looking for some help
> with how to do this using PHP's special flavor of XML/XSL.
>
> Within the XSL doc, I've got:

Didja search the manual?

http://php.net/urlencode



> 
>  href="http://www.anrdoezrs.net/click-1692198-5463217?loc={$ItemLink}";>
>
> and $ItemLink needs to be URL encoded. How do I do this on my PHP box?
> Sorry no Java or .NET available...   :)



-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] MSSqlServer table/field information (Solved, kinda)

2005-04-22 Thread Chris Boget
> Look into the INFORMATION SCHEMA views in SQL Books Online for a
> starting point.

Excellent tip!  Thanks.  With the help provided by everyone who
replied, I came up with the following:

Query to get the primary key(s) for a table

  sp_pkeys @table_name=''

Query to get the column names for a table

  sp_columns @table_name=''

Query to get the constraints on the columns of the table

  SELECT 
  INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.COLUMN_NAME,
  INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.CONSTRAINT_NAME,
  INFORMATION_SCHEMA.CHECK_CONSTRAINTS.CHECK_CLAUSE
  FROM 
  INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
  INNER JOIN
  INFORMATION_SCHEMA.CHECK_CONSTRAINTS ON 
  INFORMATION_SCHEMA.CHECK_CONSTRAINTS.CONSTRAINT_NAME = 
  INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.CONSTRAINT_NAME
  WHERE 
  INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.TABLE_NAME = 
  N''
  

thnx,
Chris

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



Re: [PHP] PHP, Apache, Windows 2003

2005-04-22 Thread Ryan J. Cavicchioni
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
Hello,

What is the exact error message the Apache is giving you?

Reynier Perez Mira wrote:

> Hi list:
>
> Recently I installed Windows 2003 Server. Now I try to install
> Apache 2.0.48 and PHP 5.0.4. First I install PHP 5.0.4 from source
> binary to Win32 downloaded from www.php.net  .
> It's means that php5apache2.dll is include in this packet. Well
> when I try to config the httpd.conf file and put this LoadModule
> C:/PHP/php5apache2.dll into Modules config the service doesn't
> start. Why? Some help?
>
> Thanks
>
>
>
> Reynier Pérez Mira
>
> 3ero. Ing. Informática
>
> Entre más inteligente me siento, más me doy cuenta de lo ignorante
> que soy.
>
>
>
>
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: GnuPT 2.6.1.1 by EQUIPMENTE.DE
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFCaW0MTMDaAcJxvKgRAk8jAKCtLnKANk4dtI8RdiZnj8fVK8WWVgCdHBAy
HqIfkAkhh5fH/f/Bj70r8Xc=
=bQMO
-END PGP SIGNATURE-

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



Re: [PHP] image maps in PHP

2005-04-22 Thread John Coppens
On Fri, 22 Apr 2005 19:11:23 +0530
[EMAIL PROTECTED] (Dasmeet Singh) wrote:

> Actually I am not able to make image maps because of uneven state 
> boundaries..
> 
> Can you please suggest some tools... I haven't used any yet...

Did you check GIMP? It has an option to make HTML image maps. 
Check Filters|Web|ImageMap

John

> 
> Thanks
> 
> -
> Free Website Promotion - A Complete Guide
> http://hostwindow.info/web-hosting/9/free-website-promotion/1/
> 
> 
> Mike wrote:
> >>Hi!
> >>I need to create an image map on a country map, where people 
> >>can click on any state and get some info related to it.. In 
> >>such case the regular polygon/circle/rectengle image map wont 
> >>do bcoz of shapes of state..
> >>
> >>I guess this must be possible someway in PHP.. please tell me 
> >>if you have any idea how to go abt this..
> >>
> > 
> > Is the problem you're experiencing that the image map isn't being
> > built properly or are you passing information to it that does not
> > appear to be consistant.
> > 
> > If it's the former, then PHP has nothing to do with that. I'm sure
> > you can find some tools to generate image maps for you. There have
> > always been free ones with a minimum of effort. 
> > 
> > If you're having problem with PHP in the mix, can you describe the PHP
> > problem, provide some code, some sample output, etc.? 
> > 
> > I've used image maps in the past (though I try to stay away from
> > them) and you can create a link with virtually any polygon if you
> > have the patience to may out the plot points. You could easily create
> > a star with many, many points and have it be clickable - which would
> > indicate that most states would be a piece of cake. 
> > 
> > -M

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



[PHP] modify array data

2005-04-22 Thread Jon Aston
Is there a way to easily rotate array data?

what I want to do is
change from

bob | bill | frank
joe | jose | sam
sally | jim | kim

to
|  | | frank||  |
|  |bill | | sam|  |
|bob| | jose  |   | kim|
|  |joe| |jim   |  |
|  | | sally || |

is there an easy way to do this?
the data and arraysize will vary so I was looking for a way that I could
have php do it without having to make script for different array sizes.

Thanks

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



Re: Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 4:29 am, Richard Davey said:
> This isn't about redundancy, it's about enhancing the experience for
> customers physically located thousands of miles away from the server
> they are trying to access. So, bring the content closer to them and
> drop their wait times massively. It's easy for those of us sat on the
> end of cable connections to become complacent about this IMHO (i.e.
> "the Internet is fast enough now that you don't need to do this"), but
> in reality that's not really yet the case.

I believe, then, that you would best be served by focussing your search on
"mirroring" such as that done by, say, http://php.net

Seems to work well for them :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] image maps in PHP

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 6:41 am, Dasmeet Singh said:
> Actually I am not able to make image maps because of uneven state
> boundaries..
>
> Can you please suggest some tools... I haven't used any yet...

I was writing an on-line mapping tool that used PHP and let you outline
the regions for a given image.

Sort of "Indian Jones"-like (the mapping of the plane as he flew)

You'll probably find a nice one, but if not, you may want to consider
writing your own in PHP if the existing ones aren't that good.  It wasn't
that tricky.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Php defense

2005-04-22 Thread Joe Harman
 My 2 Cents > ASP is a Platform that supports a number of different
microsoft languages which includes ASP Javascript, ASP VBScript,
ASP.Net C# & ASP.Net VB ... ASP has a couple of good points to it...
most notably is that it is backed by the largest computer company out
there.. Microsoft... also, from my experience as a college level
instructor, they teach microsoft programming languages at the
colleges... there is nothing spectacular about the programming
languages that ASP supports that cannot be done with PHP... and I
should say that that is my opinion...

I know Yahoo & Google use PHP in some of their applications... also
Lufthansa (Airline) uses PHP... Vonage... Broadvoice.. the list goes
on...

Here is a few articles for you : 
http://www.zend.com/news/zendpr.php?id=89
http://www-306.ibm.com/software/data/info/zendcore/
http://www.gartner.com/DisplayDocument?doc_cd=126609
http://www.zend.com/developers.php
http://news.com.com/2100-1023-963937.html?tag=lh

Good Luck Pablo,
Joe

On 4/22/05, Pablo D Marotta <[EMAIL PROTECTED]> wrote:
> Hi there..
> I`m defending the language, but people here want to migrate to asp..
> They just keep on saying "php is not used for huge corporation solutions, 
> there
> asp goes better".
> 
> I know it isn´t correct, but I don´t know much about "well-known" websites
> using php technology. (I just don´t navigate enough time to know it)
> I think that could help a lot, since this people is highly influenced by that
> kind of facts.. (I mean, knowing that other companies trust this language to
> manage critical information).
> 
> Does anybody know/have any web-sites listing using php? If you only know a few
> of those, it could help me too.
> 
> Thanks in advance!!
> Pablo
> 
> American Express made the following
> annotations on 04/22/05 06:58:25
> --
> **
> 
> "This message and any attachments are solely for the intended recipient and 
> may contain confidential or privileged information. If you are not the 
> intended recipient, any disclosure, copying, use, or distribution of the 
> information included in this message and any attachments is prohibited. If 
> you have received this communication in error, please notify us by reply 
> e-mail and immediately and permanently delete this message and any 
> attachments. Thank you."
> 
> **
> ==
> 
> --
> 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] Re: reverse MD5 ???

2005-04-22 Thread Greg Donald
On 4/22/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> It's more like a theoretical "hole" that may some day prove to be the
> first step in a long long long process of understanding something that
> might maybe some day yield a way to de-crypt MD5.

That's exactly my point.

It's similar to how a local root exploit sometimes evolves into a
remote root exploit once publicized and people begin working on it.

Disclaimer: There are only about 5 or 6 people in the entire world who
know anything about encryption.. and sadly I am not one of them.


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



Re: [PHP] I need do paging in php, I use ODBC Access

2005-04-22 Thread Matthew Weier O'Phinney
* Jochem Maas <[EMAIL PROTECTED]> :
> Richard Lynch wrote:
> > On Thu, April 21, 2005 12:23 pm, Warren Vail said:
> > 
> > > The only approach left that I could come up with is to transfer the
> > > entire sequence set to your application, and count the rows, perhaps
> > > only displaying the rows you want to show.  This is obviously not very
> > > efficient (in fact, with enough rows it may prove impossible because of
> > > memory limitations), but it will produce what appears to be a paged
> > > result.
> > 
> > If this is the best answer your database software will let you come up
> > with, it's time to switch databases :-)
> > 
> > Fortunately, the databases that don't do "LIMIT" have this nifty thing
>
> I was under the impression that LIMIT was mySQL specific (although its
> quite likely that their use of the keyword and the ubiqitous nature of mySQL
> that other vendors have also adopted it.

Actually, LIMIT is in ANSI SQL.

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



Re: [PHP] Php defense

2005-04-22 Thread Petar Nedyalkov
On Friday 22 April 2005 16:58, Pablo D Marotta wrote:
> Hi there..
> I`m defending the language, but people here want to migrate to asp..
> They just keep on saying "php is not used for huge corporation solutions,
> there asp goes better".
>
> I know it isn´t correct, but I don´t know much about "well-known" websites
> using php technology. (I just don´t navigate enough time to know it)
> I think that could help a lot, since this people is highly influenced by
> that kind of facts.. (I mean, knowing that other companies trust this
> language to manage critical information).

Let's start with Yahoo ;-)
Google also uses PHP.
Etc.

>
> Does anybody know/have any web-sites listing using php? If you only know a
> few of those, it could help me too.
>
> Thanks in advance!!
> Pablo
>
>
>
> American Express made the following
>  annotations on 04/22/05 06:58:25
> ---
>---
> ***
>***
>
> "This message and any attachments are solely for the intended recipient and
> may contain confidential or privileged information. If you are not the
> intended recipient, any disclosure, copying, use, or distribution of the
> information included in this message and any attachments is prohibited. If
> you have received this communication in error, please notify us by reply
> e-mail and immediately and permanently delete this message and any
> attachments. Thank you."
>
> ***
>***
> ===
>===

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgp6ZdC0cT5EV.pgp
Description: PGP signature


Re: [PHP] Php defense

2005-04-22 Thread -k.
As i recall Yahoo uses PHP. Quick Google turned up:
http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm

Also i remember it was a pretty big deal when
Friendster switched to PHP. And the resulting
improvement in performance was pretty dramatic.
O'Reilly has a good article.
http://www.oreillynet.com/pub/wlg/5155

Google around some, especially on the Friendster
switch, which as I recall caused quite a stir, for
more information.




-k.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: [PHP] Repeat Accross, then down

2005-04-22 Thread Mark Rees
Use a counter when iterating through the results

When counter % (modulus) 3=0 then write a new row

Mark

-Original Message-
From: Simon Allison [mailto:[EMAIL PROTECTED] 
Sent: 22 April 2005 15:00
To: php-general@lists.php.net
Subject: [PHP] Repeat Accross, then down


Say for a photo album with photo paths taken from a database (or
anything from a database for that matter) how can you use PHP to repeat
across for three photos and then add a new row with the next 3 photos
and so on and so on?

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

E&OE

**
**


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



[PHP] Repeat Accross, then down

2005-04-22 Thread Simon Allison
Say for a photo album with photo paths taken from a database (or anything
from a database for that matter) how can you use PHP to repeat across for
three photos and then add a new row with the next 3 photos and so on and so
on?



[PHP] Php defense

2005-04-22 Thread Pablo D Marotta
Hi there..
I`m defending the language, but people here want to migrate to asp..
They just keep on saying "php is not used for huge corporation solutions, there
asp goes better".

I know it isn´t correct, but I don´t know much about "well-known" websites
using php technology. (I just don´t navigate enough time to know it)
I think that could help a lot, since this people is highly influenced by that
kind of facts.. (I mean, knowing that other companies trust this language to
manage critical information).

Does anybody know/have any web-sites listing using php? If you only know a few
of those, it could help me too.

Thanks in advance!!
Pablo



American Express made the following
 annotations on 04/22/05 06:58:25
--
**

"This message and any attachments are solely for the intended recipient and may 
contain confidential or privileged information. If you are not the intended 
recipient, any disclosure, copying, use, or distribution of the information 
included in this message and any attachments is prohibited. If you have 
received this communication in error, please notify us by reply e-mail and 
immediately and permanently delete this message and any attachments. Thank you."

**
==

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



RE: [PHP] image maps in PHP

2005-04-22 Thread Mike
> Actually I am not able to make image maps because of uneven state 
> boundaries..
> 
> Can you please suggest some tools... I haven't used any yet...
> 
> Thanks
> 
> -

I just googled and came up with a bunch of results:
http://www.google.com/search?hl=en&lr=&q=free+imagemap+html+generator&btnG=S
earch

I haven't had to make any image maps in quite a few years, so I can't
personally recommend any. But I'm sure that the basic "point and click"
interface will be supported by many of the free utils you'll find on that
first results page.

Good luck

-M

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



[PHP] Re: Easy question about XML parsing

2005-04-22 Thread Jason Barnett
Brian Dunning wrote:
> I've been going through a number of easy XML parsing examples on the
> web, and they all have one thing in common: the XML is in a file, which
> they read in 4K chunks and parse.
>
> My application will be retrieving the XML from a web service, presumably
> like $xml = file_get_contents($url). I was assuming that I could parse
> the XML in memory using that $xml variable, but since NONE of the
> examples I've seen do this, I was wondering if it's a requirement that
> the XML be in a local file, and needing to do the 4K chunk thing.
>
> - Brian

Nope, if the stream will open and put data into $xml then you're fine.
It's not a requirement that the XML file is on the disk, just that it's
available to memory.

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


Re: [PHP] image maps in PHP

2005-04-22 Thread Dasmeet Singh
Actually I am not able to make image maps because of uneven state 
boundaries..

Can you please suggest some tools... I haven't used any yet...
Thanks
-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
Mike wrote:
Hi!
I need to create an image map on a country map, where people 
can click on any state and get some info related to it.. In 
such case the regular polygon/circle/rectengle image map wont 
do bcoz of shapes of state..

I guess this must be possible someway in PHP.. please tell me 
if you have any idea how to go abt this..

Is the problem you're experiencing that the image map isn't being built
properly or are you passing information to it that does not appear to be
consistant.
If it's the former, then PHP has nothing to do with that. I'm sure you can
find some tools to generate image maps for you. There have always been free
ones with a minimum of effort. 

If you're having problem with PHP in the mix, can you describe the PHP
problem, provide some code, some sample output, etc.? 

I've used image maps in the past (though I try to stay away from them) and
you can create a link with virtually any polygon if you have the patience to
may out the plot points. You could easily create a star with many, many
points and have it be clickable - which would indicate that most states
would be a piece of cake. 

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


RE: [PHP] image maps in PHP

2005-04-22 Thread Mark Rees
Oh, funnily enough I did a similar thing for India as well for a cricket
website, but only based on test match venues. 

You should be able to find something, try government websites etc. 

Good luck

-Original Message-
From: Dasmeet Singh [mailto:[EMAIL PROTECTED] 
Sent: 22 April 2005 14:34
To: Mark Rees
Subject: Re: [PHP] image maps in PHP


Mark Rees wrote:
> Yes, I once did this for all the states in Brazil. It took me a few 
> hours to trace the states, but it looked beautiful when it was 
> finished. This will already have been done for the states many times -

> you could probably borrow someone else's work and scale it up or down 
> a bit if it doesn't fit.
> 
> Mark
> 
> -Original Message-
> From: Mike [mailto:[EMAIL PROTECTED]
> Sent: 22 April 2005 14:16
> To: php-general@lists.php.net
> Subject: RE: [PHP] image maps in PHP
> 
> 
> 
>>Hi!
>>I need to create an image map on a country map, where people can click

>>on any state and get some info related to it.. In such case the 
>>regular polygon/circle/rectengle image map wont do bcoz of shapes of 
>>state..
>>
>>I guess this must be possible someway in PHP.. please tell me if you 
>>have any idea how to go abt this..
>>
> 
> Is the problem you're experiencing that the image map isn't being 
> built properly or are you passing information to it that does not 
> appear to be consistant.
> 
> If it's the former, then PHP has nothing to do with that. I'm sure you

> can find some tools to generate image maps for you. There have always 
> been free ones with a minimum of effort.
> 
> If you're having problem with PHP in the mix, can you describe the PHP

> problem, provide some code, some sample output, etc.?
> 
> I've used image maps in the past (though I try to stay away from them)

> and you can create a link with virtually any polygon if you have the 
> patience to may out the plot points. You could easily create a star 
> with many, many points and have it be clickable - which would indicate

> that most states would be a piece of cake.
> 
> -M
> 

Thanks.. actually I found some maps for US states with image map done.. 
but I am looking for a map of India.. and still havent find any

-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

E&OE

**
**


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



Re: [PHP] image maps in PHP

2005-04-22 Thread Dasmeet Singh
Mark Rees wrote:
Yes, I once did this for all the states in Brazil. It took me a few
hours to trace the states, but it looked beautiful when it was finished.
This will already have been done for the states many times - you could
probably borrow someone else's work and scale it up or down a bit if it
doesn't fit.
Mark
-Original Message-
From: Mike [mailto:[EMAIL PROTECTED] 
Sent: 22 April 2005 14:16
To: php-general@lists.php.net
Subject: RE: [PHP] image maps in PHP


Hi!
I need to create an image map on a country map, where people
can click on any state and get some info related to it.. In 
such case the regular polygon/circle/rectengle image map wont 
do bcoz of shapes of state..

I guess this must be possible someway in PHP.. please tell me
if you have any idea how to go abt this..
Is the problem you're experiencing that the image map isn't being built
properly or are you passing information to it that does not appear to be
consistant.
If it's the former, then PHP has nothing to do with that. I'm sure you
can find some tools to generate image maps for you. There have always
been free ones with a minimum of effort. 

If you're having problem with PHP in the mix, can you describe the PHP
problem, provide some code, some sample output, etc.? 

I've used image maps in the past (though I try to stay away from them)
and you can create a link with virtually any polygon if you have the
patience to may out the plot points. You could easily create a star with
many, many points and have it be clickable - which would indicate that
most states would be a piece of cake. 

-M
Thanks.. actually I found some maps for US states with image map done.. 
but I am looking for a map of India.. and still havent find any

-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] image maps in PHP

2005-04-22 Thread Brian V Bonini
On Fri, 2005-04-22 at 09:14, Dasmeet Singh wrote:
> Hi!
> I need to create an image map on a country map, where people can click 
> on any state and get some info related to it.. In such case the regular 
> polygon/circle/rectengle image map wont do bcoz of shapes of state..


Poly will define any shape you need for the states in an image map.
You'll most likely want to use an image map program to generate it
though so you don't have to map all those coordinates out manually.

-- 

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] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Dasmeet Singh
Richard Davey wrote:
Hello Jochem,
Friday, April 22, 2005, 8:13:15 AM, you wrote:
JM> in a round about way he seems to be asking 'why'? which is not
JM> totally invalid.
To be honest when I ask people "why?" I actually use that word (or at
least something closely related to it).
JM> do you want/need a master/slave configuration
JM> or true decentralisation and/or two way syncing?
See my reply to Drewcore for far more detail which answers the above.
JM> sounds like a costly undertaking, not to be taken lightly... I'm
JM> interested to understand the requirement that dictates such server
JM> redundancy. Given the implied cost, planning/implementation should
JM> probably left to a company who already knows the answers to your
JM> questions :-/?
This isn't about redundancy, it's about enhancing the experience for
customers physically located thousands of miles away from the server
they are trying to access. So, bring the content closer to them and
drop their wait times massively. It's easy for those of us sat on the
end of cable connections to become complacent about this IMHO (i.e.
"the Internet is fast enough now that you don't need to do this"), but
in reality that's not really yet the case.
Best regards,
Richard Davey
I dont have much knowledge about this thing.. still isnt it possible to 
rsync the contents after you update your site? If this is possible in 
your case, then its quiet easy I guess.. sorry if I misunderstood :)

-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] image maps in PHP

2005-04-22 Thread Mark Rees
Yes, I once did this for all the states in Brazil. It took me a few
hours to trace the states, but it looked beautiful when it was finished.
This will already have been done for the states many times - you could
probably borrow someone else's work and scale it up or down a bit if it
doesn't fit.

Mark

-Original Message-
From: Mike [mailto:[EMAIL PROTECTED] 
Sent: 22 April 2005 14:16
To: php-general@lists.php.net
Subject: RE: [PHP] image maps in PHP


> Hi!
> I need to create an image map on a country map, where people
> can click on any state and get some info related to it.. In 
> such case the regular polygon/circle/rectengle image map wont 
> do bcoz of shapes of state..
> 
> I guess this must be possible someway in PHP.. please tell me
> if you have any idea how to go abt this..
> 
Is the problem you're experiencing that the image map isn't being built
properly or are you passing information to it that does not appear to be
consistant.

If it's the former, then PHP has nothing to do with that. I'm sure you
can find some tools to generate image maps for you. There have always
been free ones with a minimum of effort. 

If you're having problem with PHP in the mix, can you describe the PHP
problem, provide some code, some sample output, etc.? 

I've used image maps in the past (though I try to stay away from them)
and you can create a link with virtually any polygon if you have the
patience to may out the plot points. You could easily create a star with
many, many points and have it be clickable - which would indicate that
most states would be a piece of cake. 

-M

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

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

E&OE

**
**


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



RE: [PHP] image maps in PHP

2005-04-22 Thread Mike
> Hi!
> I need to create an image map on a country map, where people 
> can click on any state and get some info related to it.. In 
> such case the regular polygon/circle/rectengle image map wont 
> do bcoz of shapes of state..
> 
> I guess this must be possible someway in PHP.. please tell me 
> if you have any idea how to go abt this..
> 
Is the problem you're experiencing that the image map isn't being built
properly or are you passing information to it that does not appear to be
consistant.

If it's the former, then PHP has nothing to do with that. I'm sure you can
find some tools to generate image maps for you. There have always been free
ones with a minimum of effort. 

If you're having problem with PHP in the mix, can you describe the PHP
problem, provide some code, some sample output, etc.? 

I've used image maps in the past (though I try to stay away from them) and
you can create a link with virtually any polygon if you have the patience to
may out the plot points. You could easily create a star with many, many
points and have it be clickable - which would indicate that most states
would be a piece of cake. 

-M

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



[PHP] image maps in PHP

2005-04-22 Thread Dasmeet Singh
Hi!
I need to create an image map on a country map, where people can click 
on any state and get some info related to it.. In such case the regular 
polygon/circle/rectengle image map wont do bcoz of shapes of state..

I guess this must be possible someway in PHP.. please tell me if you 
have any idea how to go abt this..

Thanks in advance :)
-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Easy question about XML parsing

2005-04-22 Thread Brian Dunning
I've been going through a number of easy XML parsing examples on the 
web, and they all have one thing in common: the XML is in a file, which 
they read in 4K chunks and parse.

My application will be retrieving the XML from a web service, 
presumably like $xml = file_get_contents($url). I was assuming that I 
could parse the XML in memory using that $xml variable, but since NONE 
of the examples I've seen do this, I was wondering if it's a 
requirement that the XML be in a local file, and needing to do the 4K 
chunk thing.

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


Re: [PHP] Re: reverse MD5 ???

2005-04-22 Thread Dan Rossi
I don't think that's right.  Collisions allow certain kinds of
cryptographic attacks against things like MD5-based signatures but that
is not at all the same as being able to simply determine the original
message content from the digest.  Rather, they allow you to substitute
the original message with a different one which generates the same MD5
hash.  This may or may not be useful as an attack, depending on how MD5
is being used.

Anyone ever tried using ENCODE and DECODE functions in mysql ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Richard Davey
Hello Jochem,

Friday, April 22, 2005, 8:13:15 AM, you wrote:

JM> in a round about way he seems to be asking 'why'? which is not
JM> totally invalid.

To be honest when I ask people "why?" I actually use that word (or at
least something closely related to it).

JM> do you want/need a master/slave configuration
JM> or true decentralisation and/or two way syncing?

See my reply to Drewcore for far more detail which answers the above.

JM> sounds like a costly undertaking, not to be taken lightly... I'm
JM> interested to understand the requirement that dictates such server
JM> redundancy. Given the implied cost, planning/implementation should
JM> probably left to a company who already knows the answers to your
JM> questions :-/?

This isn't about redundancy, it's about enhancing the experience for
customers physically located thousands of miles away from the server
they are trying to access. So, bring the content closer to them and
drop their wait times massively. It's easy for those of us sat on the
end of cable connections to become complacent about this IMHO (i.e.
"the Internet is fast enough now that you don't need to do this"), but
in reality that's not really yet the case.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I do not fear computers. I fear the lack of them." - Isaac Asimov

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



Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Richard Davey
Hello Drewcore / Jochem,

Friday, April 22, 2005, 4:45:37 AM, you wrote:

D> are you talking about having one server in south america that acts
D> as your database server, one server in asia that's your web server,
D> and then another server in north america that servers some other
D> task?

Not really - the scenario is more like this:

There is a primary set of servers in the US (one web, one DB, one file
server) - this handles all the "master" content (in English) as well
as the user logins, shop, etc. Content is translated to several
languages which the user can pick from, the site handles this just
fine. This all exists now.

But a vast majority of our customers live in Europe, and smaller but
no less significant sets in Russia and Japan, so duplicating this
content across a set of servers physically located there would be
extremely beneficial for them (speed-wise) where they don't all live
on the end of ADSL/cable connections.

The question originally was the best way to ensure these slaves
provide the exact same content as the master does.

For example one approach could be to sync the content on a file level,
perhaps another is that when the master CMS is updated these changes
are then propagated to the slaves in sequence (i.e. something done
from the PHP code itself rather than on a system level). It's really a
form of load balancing I guess, but application design for this kind
of environment is inherently different to the "all sits on one box"
that most people only have to deal with.

Further digging around has revealed this book on the subject:

"Multi-Tier Application Planning with Php: Practical Guide for Programmers"

(which I've ordered). I also found slides by Theo Schlossnagle from his
Scalable Internet Architecture talk at ApacheCon this year. Both these
things are addressing the design issues I'm now faced with, I'm just
extremely surprised no-one here has encountered them before.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I do not fear computers. I fear the lack of them." - Isaac Asimov

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



Re: [PHP] I need do paging in php, I use ODBC Access

2005-04-22 Thread Jochem Maas
Richard Lynch wrote:
On Thu, April 21, 2005 12:23 pm, Warren Vail said:
The only approach left that I could come up with is to transfer the
entire sequence set to your application, and count the rows, perhaps
only displaying the rows you want to show.  This is obviously not very
efficient (in fact, with enough rows it may prove impossible because of
memory limitations), but it will produce what appears to be a paged
result.

If this is the best answer your database software will let you come up
with, it's time to switch databases :-)
Fortunately, the databases that don't do "LIMIT" have this nifty thing
I was under the impression that LIMIT was mySQL specific (although its
quite likely that their use of the keyword and the ubiqitous nature of mySQL
that other vendors have also adopted it.
anyway, many other DBs do implement an alternative in the form of FIRST, SKIP
keywords which effectively does the same as the LIMIT clause. (AFAICR
FIRST/SKIP is part of the SQL std)
called "CURSOR" which lets you kind of do the same thing.
At least, all the databases I know of.
Maybe something really stupid and broken like MS Access or something that
doesn't even claim to do SQL like, e, FileMaker???
Even there, I'll bet there's some better answer than pulling all the rows
down just to display a tiny fraction of them.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: reverse MD5 ???

2005-04-22 Thread trlists
On 21 Apr 2005 Greg Donald wrote:

> > Same thing with MD5, it
> > is just one way, it can't be reversed.
> 
> MD5 collisions were found last year:
> http://cryptography.hyperlink.cz/md5/MD5_collisions.pdf
> 
> Just a matter of time/cpu power.

I don't think that's right.  Collisions allow certain kinds of 
cryptographic attacks against things like MD5-based signatures but that 
is not at all the same as being able to simply determine the original 
message content from the digest.  Rather, they allow you to substitute 
the original message with a different one which generates the same MD5 
hash.  This may or may not be useful as an attack, depending on how MD5 
is being used.

--
Tom

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



Re: [PHP] reverse MD5 ???

2005-04-22 Thread trlists
On 21 Apr 2005 M Saleh EG wrote:

> It's simple. 
> If your system supports it performance wise. 
> Grab the id and compare it against the md5 version of the id saved in the 
> cookie.

Actually I think the discussion was about reversing the MD5 to get back 
the original message -- not about cookies or IDs.  What you are 
discussing is a different issue.

--
Tom

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



Re: [PHP] Re: reverse MD5 ???

2005-04-22 Thread Ryan A
Hey,

> I really
> wouldn't sweat this in terms of your day-to-day life/programming,
> other than to keep your code modular enough to replace "md5" with
> something else in the year 2020 or whatever.

Thats fine by me, by 2020 the spaceship would have landed and I will be
declared
sub ruler of planet earth before being taken to planet #Xgdwgd to rule...
BTW, I'm
recruiting sub-sub rulers for earth if anybodys intrested requirments
are: must be
able to PHP program using MySql as the DB...no oracle high class sh*t.


Cheers,
Ryan
P.S Just got up...feeling funny.



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 4/20/2005

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



Re: [PHP] Sorting table columns dynamically on normalized MySQL tables

2005-04-22 Thread Richard Lynch
On Wed, April 20, 2005 5:53 am, Leif Gregory said:
> So joining on four tables isn't considered bad practice?

No, it's great practice.

The only thing to watch for is just how *BIG* will the number of tuples grow?

If you can multiply together the number of rows in all four tables and
come up with << 1,000,000 you're fine.

If not, you have to start thinking about how you can get just the ones you
want for each query, and do it in such a way the MySQL never has to cope
with 1,000,000 rows at once.

Actually MySQL is quite happy to do 1,000,000 rows -- It's your hardware
that won't like it. :-)

So it really depends on what's *IN* the data, rather than the actual
number of tables.

Be sure you always get your WHERE clauses right.

One rule of thumb:

Work your way through all tables being joined from left to right:

FROM table1, table2, table3, table4, ...

For each tableX, make sure that you are relating it back to a previous
table, with an INDEXED key field in your WHERE clause with AND between
them:

WHERE table1.indexA = table2.indexB
  AND table2.indexC = table3.indexD
  AND table3.indexE = table4.indexE

It doesn't matter on table3 if you have it tied to table2 (as above) or
table 1 -- So long as the fields are indexed, and you can trace back from
every tableX to table1 *somehow*

But you wouldn't want just *this*

WHERE table1.indexA = table2.indexB
  AND table3.indexC = table4.indexD

You've got nothing to tie table3 and table4 back to table1, so every
single row in the 3/4 combination is going to be listed with every single
row with the 1/2 combination, in every possible permutation...

Try it with some very small (number of rows) tables just to see what happens!

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Replacement Question.

2005-04-22 Thread Richard Lynch
On Wed, April 20, 2005 7:22 am, Bob Palma said:
> I have a database field that I need to read and do some conversion on.
> Here is what the raw data from the database looks like:
>
> --
> 1084751309jpenaDisney Vignette Fleximon disk utilization
> alert C:\ at 85%1084799703bpalmafixed.1084799713bpalmaclosed
> --
>
> After conversion, it should look like this:
>
> --
> 5/16/2004 7:48:29 PM jpena
> Disney Vignette Fleximon disk utilization alert C:\ at 85%
>
> 5/17/2004 9:15:03 AM bpalma
> fixed.
>
> 5/17/2004 9:15:13 AM bpalma
> closed
> --
>
>
> I have tried to use eregi_replace to convert the timestamps to DateTime,
> but I end up with all three timestamps being changed to the same time
> (5/16/2004 7:48:29 PM).
>
> Here is the quick, albeit ugly, code I've tried to come close
>
> --
> $worklogt3 = eregi_replace("","", $worklogt1);
> $worklogt4 = eregi_replace("","", $worklogt3);
> $worklog = eregi_replace("[0-9]{10,10}",date("m/j/y g:i
>   a",$worklogt4),$worklogt4);
> --
>
> $worklogt1 is the value of the field from the database and the first two
> replacements are actually for different characters, even though they
> look the same.
>
> Can anyone help me with this?  I've been beating myself up for almost
> three days over this.

Your problem is that you are passing in all of $worklogt4 to the date
function, and that *BEGINS* with the first date/time, and that's what PHP
uses.

You need to FIRST break up your single line into separeate lines, based on
the 10-digit time-stamps.

Something like:
$lines = split('[0-9]{10,10}', $worklogt4);

But then I'm not sure you get to keep the date/time -- I never use split
much, myself...

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Need urgent help on post php long code

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 12:55 am, Pieter du Toit said:
> I have the following code:
> $result = mysql_query("SELECT users.user_first_name, users.user_last_name,
> users.user_cell, users.user_idnom, users.user_email, users.user_adres1,
> users.user_adres2, users.user_pcode, users.user_city, users.user_prov FROM
> users WHERE users.user_id = '$user_id'");
>
> extract($row);
>
> $ewal_result = mysql_query("SELECT DECODE(ewallet.ewal_pass,
> '{$config["password_password"]}') AS ewal_pass FROM ewallet WHERE
> ewallet.user_id = '$user_id'");
>
> extract($row);
>
> dprint($row);
>
> $Co_ID = $config["e_wallet"]["Co_ID"];
>
> $Outlet = $config["e_wallet"]["Outlet"];
>
> $transac = get_nextid($_SESSION["database"], "transacs", "tran_id",
> "tran");
>
> ! this is where i echo all my required vars to post, and i get a value
> for each, but when i post to the next form only $co_id and $outlet is
> posted
> !!

POST variables come from the HTTP interaction.

HTTP is stateless -- Nothing from one POST will get carried over to the
next unless *YOU* do something to make that happen.

You can pass them as HIDDEN INPUT, you can put them in your SESSION, you
can hire/train a squirrel to read them and repeat them, but they ain't
gonna get carried over unles YOU do it.

Neither $co_id nor $Outlet is POSTed.  You assign them in your script, so
of course they have values.

>
> echo "Admin testing";
>
> echo "coid = ".$Co_ID;
>
> echo "Outlet = ".$Outlet;
>
> echo "user_email = ".$user_email;
>
> echo "ewal_pass = ".$ewal_pass;
>
> echo "user_id = ".$user_id.$transac;
>
> echo <<< END

These other variables would work *ONLY* if you manage to transmit $user_id
(used in the queries above) from page to page.


> 
>
> 
>
> 
>
> 
>
> 
>
> 

Here you are passing two variables you're going to ignore anyway ($Co_ID
and $Outlet) and *NOT* passing $user_id you need in your queris, and,
well, I don't really know what you are trying to do with the other four
variables, but you've given me a headache. :-)

Sit down with a pencil and figure out exactly what data you need to
transmit from page to page, and what you can just lookup again, and where
the data will come from.

I say again:  POST data will not propogate itself. You MUST
store/propogate it in $_SESSION or as more hidden INPUT or propogate at
least the $user_id so you can look up their info again.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] view zip file contents

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 7:33 am, Sebastian said:
> does anyone know of a way to view the contents of a zip file and its
> directory structure?
> i know there are zip file functions in php but they require extra libs i
> would rather not load right now.
>
> i know its possible, at least by looking at this download manager that
> does
> this: http://phpatm.free.fr/
>
> i tried looking at the source code but its messy. nice app, but awful
> coding
> practice.
> anyway, if anyone knows a method to do this, please let me know.

http://php.net/exec

Not nearly as efficient as adding gzlib to your PHP, but maybe you only
need to do it occasionally...

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Count totals (might be 0T)

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 3:36 pm, Ryan A said:
> Hey,
> Thanks for replying.
> That means I will have to run a query per categorywhich I would like
> to
> avoid if possible as they could be
> a high amount of categories as they are user created and not defined by
> us.

 group by
cno";
  $cat_info = mysql_query($query) or die(mysql_error());
  $CATEGORY_COUNT = array();
  $CATEGORY_SIZE = array();
  while (list($cno, $count, $size) = mysql_fetch_row($cat_info)){
$CATEGORY_COUNT[$cno] = $count;
$CATEGORY_SIZE[$cno] = $size;
  }
?>

Only problem is that you could have a slight "timing" issue where the
select above gets done, then somebody adds a new image, and then you
display your counts, and then you display the list, and that extra image
is in the list, but not counted.

You *COULD* solve this by wrapping a transaction around the whole mess if
it's really critical, but you probably don't need it.



> Thanks,
> Ryan
>
>
> On 4/22/2005 12:08:31 AM, Drewcore ([EMAIL PROTECTED]) wrote:
>> run another sql query:
>> "select pic_size_kb from  where
>> pic_category='$current_category",
>> then make a loop that increments a)
>>
>> the total number of records (ie total number of pics in category), and
>>
>> then adds the pic size from each record to some variable (eg
>>
>> $total_kb) and then you have your total.
>>
>>
>>
>> hope that helps.
>>
>>
>>
>> drew
>>
>>
>>
>> On 4/21/05, Ryan A <[EMAIL PROTECTED]> wrote:
>>
>> > Hi again,
>>
>> > Am faced with a new problem (either that or working straight 10 hours
>> is
>>
>> > catching up!)
>>
>> >
>>
>> > Heres my table (easy to figure out so i wont waste your time
>> explaining
>> the
>>
>> > fields):
>>
>> > cno,
>>
>> > date_added,
>>
>> > pic_name,
>>
>> > pic_size_kb,
>>
>> > pic_desc_text,
>>
>> > pic_category
>>
>> >
>>
>> > the way i am displaying the data is like this (thanks to Phillip and
>> Andy
>>
>> > from this list)
>>
>> >
>>
>> >  __
>>
>> >  category here
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 4/20/2005
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Re: reverse MD5 ???

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 10:28 am, Ryan A said:
> Interesting reading, even though most of it went over my head :-)
> There ar'nt any tools freely available to the average joe to decypher a
> md5
> hash though...right?

No, there aren't.

And even the collisions found don't really mean much in the grand scheme
of things, from what I've read.

The worst-case scenario is that in a few years' time, more likely in MANY
years' time, somebody will figure out a way to use hardware not yet
available to crack MD5...  Even that is more likely to be "crack one out
of every 2 billion MD5 values" rather than crack any old MD5 they run
across.

I really wouldn't sweat this in terms of your day-to-day life/programming,
other than to keep your code modular enough to replace "md5" with
something else in the year 2020 or whatever.

>> MD5 collisions were found last year:
>> http://cryptography.hyperlink.cz/md5/MD5_collisions.pdf
>>
>> Just a matter of time/cpu power.

Maybe I'm mis-remembering the article and its implications, but I don't
think they can apply that to an arbitrary MD5 hash and reverse it to the
plain-text original...

It's more like a theoretical "hole" that may some day prove to be the
first step in a long long long process of understanding something that
might maybe some day yield a way to de-crypt MD5.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



RE: [PHP] I need do paging in php, I use ODBC Access

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 12:23 pm, Warren Vail said:
> The only approach left that I could come up with is to transfer the
> entire sequence set to your application, and count the rows, perhaps
> only displaying the rows you want to show.  This is obviously not very
> efficient (in fact, with enough rows it may prove impossible because of
> memory limitations), but it will produce what appears to be a paged
> result.

If this is the best answer your database software will let you come up
with, it's time to switch databases :-)

Fortunately, the databases that don't do "LIMIT" have this nifty thing
called "CURSOR" which lets you kind of do the same thing.

At least, all the databases I know of.

Maybe something really stupid and broken like MS Access or something that
doesn't even claim to do SQL like, e, FileMaker???

Even there, I'll bet there's some better answer than pulling all the rows
down just to display a tiny fraction of them.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Can I use $_REQUEST for file uploads?

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 12:48 pm, Srinadh Sannidhanam said:
> Hi
>   When I use $_REQUEST for accessing files uploaded, it is working
> fine in PHP PHP 4.3.10.
>  But it is not working in PHP 4.3.4.
>  $_FILES working in both the versions. Can I use $_REQUEST in PHP
> 4.3.10 also? Do I need to change any configuration in php.ini?
> server is Apache/2.0.49
> Please help me in this regard.

When $_REQUEST doesn't seem to work with file uploads, it almost always,
in my experience, means I forgot the ENCTYPE="multipart/form-data" on the
FORM tag.

D'oh!

I did that several times, over the years, before it became a habit to type
it for file uploads.

YMMV

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] I need do paging in php, I use ODBC Access

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 2:02 pm, chris said:
> You are right about MSSQL not having a limit, but here is an article that
> shows a work around
> http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=850&lngWId=5

Just use a cursor.

It's not that tricky.

Honest.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] PEAR Packages

2005-04-22 Thread Richard Lynch
On Thu, April 21, 2005 2:08 pm, Jason Barnett said:
> Correction: so I browsed the site a bit and maybe GTK2 is ready to go
> after all.  But I haven't used it at all so YMMV.

I think it's in early alpha.

Which is not quite ready to go, really, but a decade seems very pessimistic.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



RE: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Mark Rees
Be very careful with timezones. If you have dedicated servers with full
control over each one, you can simplify this by setting them all to the
same timezone. If not, you have a lot of work to do.

Mark

-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED] 
Sent: 22 April 2005 08:13
To: Richard Davey
Cc: php-general@lists.php.net
Subject: Re: [PHP] Re: 1 web site, 3 servers, 3 countries - best
practises?


Richard Davey wrote:
> Hello Satyam,
> 
> Thursday, April 21, 2005, 5:07:52 PM, you wrote:
> 
> S> My domain, satyam.com.ar, though supposedly in Argentina resides in

> S> Spain, where I currently live hundreds of kilometers away from it, 
> S> which I mention to point out that domain names do not correlate to 
> S> physical locations. Unless there is a political issue regarding who

> S> owns the actual machine and budgeting problems, I would rather keep

> S> just one server farm fed from multiple international locations.
> 
> No offense, but that entire post was completely useless with regards 
> to my original message.

in a round about way he seems to be asking 'why'? which is not totally
invalid.

> 
> This is nothing to do with domain names, I was simply asking if anyone

> had experience of handling one site spread across multiple remote 
> located servers from a PHP/SQL perspective (syncing content, user 
> accounts, etc).

I don't have any answers, but maybe some questions might be useful:

do you want/need a master/slave configuration
or true decentralisation and/or two way syncing?

what definition of 'seamless' have you been given?

what kind of content?

sounds like a costly undertaking, not to be taken lightly... I'm
interested to understand the requirement that dictates such server
redundancy. Given the implied cost, planning/implementation should
probably left to a company who already knows the answers to your
questions :-/?

anyway interesting problem you have before you!

> 
> Best regards,
> 
> Richard Davey

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

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

E&OE

**
**


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



Re: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Jochem Maas
Richard Davey wrote:
Hello Satyam,
Thursday, April 21, 2005, 5:07:52 PM, you wrote:
S> My domain, satyam.com.ar, though supposedly in Argentina resides in Spain,
S> where I currently live hundreds of kilometers away from it, which I mention
S> to point out that domain names do not correlate to physical locations.
S> Unless there is a political issue regarding who owns the actual machine and
S> budgeting problems, I would rather keep just one server farm fed from
S> multiple international locations.
No offense, but that entire post was completely useless with regards
to my original message.
in a round about way he seems to be asking 'why'? which is not totally 
invalid.
This is nothing to do with domain names, I was simply asking if anyone
had experience of handling one site spread across multiple remote
located servers from a PHP/SQL perspective (syncing content, user
accounts, etc).
I don't have any answers, but maybe some questions might be useful:
do you want/need a master/slave configuration
or true decentralisation and/or two way syncing?
what definition of 'seamless' have you been given?
what kind of content?
sounds like a costly undertaking, not to be taken lightly...
I'm interested to understand the requirement that dictates
such server redundancy. Given the implied cost,
planning/implementation should probably left to a company
who already knows the answers to your questions :-/?
anyway interesting problem you have before you!
Best regards,
Richard Davey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Leon Poon
I think he wants mirror, sort of...

I will do this if I were you:
Select the server wif the most bandwidth. Call this the master.
The other 2 are slaves.
To sync files:
==
Enable network file system server on the 2 slaves. Export the htdocs 
directories.

Setup the master to mount the exports.
Setup file monitoring tools (maybe fam?) on the master to copy new files to 
the mounted slave directories when alteration of files in htdocs is 
detected.

DO NOT instead mount exports of the master's htdocs on the slaves otherwise 
the slaves will be very slow in serving out files.

Of course, you have to enable security - things like IP 
restriction/encryption on the NFS.

To sync database:
=
Use database slaving tools?
If you are using MySQL, see 
http://mysql.hjc.edu.sg/doc/mysql/en/replication-intro.html. All updates 
from ANY server must be done at the master though.

Or you can just host the SQL server at the master. All queries goes to the 
master.


Hope this helps!

-Leon

- Original Message - 
From: "Drewcore" <[EMAIL PROTECTED]>
To: "php" 
Sent: Friday, April 22, 2005 11:45 AM
Subject: Re: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?


well, i guess it all depends...
are you talking about having one server in south america that acts as
your database server, one server in asia that's your web server, and
then another server in north america that servers some other task?
or are you talking about having a localized database, http, etc,
server for each location (read: continent/country)?
the first is easy... it'll all just mesh... the second is more difficult.
drew
--
dc .. drewcore.com
--
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