Re: [PHP] Re: header

2008-09-17 Thread mike
On Tue, Sep 16, 2008 at 11:40 PM, Micah Gersten <[EMAIL PROTECTED]> wrote:
> Wouldn't it be nice if in the $_SERVER array you could get the whole URL
> now that PHP has a parse_url function?

That actually would be a nice thing to have, instead of having to
build it yourself (considering people do it a variety of ways)

Although I think this would sum it up quite briefly:

$url = 'http';
if(isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on')
{ $url .= 's'; }
$url .= '//'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

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



Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Luke
What is it?

I'm only familiar with the MySQL tools such as Query Browser and Admin?

2008/9/17 Dax Solomon Umaming <[EMAIL PROTECTED]>

> Ross McKay wrote:
> > Posting this here, because a few people responded when I mentioned not
> > having a Linux-native data modelling tool. Apparently, MySQL Workbench
> > should be alpha-ready by end of the month...
>
> I've been waiting for this. I'm getting tired of DBDesigner4's bugs and
> all.
>
> --
> Dax Solomon Umaming
> http://blog.knightlust.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Luke Slater


Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Ross McKay
On Wed, 17 Sep 2008 09:00:45 +0100, Luke wrote:

>What is it?
>
>I'm only familiar with the MySQL tools such as Query Browser and Admin?

http://dev.mysql.com/downloads/workbench/5.0.html

In short, it's a data modelling tool. Such things are very handy for
designing and building databases, and usually also for documenting them.
If your DB has more than a handful of tables, it's well worth the
effort.
-- 
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin

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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Colin Guthrie

Ashley Sheridan wrote:

Would it be totally off topic if everyone were to say what their
favourite OS was and why? I'm just a little curious as to what OS's
people use in this field.


Well I've been using various flavours of Linux since uni where it was 
used in most to the labs. It was a RH version and as I started playing 
with it on my own PCs I opted for a RH derivative that gaining momentum 
at the time, Mandrake. I've been using it ever since with little forrays 
into Fedora, Ubuntu and Suse land. For me Mandriva is an ideal distro. 
It's secure, business orientated but still very desktop friendly. The 
people involved are excellent and the community is both very supportive 
and fun (similar feeling to this list).


For me a linux distro is not all about having the latest and greatest 
packages shoved at you whenever they are available. To me the job of the 
distro is to have defined cycles and defined distribution channels. 
While they have their place, having random repositories of packages is 
IMO not a good idea. Different people package things in different ways 
and with different names etc. which can make upgrading difficult when 
official packages conflict with third party ones.


So the Mandriva system for me works best. I can use happily in my home 
computing life and I can deploy it to the network of machines in my 
office without worry.


I have a lot of time of OSX, but I like to fiddle and break and be 
different, and OSX doesn't give me quite what I want in that respect.



Windows? Nah.


--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



Re: [PHP] Paypal Integration

2008-09-17 Thread Per Jessen
Richard Heyes wrote:

>> No, there are certain terms and conditions for using Google Checkout.
>> You  have to display their logo prominently, and they say they will
>> terminate accounts of anyone not adhering to these terms.
> 
> Hmm, might not be so bad. I would think a Google logo instils trust.
> 

Not necessarily.  Here in Switzerland, the federal data protection
agency has recently advised people to be careful with what data they
let Google handle (or not).  


/Per Jessen, Zürich


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



[PHP] ftp_pasv - question

2008-09-17 Thread jogisarge

hello @all,

i have to change my ftp connection in passive mode.
now i am not sure, where i have to place the ftp_pasv statement.
do i have to place it after ftp_connect or after ftp_login, or ...

i hope somebody can help me !

by jogi
-- 
View this message in context: 
http://www.nabble.com/ftp_pasv---question-tp19527773p19527773.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] Paypal Integration

2008-09-17 Thread Richard Heyes
> Not necessarily.  Here in Switzerland, the federal data protection
> agency has recently advised people to be careful with what data they
> let Google handle (or not).

How come? Presumably there has been something that caused that?

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

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



Re: [PHP] Paypal Integration

2008-09-17 Thread mike
On Wed, Sep 17, 2008 at 1:33 AM, Per Jessen <[EMAIL PROTECTED]> wrote:

> Not necessarily.  Here in Switzerland, the federal data protection
> agency has recently advised people to be careful with what data they
> let Google handle (or not).

Germany has also advised it's citizens to not use Chrome due to the
amount of data Google would be able to associate to someone by using
it...

Anyway. Google is getting per-transaction fees. I don't see why they'd
care about needing a logo on it. They're making money, they don't need
ads or anything.

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



Re: [PHP] Re: header

2008-09-17 Thread Nathan Rixham

Jochem Maas wrote:

Robert Cummings schreef:

On Tue, 2008-09-16 at 21:18 +0100, Nathan Rixham wrote:

Jim Lucas wrote:

Robert Cummings wrote:

On Tue, 2008-09-16 at 18:13 +0100, Nathan Rixham wrote:

I also meant:
define('PUBLIC_BASE_HREF' , 'http://php.net/')




and further thinking there has to be an easier / cleaner way of 
getting "http://"; / "https://"; in php..

What's wrong with $_SERVER['HTTPS'] ?

Cheers,
Rob.

my way

  if ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 
'off' ) {

$proto .= 's';
  }
  return $proto . '://';  # Adding the :// is optionial
}

echo get_http_protocol();

?>

That is about as simple as you can get.


lol this one's got my brain going; here's mine:




Just because 443 is the default HTTPS port, doesn't mean HTTPS is being
served over 443, nor does it mean HTTPS isn't also being served over
another port. This is less effective than using $_SERVER['HTTPS'].


although I hazard to offer the following as more complete:

function get_http_protocol()
{
$proto = 'http';
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && 
strtolower($_SERVER['HTTPS']) !== 'off') {

$proto .= 's';
   }

return $proto . '://';  # Adding the :// is optionial
}

because if $_SERVER['HTTPS'] happens to be false (which I don't think it 
ever should be) it
would cause the return value to be 'https://' which I don't think would 
be correct in that case
(even thought the case is theoretical and likely to indicate an engine 
problem if it did occur)




Cheers,
Rob.




thats funny about 8 back I said the same thing but in a define!

define('ACCESS_PROTOCOL', isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] 
? ( $_SERVER['HTTPS'] && strtolower($_SERVER['HTTPS']) != 'off' ? 
'https' : 'http' ) : 'http' . '://');


def the most complete/accurate way of doing it (same as the function)

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



Re: [PHP] Re: header

2008-09-17 Thread Nathan Rixham

Micah Gersten wrote:

Wouldn't it be nice if in the $_SERVER array you could get the whole URL
now that PHP has a parse_url function?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



off on a tangent.. I made this some time ago which is rather useful:

class url {

public $scheme = false;
public $host = false;
public $port = false;
public $user = false;
public $pass = false;
public $path = false;
public $query = false;
public $fragment = false;

public function __construct( $url = FALSE )
{
if( $url !== FALSE ) {
$this->load( $url );
}
}

public function load( $url )
{
if( is_string( $url ) && strlen( trim( $url ) ) ) {
if( ($tempSelf = parse_url( $url )) !== FALSE ) {
foreach( $tempSelf as $component => $value ) {
$this->$component = $value;
}
return TRUE;
}
}
return FALSE;
}

public function __toString()
{
if($this->scheme) {
$_string .= $this->scheme . '://';
}
if($this->user && $this->pass) {
$_string .= $this->user . ':' . $this->pass . '@';
}
if($this->host) {
$_string .= $this->host;
}
if($this->port) {
$_string .= ':' . $this->port;
}
if($this->path) {
$_string .= $this->path;
}
if($this->query) {
$_string .= '?' . $this->query;
}
if($this->fragment) {
$_string .= $this->fragment;
}
return $_string;
}

}

$url = new url('http://php.net/some.page');

echo $url;
echo $url->scheme;

etc.

Agreed though; it would be nice if PHP had gave access to all the 
properties in a simple UNIFIED way regardless of the http server 
software and protocol used.


$_SERVER['HTTP_REQUEST_SCHEME'] = 'http://';
$_SERVER['HTTP_REQUEST_HOST'] = 'php.net';
etc..

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



Re: [PHP] Paypal Integration

2008-09-17 Thread Per Jessen
Richard Heyes wrote:

>> Not necessarily.  Here in Switzerland, the federal data protection
>> agency has recently advised people to be careful with what data they
>> let Google handle (or not).
> 
> How come? Presumably there has been something that caused that?
> 

It was Google Chrome that prompted it, but at least in IT, people are in
general careful with what data they let pass through America or an
American corporation.  Especially when it's about money. 


/Per Jessen, Zürich


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



Re: [PHP] ftp_pasv - question

2008-09-17 Thread Wolf

 jogisarge <[EMAIL PROTECTED]> wrote: 
> 
> hello @all,
> 
> i have to change my ftp connection in passive mode.
> now i am not sure, where i have to place the ftp_pasv statement.
> do i have to place it after ftp_connect or after ftp_login, or ...
> 
> i hope somebody can help me !
> 
> by jogi

Sure, RTFM as it has examples right there!

http://us2.php.net/ftp_pasv

HTH,
Wolf

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



Re: [PHP] Paypal Integration

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 5:08 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:

> > Not necessarily.  Here in Switzerland, the federal data protection
> > agency has recently advised people to be careful with what data they
> > let Google handle (or not).
>
> How come? Presumably there has been something that caused that?
>
> --
> Richard Heyes
>
> HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
> http://www.phpguru.org/RGraph
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Anytime you bring google into the picture, there is are privacy concerns.
They've stated many times that privacy is lost anyway, so why bother with
it.  I don't think they're trying to do anything vindictive, but at the same
time, they're a bit more intrusive than the average person likes.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


[PHP] Making array to string

2008-09-17 Thread Hunt Jon
Hi, I'm new to PHP. I have an array that I would like to convert into a string.

For example, I have

array(
0 => "Good morning",
1 => "Good afternoon",
2 => "Good evening",
3 => "Good night"
);

Now I would like to convert the array to something like:

"Good morning Good afternoon Good evening Good night".

The result has concatanation of each value, but has one space between it.
If possible, I would like to insert something like "\n" instead of space.

I've been looking into various "array" functions, but I have no clue
where to start.

-J

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



RE: [PHP] Making array to string

2008-09-17 Thread Jay Blanchard
[snip]
Hi, I'm new to PHP. I have an array that I would like to convert into a
string.

For example, I have

array(
0 => "Good morning",
1 => "Good afternoon",
2 => "Good evening",
3 => "Good night"
);

Now I would like to convert the array to something like:

"Good morning Good afternoon Good evening Good night".

The result has concatanation of each value, but has one space between
it.
If possible, I would like to insert something like "\n" instead of
space.

I've been looking into various "array" functions, but I have no clue
where to start.
[/snip]

http://www.php.net/implode


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



Re: [PHP] Making array to string

2008-09-17 Thread Aschwin Wesselius

Hunt Jon wrote:

Hi, I'm new to PHP. I have an array that I would like to convert into a string.

For example, I have

array(
0 => "Good morning",
1 => "Good afternoon",
2 => "Good evening",
3 => "Good night"
);

Now I would like to convert the array to something like:

"Good morning Good afternoon Good evening Good night".

The result has concatanation of each value, but has one space between it.
If possible, I would like to insert something like "\n" instead of space.

I've been looking into various "array" functions, but I have no clue
where to start.
  

Hi,

This one is easy It wil 'blow' your mind...

$array = array(0 => 'Good morning', 1 => 'Good night');

$str = implode(chr(10), $array);


--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


Re: [PHP] Making array to string

2008-09-17 Thread Hunt Jon
Wow! Thanks all. It seems `implode` is what I wanted.

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



Re: [PHP] Making array to string

2008-09-17 Thread Eric Gorr


On Sep 17, 2008, at 8:54 AM, Hunt Jon wrote:

Hi, I'm new to PHP. I have an array that I would like to convert  
into a string.


For example, I have

array(
0 => "Good morning",
1 => "Good afternoon",
2 => "Good evening",
3 => "Good night"
);

Now I would like to convert the array to something like:

"Good morning Good afternoon Good evening Good night".

The result has concatanation of each value, but has one space  
between it.
If possible, I would like to insert something like "\n" instead of  
space.


I've been looking into various "array" functions, but I have no clue
where to start.


Of course, implode is the best option, but this can be accomplished in  
other ways as well. Since you were unaware of basic array processing  
and string techniques, I thought I would mention that it can be done  
with a 'for' loop...


$asString = "";
$nItems   = count( $myArray );

for ( $x = 0; $x < $nItems - 1; $x++ ) {
  $asString .= $myArray[ $x ];
  $asString .= " ";
}

$asString .= $myArray[ $nItems - 1 ];


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



[PHP] Email Verification

2008-09-17 Thread Tom Chubb
Can anyone offer advice on best practices for email address verification?
Obviously for user registration it's common to click a link in your email to
complete the process thereby verifying the email, but if you want to keep
things very simple for the end user, what are the best methods?
I have been looking at getmxrr and the examples feature some good advice,
etc.
One that I've found that I'm thinking of using is
http://www.tienhuis.nl/php-email-address-validation-with-verify-probe which
tries to connect to the SMTP server as well as mx lookup, etc.
How reliable are these?
With new domain name extensions appearing all the time I wanted to find
something better than a regex which might become outdated after a while and
I'd never know about it!

Thoughts please and thanks in advance


[PHP] Pear XML parser finding nothing in ATOM / Movable Type feed

2008-09-17 Thread John Allsopp

Hi

I know nothing about Pear, so I don't know how to debug this:

I've got a newly installed Movable Type blog with a couple of entries in 
it, and I just found from php.net the pear classes to parse an RSS feed, 
parser.php and rss.php, and this code from the PEAR site works


require_once "XML/RSS.php";

$rss =& new XML_RSS("http://rss.slashdot.org/Slashdot/slashdot";);
$rss->parse();

echo "Headlines from slashdot\n";
echo "\n";

foreach ($rss->getItems() as $item) {
   echo "" . $item['title'] . 
"\n";

}

echo "\n";

but if I point it at my blog: 
http://www.bluetreeservices.co.uk/gps_tracking_news/atom.xml or 
http://www.bluetreeservices.co.uk/gps_tracking_news/ or 
http://www.bluetreeservices.co.uk/gps_tracking_news , parse returns an 
empty array.


Am I just using the wrong code for that type of feed (I would have 
thought any RSS reader would handle an atom format feed) or is it that 
my server needs to provide atom.xml or .. what's going on?


I've no idea how to use PEAR::error with regard to $rss->parse() so I'm 
a bit stumped about debugging it.


I'd certainly call myself a PHP programmer, but I've never really used 
pear is the thing.


All help appreciated :-)

Cheers
J

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



[PHP] Re: Email Verification

2008-09-17 Thread Al



Tom Chubb wrote:

Can anyone offer advice on best practices for email address verification?
Obviously for user registration it's common to click a link in your email to
complete the process thereby verifying the email, but if you want to keep
things very simple for the end user, what are the best methods?
I have been looking at getmxrr and the examples feature some good advice,
etc.
One that I've found that I'm thinking of using is
http://www.tienhuis.nl/php-email-address-validation-with-verify-probe which
tries to connect to the SMTP server as well as mx lookup, etc.
How reliable are these?
With new domain name extensions appearing all the time I wanted to find
something better than a regex which might become outdated after a while and
I'd never know about it!

Thoughts please and thanks in advance



Here's what I use. It's simple, uses php5 functions and appears to catch most 
obvious user input errors.

function checkEmailAddr($emailAddr)
{
if(!filter_var($emailAddr, FILTER_VALIDATE_EMAIL)) throw new Exception("Email address error. 
Syntax is wrong.");


$domain = substr(strchr($emailAddr, '@'), 1);

if(!checkdnsrr($domain))
{
throw new Exception("Email address warning. Specified domain \"$domain\" appears to be 
invalid. Check carefully.");

}
return true;
}

Use in try/catch code, e.g.,
try
{
   $emailAddrOK = checkEmailAddr($userSubmitedDataArray[EMAIL_ADDR_FIELD]);
}
catch (Exception $e)
{
   $errorMsg = $e->getMessage(); //Message text in check function
   $emailAddrOK= false;
}

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



Re: [PHP] Email Verification

2008-09-17 Thread Richard Heyes
> Can anyone offer advice on best practices for email address verification?
> Obviously for user registration it's common to click a link in your email to
> complete the process thereby verifying the email, but if you want to keep
> things very simple for the end user, what are the best methods?

The best method is that IMO. It's common place and thus understood.
There may be a delay incurred though because of mail delays.

> I have been looking at getmxrr and the examples feature some good advice,
> etc.
> One that I've found that I'm thinking of using is
> http://www.tienhuis.nl/php-email-address-validation-with-verify-probe which
> tries to connect to the SMTP server as well as mx lookup, etc.

You could. Bear in mind that you can't do that if their mail server
happens to be down at the time.

> How reliable are these?

Not 100%. Like I said, my preferred option would be just to send the
user an email.

> With new domain name extensions appearing all the time I wanted to find
> something better than a regex which might become outdated after a while and
> I'd never know about it!

New domain name extensions can be accounted for easily, eg:

\.(?:[a-z]){2,4}

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

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



Re: [PHP] Email Verification

2008-09-17 Thread Per Jessen
Tom Chubb wrote:

> Can anyone offer advice on best practices for email address
> verification? 

1) check for a valid address syntax - that's easily done with a simply
regex (leaving the most obscure variations out). 
2) check that the domain-name exists and has an A record.



/Per Jessen, Zürich


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



Re: [PHP] Email Verification

2008-09-17 Thread Per Jessen
Richard Heyes wrote:

>> I have been looking at getmxrr and the examples feature some good
>> advice, etc.
>> One that I've found that I'm thinking of using is
>> http://www.tienhuis.nl/php-email-address-validation-with-verify-probe
>> which tries to connect to the SMTP server as well as mx lookup, etc.
> 
> You could. Bear in mind that you can't do that if their mail server
> happens to be down at the time.

Greylisting is also likely to interfer with the process.

> Like I said, my preferred option would be just to send the
> user an email.

I second that. 


/Per Jessen, Zürich


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



[PHP] Re: Pear XML parser finding nothing in ATOM / Movable Type feed

2008-09-17 Thread Nathan Rixham

John Allsopp wrote:

Hi

I know nothing about Pear, so I don't know how to debug this:

I've got a newly installed Movable Type blog with a couple of entries in 
it, and I just found from php.net the pear classes to parse an RSS feed, 
parser.php and rss.php, and this code from the PEAR site works


require_once "XML/RSS.php";

$rss =& new XML_RSS("http://rss.slashdot.org/Slashdot/slashdot";);
$rss->parse();

echo "Headlines from slashdot\n";
echo "\n";

foreach ($rss->getItems() as $item) {
   echo "" . $item['title'] . 
"\n";

}

echo "\n";

but if I point it at my blog: 
http://www.bluetreeservices.co.uk/gps_tracking_news/atom.xml or 
http://www.bluetreeservices.co.uk/gps_tracking_news/ or 
http://www.bluetreeservices.co.uk/gps_tracking_news , parse returns an 
empty array.


Am I just using the wrong code for that type of feed (I would have 
thought any RSS reader would handle an atom format feed) or is it that 
my server needs to provide atom.xml or .. what's going on?


I've no idea how to use PEAR::error with regard to $rss->parse() so I'm 
a bit stumped about debugging it.


I'd certainly call myself a PHP programmer, but I've never really used 
pear is the thing.


All help appreciated :-)

Cheers
J


Atom and RSS are completely different; the only similarities lie in the 
fact they are both XML, and both used frequently for syndicating news.


You need an atom parser; or just load the feed into DOMDocument..

SimplePie and RssPhp are the only two I know that handle atom feeds well.

regards

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Robert Cummings
On Tue, 2008-09-16 at 20:11 +0100, Ashley Sheridan wrote:
>
> Would it be totally off topic if everyone were to say what their
> favourite OS was and why? I'm just a little curious as to what OS's
> people use in this field.

I originally started using Linux 8 years ago at my first job out of
school. At that time I was using Debian. At home though I started
playing around with Mandrake. Over time though I liked Mandrake less and
less and Finally moved to Ubuntu about 3 years ago for my desktop. I
haven't looked back since I find the apt repositories have plenty of
bleeding edge stuff while I can still compile whatever else I need from
source. For server side stuff though, I still find myself leaning
towards Debian although I'm quite at home using Red Hat, Fedora, and
Cent OS also. Ultimately though, I have to say I much prefer apt over
yum.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Making array to string

2008-09-17 Thread Nathan Rixham

Eric Gorr wrote:


On Sep 17, 2008, at 8:54 AM, Hunt Jon wrote:

Hi, I'm new to PHP. I have an array that I would like to convert into 
a string.


For example, I have

array(
0 => "Good morning",
1 => "Good afternoon",
2 => "Good evening",
3 => "Good night"
);

Now I would like to convert the array to something like:

"Good morning Good afternoon Good evening Good night".

The result has concatanation of each value, but has one space between it.
If possible, I would like to insert something like "\n" instead of space.

I've been looking into various "array" functions, but I have no clue
where to start.


Of course, implode is the best option, but this can be accomplished in 
other ways as well. Since you were unaware of basic array processing and 
string techniques, I thought I would mention that it can be done with a 
'for' loop...


$asString = "";
$nItems   = count( $myArray );

for ( $x = 0; $x < $nItems - 1; $x++ ) {
  $asString .= $myArray[ $x ];
  $asString .= " ";
}

$asString .= $myArray[ $nItems - 1 ];



there's foreach too..

$asString = '';
foreach( $myArray as $index => $value ) {
  $asString .= $value . ' ';
}

BUT implode is the way to do it in this scenario :)

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



Re: [PHP] Making array to string

2008-09-17 Thread Eric Gorr


On Sep 17, 2008, at 10:54 AM, Nathan Rixham wrote:


Eric Gorr wrote:

On Sep 17, 2008, at 8:54 AM, Hunt Jon wrote:
Hi, I'm new to PHP. I have an array that I would like to convert  
into a string.


For example, I have

array(
0 => "Good morning",
1 => "Good afternoon",
2 => "Good evening",
3 => "Good night"
);

Now I would like to convert the array to something like:

"Good morning Good afternoon Good evening Good night".

The result has concatanation of each value, but has one space  
between it.
If possible, I would like to insert something like "\n" instead of  
space.


I've been looking into various "array" functions, but I have no clue
where to start.
Of course, implode is the best option, but this can be accomplished  
in other ways as well. Since you were unaware of basic array  
processing and string techniques, I thought I would mention that it  
can be done with a 'for' loop...

$asString = "";
$nItems   = count( $myArray );
for ( $x = 0; $x < $nItems - 1; $x++ ) {
 $asString .= $myArray[ $x ];
 $asString .= " ";
}
$asString .= $myArray[ $nItems - 1 ];


there's foreach too..

$asString = '';
foreach( $myArray as $index => $value ) {
 $asString .= $value . ' ';
}

BUT implode is the way to do it in this scenario :)


That foreach doesn't quite work as requested...there will be an extra  
space at the end of the string.


Of course, processing the $asString with rtrim will get rid of it.


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



Re: [PHP] Email Verification

2008-09-17 Thread Stut

On 17 Sep 2008, at 14:20, Tom Chubb wrote:
Can anyone offer advice on best practices for email address  
verification?
Obviously for user registration it's common to click a link in your  
email to
complete the process thereby verifying the email, but if you want  
to keep

things very simple for the end user, what are the best methods?


Send them an email with a verification link - it's the only 100%  
accurate way and most people will have come across this requirement  
on other sites.


I have been looking at getmxrr and the examples feature some good  
advice,

etc.
One that I've found that I'm thinking of using is
http://www.tienhuis.nl/php-email-address-validation-with-verify- 
probe which

tries to connect to the SMTP server as well as mx lookup, etc.
How reliable are these?


They're not for reasons already mentioned by other posters. Also you  
need to consider how often you'll be doing this. I implemented this  
check on one of my sites and I very quickly hit auto-bans on Hotmail,  
Gmail and Yahoo mail servers. They don't like it when you make lots  
of connections to their servers without sending anything!


With new domain name extensions appearing all the time I wanted to  
find
something better than a regex which might become outdated after a  
while and

I'd never know about it!


In that case you need to make your regex loose enough to handle that,  
or keep on top of it manually. Either way you're better off just  
sending them a verification email.


-Stut

--
http://stut.net/

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Philip Thompson

On Sep 16, 2008, at 6:26 PM, tedd wrote:


At 8:11 PM +0100 9/16/08, Ashley Sheridan wrote:
Would it be totally off topic if everyone were to say what their  
favourite OS was and why? I'm just a little curious as to what OS's  
people use in this field.


Obviously, mine is Mac and OSX 10.4.11. My next one will be whatever  
is the top of the line Apple has at the time I have to money for it.


The question is... why aren't you on 10.5.4? I never miss an update...  
=D


~Philip

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



Re: [PHP] Email Verification

2008-09-17 Thread tedd

At 2:20 PM +0100 9/17/08, Tom Chubb wrote:

Can anyone offer advice on best practices for email address verification?
Obviously for user registration it's common to click a link in your email to
complete the process thereby verifying the email, but if you want to keep
things very simple for the end user, what are the best methods?
I have been looking at getmxrr and the examples feature some good advice,
etc.
One that I've found that I'm thinking of using is
http://www.tienhuis.nl/php-email-address-validation-with-verify-probe which
tries to connect to the SMTP server as well as mx lookup, etc.
How reliable are these?
With new domain name extensions appearing all the time I wanted to find
something better than a regex which might become outdated after a while and
I'd never know about it!

Thoughts please and thanks in advance


Tom:

To obtain a 100% valid email address you must take measures to 
validate it -- there are no short cuts.


Here's a working example I use for users posting comments (I'm still 
working on it):


http://sperling.com/comments/an-example/

The Explanation provides an explanation (what else?).

Plus, leaving a comment will show you how the process works.

One of the important points here is that this will only collect 
validated and willing email addresses.


Of course, the javascript routine to review email addresses after the 
user clicks submit will give the user a head's-up if the email 
address isn't properly formatted, but in the end the server-side must 
recheck everything anyway. So, JS in this case is just an example of 
progressive enhancement.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread John Biroldi
This is a 6 month contract, but the client has typically extended in the
past.  No C2C.  Contract will be W2 based (all inclusive).  If interested,
please contact me ASAP.  THANKS!

 

Description & Requirements:

*   This role will supervise the efforts of individuals who do not
report to them, so excellent interpersonal and influencing skills are
necessary.
*   The ability to communicate complex technical issues in layman's
terms is critical. 
*   Minimum of five years of experience in Web development and server
administration. 
*   Excellent project management skills; proven ability to develop and
manage project and production plans, resources, and vendors; strong sense of
urgency, initiative and follow-through.
*   Excellent research, investigative, analytical and troubleshooting
skills. 
*   Experience successfully implementing W3C and ADA: Federal 508
accessibility standards on Web sites. 
*   Proficiency with Microsoft Windows 2003 Server environment, Web
content management and version control software. 
*   Fluent in the following Web development languages: 

*   HTML 4.01/XHTML 1.0, JavaScript (W3C DOM), CSS, ASP.NET 2.0, Visual
Basic; and knowledgeable of current W3C standards of using XHTML for
structure and CSS for design. 

*   Fluent in at least three of the following development languages: 

*   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA, XML,
XSLT, relational databases and concepts of object-oriented programming. 

*   Ability to synthesize non-technical specifications and project
descriptions into technical development specifications. 
*   Has knowledge of standard concepts, practices, and procedures within
server and development environments.

 

John Biroldi

Managing Partner

PINNACLE RESOURCES

914-584-8430

  [EMAIL PROTECTED]

 



[PHP] Re: Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Nathan Rixham

John Biroldi wrote:

*   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA, XML,
XSLT, relational databases and concepts of object-oriented programming. 


hate to be the one to say the obvious.. but this is a *PHP* list

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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Sudheer

Robert Cummings wrote:

On Wed, 2008-09-17 at 13:00 -0400, John Biroldi wrote:
  
*	Fluent in at least three of the following development languages: 


*   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA, XML,
XSLT, relational databases and concepts of object-oriented programming. 



Anyone else not see PHP in the above?

Cheers,
Rob.
  
Ugh. I guess most of us would hit the delete button as soon as we feel 
it's spam.



--

With warm regards,
Sudheer. S
http://binaryvibes.co.in


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



[PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
What I want to do is find the top 10 servers where the column steps = 
iisreset. The following code works great except that the page is not 
displaying the servername in the 'Server Name' column of my results (nothing 
appears, the column is just blank).


servername and steps are the important columns in the database table. 
$_POST[time1] and $_POST[time2] come from a form submitted.


When I copy and paste the entire select statement into the SQL tab in 
phpmyadmin (and replace the time variables with actual times corresponding 
to the timestamp column), it displays the correct results including 
servername. Everything works in the php page's results except for the 
servername. I feel like it's right in front of my face and that's why I 
can't see it lol. Any help would be greatly appreciated. Thanks in advance 
=)


My code...

$query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps LIKE 
'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >= '$_POST[time1]' 
GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";

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

# display column titles
echo "";
echo "Count";
echo "Server 
Name";

echo "";

#display results
while($i = mysql_fetch_row($result))
{
echo "", $i[COUNT('steps')], 
"";

echo "", $i[servername] ,"";
}
echo ""; 



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



Re: [PHP] Re: header

2008-09-17 Thread mike
On Wed, Sep 17, 2008 at 2:31 AM, Nathan Rixham <[EMAIL PROTECTED]> wrote:

> off on a tangent.. I made this some time ago which is rather useful:
>

> $url = new url('http://php.net/some.page');
>
> echo $url;
> echo $url->scheme;

Why would you need this with parse_url() ?

Seems like that function is completely duplicated there...

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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote:

> What I want to do is find the top 10 servers where the column steps =
> iisreset. The following code works great except that the page is not
> displaying the servername in the 'Server Name' column of my results (nothing
> appears, the column is just blank).
>
> servername and steps are the important columns in the database table.
> $_POST[time1] and $_POST[time2] come from a form submitted.
>
> When I copy and paste the entire select statement into the SQL tab in
> phpmyadmin (and replace the time variables with actual times corresponding
> to the timestamp column), it displays the correct results including
> servername. Everything works in the php page's results except for the
> servername. I feel like it's right in front of my face and that's why I
> can't see it lol. Any help would be greatly appreciated. Thanks in advance
> =)
>
> My code...
>
> $query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps LIKE
> 'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >= '$_POST[time1]'
> GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";
> $result = mysql_query($query) or die(mysql_error());
>
> # display column titles
> echo "";
> echo "Count";
> echo "Server
> Name";
> echo "";
>
> #display results
> while($i = mysql_fetch_row($result))
> {
> echo "", $i[COUNT('steps')],
> "";
> echo "", $i[servername] ,"";
> }
> echo "";
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Change that "COUNT(steps)" to "COUNT(steps) AS CountSteps", that might be
the issue.  Then you're using $i['CountSteps'].  That seems a bit more
normal looking to me atleast.

Also, try echoing out your query on the screen to see that its formating
properly in the PHP code.  You may have something wrong in there, although I
don't see any off hand.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Jochem Maas

Robert Cummings schreef:

On Wed, 2008-09-17 at 13:00 -0400, John Biroldi wrote:
*	Fluent in at least three of the following development languages: 


*   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA, XML,
XSLT, relational databases and concepts of object-oriented programming. 


Anyone else not see PHP in the above?


no I'm not seeing it.

apart from that, what kind of project can't standardize on a single
development 'platform'? .NET *and* Java?

the funny thing is http://www.pinnacleus.com/ is a completely bogus site,
that's technically a complete pile of crap on top of containing *no* 
information.

catchphrase of the day: "get a site, get a clue and get a .NET developer somewhere 
else".



Cheers,
Rob.



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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta 
<[EMAIL PROTECTED]>wrote:



What I want to do is find the top 10 servers where the column steps =
iisreset. The following code works great except that the page is not
displaying the servername in the 'Server Name' column of my results 
(nothing

appears, the column is just blank).

servername and steps are the important columns in the database table.
$_POST[time1] and $_POST[time2] come from a form submitted.

When I copy and paste the entire select statement into the SQL tab in
phpmyadmin (and replace the time variables with actual times 
corresponding

to the timestamp column), it displays the correct results including
servername. Everything works in the php page's results except for the
servername. I feel like it's right in front of my face and that's why I
can't see it lol. Any help would be greatly appreciated. Thanks in 
advance

=)

My code...

$query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps 
LIKE
'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >= 
'$_POST[time1]'

GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";
$result = mysql_query($query) or die(mysql_error());

# display column titles
echo "";
echo "Count";
echo "Server
Name";
echo "";

#display results
while($i = mysql_fetch_row($result))
{
echo "", $i[COUNT('steps')],
"";
echo "", $i[servername] 
,"";

}
echo "";

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



Change that "COUNT(steps)" to "COUNT(steps) AS CountSteps", that might be
the issue.  Then you're using $i['CountSteps'].  That seems a bit more
normal looking to me atleast.

Also, try echoing out your query on the screen to see that its formating
properly in the PHP code.  You may have something wrong in there, although 
I

don't see any off hand.

--
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."




Adding as CountSteps $i['CountSteps'] still leaves the column blank.

echo $result; gives me an output of:
Resource id #3

and

echo $query;

just gives me an error.

One thing I don't understand is why echo $result; gives me Resource id #3 as 
an output. What does that mean? 



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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Robert Cummings
On Wed, 2008-09-17 at 13:00 -0400, John Biroldi wrote:
>
> * Fluent in at least three of the following development languages: 
> 
> * Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA, XML,
> XSLT, relational databases and concepts of object-oriented programming. 

Anyone else not see PHP in the above?

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:30 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote:

> ""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>  On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]
>> >wrote:
>>
>>  What I want to do is find the top 10 servers where the column steps =
>>> iisreset. The following code works great except that the page is not
>>> displaying the servername in the 'Server Name' column of my results
>>> (nothing
>>> appears, the column is just blank).
>>>
>>> servername and steps are the important columns in the database table.
>>> $_POST[time1] and $_POST[time2] come from a form submitted.
>>>
>>> When I copy and paste the entire select statement into the SQL tab in
>>> phpmyadmin (and replace the time variables with actual times
>>> corresponding
>>> to the timestamp column), it displays the correct results including
>>> servername. Everything works in the php page's results except for the
>>> servername. I feel like it's right in front of my face and that's why I
>>> can't see it lol. Any help would be greatly appreciated. Thanks in
>>> advance
>>> =)
>>>
>>> My code...
>>>
>>> $query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps
>>> LIKE
>>> 'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >=
>>> '$_POST[time1]'
>>> GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";
>>> $result = mysql_query($query) or die(mysql_error());
>>>
>>> # display column titles
>>> echo "";
>>> echo "Count";
>>> echo "Server
>>> Name";
>>> echo "";
>>>
>>> #display results
>>> while($i = mysql_fetch_row($result))
>>> {
>>> echo "", $i[COUNT('steps')],
>>> "";
>>> echo "", $i[servername]
>>> ,"";
>>> }
>>> echo "";
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>  Change that "COUNT(steps)" to "COUNT(steps) AS CountSteps", that might
>> be
>> the issue.  Then you're using $i['CountSteps'].  That seems a bit more
>> normal looking to me atleast.
>>
>> Also, try echoing out your query on the screen to see that its formating
>> properly in the PHP code.  You may have something wrong in there, although
>> I
>> don't see any off hand.
>>
>> --
>> -Dan Joseph
>>
>> www.canishosting.com - Plans start @ $1.99/month.
>>
>> "Build a man a fire, and he will be warm for the rest of the day.
>> Light a man on fire, and will be warm for the rest of his life."
>>
>>
>
> Adding as CountSteps $i['CountSteps'] still leaves the column blank.
>
> echo $result; gives me an output of:
> Resource id #3
>
> and
>
> echo $query;
>
> just gives me an error.
>
> One thing I don't understand is why echo $result; gives me Resource id #3
> as an output. What does that mean?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
That's basically your result set ID number inside PHP.

as for $query, what error are you getting?  Does this $query echo out:

$query = "SELECT servername, COUNT(steps) AS CountSteps FROM monitoring
WHERE steps LIKE 'iisreset' AND timestamp <= '" . $_POST['time2'] . "' AND
timestamp >= '" . $_POST['time1'] . "' GROUP BY servername ORDER BY COUNT(*)
DESC LIMIT 10";

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


[PHP] Re: Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread tedd

At 6:20 PM +0100 9/17/08, Nathan Rixham wrote:

John Biroldi wrote:

*   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA, XML,
XSLT, relational databases and concepts of object-oriented programming.


hate to be the one to say the obvious.. but this is a *PHP* list


Yep, I stopped reading there and drop-kicked it into my delete file.

Plus, their web site sucks.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:28 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:

> Robert Cummings schreef:
>
>> On Wed, 2008-09-17 at 13:00 -0400, John Biroldi wrote:
>>
>>> *   Fluent in at least three of the following development languages:
>>> *   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA,
>>> XML,
>>> XSLT, relational databases and concepts of object-oriented programming.
>>>
>>
>> Anyone else not see PHP in the above?
>>
>
> no I'm not seeing it.
>
> apart from that, what kind of project can't standardize on a single
> development 'platform'? .NET *and* Java?
>
> the funny thing is http://www.pinnacleus.com/ is a completely bogus site,
> that's technically a complete pile of crap on top of containing *no*
> information.
>
> catchphrase of the day: "get a site, get a clue and get a .NET developer
> somewhere else".
>
>
>> Cheers,
>> Rob.
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Not to defend thisBUT

There are places that use multiple platforms.  My company uses .NET and PHP
for different things.  Also recruiters will often target people who have
related knowledge to what they're looking for.  I.E. looking for a PHP
programmer, but will consider someone who knows C or Java instead.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


RE: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Jay Blanchard
[snip]
> * Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA,
XML,
> XSLT, relational databases and concepts of object-oriented
programming. 

Anyone else not see PHP in the above?
[/snip]

Nope. I see 2 P's, but no H

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



Re: [PHP] Paypal Integration

2008-09-17 Thread Ashley Sheridan
On Wed, 2008-09-17 at 02:10 -0700, mike wrote:
> On Wed, Sep 17, 2008 at 1:33 AM, Per Jessen <[EMAIL PROTECTED]> wrote:
> 
> > Not necessarily.  Here in Switzerland, the federal data protection
> > agency has recently advised people to be careful with what data they
> > let Google handle (or not).
> 
> Germany has also advised it's citizens to not use Chrome due to the
> amount of data Google would be able to associate to someone by using
> it...
> 
> Anyway. Google is getting per-transaction fees. I don't see why they'd
> care about needing a logo on it. They're making money, they don't need
> ads or anything.
> 
It's probably just so they can get their name out there a bit, to let
others know they have a checkout system. I reckon they'll probably drop
that condition once they are more popular in that area.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Robert Cummings
On Wed, 2008-09-17 at 14:49 -0400, Dan Joseph wrote:
>
> Not to defend thisBUT
> 
> There are places that use multiple platforms.  My company uses .NET and PHP
> for different things.  Also recruiters will often target people who have
> related knowledge to what they're looking for.  I.E. looking for a PHP
> programmer, but will consider someone who knows C or Java instead.

But PHP wasn't listed ;)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: Email Verification

2008-09-17 Thread Ashley Sheridan
On Wed, 2008-09-17 at 09:59 -0400, Al wrote:
> 
> Tom Chubb wrote:
> > Can anyone offer advice on best practices for email address verification?
> > Obviously for user registration it's common to click a link in your email to
> > complete the process thereby verifying the email, but if you want to keep
> > things very simple for the end user, what are the best methods?
> > I have been looking at getmxrr and the examples feature some good advice,
> > etc.
> > One that I've found that I'm thinking of using is
> > http://www.tienhuis.nl/php-email-address-validation-with-verify-probe which
> > tries to connect to the SMTP server as well as mx lookup, etc.
> > How reliable are these?
> > With new domain name extensions appearing all the time I wanted to find
> > something better than a regex which might become outdated after a while and
> > I'd never know about it!
> > 
> > Thoughts please and thanks in advance
> > 
> 
> Here's what I use. It's simple, uses php5 functions and appears to catch most 
> obvious user input errors.
> 
> function checkEmailAddr($emailAddr)
> {
>  if(!filter_var($emailAddr, FILTER_VALIDATE_EMAIL)) throw new 
> Exception("Email address error. 
> Syntax is wrong.");
> 
>  $domain = substr(strchr($emailAddr, '@'), 1);
> 
>  if(!checkdnsrr($domain))
>  {
>  throw new Exception("Email address warning. Specified domain 
> \"$domain\" appears to be 
> invalid. Check carefully.");
>  }
>  return true;
> }
> 
> Use in try/catch code, e.g.,
> try
> {
> $emailAddrOK = checkEmailAddr($userSubmitedDataArray[EMAIL_ADDR_FIELD]);
> }
> catch (Exception $e)
> {
> $errorMsg = $e->getMessage(); //Message text in check function
> $emailAddrOK= false;
> }
> 
I don't think that was the sort of verification he was after, but that
looks like a lot of code just to validate an email address, you should
look at regular expressions maybe.

For validating that an email address is *real* rather than just valid,
you really need to have a verification link in the email. You can do
this simply by putting a link in the email you send to them that points
to a script on your site. The link will contain some sort of hash in the
URL parameters, which you just need to match against a record in the
database (made when you sent out the email to them)


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:56 PM, Robert Cummings <[EMAIL PROTECTED]>wrote:

> On Wed, 2008-09-17 at 14:49 -0400, Dan Joseph wrote:
> >
> > Not to defend thisBUT
> >
> > There are places that use multiple platforms.  My company uses .NET and
> PHP
> > for different things.  Also recruiters will often target people who have
> > related knowledge to what they're looking for.  I.E. looking for a PHP
> > programmer, but will consider someone who knows C or Java instead.
>
> But PHP wasn't listed ;)
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
LOL, I know, I was just using those two as an example and to somehow stay on
topic.  My dad is a technical recruiter, he's told me many times about how
recruiters will go about finding tech people in different markets.
Sometimes they have to target people with experience outside the given
knowledge because they can't find anyone with exactly what they're looking
for.

But again, I'm not defending the guy.  Let him fight for himself. :)

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Ashley Sheridan
On Wed, 2008-09-17 at 14:49 -0400, Dan Joseph wrote:
> On Wed, Sep 17, 2008 at 2:28 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> 
> > Robert Cummings schreef:
> >
> >> On Wed, 2008-09-17 at 13:00 -0400, John Biroldi wrote:
> >>
> >>> *   Fluent in at least three of the following development languages:
> >>> *   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA,
> >>> XML,
> >>> XSLT, relational databases and concepts of object-oriented programming.
> >>>
> >>
> >> Anyone else not see PHP in the above?
> >>
> >
> > no I'm not seeing it.
> >
> > apart from that, what kind of project can't standardize on a single
> > development 'platform'? .NET *and* Java?
> >
> > the funny thing is http://www.pinnacleus.com/ is a completely bogus site,
> > that's technically a complete pile of crap on top of containing *no*
> > information.
> >
> > catchphrase of the day: "get a site, get a clue and get a .NET developer
> > somewhere else".
> >
> >
> >> Cheers,
> >> Rob.
> >>
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> Not to defend thisBUT
> 
> There are places that use multiple platforms.  My company uses .NET and PHP
> for different things.  Also recruiters will often target people who have
> related knowledge to what they're looking for.  I.E. looking for a PHP
> programmer, but will consider someone who knows C or Java instead.
> 
Yeah, just recently we've had to mix in a PHP script with a ColdFusion
site because PHP is able to do what CF can't, and they don't want to
keep paying for those bloody extensions!

As for the job email though, come on, that's plainly spam from some
idiot who doesn't know his ASP from his elbow!


Ash
www.ashleysheridan.co.uk


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



[PHP] Install problem

2008-09-17 Thread Illó Gábor
Hello

I have this error when i type make:

ml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lcrypt -o libphp5.la
/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 can
not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
*** Error code 1

Can somebody help me? SYS: FreeBSD 7.0 AMD64

./configure --prefix=/usr/local/php \
--with-apxs2=/usr/local/sbin/apxs \
--with-mysql \
--with-gd \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--enable-shared \
--enable-static \
--with-pear \
--with-mcrypt \
--with-iconv \
--with-openssl \
--with-config-file-path=/usr/local/php \
--enable-mbstring \
--with-sqlite \
--with-pdo-sqlite \
--without-sybase-ct \
--without-pgsql \
--without-mssql \
--without-msql \
--enable-ftp \
--enable-sockets \
--enable-pcntl \
--with-imap=/usr/lib \
--with-imap-ssl=/usr/lib


Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Stut

On 16 Sep 2008, at 23:54, tedd wrote:

At 7:40 PM +0100 9/16/08, Stut wrote:

On 16 Sep 2008, at 15:59, tedd wrote:
Then one day, M$ sent out notice that they would no longer support  
QuickBasic and that was the end of that. All of our current, and  
past work, was on a dead-end street. We were left to fend for  
ourselves.


I don't mean any disrespect but devoting your livelihood on a  
technology with a single provider is probably not the smartest move  
you've made.


No offense taken and what you say at face value is true. However,  
that was a past lifetime -- how smart were you 20 years ago?


I was 11 so it's kinda hard to tell, but I remember thinking I was  
doing ok ;)


And I didn't really devote MY livelihood to one technology nor  
industry for that matter -- never have. That's the reason why I have  
several businesses going concurrently. I just wished one of them  
would hit the log-ball so I could retire and program for a hobby.


Don't we all!

It's not nice for Microsoft to have pulled support for it but  
they're a business and they made that decision because they didn't  
see a profitable future there, they weren't out to screw you.


Of course they were not out to screw me, but even if they were,  
that's not relevant.


I think the important point here is that if you create a development  
product which requires others to have faith in you, then you also  
inherent a responsibility to those who have invested their time into  
helping you secure your product. Software development is a symbiotic  
relationship.


Indeed it is, but in any one to many arrangement the first to go is  
the smallest. My guess would be that QuickBasic was *the* smallest in  
terms of user base.


If you want to pull the plug and cut that relationship, that's your  
choice. But that action comes with a cost. From my perspective, M$  
is just reaping what it sowed.


I just love the way everyone ignores all the good they've done and  
focuses on the evil. With so many customers/users do you really expect  
them to be able to keep them all happy? Seriously?


If you feel you need to hold a grudge, by all means do so, but I  
personally have grown out of name-calling and stick to logical  
argument instead. Does wonders for my BP!



Besides, grant me my windmills to tilt.


Gimme a sec to mount my trusty steed.

Imagine if PHP suddenly stopped development and you had to find a  
different language (i.e., ruby). Sure we could all do it, but we  
picked this language for a reason and now we have to choose again  
-- and perhaps that choice was our second choice. I don't like  
being forced to settle for my second choice.


Speaking only for myself I would have no problem with it at all,  
for a few reasons...


I've been there before and survived -- like you, I have numerous  
languages under my belt -- in fact they all look the same to me now.  
So, that wouldn't be a big problem, just an annoying one.


While I have no faith of which to speak in anything except science, I  
try to live by the philosophy set out in the serenity prayer. It's  
worked pretty well for me so far.


Now, should have M$ continued to support a product that wasn't  
making sufficient money for them? I dunno, but I don't care either  
-- they screwed with my life and I'll spend the rest of it calling  
M$, M$.


That's your choice, but don't take offence when I say that's  
changed my opinion of you somewhat.


No offense taken, but if your opinion of me has changed over that,  
be advised I've done far worse than name calling.


I realize that you take the high-road on things like this -- I  
respect that -- that used to be my practice as well. It's very  
predicable from a business perspective. But times change and I kind  
of like telling people what I really think -- somewhat like the  
member of the family who no longer cares if he farts in public -- if  
you get the drift.


I have no issue with people giving their opinion, but to do so with  
childish (IMHO) name-calling makes the reasonable argument, if there  
is one, much harder to take seriously.


Similarly, I had a run-in with American Express over 30 years ago  
and even to this day I return all their sales promotion in their  
self-addressed no-postage envelope they provide. Over the years, I  
suspect they have paid postage for over 100 pounds of profitless  
correspondence and the time for their staff to examine it.


You're not alone in doing this, but how much a dent do you really  
think you've made in their profits? It's like spam, if it wasn't  
worth doing they wouldn't do it. Your efforts would be better spent  
trying to get your address blacklisted... or learning Scala!


Well... that was the idea, to get blacklisted. Just about every  
thing I sent back had my address on it and included a message which  
basically said "This what I think of your service and you just paid  
the postage for me to say it. Now take me off your list!" But, it  
hasn't happened yet

Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Bastien Koert
On Wed, Sep 17, 2008 at 4:13 AM, Ross McKay <[EMAIL PROTECTED]> wrote:

> On Wed, 17 Sep 2008 09:00:45 +0100, Luke wrote:
>
> >What is it?
> >
> >I'm only familiar with the MySQL tools such as Query Browser and Admin?
>
> http://dev.mysql.com/downloads/workbench/5.0.html
>
> In short, it's a data modelling tool. Such things are very handy for
> designing and building databases, and usually also for documenting them.
> If your DB has more than a handful of tables, it's well worth the
> effort.
> --
> Ross McKay, Toronto, NSW Australia
> "Let the laddie play wi the knife - he'll learn"
> - The Wee Book of Calvin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
what about dia on llinux? Not quite as nice as visio...but livable

-- 

Bastien

Cat, the other other white meat


Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
On Wed, Sep 17, 2008 at 2:30 PM, Vinny Gullotta 
<[EMAIL PROTECTED]>wrote:



""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

 On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta 
<[EMAIL PROTECTED]

>wrote:

 What I want to do is find the top 10 servers where the column steps =

iisreset. The following code works great except that the page is not
displaying the servername in the 'Server Name' column of my results
(nothing
appears, the column is just blank).

servername and steps are the important columns in the database table.
$_POST[time1] and $_POST[time2] come from a form submitted.

When I copy and paste the entire select statement into the SQL tab in
phpmyadmin (and replace the time variables with actual times
corresponding
to the timestamp column), it displays the correct results including
servername. Everything works in the php page's results except for the
servername. I feel like it's right in front of my face and that's why I
can't see it lol. Any help would be greatly appreciated. Thanks in
advance
=)

My code...

$query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps
LIKE
'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >=
'$_POST[time1]'
GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";
$result = mysql_query($query) or die(mysql_error());

# display column titles
echo "";
echo "class='tableHeader'>Count";

echo "Server
Name";
echo "";

#display results
while($i = mysql_fetch_row($result))
{
echo "", $i[COUNT('steps')],
"";
echo "", $i[servername]
,"";
}
echo "";

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


 Change that "COUNT(steps)" to "COUNT(steps) AS CountSteps", that might

be
the issue.  Then you're using $i['CountSteps'].  That seems a bit more
normal looking to me atleast.

Also, try echoing out your query on the screen to see that its formating
properly in the PHP code.  You may have something wrong in there, 
although

I
don't see any off hand.

--
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."




Adding as CountSteps $i['CountSteps'] still leaves the column blank.

echo $result; gives me an output of:
Resource id #3

and

echo $query;

just gives me an error.

One thing I don't understand is why echo $result; gives me Resource id #3
as an output. What does that mean?

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



That's basically your result set ID number inside PHP.

as for $query, what error are you getting?  Does this $query echo out:

$query = "SELECT servername, COUNT(steps) AS CountSteps FROM monitoring
WHERE steps LIKE 'iisreset' AND timestamp <= '" . $_POST['time2'] . "' AND
timestamp >= '" . $_POST['time1'] . "' GROUP BY servername ORDER BY 
COUNT(*)

DESC LIMIT 10";

--
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."



It's actually not an error, it's the select statement that is echo'd

echo $query;

yields

SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE steps = 
'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND timestamp >= 
'2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10 



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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
You'll want to change your Order By statement to 'ORDER BY CountSteps DESC'.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:
> echo $query;
>
> yields
>
> SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
> steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
> timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
> LIMIT 10
>

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



Re: [PHP] Paypal Integration

2008-09-17 Thread mike
On Wed, Sep 17, 2008 at 11:56 AM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:

> It's probably just so they can get their name out there a bit, to let
> others know they have a checkout system. I reckon they'll probably drop
> that condition once they are more popular in that area.

Well obviously they want the name out. But it's Google. They should
have no problem marketing their services, and they'd probably have
quicker adoption if they made a pure API method to integrate.

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Jason Pruim


On Sep 17, 2008, at 3:24 PM, Stut wrote:


On 16 Sep 2008, at 23:54, tedd wrote:

At 7:40 PM +0100 9/16/08, Stut wrote:

On 16 Sep 2008, at 15:59, tedd wrote:




Snail-mail spam relies upon the same basic fact that electronic spam  
does... everyone hates it until it offers them something they want.  
Unfortunately in most cases it happens often enough to be  
profitable. Oh, and because everyone's doing it these days there  
doesn't seem to be any noticeable effect on a company's reputation  
which is unfortunate.


I like what you said right here stut... It's only junk until someone  
hits the nail on the head with it! Maybe 9 out of 10 people don't need  
another credit card... but it's that 1 person they do it for. Average  
response rates to direct mail marketing campaigns are about 2% being  
considered good.





It's possible that if more people returned it, possible with some  
extra weight they might stop, but I don't see it happening. You  
might have better luck getting removed if you mark the envelope "No  
longer at this address" rather than writing a rant. They're less  
likely to continue sending you stuff if they don't think you're  
there anymore. I do the same with spam email using the bounce  
feature in Apple Mail and it's worked pretty well both on and offline.


As the resident direct mail specialist on this list... :)

I can say that the amount of mail that is returned to the customer  
won't affect in any way shape or form how much mail they send out.  
Presumably they are working of a rented list where you can get any  
info you could possible ever think of... I registered a domain and not  
more then 1 month later I had a business credit card offer from  
Capitol One... Who is the largest direct mailer in the US. I barely  
even had a crappy site up before that happened! :)


And as far as returning the mail to them in their envelopes, it  
doesn't cost that much... $500/year for the permit, per piece returned  
fee + Weighted first class rate... All in all, not that big of a deal :)


But what ever makes you happy! :)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Sancar Saran
On Wednesday 17 September 2008 22:00:48 Dan Joseph wrote:
> But again, I'm not defending the guy.  Let him fight for himself. :)

Fight for himself ? He can't.

I'm pretty sure he did not know anything about that mail.

And if it was true they search microsoft oriented and this list was't very 
microsoft friendly.


Regards













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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Ashley Sheridan
On Wed, 2008-09-17 at 15:36 -0400, Jason Pruim wrote:
> On Sep 17, 2008, at 3:24 PM, Stut wrote:
> 
> > On 16 Sep 2008, at 23:54, tedd wrote:
> >> At 7:40 PM +0100 9/16/08, Stut wrote:
> >>> On 16 Sep 2008, at 15:59, tedd wrote:
> 
> >
> > Snail-mail spam relies upon the same basic fact that electronic spam  
> > does... everyone hates it until it offers them something they want.  
> > Unfortunately in most cases it happens often enough to be  
> > profitable. Oh, and because everyone's doing it these days there  
> > doesn't seem to be any noticeable effect on a company's reputation  
> > which is unfortunate.
> 
> I like what you said right here stut... It's only junk until someone  
> hits the nail on the head with it! Maybe 9 out of 10 people don't need  
> another credit card... but it's that 1 person they do it for. Average  
> response rates to direct mail marketing campaigns are about 2% being  
> considered good.
> 
> >
> >
> > It's possible that if more people returned it, possible with some  
> > extra weight they might stop, but I don't see it happening. You  
> > might have better luck getting removed if you mark the envelope "No  
> > longer at this address" rather than writing a rant. They're less  
> > likely to continue sending you stuff if they don't think you're  
> > there anymore. I do the same with spam email using the bounce  
> > feature in Apple Mail and it's worked pretty well both on and offline.
> 
> As the resident direct mail specialist on this list... :)
> 
> I can say that the amount of mail that is returned to the customer  
> won't affect in any way shape or form how much mail they send out.  
> Presumably they are working of a rented list where you can get any  
> info you could possible ever think of... I registered a domain and not  
> more then 1 month later I had a business credit card offer from  
> Capitol One... Who is the largest direct mailer in the US. I barely  
> even had a crappy site up before that happened! :)
> 
> And as far as returning the mail to them in their envelopes, it  
> doesn't cost that much... $500/year for the permit, per piece returned  
> fee + Weighted first class rate... All in all, not that big of a deal :)
> 
> But what ever makes you happy! :)
> 
> 
> --
> 
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 11287 James St
> Holland, MI 49424
> www.raoset.com
> [EMAIL PROTECTED]
> 
> 
> 
> 
> 
It's all about weighing those suckers down some more with loose change
that we all have accumulating everywhere. For the cost of 10p of mine, I
know i've just put their costs up way more. Of course, if you don't have
coins to spare, stones work equally well...

As for weighing the good merits of Microshaft, well it's all relative
isn't it? For everything they do good, there's a bunch of things they've
done on the way, whether it was muscling someone else out of the market,
or just making it even easier for virus writers to attack us. At the end
of the day, everyone will weigh this out on both their own experience
and what they've heard. If the majority of what is said about them is
bad, well, no smoke without fire and all that...


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta

Still no luck displaying the stupid servername. Any other things I can try?


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
You'll want to change your Order By statement to 'ORDER BY CountSteps 
DESC'.


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:

echo $query;

yields

SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
LIMIT 10




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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote:

> What I want to do is find the top 10 servers where the column steps =
> iisreset. The following code works great except that the page is not
> displaying the servername in the 'Server Name' column of my results (nothing
> appears, the column is just blank).
>
> servername and steps are the important columns in the database table.
> $_POST[time1] and $_POST[time2] come from a form submitted.
>
> When I copy and paste the entire select statement into the SQL tab in
> phpmyadmin (and replace the time variables with actual times corresponding
> to the timestamp column), it displays the correct results including
> servername. Everything works in the php page's results except for the
> servername. I feel like it's right in front of my face and that's why I
> can't see it lol. Any help would be greatly appreciated. Thanks in advance
> =)
>
> My code...
>
> $query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps LIKE
> 'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >= '$_POST[time1]'
> GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";
> $result = mysql_query($query) or die(mysql_error());
>
> # display column titles
> echo "";
> echo "Count";
> echo "Server
> Name";
> echo "";
>
> #display results
> while($i = mysql_fetch_row($result))
> {
> echo "", $i[COUNT('steps')],
> "";
> echo "", $i[servername] ,"";
> }
> echo "";
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
$i[servername]

Try:  $i['servername']

notice the ' and ' around the name.  I've heard you can do w/o those, but
I've had issues in the past where it didn't work.  ITs also good practice to
use 'em.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
Do var_dump($i) in the loop to see if you're getting the data you want.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:
> Still no luck displaying the stupid servername. Any other things I can
> try?
>
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> You'll want to change your Order By statement to 'ORDER BY CountSteps
>> DESC'.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>> echo $query;
>>>
>>> yields
>>>
>>> SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
>>> steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
>>> timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
>>> LIMIT 10
>>>
>
>

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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Jochem Maas

Ashley Sheridan schreef:

On Wed, 2008-09-17 at 14:49 -0400, Dan Joseph wrote:

On Wed, Sep 17, 2008 at 2:28 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:


Robert Cummings schreef:


On Wed, 2008-09-17 at 13:00 -0400, John Biroldi wrote:


*   Fluent in at least three of the following development languages:
*   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, VBA,
XML,
XSLT, relational databases and concepts of object-oriented programming.


Anyone else not see PHP in the above?


no I'm not seeing it.

apart from that, what kind of project can't standardize on a single
development 'platform'? .NET *and* Java?

the funny thing is http://www.pinnacleus.com/ is a completely bogus site,
that's technically a complete pile of crap on top of containing *no*
information.

catchphrase of the day: "get a site, get a clue and get a .NET developer
somewhere else".



Cheers,
Rob.



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



Not to defend thisBUT

There are places that use multiple platforms.  My company uses .NET and PHP
for different things.  Also recruiters will often target people who have
related knowledge to what they're looking for.  I.E. looking for a PHP
programmer, but will consider someone who knows C or Java instead.


Yeah, just recently we've had to mix in a PHP script with a ColdFusion
site because PHP is able to do what CF can't, and they don't want to
keep paying for those bloody extensions!


that's rather different than saying: let's build this site on ColdFusion and
Java and .NET

besides php is like superglue, you can use it to fix anything :-)
I guess you weren't in a position to say the real solution was 'dump CF, use 
php instead'

:-P



As for the job email though, come on, that's plainly spam from some
idiot who doesn't know his ASP from his elbow!


lol.




Ash
www.ashleysheridan.co.uk





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



Re: [PHP] Install problem

2008-09-17 Thread Jochem Maas

Illó Gábor schreef:

Hello

I have this error when i type make:

ml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lcrypt -o libphp5.la
/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 can
not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
*** Error code 1


try adding '--with-pic' to the configure line.


Can somebody help me? SYS: FreeBSD 7.0 AMD64

./configure --prefix=/usr/local/php \
--with-apxs2=/usr/local/sbin/apxs \
--with-mysql \
--with-gd \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--enable-shared \
--enable-static \


aren't these last two a bit mutually exclusive?


--with-pear \
--with-mcrypt \
--with-iconv \
--with-openssl \
--with-config-file-path=/usr/local/php \
--enable-mbstring \
--with-sqlite \
--with-pdo-sqlite \
--without-sybase-ct \
--without-pgsql \
--without-mssql \
--without-msql \
--enable-ftp \
--enable-sockets \
--enable-pcntl \
--with-imap=/usr/lib \
--with-imap-ssl=/usr/lib




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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta 
<[EMAIL PROTECTED]>wrote:



What I want to do is find the top 10 servers where the column steps =
iisreset. The following code works great except that the page is not
displaying the servername in the 'Server Name' column of my results 
(nothing

appears, the column is just blank).

servername and steps are the important columns in the database table.
$_POST[time1] and $_POST[time2] come from a form submitted.

When I copy and paste the entire select statement into the SQL tab in
phpmyadmin (and replace the time variables with actual times 
corresponding

to the timestamp column), it displays the correct results including
servername. Everything works in the php page's results except for the
servername. I feel like it's right in front of my face and that's why I
can't see it lol. Any help would be greatly appreciated. Thanks in 
advance

=)

My code...

$query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps 
LIKE
'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >= 
'$_POST[time1]'

GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";
$result = mysql_query($query) or die(mysql_error());

# display column titles
echo "";
echo "Count";
echo "Server
Name";
echo "";

#display results
while($i = mysql_fetch_row($result))
{
echo "", $i[COUNT('steps')],
"";
echo "", $i[servername] 
,"";

}
echo "";

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



$i[servername]

Try:  $i['servername']

notice the ' and ' around the name.  I've heard you can do w/o those, but
I've had issues in the past where it didn't work.  ITs also good practice 
to

use 'em.

--
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."




yeah, I've tried that combination before, but just for grins I tried it 
again, and same result. It displays the counts but not the servernames. 



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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta
var_dump($i); looks messy, but I can see the server names in there and they 
are the correct names.



"Micah Gersten" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Do var_dump($i) in the loop to see if you're getting the data you want.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:

Still no luck displaying the stupid servername. Any other things I can
try?


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

You'll want to change your Order By statement to 'ORDER BY CountSteps
DESC'.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:

echo $query;

yields

SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
LIMIT 10







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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
What is the key for the server name?  That's what you need when you
output it.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:
> var_dump($i); looks messy, but I can see the server names in there and
> they are the correct names.
>
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Do var_dump($i) in the loop to see if you're getting the data you want.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>> Still no luck displaying the stupid servername. Any other things I can
>>> try?
>>>
>>>
>>> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
>>> news:[EMAIL PROTECTED]
 You'll want to change your Order By statement to 'ORDER BY CountSteps
 DESC'.

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com



 Vinny Gullotta wrote:
> echo $query;
>
> yields
>
> SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
> steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
> timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
> LIMIT 10
>
>>>
>>>
>
>

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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 4:21 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote:

> var_dump($i); looks messy, but I can see the server names in there and they
> are the correct names.
>
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>  Do var_dump($i) in the loop to see if you're getting the data you want.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>
>>> Still no luck displaying the stupid servername. Any other things I can
>>> try?
>>>
>>>
>>> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
>>> news:[EMAIL PROTECTED]
>>>
 You'll want to change your Order By statement to 'ORDER BY CountSteps
 DESC'.

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com



 Vinny Gullotta wrote:

> echo $query;
>
> yields
>
> SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
> steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
> timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
> LIMIT 10
>
>
>>>
>>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Can you show us one of the var_dumps?

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta

var_dump looks like this:

array(2) { [0]=> string(9) "wehost006" [1]=> string(2) "72" } array(2) { 
[0]=> string(8) "H7848-49" [1]=> string(2) "71" } array(2) { [0]=> string(7) 
"H7853-2" [1]=> string(2) "70" } array(2) { [0]=> string(7) "H7842-2" [1]=> 
string(2) "64" } array(2) { [0]=> string(9) "WEHOST005" [1]=> string(2) 
"64" } array(2) { [0]=> string(7) "h7835-2" [1]=> string(2) "57" } array(2) 
{ [0]=> string(9) "wehost007" [1]=> string(2) "56" } array(2) { [0]=> 
string(7) "H7814-1" [1]=> string(2) "55" } array(2) { [0]=> string(5) 
"H0542" [1]=> string(2) "54" } array(2) { [0]=> string(8) "H7811-12" [1]=> 
string(2) "54" }



""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
On Wed, Sep 17, 2008 at 4:21 PM, Vinny Gullotta 
<[EMAIL PROTECTED]>wrote:


var_dump($i); looks messy, but I can see the server names in there and 
they

are the correct names.


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

 Do var_dump($i) in the loop to see if you're getting the data you want.


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:


Still no luck displaying the stupid servername. Any other things I can
try?


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]


You'll want to change your Order By statement to 'ORDER BY CountSteps
DESC'.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:


echo $query;

yields

SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
LIMIT 10







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



Can you show us one of the var_dumps?

--
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."




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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta

If by key you mean the column in the database, it's called: servername

"Micah Gersten" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

What is the key for the server name?  That's what you need when you
output it.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:

var_dump($i); looks messy, but I can see the server names in there and
they are the correct names.


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Do var_dump($i) in the loop to see if you're getting the data you want.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:

Still no luck displaying the stupid servername. Any other things I can
try?


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

You'll want to change your Order By statement to 'ORDER BY CountSteps
DESC'.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:

echo $query;

yields

SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
LIMIT 10










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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
That's your problem, you need to use mysql_fetch_assoc instead of
mysql_fetch_row.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:
> var_dump looks like this:
>
> array(2) { [0]=> string(9) "wehost006" [1]=> string(2) "72" } array(2)
> { [0]=> string(8) "H7848-49" [1]=> string(2) "71" } array(2) { [0]=>
> string(7) "H7853-2" [1]=> string(2) "70" } array(2) { [0]=> string(7)
> "H7842-2" [1]=> string(2) "64" } array(2) { [0]=> string(9)
> "WEHOST005" [1]=> string(2) "64" } array(2) { [0]=> string(7)
> "h7835-2" [1]=> string(2) "57" } array(2) { [0]=> string(9)
> "wehost007" [1]=> string(2) "56" } array(2) { [0]=> string(7)
> "H7814-1" [1]=> string(2) "55" } array(2) { [0]=> string(5) "H0542"
> [1]=> string(2) "54" } array(2) { [0]=> string(8) "H7811-12" [1]=>
> string(2) "54" }
>
>
> ""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> On Wed, Sep 17, 2008 at 4:21 PM, Vinny Gullotta
>> <[EMAIL PROTECTED]>wrote:
>>
>>> var_dump($i); looks messy, but I can see the server names in there
>>> and they
>>> are the correct names.
>>>
>>>
>>> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
>>> news:[EMAIL PROTECTED]
>>>
>>>  Do var_dump($i) in the loop to see if you're getting the data you
>>> want.

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com



 Vinny Gullotta wrote:

> Still no luck displaying the stupid servername. Any other things I
> can
> try?
>
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> You'll want to change your Order By statement to 'ORDER BY
>> CountSteps
>> DESC'.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>
>>> echo $query;
>>>
>>> yields
>>>
>>> SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
>>> steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
>>> timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*)
>>> DESC
>>> LIMIT 10
>>>
>>>
>
>
>>>
>>> -- 
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>> Can you show us one of the var_dumps?
>>
>> -- 
>> -Dan Joseph
>>
>> www.canishosting.com - Plans start @ $1.99/month.
>>
>> "Build a man a fire, and he will be warm for the rest of the day.
>> Light a man on fire, and will be warm for the rest of his life."
>>
>
>

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



Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Dan Joseph
On Wed, Sep 17, 2008 at 4:30 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote:

> If by key you mean the column in the database, it's called: servername
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>  What is the key for the server name?  That's what you need when you
>> output it.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>
>>> var_dump($i); looks messy, but I can see the server names in there and
>>> they are the correct names.
>>>
>>>
>>> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
>>> news:[EMAIL PROTECTED]
>>>
 Do var_dump($i) in the loop to see if you're getting the data you want.

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com



 Vinny Gullotta wrote:

> Still no luck displaying the stupid servername. Any other things I can
> try?
>
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> You'll want to change your Order By statement to 'ORDER BY CountSteps
>> DESC'.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>
>>> echo $query;
>>>
>>> yields
>>>
>>> SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
>>> steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
>>> timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) DESC
>>> LIMIT 10
>>>
>>>
>
>
>>>
>>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Thanks, I know your problem, sorry for not seeing this sooner.
mysql_fetch_row returns the numerical array types.  $array[0]...  You want
to use mysql_fetch_array().  Change to that, and you should be seeing the
servername's.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
I meant key in the array that was returned by MySQL.  I answered you in
my other post.  The array was numerically index based instead of column
based.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:
> If by key you mean the column in the database, it's called: servername
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> What is the key for the server name?  That's what you need when you
>> output it.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>> var_dump($i); looks messy, but I can see the server names in there and
>>> they are the correct names.
>>>
>>>
>>> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
>>> news:[EMAIL PROTECTED]
 Do var_dump($i) in the loop to see if you're getting the data you
 want.

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com



 Vinny Gullotta wrote:
> Still no luck displaying the stupid servername. Any other things I
> can
> try?
>
>
> "Micah Gersten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> You'll want to change your Order By statement to 'ORDER BY
>> CountSteps
>> DESC'.
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Vinny Gullotta wrote:
>>> echo $query;
>>>
>>> yields
>>>
>>> SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
>>> steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
>>> timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*)
>>> DESC
>>> LIMIT 10
>>>
>
>
>>>
>>>
>
>

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



Re: [PHP] SQL outer join problem

2008-09-17 Thread Liz Kim
I've tried using the same php.ini file and phpinfo() shows the same info for
both servers.

I think I've narrowed the problem down a little bit though. After looking
into the Driver Manager's log and I found that
SQLExtendedFetch is being called on server 2 (incomplete result) and
SQLFetch on server 1 (correct result).

Can someone please tell me when PHP calls SQLExtendedFetch in stead of
SQLFetch?  How can I configure PHP to use SQLFetch instead?

Thanks!
On Tue, Sep 16, 2008 at 4:25 PM, Micah Gersten <[EMAIL PROTECTED]> wrote:

> Compare phpinfo() on both servers.
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>
>
> Liz Kim wrote:
> >  have a very simple script which connects to a database, execute a query
> > then displays the result.
> > This script uses odbc_connect and functions.
> >
> > There are two identical Apache web servers and one MS SQL database
> server.
> > When the script is ran on web server #1, all the results are returned
> > correctly.
> > Ran on server #2, however, some entries are missing.
> > Same script, different result..
> >
> > I am using left outer join in the SQL query and the missing items are the
> > ones that should be canceled out from this join.
> > I directly ran the query on the database and made sure it is not causing
> and
> > problems.
> > I checked the odbc setting on php.ini and odbc.ini on both servers.  No
> > difference.
> > No permission problems either as I am logging in as the same user...
> >
> > Any ideas???
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Vinny Gullotta

That was it!!! Thank you all so much for your help!!! =D


""Dan Joseph"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
On Wed, Sep 17, 2008 at 4:30 PM, Vinny Gullotta 
<[EMAIL PROTECTED]>wrote:



If by key you mean the column in the database, it's called: servername

"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

 What is the key for the server name?  That's what you need when you

output it.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:


var_dump($i); looks messy, but I can see the server names in there and
they are the correct names.


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Do var_dump($i) in the loop to see if you're getting the data you 
want.


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:

Still no luck displaying the stupid servername. Any other things I 
can

try?


"Micah Gersten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

You'll want to change your Order By statement to 'ORDER BY 
CountSteps

DESC'.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vinny Gullotta wrote:


echo $query;

yields

SELECT servername, COUNT(steps) as CountSteps FROM monitoring WHERE
steps = 'IISRESET' AND timestamp <= '2008-09-17 11:40:34' AND
timestamp >= '2008-08-17' GROUP BY servername ORDER BY COUNT(*) 
DESC

LIMIT 10










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



Thanks, I know your problem, sorry for not seeing this sooner.
mysql_fetch_row returns the numerical array types.  $array[0]...  You want
to use mysql_fetch_array().  Change to that, and you should be seeing the
servername's.

--
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."




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



[PHP] SQLExtendedFetch

2008-09-17 Thread Liz Kim
I've posted this already but I thought a new subject might help..

I have a script which connects to a MS SQL database, executes a query then
displays the result.
There are two identical Apache web servers and one MS SQL database server.
When the script is ran on web server #1, all the results are returned
correctly.
Ran on server #2, however, some entries are missing.
Same script, different result..

After looking into the Driver Manager's log and I found that
SQLExtendedFetch is being called on server 2 (incomplete result) and
SQLFetch on server 1 (correct result).

Can someone please tell me when PHP calls SQLExtendedFetch in stead of
SQLFetch?
How can I configure PHP to use SQLFetch instead?

Thanks a lot!


Re: [PHP] SQLExtendedFetch

2008-09-17 Thread Ashley Sheridan
On Wed, 2008-09-17 at 15:30 -0700, Liz Kim wrote:

> I've posted this already but I thought a new subject might help..
> 
> I have a script which connects to a MS SQL database, executes a query then
> displays the result.
> There are two identical Apache web servers and one MS SQL database server.
> When the script is ran on web server #1, all the results are returned
> correctly.
> Ran on server #2, however, some entries are missing.
> Same script, different result..
> 
> After looking into the Driver Manager's log and I found that
> SQLExtendedFetch is being called on server 2 (incomplete result) and
> SQLFetch on server 1 (correct result).
> 
> Can someone please tell me when PHP calls SQLExtendedFetch in stead of
> SQLFetch?
> How can I configure PHP to use SQLFetch instead?
> 
> Thanks a lot!

If you have Apache on IIS, why not go MySQL. It's a fair bit faster I've
found, and a darn site easier to work with; no M$ attempts to lock you
into using only Enterprise Manager to mess with the database, etc.


Ash
www.ashleysheridan.co.uk


Re: [PHP] PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Jochem Maas

Dan Joseph schreef:

On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <[EMAIL PROTECTED]>wrote:


...




$i[servername]

Try:  $i['servername']

notice the ' and ' around the name.  I've heard you can do w/o those, but
I've had issues in the past where it didn't work.  ITs also good practice to
use 'em.


yes, not quoting the array key will generate an E_NOTICE, php first looks for
a constant named **servername** doesn't find it and falls back to using the
literal as a string value, namely 'servername'

developed with error_reporting set to E_ALL and such things are explained to 
you.






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



[PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Nathan Rixham

Vinny Gullotta wrote:
What I want to do is find the top 10 servers where the column steps = 
iisreset. The following code works great except that the page is not 
displaying the servername in the 'Server Name' column of my results 
(nothing appears, the column is just blank).


servername and steps are the important columns in the database table. 
$_POST[time1] and $_POST[time2] come from a form submitted.


When I copy and paste the entire select statement into the SQL tab in 
phpmyadmin (and replace the time variables with actual times 
corresponding to the timestamp column), it displays the correct results 
including servername. Everything works in the php page's results except 
for the servername. I feel like it's right in front of my face and 
that's why I can't see it lol. Any help would be greatly appreciated. 
Thanks in advance =)


My code...

$query = "SELECT servername, COUNT(steps) FROM monitoring WHERE steps 
LIKE 'iisreset' AND timestamp <= '$_POST[time2]' AND timestamp >= 
'$_POST[time1]' GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10";

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

# display column titles
echo "";
echo "Count";
echo "Server 
Name";

echo "";

#display results
while($i = mysql_fetch_row($result))
{
echo "", $i[COUNT('steps')], 
"";

echo "", $i[servername] ,"";
}
echo "";


just a few little notes.. because I'm like this today

(none of it is a you must do, or meant badly, just aiming to save you 
some time by passing on a few *things*)


1: SQL
in mysql queries /should/ use backticks (`) around database, table and 
column names, stop's them getting confused with variables or reserved 
words (like timestamp) and saves you future trouble :)


further, you'll be needing to use AS to turn COUNT(steps) into a nice 
name like "stepcount"


so..
$query = 'SELECT `servername`, COUNT(`steps`) AS stepcount FROM 
`monitoring` WHERE `steps` LIKE "iisreset" AND `timestamp` <= ' . 
$_POST[time2] . ' AND `timestamp` >= ' . $_POST[time1] . ' GROUP BY 
`servername` ORDER BY COUNT(*) DESC LIMIT 10';


2: you should be cleaning those posts before you add them to a mysql 
query; this has been covered many times so I won't repost it 
(mysql_real_escape() or sprintf or.. many different methods]


3: Needless multiple echo's; one will suffice just fine and show it up 
in your editor as a nice easily visible block of html :)


echo '
Count
Server Name
';

4: valid xhtml; in my opinion there's no excuse now; it's been years 
since it came out (and you're already using css); this will do the same 
as above:

echo '

Count
Server Name
';

[css to center the table would be]
table.center {
margin: 0 auto;
}

5: mysql_fetch_row() returns a numerical indexed array.. not associative 
thus:

$i = mysql_fetch_row($result)
print_r($i);

will show..
$i[0] => the server name
$i[1] => stepcount value

you'll be needing
$i = mysql_fetch_assoc($result);
print_r($i);

which will show
$i['servername'] => the server name
$i['stepcount'] => stepcount value

6: " vs '
when you use " php will parse the enclosed string for variables, when 
you use ' it won't; so ' leads for faster code, and also encourages you 
to code strongly by closing strings and concatenating variables.
Further it allows you to use valid html " around attributes rather than 
the invalid '


7: , vs .
there is no vs :) to concatenate we use . (period) not , (comma)

so for 6 & 7..
echo '' . $i['servername'] . '';

I'm going to stop there, hope it helps a little bit; and I won't go any 
further as half the fun is learning; so you finding out how to save time 
on queries and write your own db handlers etc is not my domain I reckons


Regards

nathan

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



Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece.  It saves the overhead of concatenation before
output.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Nathan Rixham wrote:
>
> 6: " vs '
> when you use " php will parse the enclosed string for variables, when
> you use ' it won't; so ' leads for faster code, and also encourages
> you to code strongly by closing strings and concatenating variables.
> Further it allows you to use valid html " around attributes rather
> than the invalid '
>
> 7: , vs .
> there is no vs :) to concatenate we use . (period) not , (comma)
>
> so for 6 & 7..
> echo '' . $i['servername'] . '';
>
> I'm going to stop there, hope it helps a little bit; and I won't go
> any further as half the fun is learning; so you finding out how to
> save time on queries and write your own db handlers etc is not my
> domain I reckons
>
> Regards
>
> nathan
>

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



Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Nathan Rixham

learn something new every day! cheers Micah :)

Micah Gersten wrote:

While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece.  It saves the overhead of concatenation before
output.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Nathan Rixham wrote:

6: " vs '
when you use " php will parse the enclosed string for variables, when
you use ' it won't; so ' leads for faster code, and also encourages
you to code strongly by closing strings and concatenating variables.
Further it allows you to use valid html " around attributes rather
than the invalid '

7: , vs .
there is no vs :) to concatenate we use . (period) not , (comma)

so for 6 & 7..
echo '' . $i['servername'] . '';

I'm going to stop there, hope it helps a little bit; and I won't go
any further as half the fun is learning; so you finding out how to
save time on queries and write your own db handlers etc is not my
domain I reckons

Regards

nathan



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



[PHP] Re: SQLExtendedFetch

2008-09-17 Thread Nathan Rixham

Liz Kim wrote:

I've posted this already but I thought a new subject might help..

I have a script which connects to a MS SQL database, executes a query then
displays the result.
There are two identical Apache web servers and one MS SQL database server.
When the script is ran on web server #1, all the results are returned
correctly.
Ran on server #2, however, some entries are missing.
Same script, different result..

After looking into the Driver Manager's log and I found that
SQLExtendedFetch is being called on server 2 (incomplete result) and
SQLFetch on server 1 (correct result).

Can someone please tell me when PHP calls SQLExtendedFetch in stead of
SQLFetch?
How can I configure PHP to use SQLFetch instead?

Thanks a lot!



I am guessing wildly here; but have you checked the ODBC versions are 
the same; and that PHP versions are the same; if not then upgrade faulty 
servers php/odbc to correct servers version.


[googling shows lots of bugs here]

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



Re: [PHP] Web Project Leader -- Contract - San Francisco area

2008-09-17 Thread Nathan Rixham

Jochem Maas wrote:

Ashley Sheridan schreef:

On Wed, 2008-09-17 at 14:49 -0400, Dan Joseph wrote:
On Wed, Sep 17, 2008 at 2:28 PM, Jochem Maas <[EMAIL PROTECTED]> 
wrote:



Robert Cummings schreef:


On Wed, 2008-09-17 at 13:00 -0400, John Biroldi wrote:

*   Fluent in at least three of the following development 
languages:
*   Microsoft .NET Framework ( VB.NET or C#), ASP, JSP, Java, 
VBA,

XML,
XSLT, relational databases and concepts of object-oriented 
programming.



Anyone else not see PHP in the above?


no I'm not seeing it.

apart from that, what kind of project can't standardize on a single
development 'platform'? .NET *and* Java?

the funny thing is http://www.pinnacleus.com/ is a completely bogus 
site,

that's technically a complete pile of crap on top of containing *no*
information.

catchphrase of the day: "get a site, get a clue and get a .NET 
developer

somewhere else".



Cheers,
Rob.



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



Not to defend thisBUT

There are places that use multiple platforms.  My company uses .NET 
and PHP

for different things.  Also recruiters will often target people who have
related knowledge to what they're looking for.  I.E. looking for a PHP
programmer, but will consider someone who knows C or Java instead.


Yeah, just recently we've had to mix in a PHP script with a ColdFusion
site because PHP is able to do what CF can't, and they don't want to
keep paying for those bloody extensions!


that's rather different than saying: let's build this site on ColdFusion 
and

Java and .NET

besides php is like superglue, you can use it to fix anything :-)
I guess you weren't in a position to say the real solution was 'dump CF, 
use php instead'


:-P



As for the job email though, come on, that's plainly spam from some
idiot who doesn't know his ASP from his elbow!


lol.




Ash
www.ashleysheridan.co.uk






so anybody applied? :'(

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



Re: [PHP] Re: MySQL Workbench coming for Linux

2008-09-17 Thread Ross McKay
Bastien Koert wrote:

>what about dia on llinux? Not quite as nice as visio...but livable

The Enterprise Architect version of Visio lets you add column
definitions to your entities, add foreign key relationships, add
indices, add comments at the table and column level, and then generate a
build script. It also has a reporting tool for generating a data
dictionary. In short, it makes a pretty good stab at being a data
modelling tool (imperfectly, but sufficiently for my needs).

Dia is just a diagramming tool (unless you can tell me otherwise).
-- 
Ross McKay, Toronto, NSW Australia
"Nobody ever rioted for austerity" - George Monbiot

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



Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Chris



1: SQL
in mysql queries /should/ use backticks (`) around database, table and 
column names, stop's them getting confused with variables or reserved 
words (like timestamp) and saves you future trouble :)


.. which is a mysql-ism - no other database supports this. As soon as 
you need to use another db (regardless of whether it's this application 
or not), you're stuffed.


For reserved word column names, you don't have much choice but don't do 
that in the first place ;)


http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

Other db's will have a similar list - though in most cases, if it's a 
function or sql keyword (eg 'table'), it'll be reserved in all.


further, you'll be needing to use AS to turn COUNT(steps) into a nice 
name like "stepcount"


Which is also a mysql-ism. Most other db's don't let you use aggregate 
aliases in an order by clause (I think because the sql standard says 
don't do that).


--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] SQL outer join problem

2008-09-17 Thread Chris

Liz Kim wrote:

I've tried using the same php.ini file and phpinfo() shows the same info for
both servers.

I think I've narrowed the problem down a little bit though. After looking
into the Driver Manager's log and I found that
SQLExtendedFetch is being called on server 2 (incomplete result) and
SQLFetch on server 1 (correct result).

Can someone please tell me when PHP calls SQLExtendedFetch in stead of
SQLFetch?  How can I configure PHP to use SQLFetch instead?


Seems to be something to do with your odbc settings. Are they the same 
on both servers?


--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] SQLExtendedFetch

2008-09-17 Thread Chris



If you have Apache on IIS, why not go MySQL. It's a fair bit faster I've
found, and a darn site easier to work with;


because changing a web server is a lot easier than rewriting an app to 
use another database ;)


--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] Email Verification

2008-09-17 Thread Lupus Michaelis

Richard Heyes a écrit :


New domain name extensions can be accounted for easily, eg:

\.(?:[a-z]){2,4}


  It excludes .museum tld.

--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

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



Re: [PHP] Email Verification

2008-09-17 Thread Per Jessen
Lupus Michaelis wrote:

> Richard Heyes a écrit :
> 
>> New domain name extensions can be accounted for easily, eg:
>> 
>> \.(?:[a-z]){2,4}
> 
>It excludes .museum tld.

Don't make assumptions about which TLDs that are or are not allowed -
the domain part of an email address could be validated with this:

@[a-z0-9][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)+

A test for total length and valid use of hyphens should be added.  See
RFC1034.  Then look up the A record. 



/Per Jessen, Zürich


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