php-general Digest 28 Jun 2005 06:16:31 -0000 Issue 3537

2005-06-28 Thread php-general-digest-help

php-general Digest 28 Jun 2005 06:16:31 - Issue 3537

Topics (messages 217704 through 217741):

Re: PHP vs. ColdFusion
217704 by: Matt Babineau

shell expansion (globbing) from inside php cli script
217705 by: b-bonini.cox.net
217706 by: André Medeiros
217719 by: Brian V Bonini
217725 by: Jasper Bryant-Greene
217730 by: Bob Winter

the EXEC command
217707 by: mikael
217708 by: Jason Barnett
217709 by: John Nichel

Re: Removing nonlatin characters
217710 by: Dotan Cohen
217711 by: John Nichel
217712 by: Jay Blanchard
217713 by: Dotan Cohen

Re: Sybase and PHP
217714 by: Jamie Alessio

APD Problem
217715 by: Amir Mohammad Saied

Breaking up data efficiently
217716 by: Wee Keat
217717 by: Jasper Bryant-Greene
217718 by: Philip Hallstrom
217721 by: Tom Rogers
217723 by: Tom Rogers
217737 by: Kevin L'Huillier

looking for a pure startup opportunity..
217720 by: bruce
217722 by: Richard Davey
217724 by: bruce
217726 by: Esteamedpw.aol.com

Re: Breaking up data efficiently -- closed
217727 by: Wee Keat

Re: Object Oriented PHP (5)
217728 by: Esteamedpw.aol.com

Re: Display picture from MySQL
217729 by: Esteamedpw.aol.com

Email screwing my swedish characters
217731 by: Ryan A
217733 by: Manuel Lemos
217734 by: Ryan A
217736 by: Manuel Lemos

Dynamic pspell module, and adding new words to the list
217732 by: Dan Rossi

ad management
217735 by: Sebastian
217739 by: Kevin L'Huillier

Question about HTTP 301 permanent redirects
217738 by: Dr. Brad Lustick
217740 by: Kevin L'Huillier
217741 by: Jasper Bryant-Greene

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-general@lists.php.net


--
---BeginMessage---
Yeah - I'll second all of this. I'm a Certified Macromedia CF Developer,
why do you ask am I on this list? The answer is simple, php is better.
However with the recent developments in CF6, CF has become very comparable.
Why would I still choose PHP over CF given this? Ease of management. I don't
have to even think about the server. I spend about 1 hr a month messing
around with the server (daemon restarts or php config changes). That's where
LAMP's value really shines through I think you will find. 



Thanks,

Matt Babineau
Criticalcode
858.733.0160
[EMAIL PROTECTED]
http://www.criticalcode.com
 
-Original Message-
From: Brad Pauly [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 27, 2005 11:09 AM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP vs. ColdFusion

On 6/26/05, Rick Emery [EMAIL PROTECTED] wrote:
 My employer has (finally) decided to take full advantage of our 
 intranet, and wants to move from client-server applications to 
 web-based applications. To that end, we're trying to determine the 
 best platform for our applications. We're a Microsoft shop, with 
 Microsoft SQL Server 2000 for all of our databases (that won't change 
 any time soon, if ever). Due to past experience that I won't get into, 
 we (the Development group) have all agreed that ASP.Net is out (at 
 least for the short term).
 
 We had the opportunity to visit a local enterprise that has deployed 
 ColdFusion, and they couldn't stop singing its praises. I'm partial to 
 PHP, even after sampling Coldfusion, so what I would like is some 
 ammunition that I can take into a meeting to sell management on 
 PHP instead of ColdFusion. I've already been harping on the difference 
 in cost, so I'm looking for other points to go with. Besides, we'll 
 probably invest in Zend products if we choose PHP, and Macromedia has 
 government rates available; I don't have any numbers (yet), but the 
 cost difference may not be that great in the end.
 
 Any input would be greatly appreciated. Opinions are welcome 
 (especially from programmers with experience in both), but I have to 
 sell it to management (I'm already on the PHP side), so links to 
 data or articles comparing the two are best.

It might not be easy to put a number on, but consider your (and possibly the
other developers') enthusiasm about PHP. I would guess that you will be more
productive with something that you are excited about.

I have done a lot of work in both ColdFusion and PHP and I much prefer PHP.
There are some technical reasons (i.e., I like shared nothing), but some
of it is also personal preference. I just like it. CF is fine and I don't
think it's dead, but it just isn't as fun to work with. My biggest problem
with CF is probably that I have to use it on Windows and, well, I really
don't like that. ;) You mention being in a Windows environment so maybe 

Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Jasper Bryant-Greene
Kevin L'Huillier wrote:
 On 27/06/05, Dr. Brad Lustick [EMAIL PROTECTED] wrote:
I'm a novice trying to understand the exact construction of code for doing an 
HTTP 301 permanent redirect for a server
coded in PHP. Could someone please tell me how I would handle the following 
example?
 
 In your case you might want to do something like:
 
 $article = $_REQUEST['i'];
 // some validation of $article if necessary
 $url = sprintf('/services.php/%s'. $i);
 header('Location: ' . $url);

WRONG. He specifically said please only reply if you know how. Obviously
you do not.

To do an HTTP/1.1 *301 Permanent Redirect* not a *302 Found* Redirect as
you described, that code would need to be altered to:

$article = $_REQUEST['i'];
// some validation of $article if necessary
$url = sprintf('/services.php/%s'. $i);
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $url);

Jasper

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



[PHP] Zeus Technology wins again!

2005-06-28 Thread Jock Busuttil
Zeus Technology has won a further two awards from TechWorld for our
groundbreaking Zeus Extensible Traffic Manager (ZXTM), an advanced load
balancing and application traffic management solution.  ZXTM came out on
top despite stiff competition from F5 Networks' BIG-IP 6400 and
Netscaler's Application Delivery System.

ZXTM combines functionality that businesses need now, such as SSL, load
balancing and application acceleration, with emerging technologies that
will be of increasing importance to applications in the future, such as
native XML and SOAP capabilities.

Editor of Techworld.com, Maxwell Cooter, commented on the awards, There
were some interesting products in the accelerator category section but
Zeus got the nod over some well-known competitors because of the way that
it covered all bases from application and XML acceleration to server
optimisation, and at a lower price. The Editor's Award is always a tough
section to judge as we have to compare differing technologies. The judges
felt that Zeus offered a genuinely innovative alternative in the field of
traffic optimisation and acceleration and was a worthy winner.

Our success at Techworld.com's Network Awards comes less than a month
after Network Magazine selected ZXTM for their Product Breakthrough
award in the Application-Aware Infrastructure category.

If you'd like to know more or would like to try out ZXTM for yourself, I'd
be happy to share further information with you.  Feel free to drop me a
line with your needs and I'll get back to you as soon as I can.

Best regards,

Jock Busuttil
Product Marketing Manager



ZXTM - More than just a load balancer


  Winner of the Product Breakthrough award
  at Network Magazine's Innovation Awards, May 2005

   Winner of the Accelerator Product of the Year
   and Editor's Award at Techworld.com's
  Network Awards, June 2005


-- 
Jock Busuttil [EMAIL PROTECTED]Tel: +44 (0) 1223 525000
Product Marketing Manager Fax: +44 (0) 1223 525100
Zeus Technology Ltd.  Web: http://www.zeus.com
The Jeffreys Building, Cowley Road, Cambridge, CB4 OWS, United Kingdom

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



Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Jochem Maas

Jasper Bryant-Greene wrote:

Kevin L'Huillier wrote:


On 27/06/05, Dr. Brad Lustick [EMAIL PROTECTED] wrote:


I'm a novice trying to understand the exact construction of code for doing an 
HTTP 301 permanent redirect for a server
coded in PHP. Could someone please tell me how I would handle the following 
example?


I don't think the server itself is coded in php - and regardless of the 
technology used to deliver a site,
php is not required to output a HTTP header - although it does make it easy :-)



In your case you might want to do something like:

$article = $_REQUEST['i'];
// some validation of $article if necessary
$url = sprintf('/services.php/%s'. $i);
header('Location: ' . $url);



WRONG. He specifically said please only reply if you know how. Obviously
you do not.


and you can't ber bothered to read properly either, you reuse the other guys' 
code
but you fail to see it has blatant typos in it - given your resounding WRONG 
I figure
the least you could do it post something that isn't.

besides if you ask me, saying things like please only reply if you know how 
is:

a, pretty implicit when asking a question.
b, shortsighted
c, a little rude
d, the OP has the title 'Dr.' - now I have friends who are doctors in various 
fields,
and I expect everyone of them to be able to use google,  ... hint hint.

thankfully Jasper 'knows how'



To do an HTTP/1.1 *301 Permanent Redirect* not a *302 Found* Redirect as
you described, that code would need to be altered to:

$article = $_REQUEST['i'];
// some validation of $article if necessary
$url = sprintf('/services.php/%s'. $i);


   ^ typo! (also where is $i coming from?)


header('HTTP/1.1 301 Moved Permanently');


also consider that using 'Status' may be better or possibly both to cover
you bases, e.g.:


?php

header(HTTP/1.1 301 Moved Permanently);
header(Status: 301 Moved Permanently);

?



header('Location: ' . $url);

Jasper



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



[PHP] Files

2005-06-28 Thread Chris Grigor
Hey all,

I am having a bash at working with flat files.

What I am trying to achieve is the following

There are 2 files with info in them, 
file1 has
id,email

and file2 has 
id,filename

what I am trying to achieve is open up file1 get the id and email then
open file2 and match the id of file1 to id of file2, then if succesful
send a mail with the filename in file2.

Maybe have a look at the code...

$recp_list = fopen(mail_group_list.txt, r);

while(!feof($recp_list))
{

$line = fgets($recp_list, 255);

$line = chop($line);

$split = explode(,, $line);

$id = $split[0];
$email = $split[1];

// time to mail.

if ($email != ) {



$group_list = fopen(file_group_list.txt, r);

while(!feof($group_list))
{
$groupline = fgets($group_list, 255);

$groupline = chop($groupline);

$groupsplit = explode(,, $groupline);

$groupid = $groupsplit[0];
$groupFileName = $groupsplit[1];

if($groupid = $id)
{


// start mailing
$fromname = Test Mailer;
$fromaddress = [EMAIL PROTECTED]; 
$subject = Test mail;
$message = Test message $groupFileName;
$headers = From: \.$fromname.\ .$fromaddress.\n;
   
   // Notify the user on screen if the send was succesfull
   if(mail($email, $subject, $message, $headers))

{ 
print Mail sent successfully to $email;
}
else
{
print Mail not sent to $email;
}


}#end if groupid = id
}#end while group list
}#end if email


}#end while email !=
?


So thats the mail.php

mail_list_group.txt looks like this 

1,test@test.com
5,[EMAIL PROTECTED]
7,test@test.com

file_group_list.txt looks like this 

2,filename1.doc
3,filename2.doc
4,filename3.doc

Any help on this would be great !

Cheers
Chris

PS the formatting might come out all wrong as its mailed from a web account.
-- 


Anyone can give up smoking, but it takes a man to face cancer.

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



Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Jasper Bryant-Greene
Jochem Maas wrote:
 header('HTTP/1.1 301 Moved Permanently');
 
 
 also consider that using 'Status' may be better or possibly both to cover
 you bases, e.g.:
 
 
 ?php
 
 header(HTTP/1.1 301 Moved Permanently);
 header(Status: 301 Moved Permanently);
 
 ?

Waste of time. Go read the HTTP spec. Apologies for missing the typos, I
was rather in a hurry. The point is, it wasn't a 301 redirect.

Jasper

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



RE: [PHP] Files

2005-06-28 Thread Shaw, Chris - Accenture

Hello,

I am not sure what problems you are having, but

Shouldn't the id's in the files match up?

So,

File1:
1, test@test.com
2, [EMAIL PROTECTED]
3, [EMAIL PROTECTED]

File2:
1, doc1.doc
2, doc2.doc
3, doc3.doc


Also, where you are comparing the $groupid to the $id, shouldn't it be:

if($groupid == $id)

hth

Chris.

-Original Message-
From: Chris Grigor [mailto:[EMAIL PROTECTED]
Sent: 28 June 2005 11:24
To: PHP General
Subject: [PHP] Files


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Hey all,

I am having a bash at working with flat files.

What I am trying to achieve is the following

There are 2 files with info in them,

file1 has
id,email

and file2 has

id,filename

what I am trying to achieve is open up file1 get the id and email then
open file2 and match the id of file1 to id of file2, then if succesful
send a mail with the filename in file2.

Maybe have a look at the code...

$recp_list = fopen(mail_group_list.txt, r);

while(!feof($recp_list))
{


$line = fgets($recp_list, 255);
  

$line = chop($line);


$split = explode(,, $line);


$id = $split[0];
$email = $split[1];


// time to mail.

if ($email != ) {





$group_list = fopen(file_group_list.txt, r);

while(!feof($group_list))
{
$groupline = fgets($group_list, 255);

$groupline = chop($groupline);

$groupsplit = explode(,, $groupline);

$groupid = $groupsplit[0];
$groupFileName = $groupsplit[1];

if($groupid = $id)
{



// start mailing
$fromname = Test Mailer;
$fromaddress = [EMAIL PROTECTED];

$subject = Test mail;
$message = Test message $groupFileName;
$headers = From: \.$fromname.\ .$fromaddress.\n;
 

   // Notify the user on screen if the send was succesfull
   if(mail($email, $subject, $message, $headers))

{

print Mail sent successfully to $email;
}
else
{
print Mail not sent to $email;
}




}#end if groupid = id
}#end while group list
}#end if email


}#end while email !=
?


So thats the mail.php

mail_list_group.txt looks like this


1,test@test.com
5,[EMAIL PROTECTED]
7,test@test.com

file_group_list.txt looks like this


2,filename1.doc
3,filename2.doc
4,filename3.doc

Any help on this would be great !

Cheers
Chris

PS the formatting might come out all wrong as its mailed from a web account.
--


-
---
Anyone can give up smoking, but it takes a man to face cancer.

--

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



[PHP] Re: APD Problem

2005-06-28 Thread Rory Browne
Does the /tmp/traces dir exist?

What permissions does it have?

If you'll only be running cli stuff, then make sure you own it, and
chmod to 600(or 700 if necessary). If you're running webserver stuff,
then 660, and associate the webserver group with it(usually either
nobody, www-data, or apache), when you use apache.

On 6/28/05, Amir Mohammad Saied [EMAIL PROTECTED] wrote:
 Help!
 I have installed the APD, but when i want to execute a page to have it's 
   pprof.id in the apd.dumpdir for checking it by pprofp the execution 
 terminate with this fatal error (for example):
 
 Fatal error: apd_set_pprof_trace() failed to open 
 /tmp/traces/pprof.07084 for tracing in /var/www/apd.php on line 2
 
 APD is installed correctly (from it's outputs in phpinfo()) and i have 
 set the apd.dumpdir to /tmp/traces.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Marek Kilimajer

Jasper Bryant-Greene wrote:

Jochem Maas wrote:


header('HTTP/1.1 301 Moved Permanently');



also consider that using 'Status' may be better or possibly both to cover
you bases, e.g.:


?php

   header(HTTP/1.1 301 Moved Permanently);
   header(Status: 301 Moved Permanently);

?



Waste of time. Go read the HTTP spec. Apologies for missing the typos, I
was rather in a hurry. The point is, it wasn't a 301 redirect.


It's not really a waste of time. Some apache/php configurations accept 
only the first form, some only the second.


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



Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Jochem Maas

Jasper Bryant-Greene wrote:

Jochem Maas wrote:


header('HTTP/1.1 301 Moved Permanently');



also consider that using 'Status' may be better or possibly both to cover
you bases, e.g.:


?php

   header(HTTP/1.1 301 Moved Permanently);
   header(Status: 301 Moved Permanently);

?



Waste of time. Go read the HTTP spec. Apologies for missing the typos, I


that would be the first time in history a web related spec actually worked
as stated ON EVERY BROWSER/SERVER.

notice the use of the words 'may be' and 'possibly', also you might wish to note
it wasn't a spec-driven comment but a 'get-it-working'-driven comment - fact is
there are people who have experienced problems with outputting of just the
'HTTP/1.1 301 Moved Permanently' (and it not doing what they want)


was rather in a hurry. The point is, it wasn't a 301 redirect



very pointy indeed.



Jasper



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



RE: [PHP] Zeus Technology wins again!

2005-06-28 Thread Jay Blanchard
[snip]
If you'd like to know more or would like to try out ZXTM for yourself,
I'd
be happy to share further information with you.  Feel free to drop me a
line with your needs and I'll get back to you as soon as I can.
[/snip]

We need that you not spam the list with an ad. Thank you.

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



Re[2]: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread Richard Davey
Hello Bruce,

Tuesday, June 28, 2005, 1:49:09 AM, you wrote:

b they recently got ~$13million in funding... they started in
b college, with not much more than a realization that they could
b build this...

Good for them, hope they don't blow it all on sports cars.

b but the fact that you think you can't means there's less
b competition from those who do it!

And the fact that this seems to be a reoccurring thread on this
mailing list which unless I'm very mistaken, you've started several
times before, just goes to show that you've so far managed to get
nothing off the ground and/or had very few decent responses -
after-all, if it only takes 3-4 guys surely you'd be well on your way
to your first $13 million by now.

Best regards,

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

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



[PHP] Re: Files

2005-06-28 Thread Bob Winter

Chris,

He's my take on your problem,  I have used a few different functions 
but followed the same pattern as your original script.  Check out 
http://www.php.net/manual/en/ to get the details on the ones you don't 
understand.  I have not included error checking. This example works 
successfully on my system.

--Bob

?php

$recp_list = file(mail_group_list.txt);

$group_list = file(file_group_list.txt);

$cnt = 0;
foreach($recp_list as $line) {
   $split = explode(',', $line);
   $id = trim($split[0]);
   $email = trim($split[1]);
   if($email != '') {
  foreach($group_list as $groupline) {
 $groupsplit = explode(,, $groupline);
 $groupid = trim($groupsplit[0]);
 $groupFileName = trim($groupsplit[1]);
 if($id == $groupid) {
$cnt++;
// start mailing
$fromname = Test Mailer;
$fromaddress = [EMAIL PROTECTED];
$subject = Test mail;
$message = Test message $groupFileName;
$headers = From: $fromname $fromaddress\n;
// Notify the user on screen if the send was succesfull
if(mail($email, $subject, $message, $headers)) {
  print Mail sent  successfully to $email;
} else {
  print Mail not sent to $email;
}
 }
  }
   }
}
if(!$cnt) {
   print 'No matches in files.';
}
?


Chris Grigor wrote:

Hey all,

I am having a bash at working with flat files.

What I am trying to achieve is the following

There are 2 files with info in them, 
file1 has

id,email

and file2 has 
id,filename


what I am trying to achieve is open up file1 get the id and email then
open file2 and match the id of file1 to id of file2, then if succesful
send a mail with the filename in file2.

Maybe have a look at the code...

$recp_list = fopen(mail_group_list.txt, r);

while(!feof($recp_list))
{

$line = fgets($recp_list, 255);

		$line = chop($line);


$split = explode(,, $line);

$id = $split[0];
$email = $split[1];

// time to mail.

if ($email != ) {



$group_list = fopen(file_group_list.txt, r);

while(!feof($group_list))
{
$groupline = fgets($group_list, 255);

$groupline = chop($groupline);

$groupsplit = explode(,, $groupline);

$groupid = $groupsplit[0];
$groupFileName = $groupsplit[1];

if($groupid = $id)
{


// start mailing
$fromname = Test Mailer;
$fromaddress = [EMAIL PROTECTED]; 
$subject = Test mail;

$message = Test message $groupFileName;
$headers = From: \.$fromname.\ .$fromaddress.\n;
   
   // Notify the user on screen if the send was succesfull

   if(mail($email, $subject, $message, $headers))

			{ 
print Mail sent successfully to $email;

}
else
{
print Mail not sent to $email;
}


}#end if groupid = id
}#end while group list
}#end if email


}#end while email !=
?


So thats the mail.php

mail_list_group.txt looks like this 


1,test@test.com
5,[EMAIL PROTECTED]
7,test@test.com

file_group_list.txt looks like this 


2,filename1.doc
3,filename2.doc
4,filename3.doc

Any help on this would be great !

Cheers
Chris

PS the formatting might come out all wrong as its mailed from a web account.


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



[PHP] DOM XML issue

2005-06-28 Thread Andrew Kachalo

Hi!

I have installed PHP 5.0.4 on MacOS X 10.3 (Panther). Everything works 
fine exept DOM XML parser.


After using phpinfo it shows (dom section):

dom
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.5.4
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Suppor tenabled

I'm using function domxml_open_file and get following error:

Fatal error: Call to undefined function domxml_open_file() in 
/Users/Andrew/Sites/portfolio/index.php on line 61


How can I fix this problem?

Thank you!

==
Best Regards
Andrew Kachalo
http://www.geocities.com/andrew_kachalo/

Re: [PHP] Zeus Technology wins again!

2005-06-28 Thread Ryan A

SPAMMING SOB.

On 6/27/2005 7:20:45 PM, Jock Busuttil ([EMAIL PROTECTED]) wrote:
 Zeus Technology has won a further two awards from TechWorld for our
 groundbreaking Zeus Extensible Traffic Manager (ZXTM), an advanced load
 balancing and application traffic management solution.  ZXTM came out on
 top despite stiff competition from F5
 Networks' BIG-IP 6400 and
 Netscaler's Application Delivery System.
 
 ZXTM combines functionality that businesses need now, such as SSL, load
 balancing and application acceleration, with emerging technologies that
 will be of increasing importance to applications in the future, such as
 native XML and SOAP capabilities.
 
 Editor of Techworld.com, Maxwell Cooter, commented on the awards,
 There
 were some interesting products in the accelerator category section but
 Zeus got the nod over some well-known competitors because of the way that
 it covered all bases from application and XML acceleration to server
 optimisation, and at a lower price. The Editor's Award is always a tough
 section to judge as we have to compare differing technologies. The judges
 felt that Zeus offered a genuinely innovative alternative in the field of
 traffic optimisation and acceleration and was a worthy winner.
 
 Our success at Techworld.
 com's Network Awards comes less than a month
 after Net

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



Re: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread Jason Barnett
OK, let me put this another way... while trying to remain polite.  Let's 
suppose that I am an unknown (to you) member of this list and I have 
this great idea that I want to develop.  My idea is a great one and it's 
going to make millions.  Now since I'm the one that had the idea I think 
it's pretty easy for me to go find 3 friends of mine (people that I 
know/trust/live close to me) that have the requisite skills.  After all, 
it's not like most programmers go hanging out with Hollywood 
celebrities.  ;)  If I really believed that my idea was so hot then I 
probably wouldn't be waiting around for someone on this mailing list, 
I'd just get started doing it.


true_story
Back about two years ago I was subscribed to this newsgroup with my 
email address from college.  Back then I was just doing what I do now... 
answering PHP questions while I work.  Except that I answered a lot more 
questions then because, well, I was in school still.  :)  I don't 
remember exactly how many I answered, but you can check out the marcives 
if you really want.


Anyhow, after doing this for about a year I apparently caught someone's 
attention.  I received an email from 
insert_name_of_big-shot-venture-capitalist-here / telling me that he 
had capital to give me if I had an idea that I wanted to develop.  I 
politely declined, but I told him I would get back to him if a superb 
idea came my way...

/true_story

I have always felt that getting the financing is the easy part. 
Besides, if your goal is to get $millions in funding then you're looking 
at it all wrong.  The goal is to make profit... and loads of it.  If it 
just so happens that you need a lot of funding to make that happen, then 
you can go get it.  If you have killer idea(s), then you are better off 
mocking up a prototype and networking with some people that can get you 
financing.


You always have to make a profit.

You always have to make a profit.  At least, if you plan on doing 
anything that's going to catch the attention of some VC's.  ;)


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



[PHP] Re: DOM XML issue

2005-06-28 Thread Jason Barnett

Andrew Kachalo wrote:

Hi!

...
Fatal error: Call to undefined function domxml_open_file() in 
/Users/Andrew/Sites/portfolio/index.php on line 61




This is because PHP5 now has an object-oriented approach.  You use 
DOMDocument's and/or SimpleXML to read your XML files.  Also in the 
newest versions of PHP there is a new extension called XMLWriter that 
might better suit your needs.



How can I fix this problem?



In short, you can't do anything except modify code to the new way of 
doing things.  XML support is the lesser-known-yet-dramatic change in 
the migration from PHP 4 to PHP 5.


http://php.net/manual/en/ref.dom.php


Thank you!

==
Best Regards
Andrew Kachalo
http://www.geocities.com/andrew_kachalo/


--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

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



Re: [PHP] Zeus Technology wins again!

2005-06-28 Thread John Nichel

SPAMMERS lose again!

Off to /dev/null with you and your technology.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Breaking up data efficiently

2005-06-28 Thread Jason Barnett

Kevin L'Huillier wrote:
...

Create the function split_location to return the associative array or,
if it is invalid, throws an exception.  If PHP4, replace the exception
with similar error handling.


If efficiency is really the goal, then the OP probably shouldn't go the 
route of Exceptions.  Just use a simple trigger_error() and your php.ini 
to direct where the error messages go.  Especially in this case... 
because errors here are likely just because someone added / removed an 
extra | where it didn't belong.


In my opinion you should save exceptions for, well, EXCEPTIONal 
problems.  Either that or you use exceptions for a large system that 
discriminates against specific types of errors and handles each error 
type in a totally different way.  Can we say bloat?


--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

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



RE: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread Shaw, Chris - Accenture

Why don't you go join one of the many Think Tanks on the net, where you can
form an idea, let people join in and help the idea progress. Then you can
make the idea into a well executed plan. You might find that VC's scan these
webpages, looking for one that is ready to get funding.


-Original Message-
From: Jason Barnett [mailto:[EMAIL PROTECTED]
Sent: 28 June 2005 14:16
To: php-general@lists.php.net
Subject: Re: [PHP] looking for a pure startup opportunity..


*

This e-mail has been received by the Revenue Internet e-mail service.

*

OK, let me put this another way... while trying to remain polite.  Let's
suppose that I am an unknown (to you) member of this list and I have
this great idea that I want to develop.  My idea is a great one and it's
going to make millions.  Now since I'm the one that had the idea I think
it's pretty easy for me to go find 3 friends of mine (people that I
know/trust/live close to me) that have the requisite skills.  After all,
it's not like most programmers go hanging out with Hollywood
celebrities.  ;)  If I really believed that my idea was so hot then I
probably wouldn't be waiting around for someone on this mailing list,
I'd just get started doing it.

true_story
Back about two years ago I was subscribed to this newsgroup with my
email address from college.  Back then I was just doing what I do now...
answering PHP questions while I work.  Except that I answered a lot more
questions then because, well, I was in school still.  :)  I don't
remember exactly how many I answered, but you can check out the marcives
if you really want.

Anyhow, after doing this for about a year I apparently caught someone's
attention.  I received an email from
insert_name_of_big-shot-venture-capitalist-here / telling me that he
had capital to give me if I had an idea that I wanted to develop.  I
politely declined, but I told him I would get back to him if a superb
idea came my way...
/true_story

I have always felt that getting the financing is the easy part.
Besides, if your goal is to get $millions in funding then you're looking
at it all wrong.  The goal is to make profit... and loads of it.  If it
just so happens that you need a lot of funding to make that happen, then
you can go get it.  If you have killer idea(s), then you are better off
mocking up a prototype and networking with some people that can get you
financing.

You always have to make a profit.

You always have to make a profit.  At least, if you plan on doing
anything that's going to catch the attention of some VC's.  ;)

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



Re: [PHP] Breaking up data efficiently

2005-06-28 Thread Kevin L'Huillier
 In my opinion you should save exceptions for, well, EXCEPTIONal
 problems.  Either that or you use exceptions for a large system that
 discriminates against specific types of errors and handles each error
 type in a totally different way.  Can we say bloat?

Depending on the system, malformatted data may very well
be exceptional.  (adj. 1. being an exception; uncommon)  Judging by the
lack of error-checking in the OP, it seems to be the case.  Using
trigger_error or return false would both be reasonable solutions as well.

Really, how errors are handled is up to the individual.  My point was
that Wee Keat may consider adding a few lines for validation.

Certainly adding any error-checking will reduce efficiency, which
is what the original question was regarding.

(As an aside, some day i will have to find out how many times the
word bloat appears on this list.)

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



RE: Re[2]: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread bruce
rich,

my point was/is that with the right team, and the right concept, starting,
and building a business is doable. and no, you're not going to create a
google/yahoo/dell... but you might create something that does $1-3
million/year... and without knowing you, i'm willing to bet that you havn't
created anything approaching this size before..

you sound like an incredibly negative person, not just suspicious, but
actually negative. why?

the question/thesis that i posed is that you can get a few guys together,
with the right concept agreed upon by the team, and you can build it. you
seem to reject this approach for some reason...

my repsonse to you.. if you're simply sitting on the sideline, throwing
comments, get in the game, show you can add value, or do it better.

the fact is, alot of people, the vast majority talk about doing something
(regardless what the topic is) fewer actually get out and do it. this
applies to people who want to get there degree, lose weight, build a biz...

in the '80s, nike came out with a commercial that summed it up pretty
well...'just do it'!!

so if you have an idea/concept, let's talk about it, if not, enjoy your life
anyway...

peace..

ps. as far as this being a reccuring theme, yeah. it should be if you have
people who might come here, who might have the skills, who might be
interested in getting together, then i think it's quite appropriate. once
every month or two ispretty much background noise for this list!!


-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 28, 2005 4:58 AM
To: php-general@lists.php.net
Subject: Re[2]: [PHP] looking for a pure startup opportunity..


Hello Bruce,

Tuesday, June 28, 2005, 1:49:09 AM, you wrote:

b they recently got ~$13million in funding... they started in
b college, with not much more than a realization that they could
b build this...

Good for them, hope they don't blow it all on sports cars.

b but the fact that you think you can't means there's less
b competition from those who do it!

And the fact that this seems to be a reoccurring thread on this
mailing list which unless I'm very mistaken, you've started several
times before, just goes to show that you've so far managed to get
nothing off the ground and/or had very few decent responses -
after-all, if it only takes 3-4 guys surely you'd be well on your way
to your first $13 million by now.

Best regards,

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

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

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



Re[2]: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Jay Blanchard
[snip]
so if you have an idea/concept, let's talk about it
[/snip]

The problem may be that you appear to be fishing for others to come up
with an idea that would make you rich. And while you didn't cross post,
per se', I saw your message on at least three different lists. So you
have cast a wide net, making suspicion a key ingredient. Most of the key
guys on these lists have had an experience such as the one you describe
where the end result was, how shall we say it, less than favorable
because of one of the human elements. 

In other words, it is not the premise, it is the style.

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



RE: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread bruce
and jason...

you and i and our experiences are vastly different. i'm considerably older,
and been through the wars!! funding, on terms that you as an entrepreneur
would accept is not 'easy' to find.

a good VC/Angel funds an extremely small number of the proposals that come
by their eyes.. but your mail gets to my point with the right team/right
concept, the approach of putting together a few people is doable...

and yeah.. if you have an idea, and already know a few people with the right
skills, then you're ahead of the game, assuming that the people you know are
committed, etc... for some reason, your mail is focused on the funding
aspect.. i fundamentally reject that you need external funding to build a
small/successful business. the fact that you appear to think/believe that
you need funding, (or should find funding) indicates that you're only
looking at one possible solution to the issue of creating a business.

but jason, you also need to remember, we're not trying to create a biz to
then go find funding. the goal is to create a fully sustainable business
function that meets certain parameters.

bottom line, if you're willing to take a chance, to work with others, to
build something that might succeed, this will appeal to you. if you're not
this kind of person, nothing short of a guaranteed check/salary will ever
get you to work with a startup function!!

it's about managing risks/expectations, and delivering what you say you're
going to deliver, when you say it's going to be delivered.

-bruce


-Original Message-
From: Jason Barnett [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 28, 2005 6:16 AM
To: php-general@lists.php.net
Subject: Re: [PHP] looking for a pure startup opportunity..


OK, let me put this another way... while trying to remain polite.  Let's
suppose that I am an unknown (to you) member of this list and I have
this great idea that I want to develop.  My idea is a great one and it's
going to make millions.  Now since I'm the one that had the idea I think
it's pretty easy for me to go find 3 friends of mine (people that I
know/trust/live close to me) that have the requisite skills.  After all,
it's not like most programmers go hanging out with Hollywood
celebrities.  ;)  If I really believed that my idea was so hot then I
probably wouldn't be waiting around for someone on this mailing list,
I'd just get started doing it.

true_story
Back about two years ago I was subscribed to this newsgroup with my
email address from college.  Back then I was just doing what I do now...
answering PHP questions while I work.  Except that I answered a lot more
questions then because, well, I was in school still.  :)  I don't
remember exactly how many I answered, but you can check out the marcives
if you really want.

Anyhow, after doing this for about a year I apparently caught someone's
attention.  I received an email from
insert_name_of_big-shot-venture-capitalist-here / telling me that he
had capital to give me if I had an idea that I wanted to develop.  I
politely declined, but I told him I would get back to him if a superb
idea came my way...
/true_story

I have always felt that getting the financing is the easy part.
Besides, if your goal is to get $millions in funding then you're looking
at it all wrong.  The goal is to make profit... and loads of it.  If it
just so happens that you need a lot of funding to make that happen, then
you can go get it.  If you have killer idea(s), then you are better off
mocking up a prototype and networking with some people that can get you
financing.

You always have to make a profit.

You always have to make a profit.  At least, if you plan on doing
anything that's going to catch the attention of some VC's.  ;)

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

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



RE: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread bruce
chris...

we actually thought there should/would be 'entrepreneurial sites' setup for
just this function, of bringing people together, and building small software
related businesses. we didn't find any that remotely satisfied these issues.

but, as we've told others, the idea is not to find funding but to find the
right team, with the right concept, and to build the
business/infrastructure, etc...

but, rather than take up space on this list, send responses to me offline.
this will keep the conversation from monopolizing the bandwidth!

-bruce


-Original Message-
From: Shaw, Chris - Accenture [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 28, 2005 6:57 AM
To: Jason Barnett; php-general@lists.php.net
Subject: RE: [PHP] looking for a pure startup opportunity..



Why don't you go join one of the many Think Tanks on the net, where you
can
form an idea, let people join in and help the idea progress. Then you can
make the idea into a well executed plan. You might find that VC's scan these
webpages, looking for one that is ready to get funding.


-Original Message-
From: Jason Barnett [mailto:[EMAIL PROTECTED]
Sent: 28 June 2005 14:16
To: php-general@lists.php.net
Subject: Re: [PHP] looking for a pure startup opportunity..


*

This e-mail has been received by the Revenue Internet e-mail service.

*

OK, let me put this another way... while trying to remain polite.  Let's
suppose that I am an unknown (to you) member of this list and I have this
great idea that I want to develop.  My idea is a great one and it's going to
make millions.  Now since I'm the one that had the idea I think it's pretty
easy for me to go find 3 friends of mine (people that I know/trust/live
close to me) that have the requisite skills.  After all, it's not like most
programmers go hanging out with Hollywood celebrities.  ;)  If I really
believed that my idea was so hot then I probably wouldn't be waiting around
for someone on this mailing list, I'd just get started doing it.

true_story
Back about two years ago I was subscribed to this newsgroup with my email
address from college.  Back then I was just doing what I do now... answering
PHP questions while I work.  Except that I answered a lot more questions
then because, well, I was in school still.  :)  I don't remember exactly how
many I answered, but you can check out the marcives if you really want.

Anyhow, after doing this for about a year I apparently caught someone's
attention.  I received an email from
insert_name_of_big-shot-venture-capitalist-here / telling me that he had
capital to give me if I had an idea that I wanted to develop.  I politely
declined, but I told him I would get back to him if a superb idea came my
way...
/true_story

I have always felt that getting the financing is the easy part. Besides, if
your goal is to get $millions in funding then you're looking at it all
wrong.  The goal is to make profit... and loads of it.  If it just so
happens that you need a lot of funding to make that happen, then you can go
get it.  If you have killer idea(s), then you are better off mocking up a
prototype and networking with some people that can get you financing.

You always have to make a profit.

You always have to make a profit.  At least, if you plan on doing anything
that's going to catch the attention of some VC's.  ;)

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







This message has been delivered to the Internet by the Revenue Internet
e-mail service

*

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

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

RE: Re[2]: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Jay Blanchard
[snip]
but jay, we have concepts that have been fleshed out. but rather than
simply focus on what we percieve to be good, we're also open to
ideas/concepts from others... which is why we posted what we did.. 
[/snip]

Aha, why didn't you say this to begin with? Had you said this the
response might have been different, but now that you say this red flags
go up because it seems a little more disingenuous. And why not put in
there that you are looking for folks to put up some sweat equity, an
equity that may or may not be valuable when the product(s) roll out?

Bruce I am not trying to be a hard-ass here, I was just pointing out
that the style in which the original message was delivered had a little
smell to it, IYKWIM.

[snip]
ps. rather than consume any more bandwidth on the list, let's continue
this direclty if you have more thoughts/comments..
[/snip]

You didn't seem bothered about the bandwidth when originally posting to
multiple lists and I think that discussions like these are beneficial
for younger developers who might not have gathered the experience that
us old guys have.

Peace...

P.S.
It's hard to read.
Why?
Top posting is bad!

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



RE: Re[2]: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Shaw, Chris - Accenture

snip
Bruce I am not trying to be a hard-ass here, I was just pointing out
that the style in which the original message was delivered had a little
smell to it, IYKWIM.
/snip

I thought that, but I kinda over-looked/ignored it and carried on reading.




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



Re: [PHP] Removing nonlatin characters

2005-06-28 Thread Edward Vermillion


On Jun 27, 2005, at 3:35 PM, John Nichel wrote:


Dotan Cohen wrote:
snip

What CAN'T php do?!?

/snip

I can't get it to alter space-time...yet.



Actually it does this for me all the time. I sit down at my trusty 
editor and next thing I know I'm missing a few hours!



Edward Vermillion
[EMAIL PROTECTED]

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



RE: Re[2]: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread bruce
jay...

i would suggest you go back and re-read the original posting. we stated that
we were open to forming a team, open to ideas, etc

the fact is, you misread, misinterpreted what we stated...

not my/our responsibility that you screwed up what we initially stated, and
that you then reacted in the manner that you did

peace..


-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 28, 2005 8:54 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: RE: Re[2]: [PHP] looking for a pure startup opportunity..OT


[snip]
but jay, we have concepts that have been fleshed out. but rather than
simply focus on what we percieve to be good, we're also open to
ideas/concepts from others... which is why we posted what we did..
[/snip]

Aha, why didn't you say this to begin with? Had you said this the
response might have been different, but now that you say this red flags
go up because it seems a little more disingenuous. And why not put in
there that you are looking for folks to put up some sweat equity, an
equity that may or may not be valuable when the product(s) roll out?

Bruce I am not trying to be a hard-ass here, I was just pointing out
that the style in which the original message was delivered had a little
smell to it, IYKWIM.

[snip]
ps. rather than consume any more bandwidth on the list, let's continue
this direclty if you have more thoughts/comments..
[/snip]

You didn't seem bothered about the bandwidth when originally posting to
multiple lists and I think that discussions like these are beneficial
for younger developers who might not have gathered the experience that
us old guys have.

Peace...

P.S.
It's hard to read.
Why?
Top posting is bad!

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



RE: Re[2]: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Jay Blanchard
[snip]
the fact is, you misread, misinterpreted what we stated...
[/snip]

Then we would be even...

[snip]
I was just pointing out that the style in which the original message was
delivered had a little
smell to it, IYKWIM.
[/snip]

See?

P.S.
It's hard to read.
Why?
Top posting is bad!

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



Re: [PHP] Breaking up data efficiently

2005-06-28 Thread Edward Vermillion


On Jun 28, 2005, at 9:40 AM, Kevin L'Huillier wrote:


In my opinion you should save exceptions for, well, EXCEPTIONal
problems.  Either that or you use exceptions for a large system that
discriminates against specific types of errors and handles each error
type in a totally different way.  Can we say bloat?


Depending on the system, malformatted data may very well
be exceptional.  (adj. 1. being an exception; uncommon)  Judging by the
lack of error-checking in the OP, it seems to be the case.  Using
trigger_error or return false would both be reasonable solutions as 
well.


Really, how errors are handled is up to the individual.  My point was
that Wee Keat may consider adding a few lines for validation.

Certainly adding any error-checking will reduce efficiency, which
is what the original question was regarding.

[snip]

I would think that error checking would increase efficiency,
ie. the script is more likely to work as expected. Eh? ;)

Edward Vermillion
[EMAIL PROTECTED]

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



Re: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Jason Barnett

Jay Blanchard wrote:

[snip]
the fact is, you misread, misinterpreted what we stated...
[/snip]



The fact is... there are at least 4 people that regularly post on this 
list that misinterpreted what you stated.



Then we would be even...

[snip]
I was just pointing out that the style in which the original message was
delivered had a little
smell to it, IYKWIM.
[/snip]



Agreed.

Not only that, but some of us have actually given you some constructive 
criticism to which you have responded quite negatively.  I guess you 
just can't help some people.  [shrug]


OK list, I apologize for keeping this off-topic thread alive... we now 
resume our regularly scheduled programming.


--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

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



Re: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Ryan A

 The fact is... there are at least 4 people that regularly post on this
 list that misinterpreted what you stated.

Umm, I dont know if you have counted me, but if you have not...make that
atleast 5 ppl
:-)

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



Re: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread John Nichel

Jason Barnett wrote:

Jay Blanchard wrote:


[snip]
the fact is, you misread, misinterpreted what we stated...
[/snip]



The fact is... there are at least 4 people that regularly post on this 
list that misinterpreted what you stated.


I pretty much stopped reading the original post after the subject, does 
that count? ;)


--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Esteamedpw
This really shouldn't be getting out of hand the way it is... if you don't  
like it, trust it, agree with it - why not just ignore it? It's as simple  as 
that... don't have a stroke because of it.


RE: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Chris W. Parker
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Tuesday, June 28, 2005 2:23 PM said:

 This really shouldn't be getting out of hand the way it is... if you
 don't like it, trust it, agree with it - why not just ignore it? It's
 as simple  as that... don't have a stroke because of it.

Hmm... funny.

According to my calculations no one has commented on this in about 4
hours. Yet here is your email, doing exactly what you're telling
everyone else not to. That is, ignoring an email they don't agree with
instead of replying to it.

:|

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



Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-28 Thread Brian V Bonini
On Mon, 2005-06-27 at 20:51, Jasper Bryant-Greene wrote:
 Brian V Bonini wrote:
  I can echo out the command and get a well formed command, i.e.
  one that will execute from a command prompt, but when I try to
  exec() $cmd from within the script the globbing is taken
  literally.
 
 Try shell_exec(). I don't think exec() goes via the shell.

Tried that too.

-- 

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


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

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



Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-28 Thread Brian V Bonini
On Mon, 2005-06-27 at 22:04, Bob Winter wrote:
 Brian,
 
 Can you post more of the script?

Sure. I also tried {{$files}} and tried calling a shell exclusively like:

sh -s 'scp [EMAIL PROTECTED]'

Anyway, here's more for the code surrounding the area in question, it's a 
little hacked up ATM
but your get the picture. I can send the whole file to you if you think it will 
help. I basically
just want to be able to do '$ command {file,file1,file2}' from within a php cli 
script but the {} are
not expanding.

} else {
if($argv[1] == $switches[0]) { 
print(Do you want to push live from dev[d] or staging[s]?: );
$confirm = read_input();
if(!$confirm) {
echo You did not select a choice, exiting program\n;
exit;
}
if ($confirm == s) {
if(!(mkdir($tmp_dir, 0777))) {
echo Error: can not make temp dir for files. 
Please log into staging and push manually;
exit;
}
}
$live_servers = array(a, b, c);
print(Which live servers (a=[all] b=[1-5] c=[6-13]): );
$which_servers = read_input();

if(!in_array($which_servers, $live_servers)) {
echo You must choose which live servers\n;
$err = true;
exit;
} else {
switch($which_servers) {
case $live_servers[0]:
$i = 1;
$j = 13;
break;
case $live_servers[1]:
$i = 1;
$j = 5;
break;
case $live_servers[2]:
$i = 6;
$j = 13;
break;
default:
echo An unrecoverable error has occured\n;
$err = true;
exit;
}

$ii = $i; // store this so we can reset $i on each 
outer foreach
foreach($files as $directory = $file_array) {
$files = implode(,, $file_array);
if($confirm == s) { //if staging suck the 
files down to temp local dir first
$cmd = scp [EMAIL 
PROTECTED]:$directory/{{$files}} $tmp_dir/.;
echo $cmd . \n\n;
exec($cmd, $output, $err);
//shell_exec($cmd);
}
while (!$err  $i = $j) {
($i  10) ? $cname = cwsweb0 : $cname 
= cwsweb;
$cmd = scp $tmp_dir/ . '{' . $files . 
'}' . [EMAIL PROTECTED]:$directory/.;
//echo $cmd . \n;
//exec($cmd, $output, $err);
$i++;
}
$i = $ii; // reset $i to original value so loop 
continues
}
if(file_exists($tmp_dir)) rmdir($tmp_dir); // remove 
the temp dir
$err= true;
}
}



 
 --Bob
 
 Brian V Bonini wrote:
  On Mon, 27 Jun 2005, [ISO-8859-1] Andr? Medeiros wrote:
  
  
 $cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' .
 $files . '} ' . $tmp_dir . '/';
 
 That should work
 
 On 6/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 Can not make this work inside a php script.
 
 Have tried several variations:
 $cmd = scp [EMAIL PROTECTED]:$directory/\{$files} $tmp_dir/.;
 
 $cmd = scp [EMAIL PROTECTED]:$directory/ . '{' . $files . '} ' . 
 $tmp_dir/.;
 
 etc...
 
 I can echo out the command and get a well formed command, i.e. one that 
 will execute from a command prompt, but when I try to exec() $cmd from 
 within the script the globbing is taken literally.
 
  
  
  No, I already tried it that way too. I guess I should mention this is a
  cli script if that matters.
-- 

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


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

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



Re: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Esteamedpw
Well, unfortunately you just contradicted yourself as well. I had about 18  
e-mails of the same thing, so I was replying about those.
 
Thanks for your input though, It's appreciated.


Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Andy Pieters
Hi

Actually you can get away with this:

header(Location: $url,301);

This will let php generate the proper headers

Also, and I stress this point (again and again), the http specification 
clearly states that location headers need to have a *fully qualified url* not 
a site-specific one.

Failure to do so puts the proper working of your site in the hands of the end 
user's browser who may very well fail to redirect because he doesn't find 
http://yourpage.php. (some browser do handle this correctly, but that's 
besides the point).

HTH

Andy
-- 
Registered Linux User Number 379093
-- --BEGIN GEEK CODE BLOCK-
Version: 3.1
GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++
L+++$ E---(-)@ W++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e$@ h++(*) r--++ y--()
-- ---END GEEK CODE BLOCK--
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a 
 php cli binary:
 
 http://www.vlaamse-kern.com/sas/
--

--


pgpQ96QzDJCW7.pgp
Description: PGP signature


Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Andy Pieters
On Wednesday 29 June 2005 00:31, Andy Pieters wrote:
 Hi

 Actually you can get away with this:

 header(Location: $url,301);
Well it looks like we all make typos
Header(Location: $url,true,301); 
is more like it

 This will let php generate the proper headers

 Also, and I stress this point (again and again), the http specification
 clearly states that location headers need to have a *fully qualified url*
 not a site-specific one.

 Failure to do so puts the proper working of your site in the hands of the
 end user's browser who may very well fail to redirect because he doesn't
 find http://yourpage.php. (some browser do handle this correctly, but
 that's besides the point).

 HTH

 Andy

-- 
Registered Linux User Number 379093
-- --BEGIN GEEK CODE BLOCK-
Version: 3.1
GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++
L+++$ E---(-)@ W++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e$@ h++(*) r--++ y--()
-- ---END GEEK CODE BLOCK--
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a 
 php cli binary:
 
 http://www.vlaamse-kern.com/sas/
--

--


pgpr00gTfHMlK.pgp
Description: PGP signature


Re: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Ryan A

On 6/29/2005 12:16:58 AM, [EMAIL PROTECTED] wrote:
 Well, unfortunately you just contradicted yourself as well. I had about 18
 e-mails of the same thing, so I was replying about those.

 Thanks for your input though, It's appreciated.

Sure thing, you're welcome dude!

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



[PHP] date problem

2005-06-28 Thread Mario netMines

Hi all

I have a database that holds car rental info
DB:
carrental_from (datetime field)
carrental_to (datetime field)
carrental_price (datetime field) [rates are per hour]
The values I have are like:
-00-00 00:00:00,-00-00 07:00:00,10 (all year around 00:00-07:00)
-00-00 07:00:00,-00-00 00:00:00,20 (all year around 07:00-00:00)
2005-12-22 07:00:00,2006-01-02 00:00:00,15 (christmas period 00:00-07:00)
2005-12-22 00:00:00,2006-01-02 07:00:00,25 (christmas period 07:00-00:00)

The user selects dates ($from - $to) to rent a car and he gets the price 
accordingly.
I can do a (($to-$from)/60/60) and get the total number of hours but 
depending on the date and time you get a different result. Can anyone help 
with the SQL?


Thanks in advance

Mario 


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



[PHP] Re: date problem

2005-06-28 Thread Jasper Bryant-Greene
Firstly, this shouldn't be in the PHP list, as you're asking for help
with SQL.

Mario netMines wrote:
 carrental_from (datetime field)
 carrental_to (datetime field)
 carrental_price (datetime field) [rates are per hour]

carrental_price shouldn't be a datetime field, as it isn't a datetime value.

 The values I have are like:
 -00-00 00:00:00,-00-00 07:00:00,10 (all year around 00:00-07:00)
 -00-00 07:00:00,-00-00 00:00:00,20 (all year around 07:00-00:00)
 2005-12-22 07:00:00,2006-01-02 00:00:00,15 (christmas period 00:00-07:00)
 2005-12-22 00:00:00,2006-01-02 07:00:00,25 (christmas period 07:00-00:00)
 
 The user selects dates ($from - $to) to rent a car and he gets the price
 accordingly.
 I can do a (($to-$from)/60/60) and get the total number of hours but
 depending on the date and time you get a different result. Can anyone
 help with the SQL?

Read up on the MySQL DATEDIFF() function, if you are using MySQL. Other
DBMSs should have an equiv. function.

Jasper

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



Re: [PHP] Re: date problem

2005-06-28 Thread Mario netMines

Hi Jasper and thanks for the quick reply.

something tells me it's not a straightforward SQL query that I have to use 
here but a logic using PHP and SQL.


Mario
- Original Message - 
From: Jasper Bryant-Greene [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Wednesday, June 29, 2005 4:28 AM
Subject: [PHP] Re: date problem



Firstly, this shouldn't be in the PHP list, as you're asking for help
with SQL.

Mario netMines wrote:

carrental_from (datetime field)
carrental_to (datetime field)
carrental_price (datetime field) [rates are per hour]


carrental_price shouldn't be a datetime field, as it isn't a datetime 
value.



The values I have are like:
-00-00 00:00:00,-00-00 07:00:00,10 (all year around 00:00-07:00)
-00-00 07:00:00,-00-00 00:00:00,20 (all year around 07:00-00:00)
2005-12-22 07:00:00,2006-01-02 00:00:00,15 (christmas period 00:00-07:00)
2005-12-22 00:00:00,2006-01-02 07:00:00,25 (christmas period 07:00-00:00)

The user selects dates ($from - $to) to rent a car and he gets the price
accordingly.
I can do a (($to-$from)/60/60) and get the total number of hours but
depending on the date and time you get a different result. Can anyone
help with the SQL?


Read up on the MySQL DATEDIFF() function, if you are using MySQL. Other
DBMSs should have an equiv. function.

Jasper

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




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



Re: [PHP] ad management

2005-06-28 Thread Miles Thompson


Set up a small script which is the focus of your ads - when user clicks on 
an ad the key is passed and the number of views can be incremented, along 
with date, time and IP is you care, and as you are not outputting 
anything,  the header() function can direct the user to the target destination.


Cheers - Miles Thompson

At 12:17 AM 6/28/2005, Sebastian wrote:
i am looking for a simple ad management app to keep track of ad 
views/impressions. i was looking at phpadsnews, but it seems way too much 
bloat of what i need i to do.


anyone know of a simple ad script to keep track of views/impressions?

thanks.

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



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



[PHP] force https

2005-06-28 Thread Ross
Hi,

I need to force the url from http://mydomain.com to https://mydomain.com, so 
my ssl is active. Anyway this can be done with php?


R. 

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



[PHP] Re: PHP vs. ColdFusion

2005-06-28 Thread Rick Emery

Quoting Ke'tszeri Csaba [EMAIL PROTECTED]:

About zend: sorry to say that here, but the less tools you use, the 
more freedom you have.
Give me ssh access to any server running my php code and I can 
inspect it very well, may fix it in one shot :)). From anywhere.


For what it's worth, I agree. I work with php at home and run it on a 
server with no graphical interface installed. For all of my work there, 
I ssh to the server and use vi to edit the files.


At the office, we plan to use Zend Studio (it provides some 
functionality we like) and Zend Platform (for monitoring the server), 
but we will definitely ensure that any apps would run on a server with 
just php (to avoid lock-in).


More tecnically, like we were programmers: php offers several of its 
functions as a wrapping of low level system routines and native 
drivers. I can hardly imagine any app design to be more effective 
than this.

If you are worried about code parsing, php accelerator may be just enough. ;)


Thanks for your input!
Rick

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



Re: [PHP] PHP vs. ColdFusion

2005-06-28 Thread Rick Emery

Quoting Jochem Maas [EMAIL PROTECTED]:


what is special about the MSSQL2K servers? do you have a lot of stored
procedures in it? stuff like that?


Exactly; the past mentality has been do everything through stored 
procedures, so we have a *lot*. Also, my manager's boss (who has since 
retired) had a very Microsoft-centric outlook. My manager is gradually 
overcoming that, but everything we do is data collection, storage, and 
retrieval, so MSSQL2K is pretty entrenched in the organization.



if the MSSQL servers are so important/complex/big/etc then maybe ASP.not
is the right way to go? given that moving 'everything' from
client-server to web-baseed interfaces isn't really a short-term
operation. (assuming some level of complexity in the existing software.)


Good point. But ASP.Net is definitely out (even my Microsoft-centric 
manager wants to stay away from the Framework for now). Only new 
applications and smaller existing utilities will be done web-based, 
with an eye on porting existing applications gradually at some later 
time as our schedule permits. And you hit the nail right on the head; 
our existing apps are very complex (heavy COM+, MSMQ, and some of those 
other nasty bits :-); those won't even be considered for some time.


A funny thing about this; I wrote a php application as a 
proof-of-concept (to show that it would work for us). The big-wigs in 
the organization fell in love with the app, and it was placed into 
production. It was initially placed on a W2K server with IIS 5, but we 
had some problems. It was moved to a W2K3 server with IIS 6, and the 
problem remained. I moved the app to a Linux server (well, it's really 
just a PC) with Apache2, and it's run for a few weeks without any 
problems. I think my manager's new boss wants to use this success to 
use a production Linux server (which would be our first) to host our 
web apps.



like marcromedia tools are required to run CF, they 'tie you in' to
the technology. buying Zend products is optional, if the Zend IDE is judge to
be a moneysaving tool for working with PHP then you buy it. But you
don't have to. the essential tools are with out cost and open to inspection
and modification. Purchasing Zend Accelerator/Encoder maybe a good move
for you company but again its not a requirement.


Absolutely. As I mentioned in an earlier post, I'm used to developing 
through ssh with vi :-) Any code we write would have to run on a server 
without any Zend  products, but those of us who have evaluated them 
believe there is enough added value in some of the Zend products to 
consider them.



from a strategic point of view it might also not be wise to make a
substanstial investment in technology from a company thats just been
bought out by the competion (adobe)?


That will definitely be discussed; I read an article the other day that 
the acquisition has now put Adobe/Macromedia in Microsoft's 
cross-hairs. Of course, I also read an article that Microsoft is trying 
to extinguish LAMP, but I actually chuckled when I read that one.


Thanks for your input!
Rick

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



Re: [PHP] PHP vs. ColdFusion

2005-06-28 Thread Rick Emery

Quoting Jonathan Villa [EMAIL PROTECTED]:


Take a look at these, they are just some of the articles I've bookmarked
over the past

Oracle is now behind (well in support of) PHP
http://www.oracle.com/technology/tech/php/index.html

IBM is also behind PHP (well in support of)
http://www-128.ibm.com/developerworks/websphere/techjournal/0505_krook/0505_krook.html
http://www-306.ibm.com/software/data/info/zendcore/pr.html

Microsoft looks to extenguish LAMP
http://news.com.com/Microsoft+looks+to+extinguish
+LAMP/2100-1012_3-5746549.html

Misc:
http://www.robertpeake.com/archives/66-Why-PHP.html
http://news.com.com/2061-10795_3-5663085.html

To be fair:
http://www.zdnet.com.au/news/software/0,261733,39193420,00.htm

If you're org decides to go PHP... there are all kinds of OpenSource
tools they can choose use which they can enhance for their
organization's specific needs

GForge
Mambo CMS
SugarCRM
and more...

GForge and SugarCRM also have paid support options as well.

-Jonathan Villa


Thanks for the info!
Rick

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



[PHP] Re: PHP vs. ColdFusion

2005-06-28 Thread Rick Emery

Quoting Anton Kovalenko [EMAIL PROTECTED]:


As to ColdFusion, It seems to me that this technology is dead already.


What makes you say this? I had never heard anything like this, but it 
would certainly be powerful ammunition to present to my bosses.


Thanks,
Rick

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



Re: [PHP] force https

2005-06-28 Thread Dan Trainor
Ross wrote:
 Hi,
 
 I need to force the url from http://mydomain.com to https://mydomain.com, so 
 my ssl is active. Anyway this can be done with php?
 
 
 R. 
 

i'm a newbie, you've been warned

header('Location: https://mydomain.com'); ?

/i'm a newbie, you've been warned

I don't know if that would work for an HTTPS referral - however, I don't
know why it wouldn't  Give it a shot, and if nothing else, let *me*
know, even if it's off-list.

Thanks
-dant

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



Re: [PHP] force https

2005-06-28 Thread Robert Cummings
On Tue, 2005-06-28 at 23:26, Dan Trainor wrote:
 Ross wrote:
  Hi,
  
  I need to force the url from http://mydomain.com to https://mydomain.com, 
  so 
  my ssl is active. Anyway this can be done with php?

 i'm a newbie, you've been warned
 
 header('Location: https://mydomain.com'); ?
 
 /i'm a newbie, you've been warned
 
 I don't know if that would work for an HTTPS referral - however, I don't
 know why it wouldn't  Give it a shot, and if nothing else, let *me*
 know, even if it's off-list.

It'll work fine, but here's a something a little more generic :)

header( 'Location:
https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] );

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] PHP vs. ColdFusion

2005-06-28 Thread Rick Emery

Quoting Brad Pauly [EMAIL PROTECTED]:


It might not be easy to put a number on, but consider your (and
possibly the other developers') enthusiasm about PHP. I would guess
that you will be more productive with something that you are excited
about.


Our senior developer and I (who come from a C background) are big php 
fans, and have made that fact clear to management. We have a new 
developer whose background is in ColdFusion, but he's been playing with 
and has warmed to php; he says he likes it and would look forward to 
the challenge of a new language. We have a Visual Basic programmer who 
I thought would push for ColdFusion but, to my surprise, he's pushing 
for php (maybe just because he's following everybody else, but I don't 
really care why). Our last developer hasn't expressed an opinion one 
way or the other. Our manager, who will ultimately make the decision, 
has seen some ColdFusion demos and really likes the ease of use 
(through abstraction of common tasks) and RAD capabilities. To my 
knowledge, she hasn't looked at php yet (which is why I'm soliciting 
information).



I have done a lot of work in both ColdFusion and PHP and I much prefer
PHP. There are some technical reasons (i.e., I like shared nothing),
but some of it is also personal preference. I just like it. CF is fine
and I don't think it's dead, but it just isn't as fun to work with. My
biggest problem with CF is probably that I have to use it on Windows
and, well, I really don't like that. ;) You mention being in a Windows
environment so maybe you don't have a choice with that aspect.


Good information; I really appreciate having opinions from ColdFusion 
developers. As far as the Windows environment, things may be on the way 
to changing; see my earlier post about a current php application 
running on a Linux box with Apache.


If management can see that you are stoked to use PHP that might help 
your cause.


That's what I'm hoping, and so far it seems to be having an impact.

Thanks for your input!
Rick

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



RE: [PHP] PHP vs. ColdFusion

2005-06-28 Thread Rick Emery

Quoting Matt Babineau [EMAIL PROTECTED]:


Yeah - I'll second all of this. I'm a Certified Macromedia CF Developer,
why do you ask am I on this list? The answer is simple, php is better.
However with the recent developments in CF6, CF has become very comparable.
Why would I still choose PHP over CF given this? Ease of management. I don't
have to even think about the server. I spend about 1 hr a month messing
around with the server (daemon restarts or php config changes). That's where
LAMP's value really shines through I think you will find.


I really appreciate having an opinion from a ColdFusion developer.

Thanks!
Rick

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



Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-28 Thread Bob Winter

Brian,

The format of your string that works for me is :

   $cmd = scp [EMAIL PROTECTED]:$directory/\{$files\}  $tmp_dir;

$files must be a comma separated string with NO SPACES.

Here is my complete test script for your review:
  START  =
#!/usr/bin/php
?php

$file1 = 'file_A';
$file2 = 'file_B';
$file3 = 'file_C';
$files = $file1,$file2,$file3;
$directory = '/tmp';
$user = 'root';
$tld = 'com';
$tmp_dir = '/tmp/test';
$cmd = scp [EMAIL PROTECTED]:$directory/\{$files\}  $tmp_dir;

exec($cmd, $output, $err);

echo string: $cmd \n;
echo status:$err \n;
print_r($output);
?
=== END 

Hope this solves your problem.
--Bob


Brian V Bonini wrote:

 if($confirm == s) { //if staging suck the files down to temp local dir 
first
$cmd = scp [EMAIL PROTECTED]:$directory/{{$files}} $tmp_dir/.;
echo $cmd . \n\n;
exec($cmd, $output, $err);
//shell_exec($cmd);
   }


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



Re: [PHP] force https

2005-06-28 Thread Dan Trainor
Robert Cummings wrote:
 On Tue, 2005-06-28 at 23:26, Dan Trainor wrote:
 
Ross wrote:

Hi,

I need to force the url from http://mydomain.com to https://mydomain.com, so 
my ssl is active. Anyway this can be done with php?
 
 
i'm a newbie, you've been warned

header('Location: https://mydomain.com'); ?

/i'm a newbie, you've been warned

I don't know if that would work for an HTTPS referral - however, I don't
know why it wouldn't  Give it a shot, and if nothing else, let *me*
know, even if it's off-list.
 
 
 It'll work fine, but here's a something a little more generic :)
 
 header( 'Location:
 https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] );
 
 Cheers,
 Rob.


Hey, you learn something new every day, huh.

Thanks for the tip
-dant

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



Re: [PHP] force https

2005-06-28 Thread Jasper Bryant-Greene
 Robert Cummings wrote:
 On Tue, 2005-06-28 at 23:26, Dan Trainor wrote:
 i'm a newbie, you've been warned
 
 header('Location: https://mydomain.com'); ?
 
 /i'm a newbie, you've been warned
 
 
 It'll work fine, but here's a something a little more generic :)
 
 header( 'Location: 
 https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] );
 
 Cheers, Rob.

That'll work, but if you have the same files serving both the HTTP and
HTTPS sites you might want to enclose it in the following, unless you
like infinite loops:

if($_SERVER['HTTPS'] != 'on') {

}

Assuming that you're using Apache. I'm not sure if other servers set
that variable.

Jasper

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



Re: [PHP] Re: date problem

2005-06-28 Thread Jasper Bryant-Greene
Mario netMines wrote:
 Hi Jasper and thanks for the quick reply.
 
 something tells me it's not a straightforward SQL query that I have to
 use here but a logic using PHP and SQL.

Please don't top-post.

It can be done in SQL quite easily, as can many things people use PHP
for. Go to the MySQL manual at http://dev.mysql.com/ and read up on
Date/Time functions, specifically the DATEDIFF() function. IIRC, it
returns the difference between two dates.

You can perform many types of arithmetic on the return value of the
function which should help to get the result you want. Try the MySQL
mailing lists if you can't figure it out, or if you're completely stuck
and are *convinced* it's a PHP problem (which I doubt, but I could be
wrong) then by all means come back!

Cheers

Jasper

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



Re: [PHP] force https

2005-06-28 Thread Robert Cummings
On Wed, 2005-06-29 at 00:44, Jasper Bryant-Greene wrote:
  Robert Cummings wrote:
  On Tue, 2005-06-28 at 23:26, Dan Trainor wrote:
  i'm a newbie, you've been warned
  
  header('Location: https://mydomain.com'); ?
  
  /i'm a newbie, you've been warned
  
  
  It'll work fine, but here's a something a little more generic :)
  
  header( 'Location: 
  https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] );
  
  Cheers, Rob.
 
 That'll work, but if you have the same files serving both the HTTP and
 HTTPS sites you might want to enclose it in the following, unless you
 like infinite loops:
 
 if($_SERVER['HTTPS'] != 'on') {
 
 }
 
 Assuming that you're using Apache. I'm not sure if other servers set
 that variable.

Yep, good catch. Recently I've been working with some hosts that force
you to put the files in separate directories even though it means
duplication, so I completely forgot about that :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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