[PHP] PHP LICENCE

2002-06-15 Thread Kevin Waterson

Just how much can the php name be used in applications?

The license says
  3. The name PHP must not be used to endorse or promote products
 derived from this software without prior permission from the
 PHP Group.  This does not apply to add-on libraries or tools
 that work in conjunction with PHP.  In such a case the PHP
 name may be used to indicate that the product supports PHP.

So, we have applications such as phpnuke etc that use the php name
quite freely. Is this ok, or is it a breach of the license?

Can I call my application (written in php) phpAppName??

Is this descriptive that it supports php or is it using the php
name to promote the application??

I would really like some clarity on this.

Kind regards
Kevin

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




Re: [PHP] DOCUMENT_ROOT disappeared on me!

2002-07-02 Thread Kevin Waterson

On Mon, 1 Jul 2002 22:01:27 -0700
David E. Weekly [EMAIL PROTECTED] wrote:

 All,
 
 I upgraded from PHP 4.1.2 to 4.2.1 today along with revving Apache to 1.3.26
 from 1.3.22, and, woe is me, my $DOCUMENT_ROOT now evaluates to  on all of
 my PHP pages!

$_SERVER['DOCUMENT_ROOT']

Kevin
-- 
Kevin Waterson
Byron Bay, Australia

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




[PHP] PHP 4.3.0-dev and gd

2002-07-11 Thread Kevin Waterson

trying to get the built in gd to work without luck
I am using redhat and it has gd 1.8.4(or something)
but the newer compiled version does not seem to install.

I check with phpinfo and it just says 1.6.2 or higher
but none of the 2.* functions work so I assume the
new gd did not install. my config line looks like this..
./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr --with-ttf=/usr 
--enable-track-vars --enable-ftp --enable-imap --enable-ssl --enable-versioning 
--enable-trans-sid --enable-sysvsem --with-config-file-path=/etc --with-gd

kind regards
Kev

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




Re: [PHP] PHP 4.3.0-dev and gd

2002-07-11 Thread Kevin Waterson

On Thu, 11 Jul 2002 17:19:07 +0100
Danny Shepherd [EMAIL PROTECTED] wrote:

 You need to compile with GD2 if you want to use any of the 2.* functions in
 PHP - phpinfo will say 'GD 2.0 or higher'

I tried --with-gd2 but then I get no gd at all?
the included gd version is 2.0.1 but does not
seem to build from it.

Kevin

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




Re: [PHP] Re: PHP 4.3.0-dev and gd

2002-07-11 Thread Kevin Waterson

On Thu, 11 Jul 2002 15:32:30 -0700
Ricky Dhatt [EMAIL PROTECTED] wrote:

 You need to use --with-gd=php to use the built-in gd library.

yep, that got over that hurdle, I used the config line 
./configure --with-apxs=/usr/sbin/apxs  --with-mysql=/usr --with-ttf=/usr 
--enable-track-vars --enable-ftp --enable-imap --enable-ssl --enable-versioning 
--enable-trans-sid --enable-sysvsem --with-config-file-path=/etc --with-jpeg-dir=/usr 
--with-zlib-dir=/usr --with-gd=php

and I get an error...

 In function `php_imagettftext_common':
/php/dev/php-4.3.0/ext/gd/gd.c:2734: undefined reference to `gdttf'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

what am I missing now?

Kevin

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




[PHP] ob_start

2002-07-14 Thread Kevin Waterson

I wish to compress some data using
ob_start(ob_gzhandler);

I use 
if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],gzip)) {
 ob_start(ob_gzhandler);
} else {
  ob_start();
}
 but the compression is never used..
obstart is always used withouth the gz_handler
is there a way around this? or am I doing something
wrong here?

Kind regards

kevin

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




Re: [PHP] ob_start

2002-07-14 Thread Kevin Waterson

On Sun, 14 Jul 2002 10:35:13 -0400
John Holmes [EMAIL PROTECTED] wrote:

 Shouldn't gzip be in quotes, here?? The second argument to strstr...

indeed, that fixes that.. thanks

now, I have a problem with mozilla and netscape.
Although they both accept the  ob_start(ob_gzhandler);
netscape gives a comunication error, and mozilla just
a blank page, IE on the Mac however displays the output.

The blank page in mozilla is mentioned in the manual, but
how do get around this??

Kind regards
Kevin

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




Re: [PHP] Can someone check this mysql code

2002-05-19 Thread Kevin Waterson

On Mon, 20 May 2002 08:57:16 +1200
PhilipNZ Staff [EMAIL PROTECTED] wrote:

 My code below don't want to insert the code into the database what am I doing wrong?
 
 ?php
 
  $answers=$band, $middlename, $pot;
  $date=date (l dS of F Y h:i:s A);
  
  $sql = INSERT INTO `prizeline` (`id`, `email`, `name`, `address`, `answers`, 
`date`) VALUES ('', 'email', 'name', 'address', 'answers', 'date');;
 
 $result = mysql_query($sql);
 
 ?
 
 $sql = INSERT INTO prizeline (id, email, name, address, answers, date) VALUES ('', 
'$email', '$name', '$address', '$answers', '$date');

echo $sql;

$result=mysql_query($sql) or die (mysql_error());

Kevin

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




Re: [PHP] Function

2002-05-21 Thread Kevin Waterson

On Wed, 22 May 2002 00:48:24 -0300
Rodrigo [EMAIL PROTECTED] wrote:

 Hi guys I_m trying to use a function on na .inc file, how should I do?
  
 How should I write the function and what should I write on the file so
 that the function file is _Included_ to be used on a function call on
 the php file?

in the file you want to include, lets call it inc.php, put..
?php
function blah(){
echo 'blah';
?

then in your main file put
?php
// include the file
include(inc.php);

// now we can call the function normally just as if it was written 
// where the include statement is

blah();

?

ciao

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




[PHP] RecursiveArrayIterator

2007-07-22 Thread Kevin Waterson
When I run the code below, I get an output of the array which is good.
But the first member of the array output is 0=Array. Is there a way to
prevent this? eg:

0 -- Array
name -- butch
sex -- m
breed -- boxer
name -- fido
sex -- m
breed -- doberman
name -- girly
sex -- f
breed -- poodle


?php
$array = array(
array('name'='butch', 'sex'='m', 'breed'='boxer'),
array('name'='fido', 'sex'='m', 'breed'='doberman'),
array('name'='girly','sex'='f', 'breed'='poodle')
);

$iterator =  new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
while($iterator-valid())
{
echo $iterator-key().' -- '.$iterator-current().'br/';
$iterator-next();
}
?

Kind regards
Kevin

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

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



Re: [PHP] RecursiveArrayIterator

2007-07-22 Thread Kevin Waterson
This one time, at band camp, Nathan Nobbe [EMAIL PROTECTED] wrote:

Thanks for the response. 
I was hoping to avoid this sort of recursion within userspace and keep
it at a lower level. Should not the recursive iterator recurse so we
dont need to be using user defined functions?

 printArrayKeysRecursively($innerRecursiveArrayIterator); // handle printing

Kind regards
Kevin

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

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



Re: [PHP] RecursiveArrayIterator

2007-07-22 Thread Kevin Waterson
This is what I have so far.. 

?php
$array = array(
array('name'='butch', 'sex'='m', 'breed'='boxer'),
array('name'='fido', 'sex'='m', 'breed'='doberman'),
array('name'='girly','sex'='f', 'breed'='poodle')
);

$iterator =  new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
while($iterator-valid())
{
if(!$iterator-hasChildren())
{
echo $iterator-key().' -- '.$iterator-current().'br/';
}
$iterator-next();
}
?

Kevin

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

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



Re: [PHP] RecursiveArrayIterator

2007-07-23 Thread Kevin Waterson
This one time, at band camp, Jim Lucas [EMAIL PROTECTED] wrote:


 I don't get it, why not do this?

 foreach ( $array AS $row ) {
   foreach ( $row AS $k = $v ) {
   if ( ! is_array($v) ) {
   echo {$k} -- {$v}br/\n;
   }
   }
 }

 
 Maybe I am missing the point...  ???

Indeed, whilst your method is simplistic it leaves many copies of the array
dangling in memory. Every time you call foreach it creates a copy of the
array internally. SPL iterators do things differently and know only one
element at a time. More can be seen at 
http://phpro.org/tutorials/Introduction-to-SPL.html

so the final solution was using a foreach, however, using a foreach on an
SPL iterator object implicitly calls the inner iterator giving us all the
SPL goodness in memory savings.



Kind regards
Kevin



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

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



Re: Re[2]: [PHP] Better way to store data in memory?

2007-07-23 Thread Kevin Waterson
This one time, at band camp, Richard Davey [EMAIL PROTECTED] wrote:


 Afraid not, I'm performing deformation on the data that requires a
 temporary location before rendering to the final image.

you could use the pixel iterator in imagack extension

Kevin


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

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



[PHP] get domain component from email

2007-08-07 Thread Kevin Waterson
Hi all.

Im looking for a way to get the domain from an email address.
Not sub domains, just the domain, so 
[EMAIL PROTECTED] 
would return 
example.com.mn

similarly, the address [EMAIL PROTECTED] would return
example.com

perhaps an array of tld's, then strip the tld off the end and anything
before that and the next . is the domain?

also, somebody told me .co.uk was a tld, but I cannot see it listed
http://www.iana.org/root-whois/index.html

Kind regards
Kevin

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

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



Re: [PHP] Re: get domain component from email

2007-08-07 Thread Kevin Waterson
This one time, at band camp, Stut [EMAIL PROTECTED] wrote:


 Which brings me back to my earlier question of why would you want to do 
 this? I can't think of any reason, but then again it is getting late.

I would like to prevent registration of emails from certain domains that
abuse a forum. eg: foo.uy7f564d8d6d.com
These domains are registered by the thousands by spammers and because they
use dyndns it is impossible to use an IP block.

Banning the subdomain is pointless as this is easily changed and they may
re-register.

Kind regards
Kevin

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

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



[PHP] results to html table

2007-08-11 Thread Kevin Waterson
I wish to get a result set into a html table.
normally this is not a problem. 
But I wish to use one of the results as a heading.

Here is the data... ASCII art warning
++--+-+---+
| forum_group_id | forum_group_name | forum_type_name | forum_type_id |
++--+-+---+
|  1 | Administration   | Photography | 1 |
|  1 | Administration   | Site Issues | 3 |
|  1 | Administration   | Test| 4 |
|  2 | General  | Modelling   | 2 |
|  2 | General  | foo |10 |
|  2 | General  | bar |11 |
++--+-+---+
The goal is to produce HTML tables like this..
++
| Adninistration |
++
| Photography|
++
| Site Issues|
++
|Test|
++
++
|   General  |
++
|  Modelling |
++
| foo|
++
| Bar|
++

Kind regards
kevin

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

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



Re: [PHP] Reg.Photo Upload Tool

2007-09-07 Thread Kevin Waterson
This one time, at band camp, Ramesh.b [EMAIL PROTECTED] wrote:

 Hello,
 
 Any opensource or PHP applicaiton is available for Photo upload tool?.

http://phpro.org/examples/Multiple-file-upload.html

Kevin


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

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



Re: [PHP] Re: html2png

2007-09-08 Thread Kevin Waterson
This one time, at band camp, Al [EMAIL PROTECTED] wrote:
The Imagick php extension is at RC2 and like all beta ware,
should not be considered for a production environment.


 Imagick PHP extension, easiest, or Imagemagick command line using exec().
 
 Imagick to read a pdf and output it as a jpeg:
 
 header('Content-type: image/jpeg');
 $obj = new Imagick('x.pdf');
 $obj-SetImageFormat('jpeg');
 echo $obj;
 
 Your want to use montage, resizing and write the result to a file, etc.



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

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



Re: [PHP] Image Conversion...

2007-09-08 Thread Kevin Waterson
This one time, at band camp, Tony Di Croce [EMAIL PROTECTED] wrote:

 I need to convert (resize, and store as blob's in a mysql db) images my
 users can upload. I'm wondering what the best conversion tool is... I'm
 considering ImageMagick... Is this the best?
 
 Is their anything that is integrated with PHP itself?
 
   td
 

http://phpro.org/tutorials/Storing-Images-in-MySQL-with-PHP.html


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

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



Re: [PHP] Buxa Coding Guidelines

2007-09-08 Thread Kevin Waterson
This one time, at band camp, tedd [EMAIL PROTECTED] wrote:

 At 12:17 AM +0200 9/9/07, magoo wrote:
 Hi NG!
 
 Just wanted to see what you think of the strictness of Buxa, 
 according to their PHP guidelines:
 http://www.buxaprojects.com/en/php_coding_guidelines.htm
 
 In their oppinion stuff like the short PHP init ? or inline echo 
 ?= $var ? is forbidden.
 Do you people code that strict?
 
 I do.

me too, that sort of code is an abomination.
Short tags are not portable and should never have been introduced and
should not remain in php6

enjoy
Kevin

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

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



[PHP] str_replace oddity

2007-09-21 Thread Kevin Waterson
I am using str_replace to strip double quotes.

$string = 'This string has quotes in it';

$string = str_replace('', '', $string);

this seems to work, yet when I put the $string into mysql,
it uses backslashes to escape where the quotes were. The
double-quotes are gone, yet it still escapes the 'ghost'
where they were.

I even tried 
str_replace(array(\x8c, \x9c, ', ''), '', $string)
but the ghost remains and mysql continues to escape them.

I check the charsets, and the db is Latin-1 and the sting is ISO-8859-1

Any thoughts on this would be most graciously accepted.
Kind regards
kevin


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

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



Re: [PHP] GD to database directly

2006-07-11 Thread Kevin Waterson
This one time, at band camp, Jay Blanchard [EMAIL PROTECTED] wrote:


 1. Do not store images in a database, it is just a bad idea from a
 performance perspective (as has been covered many times heretofore). 

rubbish, has been proven other wise, you are quoting old wives tales
Please provide benchmarks to back this.

Kevin


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

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



Re: [PHP] GD to database directly

2006-07-11 Thread Kevin Waterson
This one time, at band camp, Austin Denyer [EMAIL PROTECTED] wrote:


 It is generally accepted that storing things like that in a database is
 a Bad Thing.  Much better to store the images as files and store the
 path in the database.

Storing paths and databases in slower than just storing images in the db
or simnply storing them on the server. You are making a db request and a
file system request. Rather than a single request to the db.
What is a file system if not a database?

Kevin


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

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



Re: [PHP] GD to database directly

2006-07-11 Thread Kevin Waterson
This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote:


 There may be other reasons you'd want to store binary data in an SQL 
 database, 
 but it will always be a performance hit over just passing a normal file that 
 can be streamed right off the disk to the server's NIC.

How much of  a performance hit?

Kevin

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

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



Re: [PHP] Startinga shell process with a life of its own

2006-07-11 Thread Kevin Waterson
This one time, at band camp, Daevid Vincent [EMAIL PROTECTED] wrote:
 
 I wish PHP would add threading. We write enterprise level products with PHP,
 and we end up using DBUS and letting Ruby do all the real work.

submit patch

Kevin

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

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



Re: [PHP] GD to database directly

2006-07-13 Thread Kevin Waterson
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote:


 It's coming FROM THE FILE SYSTEM.

databases can be stored on RAW partitions, thus eliminating FILE SYSTEM
overhead

Kevin

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

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



Re: [PHP] GD to database directly

2006-07-13 Thread Kevin Waterson
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote:


 You really need to TEST your assumption about the DB being faster.

Do you _really_ think I am speaking without testing any of this??
I once wrote an article on this very topic in PHP mag and published the 
benchmarks.

Kevin

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

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



Re: [PHP] GD to database directly

2006-07-13 Thread Kevin Waterson
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote:



 If you've benchmarked on YOUR hardware and have a proven savings,
 fine, post your tests and output.

Already done in previous threads.
nowhere do I say the db is faster than file system. Just that various methods 
of db access are
faster than others. I fail to see you point here? Do you have one?
I have simply asked a question of those debunking the idea of binary storage 
how much
of a performance hit do they think it takes, I have done _my_ homework, I 
wonder if
others have?
You are quick to ask for benchmarks. Where are yours?

Kevin

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

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



Re: [PHP] GD to database directly

2006-07-14 Thread Kevin Waterson
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote:


 I'm more concerned about the disaster recovery of a DB from a crashed
 hard drive, which has been cluttered up with binary data, making data
 recovery.

One of the greatest benifits of binary DB storage is a single point
of back up
mysqldump db_name  backup.sql -u username -p
It really is as simple as that and no need to bother about referential
integrity when rebuilding, simple
mysql db_name  back.sql -u username -p

How much easier does it get?
 
 Then your field storage size has to be large enough.

LONGBLOB

 Given the number of posts here in PHP-General alone, of people getting
 tripped up by these things, I have concluded that cramming images into
 the DB is far more trouble than it is worth.
 
 It *seems* like a Good Idea until you actually do it for awhile, and
 then run into all these snags.

Oddly enough, I have never run into them. Nor has terraserver which stores
hundreds of thousands of images in its db, although not mysql.

Kevin

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

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



Re: [PHP] Zend Studio, phpMyAdmin, and mysql.sock

2006-07-15 Thread Kevin Waterson
This one time, at band camp, Dave M G [EMAIL PROTECTED] wrote:
 
 Please understand that I was *hoping* for advice here, as Zend and PHP 
 are surely highly correlated. But I apologize if I came across as if I 
 *expected* answers.

You raise an interesting point. Whilst PHP uses the Zend Engine it is the
only Zend product in use as far as I know. Zend have an array of other
commercial products that are built with PHP, but are no different than
any other commercial venture.

Being that these products are commercial in nature, should not they
be supporting thier own products, rather than relying on the good
will of the open source/PHP folks for tech support? If we should support
Zend products, why not other commercial applications also?
Is Zend hoping for volunteer contributions for commercial enterprises?
Should we support Zend business partners also?


Kind regards
Kevin 

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

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



Re: [PHP] Zend Studio, phpMyAdmin, and mysql.sock

2006-07-16 Thread Kevin Waterson
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote:


 Zend has provided a great deal to the PHP community -- Zend basically
 pays Ze'ev and Andi (and more) to work about half their time on
 improving PHP Open Source code.

As an ex-Zend employee I find that they are maybe the only ones with this
arrangement. It is in the best interest of Zend to have the PHP language
pushed further and (dare I name the beast?) Web 2.0 to be able to push
thier line of products. What good is a PHP IDE without the PHP language?
 
I am not putting forward some anti insert commercial application here 
scenario,
but where do folks draw the line?

Kind regards
kevin


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

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



Re: [PHP] GD to database directly

2006-07-16 Thread Kevin Waterson
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote:
 
 Assume, for the sake of argument, that your hard drive crashed.
 
 And your backup tape was invalid.
 
 And the weekly backup tape is also invalid.
 
 And, for good measuere, the monthly tape is just so out-of-date, that
 recovering from the crashed hard drive actually looks like an
 attractive option.
In this scenario, it would not matter where your images were stored, however
it would be a simple matter of hot swapping one of the raid drives.

  LONGBLOB
 
 Not big enough.

4GB is big enough for any sane image

Kind regards
Kevin

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

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



Re: [PHP] xml v php question

2006-07-25 Thread Kevin Waterson
This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote:

 
 The correct answer is (b).  (PHP 6 won't even have short tags, so get used to 
 not having them.)

ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken

Kevin


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

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



Re: [PHP] PHP Frameworks - Opinion

2006-08-01 Thread Kevin Waterson
This one time, at band camp, Gabe [EMAIL PROTECTED] wrote:

 What's the common consensus as to a solid PHP framework to use for 
 application development?  There seems to be a number of them out there, 
 but I'm not sure which one's are the most robust, actively developed, 
 secure, etc etc.

If you want something solid and mature, you cant go past ezPublish and 
ezComponents

http://www.ez.no

Kevin


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

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



Re: [PHP] Help converting C to PHP

2006-09-21 Thread Kevin Waterson
This one time, at band camp, Tom Atkinson [EMAIL PROTECTED] wrote:

 Hello,
 
 I am attempting to convert this code for generating the digits of pi 
 from the original C (below) to PHP.

is this for codegolf?

Kevin

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

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



Re: [PHP] Help converting C to PHP

2006-09-21 Thread Kevin Waterson
This one time, at band camp, Curt Zirzow [EMAIL PROTECTED] wrote:

 what about using:
   php.net/pi
 
 note the precision description.
 
 or are we talking about a different pi.

The goal of the codegolf.com challenge is to print pi to 1000 places.
The programmer to do it in the least keystrokes is the winner.

Kevin

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

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



Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread Kevin Waterson

This one time, at band camp, Roman Neuhauser wrote:


BTW, here is my class:

class returnConfigParams
{

 var $a;
 var $b;
 var $c;
 var $d;


 function getMySQLParams()
  {
   include($_SERVER['DOCUMENT_ROOT']./properties.php);

   $values = array(0 = $a, 1 = $b, 2 = $c, 3 = $d);

   return($values);

 }

}


Why not a static method?
Create a config singleton and you can have an instance of your class
available anywhere by simply using

config::getInstance()


class config{

/*** Declare instance ***/
private static $instance = NULL;

/**
*
* the constructor is set to private so
* so nobody can create a new instance using new
*
*/
private function __construct() {
  /*** nothing to see, move along ***/
}

/**
*
* Return an array instance
*
* @access public
*
* @return array
*
*/
public static function getInstance() {

if (!self::$instance)
{
/*** set this to the correct path and add some error checking ***/
include($_SERVER['DOCUMENT_ROOT']./properties.php);
self::$instance = array($a, $b, $C);
}
return self::$instance;
}

/**
*
* Like the constructor, we make __clone private
* so nobody can clone the instance
*
*/
private function __clone(){
}

} /*** end of class ***/



Just a thought
Kevin

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



Re: [PHP] Job Opening

2006-10-26 Thread Kevin Waterson
This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote:

  My company is looking for a few good PHP programmers.
 8--- snip -
 
 As a follow-up, since several people have asked:
 ---8 --- snip -

How much??

Kevin

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

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



Re: [PHP] Microsoft Partners With Zend

2006-11-01 Thread Kevin Waterson
This one time, at band camp, Ed Lazor [EMAIL PROTECTED] wrote:

 ps...  I wonder if .NET will ever support PHP *GRIN*

or perhaps something to counter php-gtk... win32php

that would would be interesting

Kevin

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

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



Re: [PHP] OO website/program doubt

2006-11-01 Thread Kevin Waterson
This one time, at band camp, bruce [EMAIL PROTECTED] wrote:

 
 does php provide the ability to store objects in a session var

yes
http://phpro.org/tutorials/Introduction-to-PHP-Sessions.html#8

Kevin

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

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



Re: [PHP] Problem with PHP 5.2.0

2006-11-13 Thread Kevin Waterson
This one time, at band camp, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi. I just installed PHP 5.2.0 and I'm running into some strange problems.

xdebug

Kevin

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

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



Re: [PHP] Hide Warnings

2006-11-17 Thread Kevin Waterson
This one time, at band camp, Stein Ivar Johnsen [EMAIL PROTECTED] wrote:

 Hi..
 
 How can I hide Warning messages so they are not shown on screen..:

code properly...


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

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



Re: [PHP] PHP Programmers

2006-11-18 Thread Kevin Waterson
This one time, at band camp, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Does anyone know of a good website, which rates PHP programmers?  or Does
 anyone know of a good, trustworthy, reliable, and reasonably price
 programmer(s)?

You get to choose any two of the above only.

enjoy

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

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



Re: [PHP] multiple upload files?

2006-11-21 Thread Kevin Waterson
This one time, at band camp, Stut [EMAIL PROTECTED] wrote:

  Does anybody know if yes/no?

Quick example here...

http://phpro.org/examples/Mulitple-file-upload.html

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

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



Re: [PHP] Please hack my app

2006-11-22 Thread Kevin Waterson
This one time, at band camp, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:


 *** THIS IS NOT ABOUT HACKING THE SERVER ***
 But about getting in the application when you're not allowed to!

So, basically, you want _us_ to do _your_ bug checking??

Kevin

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

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



Re: [PHP] Please hack my app

2006-11-22 Thread Kevin Waterson
This one time, at band camp, Rory Browne [EMAIL PROTECTED] wrote:
 
 you can hire - Chris Shiflett.

BWAHAHAHAHAHAHAHH

I actually did laugh...


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

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



[PHP] New ImageMagick Extension

2006-12-24 Thread Kevin Waterson
Just what all long suffering image folks have been needing

http://phpro.org/phpdev/New-ImageMagick-Extension.html

When finished, this should be alot of fun.

K

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



[PHP] MS purchase Yahoo

2008-03-31 Thread Kevin Waterson
Did they finally do it or is April fools com early?

http://digg.com/business_finance/Microsoft_Purchase_Yahoo_For_62_Billion

K


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



Re: [PHP] MS purchase Yahoo

2008-03-31 Thread Kevin Waterson
On Mon, 2008-03-31 at 17:05 -0700, mike wrote:
 You are pathetic. Spamming your own fake digg article to your own fake
 news story and didn't even take the effort to host it on another
 domain?

BWHAHAHAHHAA

Thanks, nice reaction, made my day,
do you have more?

Kev




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



Re: [PHP] Dynamic dropdown lists (select)

2008-04-06 Thread Kevin Waterson
On Fri, 2008-04-04 at 12:51 +0200, Angelo Zanetti wrote:

 So there will be 2 dropdown lists. First one say gets (for example) a list
 of cars, 
 
 Then once the car is choosen the second list is populated with the list of
 models for the car choosen.


Try something like this-
http://phpro.org/tutorials/Creating-Dropdowns-with-PHP-and-Xajax.html

It gives you goodness you desire

Kevin


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



Re: [PHP] objects stored in sessions

2008-04-06 Thread Kevin Waterson
On Sun, 2008-04-06 at 11:02 -0400, Mark Weaver wrote:

 So, if I create a user object, set the properties of said user object 
 and store that object in the user session will that object be available 
 throughout the application from the session?


http://phpro.org/tutorials/Introduction-To-PHP-Sessions.html#8


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



Re: [PHP] IPv6 validation

2008-07-12 Thread Kevin Waterson
This one time, at band camp, Yeti [EMAIL PROTECTED] wrote:

 Now i was wondering of what there might be the best way to validate an IPv6
 address.

from this url..
http://phpro.org/tutorials/Filtering-Data-with-PHP.html#9

?php

/*** an IP address ***/
$ip = 2001:0db8:85a3:08d3:1319:8a2e:0370:7334;

/*** try to validate as IPV6 address ***/
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === FALSE)
{
echo $ip is not a valid IP;
}
else
{
echo $ip is valid;
}
?

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



Re: [PHP] IPv6 validation

2008-07-12 Thread Kevin Waterson
This one time, at band camp, Yeti [EMAIL PROTECTED] wrote:

 It will still take some time until every provider has PHP5 running, at least
 where I am from. I have many customers who want me to get their sites
 running on some cheap webspace they got along with their internet
 connection. Then you have to tell them it won't work because of some problem
 with the versions. I would love to write code for PHP5+ only.This is a 
 terrible excuse for using 

PHP 4. Today, July 13, marks 4 years since
the release of PHP 5.0. _4 YEARS_ to move applications and code to PHP5.

Its either apathy or incometence.
Kevin

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



Re: [PHP] PDO Question. Number of rows returned

2008-07-12 Thread Kevin Waterson
This one time, at band camp, Stephen [EMAIL PROTECTED] wrote:

 I am switching to PDO and can't find an equivalent to mysql_num_rows.
 
 Am I missing something silly?
 
 Or is there a change of thinking needed for PDO?
 
 How should I determine how many rows a query returned?

PDO returns an array, sizeof/count will get you home

Kevin
http://phpro.org

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



Re: [PHP] IPv6 validation

2008-07-13 Thread Kevin Waterson
This one time, at band camp, Per Jessen [EMAIL PROTECTED] wrote:

 No, it's a simple matter of need.  People also run apache 1.x, mysql 3.x
 etc.  There are still Linux 2.2 and 2.4 systems out there too.

4 years its been, thats incompetence.

Kevin

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



Re: [PHP] OpenID

2008-07-17 Thread Kevin Waterson
This one time, at band camp, Alex Chamberlain [EMAIL PROTECTED] wrote:


 Has anybody had any success implementing an OpenID server in PHP??

Sure, I had mine all set up on oceania.net and then the domain got
stolen. So, all my OpenID info went with it.. not as good an idea as
it first seems.


Kevin

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



Re: [PHP] OpenID

2008-07-18 Thread Kevin Waterson
This one time, at band camp, Per Jessen [EMAIL PROTECTED] wrote:


 I'm curious, how does a domain get stolen ? 
This is a process I am now looking in to. The domain was registered
via a reseller who I also had an email address with. The reseller had access to
to both my domain registration details, and my email address. With both of these
they were able to simply enact a transfer and intercept the mail agreeing to the
deal.

I now have documentary proof of this from the gandi and have contacted the 
Australian
Police regarding the matter. I am also trying to get the domain back via icann 
and
mediation, which has so far cost me over $1k.

Kevin

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



Re: [PHP] Why PHP4?

2008-07-30 Thread Kevin Waterson
This one time, at band camp, Richard Heyes [EMAIL PROTECTED] wrote:

 I'm interested - why are people still using PHP4? It's been over 4
 years (I think) - plenty of time to upgrade to five.

I asked that question and was called a troll...

Kevin

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



Re: [PHP] Web2.0 style tags - where to start?

2008-07-30 Thread Kevin Waterson
This one time, at band camp, Paul Jinks [EMAIL PROTECTED] wrote:

 Does anyone know of any good resources on building a tagging system? The
 video for now will be held on a normal LAMP machine as will everything
 else.

Tagging...
http://phpro.org/tutorials/Tagging-With-PHP-And-MySQL.html

Kevin

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



Re: [PHP] Using Ajax to populate a drop-down list

2008-08-08 Thread Kevin Waterson
This one time, at band camp, Don [EMAIL PROTECTED] wrote:

 Does anyone have an example of how to do this?


http://phpro.org/tutorials/Creating-Dropdowns-with-PHP-and-Xajax.html

enjoy,

Kevin

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



Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-20 Thread Kevin Waterson
This one time, at band camp, V S Rawat [EMAIL PROTECTED] wrote:

 Sorry for bothering the rest of you. I hope you wouldn't really mind if
 some of our colleagues who are doing such a lovely volunteer work here
 get to earn some money for a bottle of beer and more. Rest assured that
 it is no fraud/ scam/ cheating. I am very much here to take the brickbats.

Oh my.. You will upset the list gods and guru's.
There will follow from this at least 50 mails saying how bad you are, followed
by a bunch of pedants that will pick holes in their arguments.

If you need some help, just drop me a mail

Kind regards
Kevin

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



Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-21 Thread Kevin Waterson
This one time, at band camp, Robert Cummings [EMAIL PROTECTED] wrote:

 Your assumption that this will occur is clearly based on false
 presumptions. For instance you assume that what has happened before will
 happen again. Secondly, your assertion that there are pedants waiting to
 pick apart poorly thought out arguments is baseless. Lastly, you forgot
 to send in your dues to the list to ensure unmolested posting of
 ridiculous statements.
 
 Please return to your rock and draw up another strategy to offend the
 list.

See what I mean?

Kevin

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



Re: [PHP] Regex for email validation

2008-08-27 Thread Kevin Waterson
This one time, at band camp, Yeti [EMAIL PROTECTED] wrote:

 ?php
 # this one worked fine for me, but it does not cover the full RFC
 like: name [EMAIL PROTECTED] OR name [EMAIL PROTECTED]
 $regex = 
 ^[a-z0-9,!#\$%'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%'\*\+/=\?\^_`\{\|}~-]+)[EMAIL
  PROTECTED](\.[a-z0-9-]+)*\.([a-z]{2,})$;
 if (eregi($regex, $email)) {
  // do something
 }
 # Beware that the filter functions only work under PHP5+. If your PHP
 supports them they should be the preferred choice
 ?

There is no silver bullet regex to validate all RFC compliant email address.
Many have tried, but they all fail at some point. The best you can do is
cater to most _sane_ addresses.

And when the domain name space is opened up, well, you will back to strpos() 
and @

Kevin

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



Re: [PHP] Recursive Iteration over a collection of objects

2008-09-08 Thread Kevin Waterson
This one time, at band camp, David Lidstone [EMAIL PROTECTED] wrote:


 which with hindsight is completely illogical! I also wasn't aware of the 
 constants. Is there a simple tutorial / docs you know of for SPL? 

http://www.phpro.org/tutorials/Introduction-to-SPL.html

Kevin

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



Re: [PHP] ASCII Captcha

2008-09-14 Thread Kevin Waterson
This one time, at band camp, tedd [EMAIL PROTECTED] wrote:

 I fixed the errors you spoke about except I could never get the 
 Graphic CAPTCHA to fail.
 
 Also, you're supposed to click the accessibility icon to get the 
 page to speak the number.

What if the user is deaf and blind? they are denied access?

Kevin

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



Re: [PHP] question about google maps

2008-11-09 Thread Kevin Waterson

This one time, at band camp, Sudhakar [EMAIL PROTECTED] wrote:

 hi
 
 how do i go about displaying an address which appears on google maps for a
 business on a web page.
 
 what are the steps.
 
 if some one knows about this please let me know.

http://www.phpro.org/classes/Phproogle.html

and some docs at

http://www.phpro.org/classes/Phproogle-Docs.html

example code can be found at
http://www.phpro.org/examples/Google-Maps-With-PHP-And-Phproogle.html


Kevin


-- 
This email message (and any accompanying file attachments) may contain 
confidential or privileged information and is intended for the sole use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible for delivering this message to the intended recipient, please 
notify [EMAIL PROTECTED] immediately and destroy any copies of the original 
message.


Any unauthorised review, use, alteration, disclosure or distribution of this 
email (including any attachments) is prohibited.

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



Re: [PHP] Days until Easter and Christmas

2008-11-18 Thread Kevin Waterson
This one time, at band camp, tedd [EMAIL PROTECTED] wrote:

 Easter lands on different dates depending upon several different 
 factors. For example in Canada it's the day after it is in the USA -- 
 I guess Canadians are slower, eh?  :-)
 
 Also, in some religions the date is the full-moon after the Equinox 
 and not a specific date. Furthermore, the Equinox does not always 
 land on March 21, but sometimes it's March 20 (leap year).

So, the key is to find the date of the Vernal Equinox, which as you say,
does not always land on March 21. However, every 400 years, it does happen
on March 21 7:30am GST. From there, we can derive a base for future dates.
Every 4th year is a leap year, and every 4th century, giving 97 leap days
each 400 years. so (365*400+97)/400 is 365.2425 gives the length of each year.
Then the dates can be calculated as follows:

http://phpro.org/examples/Get-Vernal-Equinox.html

Any improvements welcomed

Kind regards
Kevin

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



Re: [PHP] store class zithin session

2008-11-20 Thread Kevin Waterson
This one time, at band camp, Alain Roger [EMAIL PROTECTED] wrote:

 Hi,
 
 i have a class and i would like to store it zithin session.
 i was thinking to use serialize/unserialize but it does not work.

http://www.phpro.org/tutorials/Introduction-To-PHP-Sessions.html#8

Kevin

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



Re: [PHP] Job opportunity in Denver, CO - Jr. PHP developer needed

2008-12-05 Thread Kevin Waterson
This one time, at band camp, Nick Gasparro [EMAIL PROTECTED] wrote:

 The perfect candidate will possess the following skills:
 * Serious OO design background
 * PHP5 (this will be your primary language, though you can learn it on 
 the job )
 * Strong database design skills (MySql experience preferred)
 * Love of open source development and standards-based development
 * Expert understanding of JavaScript, XHTML, and the DOM
 * Strong communication skills and able to multi-task and project manage 
 well --

Hmm, all of this, I thought you wanted a Junior developer...

Kevin

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



Re: [PHP] A MySQL Question

2008-12-07 Thread Kevin Waterson
This one time, at band camp, tedd [EMAIL PROTECTED] wrote:


 In any event, the interviewer asked me how long I've been using MySQL 
 and I replied several years. After which she asked a single question, 
 which was What does EXIST mean?
I only ever use it in rollbacks to check if a table exists. Not sure if
it has another purpose...


 I've read that the common way is to say My Squell, or something 
 like that. But I always sounded out each letter, such as My S-Q-L. 
 The interviewer pronounced it the same as I, but I have heard others 
 say it differently.

Only a barbarian would call it Sequel or anything other than
My S. Q. L MY ESS KEW ELL

Kevin

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



Re: [PHP] Dates and Mysql

2008-12-10 Thread Kevin Waterson
This one time, at band camp, VamVan [EMAIL PROTECTED] wrote:

 I was wondering how is it possible for me to query the table to retrieve all
 the records that are one week less than the time stamp?


SELECT DATE_SUB(date_time_column, INTERVAL 1 WEEK) FROM your_table;
http://www.phpro.org/tutorials/Introduction-to-PHP-and-MySQL.html#45

Kevin

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



Re: [PHP] First PHP program

2008-12-13 Thread Kevin Waterson
This one time, at band camp, Anwarulhaq anwarulha...@gmail.com wrote:

 I am working on MS.net.But now i days i want to work on PHP. I dont know the
 basis of PHP. Can any one guide me how i have to start with PHP and which
 editor i should use. Also the links of useful sites for help in PHP. I shall
 be thankful.

have a look at phpro.org and for an editor, well vi(m) of course ;)
set yourself a project to make something, start coding, and ask lots
of questions.

Kevin

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



Re: [PHP] Image Resizing

2008-12-21 Thread Kevin Waterson
This one time, at band camp, Stephen Alistoun stephenalist...@gmail.com wrote:

 
 I want all the images to resize to 100px width but the height adjusts
 automatically.


Two ways, GD or Imagick

http://www.phpro.org/examples/GD-Thumbnail-Based-On-Image-Type.html

http://www.phpro.org/tutorials/Imagick.html#4

Kevin

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



Re: [PHP] RSS Feed on my PHP site

2009-01-06 Thread Kevin Waterson
This one time, at band camp, DanBarker85 danbarke...@hotmail.co.uk wrote:

 
 Hi
 
 i'm new to RSS Feeds, but how would it be possible to have a BBC News Feed
 added to my website?
 
 I've searched for some kind of tutorial but haven't found anything.

http://www.phpro.org/classes/Rss-Class.html

enjoy
Kevin

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



Re: [PHP] Zend (or other) Framework...where to start?

2009-01-15 Thread Kevin Waterson
WRT Frameworks..
before I rant, I should declare myself as an ex-consultant to Zend.

I have used most of the more popular frameworks, and in my current employment
am using Zend Framework.

All of the frameworks I have used, have had some good features, and some 
poorly implemented ones. This, I beleive comes from people trying to make
the application all things to all people to fit all applications. This will
never happen, at some time, you need to code for yourself, which is why many
developers develop their own frameworks from the ground up, myself included.

Symphony I did not like at all, but it has a nice modular api, which CodeIgnitor
I spent nearly a year on a project and eventually came to be familiar with its
nuances. The good documentation of CI and examples I found refreshing.

Symphony, Cake, CI etc all have a single commong feature, they are not Zend.
Not that the Zend Framework is a total peice of crap ... mostly, but seems to
be the product of a tortured development process where comprimises have been
made by a committee.

Although not strictly part of the framework, Zend Form would have to be the 
biggest waste of time I have come across. Abstracted to the point of 
un-usability.
Much simpler/easier to write a HTML form.

A framework is not so much a tool to make your development faster, although this
will be the case, it is a tool to make your development constant. This means you
can easily, and rapidly deploy applications as you are familiar with the tool. 
The
speed of development comes as you become more familiar with the environment you 
are
developing in.

Try any of the frameworks, or write you own, just avoid Zend.

Kevin

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



Re: [PHP] print a to z

2009-01-15 Thread Kevin Waterson
This one time, at band camp, Leon du Plessis l...@dsgnit.com wrote:

 I used that notation before, and it did not work 100%. 
 Adapt as follows:
 
 for ($i = 'a'; $i = 'z'; $i++)
 if ($i == aa) break; else echo $i;
 


foreach(range('a', 'z') as $letter ) { echo $letter; }

Kevin


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



Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Kevin Waterson
This one time, at band camp, mike mike...@gmail.com wrote:

 On Fri, Jan 16, 2009 at 10:58 AM, mike mike...@gmail.com wrote:
 
  only if it's parseable xml :)
 
 
 Or not! Ignore me. Supposedly this can handle HTML too. I'll have to
 try it next time. Normally I wind up having to use tidy to scrub a
 document and try to get it into xhtml and then use simplexml. I wonder
 how well this would work with [crappy] HTML input.

$dom-loadHTML($html)

Kevin

http://phpro.org

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



Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Kevin Waterson
This one time, at band camp, Eric Butera eric.but...@gmail.com wrote:

 
 You could also use DOM for this.
 
 http://us2.php.net/manual/en/domdocument.getelementsbytagname.php

http://www.phpro.org/examples/Get-Links-With-DOM.html


Kevin

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



Re: [PHP] What's the best way to rotate, resize, and thumbnail?

2009-01-17 Thread Kevin Waterson
This one time, at band camp, Al n...@ridersite.org wrote:

 Imagick class.  Has more image manipulating functions than you'll ever use. 
 You 
 name, and there's function to do it.

http://www.phpro.org/examples/Create-Thumbnail-With-GD.html
http://www.phpro.org/examples/GD-Thumbnail-Based-On-Image-Type.html
http://www.phpro.org/examples/Imagick-Thumbnail-From-Center.html

but _do_ checkout imagick it has all the good toys
http://www.phpro.org/tutorials/Imagick.html

Kevin

http://phpro.org

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



Re: [PHP] New PHP User with a simple question

2009-01-25 Thread Kevin Waterson
 
  Sorry, I am also new to the etiquette of these mail lists.

Hope this will get you started,

http://www.phpro.org/tutorials/Introduction-to-PHP-templating.html

Kevin

http://phpro.org


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



Re: [PHP] Re: frameworks

2009-01-30 Thread Kevin Waterson
On Fri, 2009-01-30 at 18:03 -0600, Shawn McKenzie wrote:
  From what I could tell, this was
 the best RAD, however if you prefer to lay everything out your own way
 and do things your own way then probably CI or Zend.

I use Zend every day in my current employ.
It is like pulling teeth and its feature set is not as rich as
they would have you believe.
Zend DB is pathetic
Zend Form (although not from Zend itself) is abstraction for
abstractions sake and is mind numbingly complex.
The lack of a model loader is laughable.
The list goes but you get the point, this is supposed to be from
the makers of PHP and is supposed to be a mature framework and
ready for enterprise level applications.
What a joke.

but, just my $0.02
Kevin


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



Re: [PHP] paging

2009-02-09 Thread Kevin Waterson
On Tue, 2009-02-10 at 03:26 +, Jim Douglas wrote:

http://phpro.org/tutorials/Pagination-with-PHP-and-PDO.html
 
 
 
 
 Does anyone have a link to any examples of paging?


Kevin
http://phpro.org


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



Re: [PHP] Re: Automated Numerical Filenames for Directory

2005-07-30 Thread Kevin Waterson
This one time, at band camp, Smittie [EMAIL PROTECTED] wrote:

 Okay - figured it out and have it working now

What was your solution?

Kevin


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

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



Re: [PHP] How to show complete exception text?

2005-08-19 Thread Kevin Waterson
This one time, at band camp, Christopher J. Bottaro [EMAIL PROTECTED] wrote:

 Hi,
 
 When an exception propagates all the way up the stack frame and splatters
 itself on my webpage, most of the text is cut off!  This is completely
 useless.  I can see that there is an error, but I can't read the frickin
 error message.  How do I configure PHP to show the entire exception
 message?

not sure of your code, are you trying to do something like..
?php

try {
   lots of good code;
}

catch(Exception $e){
  echo 'oh my, and exception has been thrown'.$e-getMessage();
}
?

Kevin

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

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



Re: [PHP] Super globals ?

2005-08-20 Thread Kevin Waterson
This one time, at band camp, Jasper Bryant-Greene [EMAIL PROTECTED] wrote:

 Wong HoWang wrote:
  Hello, I want to know that is there any way to create a super global in PHP?
 
 Only with the runkit extension. Take a look:
 
 http://www.php.net/runkit

This is exactly what $_GLOBALS is for, why not use it?

Kevin

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

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



Re: [PHP] Super globals ?

2005-08-20 Thread Kevin Waterson
This one time, at band camp, Jasper Bryant-Greene [EMAIL PROTECTED] wrote:

 Because he asked for superglobals, not globals. $GLOBALS (not $_GLOBALS)
meh, force of habit
 happens to be an example of a superglobal.

and variable can be set within its scope, so why not use it?
As we see in the manual at $GLOBALS _is_ a super global and available
to all scopes within the script.
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.globals
it refers to $GLOBALS as  This is a 'superglobal', or automatic global, 
variable. 

gotta love the php manual
kevin

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

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



Re: [PHP] Files passing through

2005-08-22 Thread Kevin Waterson
This one time, at band camp, Evert | Rooftop [EMAIL PROTECTED] wrote:

 What is the fastest way to do this? I know 
 echo(file_get_contents('myfile')); is not a good idea ;)

Why not?

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

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



Re: [PHP] Files passing through

2005-08-22 Thread Kevin Waterson
This one time, at band camp, Philip Hallstrom [EMAIL PROTECTED] wrote:

 My guess would be because file_get_contents returns the contents as a 
 string.  So if 'myfile' is 100mb, you're going to have to allocate 100mb 
 of memory to store that string while echo() spits it back out.
 
 But I'm just guessing as I don't know for sure...

I think you got it, we really dont have enough information on what he
has in myfile.txt

Kevin

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

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



Re: [PHP] how to divide string

2005-09-05 Thread Kevin Waterson
This one time, at band camp, Adi Zebic [EMAIL PROTECTED] wrote:

 is there any magic function who can give me from:
 
 $string =  abcdefghijklmnopqrstuwvxyz;
 
 somthing like this:
 
 abcd
 efgh
 ijkl
 mnop
 qrst
 uwvx
 yz


$newstring=chunk_split($string, 4, 'br /');

Kevin

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

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



[PHP] SPL array filter

2005-09-08 Thread Kevin Waterson

Want to filter out cats from this array using SPL FilterIterator
$arr = array('koala', 'dingo', 'cat', 'Steve Irwin', 'fish');

kind regrards
Kevin

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

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



Re: [PHP] IS the list broken, or have I botched up somehow?

2005-09-09 Thread Kevin Waterson
This one time, at band camp, Jay Blanchard [EMAIL PROTECTED] wrote:

 I haven't seen a message for a week, since I changed jobs and e-mail
 addresses. I got a subscription confirmation. Can someone reply off-list to
 let me know if they have seen this? THanks!
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

Seems to be working

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

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



Re: [PHP] Convert a timestamp to RFC822??

2005-09-11 Thread Kevin Waterson
This one time, at band camp, Brian Dunning [EMAIL PROTECTED] wrote:

 I get my timestamp from the db in this format (I don't have control  
 over this):
 
 2004-05-14 13:24:48
 
 I need to convert it to RFC822 to make it a valid RSS pubDate field  
 like this:
 
 Wed, 02 Oct 2002 13:00:00 GMT
 
 How can I do that? I'm tearing my hair out here (what's left)...

SELECT *, DATE_FORMAT(yourdatecolumn,'%d, %m,%Y %h:%i %p') AS your_date FROM 
table

just change the %m options to suit the format you wish.
You will then have a field called your_date that you can access in your loop
like 
while($row=mysql_fetch_array($result))
{
echo $row['your_date'];
}

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

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



Re: [PHP] linux embedded no db which way

2005-09-14 Thread Kevin Waterson
This one time, at band camp, adriano ghezzi [EMAIL PROTECTED] wrote:

 guys hi all, quite new in this list
 I'm involved in a project with php in a linux embedded environment,
 it's impossibile to use a db server,
 any suggestion on how to handle few hundreds of simple records ?

sqlite.org
SQLite is also bundled with php5 making it totally l33t

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

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



Re: [PHP] PDO for PHP 4 (was Re: Quick Poll: PHP 4 / 5)

2005-09-15 Thread Kevin Waterson
This one time, at band camp, Manuel Lemos [EMAIL PROTECTED] wrote:


 The matter is that PDO does not offer real database independence, so
 application developers that want to not have to deal with the important
 aspects that are different among databases will still have to deal them
 in their applications making their applications non-portable.

The point of PDO is not to gain database independence, rather a very
real attempt to create a standard database interface for PHP. This
it succeeds in doing.

Kevin

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

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



Re: [PHP] email validation regex

2005-09-16 Thread Kevin Waterson
This one time, at band camp, bruce [EMAIL PROTECTED] wrote:

 hi..
 
 looking for a good/working/tested php email validation regex that conforms
 to the rfc2822 standard.

This will be fun, everybody has their own which is always best. No two people
will agree what is correct method and will always come with a 'better' one.
This is generally accompanied by derision and ridicule of the others.
To this end, I will start the ball rolling with this one...

preg_match('/[EMAIL PROTECTED],}\.[\w]{2,6}$/iU', $email)


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

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



Re: [PHP] pulling in template file in var and populating vars?

2006-03-23 Thread Kevin Waterson
This one time, at band camp, clive [EMAIL PROTECTED] wrote:

 You could also look at using a templating engine like Smarty for instance.

BHAHAHAHAHAHAHAAA
1000 lines of code for hello world



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

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



Re: [PHP] PHP Links

2006-03-25 Thread Kevin Waterson
This one time, at band camp, Thomas Bonham [EMAIL PROTECTED] wrote:

 I'm trying to find out how make following happen
 
 Example:
 http://www.example.com/test.php?id=20

in test.php put this code

?php echo $_GET['id']; ?

Kevin

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

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



Re: [PHP] microsoft PHP ?

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

 Zouari Fourat: lol, bet you feel silly now :)

Of course, the real give away in the original article on www.phpro.org was the
MS CEO Al Porfoli is an anagram of April Fool

Kevin


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

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



[PHP] GD to move to php.net

2006-04-04 Thread Kevin Waterson
This can only mean good things for PHP and GD development.
Hope to see some real improvements to the lib now
http://phpro.org/phpdev/GD-moving-home-to-PHP.html

K

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

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



  1   2   >