[PHP] assigning to $this in constructor?

2002-12-31 Thread Matt Friedman
I think I was once able to assign to the $this reference in the
constructor of a php class. I don't seem to be able to do this anymore.
Is this new in 4.3?

Is there anyway to alter what object is returned from a php class
constructor? 

For instance, there might have been an error so you would return an
error object instead of the requested object.

Thanks,

Matt Friedman 



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




[PHP] PHP Shipping Rate Question

2002-12-02 Thread Matt Friedman
Hi,

I've found a number of UPS rate calculators in php and I'm wondering if
anyone has used many shipping calculators written in php.

If so, what success have you had? Any stories/recommendations to share?

Thanks very much,
Matt





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




[PHP] php shipping rate question

2002-12-02 Thread Matt Friedman
Hi,

I've found a number of UPS rate calculators in php and I'm wondering if
anyone has used many shipping calculators written in php.

If so, what success have you had? Any stories/recommendations to share?

Thanks very much,
Matt



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




[PHP] Shipping Purolator Class?

2002-11-25 Thread Matt Friedman
Hi Folks,

Just checking around to see if anyone is using a Purolator web service
to determine shipping costs online.

Wondering if there are classes available and if the service is hard to
use.

Thanks very much,
Matt Friedman


 

 -Original Message-
 From: John W. Holmes [mailto:[EMAIL PROTECTED]]
 Sent: Thursday November 21, 2002 8:38 PM
 To: 'Rodrigo Corrêa'; 'PHP List 1'; 'PHP List'
 Subject: RE: [PHP-DB] Help with Date
 
  Is there a way to convert a date  20/11/2002  to a Float number in
 PHP,
  since the date starts in 30/12/1899, just like the delphi treats the
  dates
 
 Yeah, of course. To convert 20/11/2002 into a float, just do
 
 echo (float)20/11/2002;
 
 and you get 20!!
 
 Or you can use strtotime() to convert it to a Unix timestamp (integer,
 number of seconds since Jan 1, 1970).
 
 ---John Holmes...
 
 
 
 --
 PHP Database 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] (( Purolator Shipping ))

2002-11-25 Thread Matt Friedman
Hi Folks,

Just checking around to see if anyone is using a Purolator web service
to determine shipping costs online.

Wondering if there are classes available and if the service is hard to
use.

Thanks very much,
Matt Friedman



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




RE: [PHP] gmtime?

2002-05-27 Thread Matt Friedman

Unix epoch is the number of secs since the start date in GMT regardless
of where your server is. The timestamp is a GMT value.

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: Jens Lehmann [mailto:[EMAIL PROTECTED]] 
Sent: Monday May 27, 2002 7:48 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] gmtime?

  -Original Message-
  From: Jens Lehmann [mailto:[EMAIL PROTECTED]]
  Sent: 24 May 2002 20:31
 
  time() returns the number of seconds since the Unix Epoch to
  the current
  local time
 
  gmtime() should return the number of seconds since the Unix
  Epoch to the
  current GM-time
 
  Do you understand now?

 Uh, no, actually now I'm more confused!

I can understand that you're confused. :-) Or am I?

 As I understand it, a Unix timestamp is *always* the number
 of seconds since 1-Jan-1970 GMT (the Unix epoch), and
 so is always a GMT time.

Imho no, because 1-Jan-1970 GMT is just the starting point,
the result depends on which timezone your server is located in.
Please correct me if I'm wrong here!

 Any function that converts between local time and a Unix
 timestamp therefore has to take the current timezone (and
 any daylight-savings rules) into account.  This is why there
 are two versions of mktime() and date(), but only one time().

 Cheers!

 Mike


Jens








-- 
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] Getting only 255 chars from SQL Server

2002-05-13 Thread Matt Friedman

If you want to make sure you get the whole string and it's fairly long,
like a paragraph of characters or something, the db field should be a
text field. Varchar is definitely no longer than 255 in MSSQL. You've
lost the data over 255 chars with your current setup. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com


-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]] 
Sent: Monday May 13, 2002 8:56 AM
To: Php-General
Subject: RE: [PHP] Getting only 255 chars from SQL Server

Oh, it's different in msSQL. My mistake, sorry.. :)
My knowledge is based on mySQL, I thought that the field lengths were in
some sorta standard.


Niklas



-Original Message-
From: Sqlcoders.com Programming Dept [mailto:[EMAIL PROTECTED]] 
Sent: 14. toukokuuta 2002 1:46
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Getting only 255 chars from SQL Server


Taken from Microsoft SQL Server 2000 Reference (Transact-SQL Reference):

varchar[(n)]

Variable-length non-Unicode character data with length of n bytes. n
must be a value from 1 through 8,000. Storage size is the actual length
in bytes of the data entered, not n bytes. The data entered can be 0
characters in length. The SQL-92 synonyms for varchar are char varying
or character varying.



- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: May 13 2002 05:38 AM
Subject: RE: [PHP] Getting only 255 chars from SQL Server


 The platform doesn't matter here, since VarChar's maximum length is 
 255 chars, so everything above that is cutted away on insert. Creating

 table with VarChar(800) should give an error..


 Niklas


 -Original Message-
 From: Michael Sims [mailto:[EMAIL PROTECTED]]
 Sent: 13. toukokuuta 2002 15:32
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Getting only 255 chars from SQL Server


 On Sun, 12 May 2002 18:43:47 -0700, you wrote:

 I have an SQL Server database running on a server on the internet. I 
 need to have php connecting to the db and returning values. Simple 
 stuff. No problem making the connection and getting data using the
 mssql
 functions. The weird thing is that 4 of the fields in the table are 
 vchar fields of length 800. When getting the data from the db for the

 web page, all that gets returned are the first 255 characters of each

 field.

 Are you using FreeTDS on *nix, or is this a Windows server making the 
 connection?

 --
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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




RE: [PHP] Re: One more Regular Expression Question...

2002-05-13 Thread Matt Friedman

$regex = a[^]*(.*)/a; 

is probably better. Plus, use eregi for case insensitive matching.

This is probably not perfect, but it'll do what you want. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com

 

-Original Message-
From: Brad Melendy [mailto:[EMAIL PROTECTED]] 
Sent: Monday May 13, 2002 10:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: One more Regular Expression Question...

Thanks Philip.  This gives me everything before the ' that I'm
looking
for but I believe it is because it occurs more than once.  I think I
need to
count the times that ' occurs and then try to target the specific
occurance that I need.  But I'm guessing a little.  Thanks for your
help.

...Brad

Philip Hallstrom [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 $string1 = a href='/Schedule_Detail'Here's the Schedule/a;
 ereg((.*)/a, $string1, $matches);
 $string2 = $matches[1];

 Something close to that anyway...

 On Mon, 13 May 2002, Brad Melendy wrote:

  Hello,
  I'm pretty stuck here.  I wish to assign a variable the value of a
  particular substrint of text from a second variable.  It's HTML so
I've
got
  something like:
 
  $string1 = a href='/Schedule_Detail'Here's the Schedule/a
 
  I want to create a variable $string2 and assign it the value of
whatever
is
  between  and /a.  I just can't figure out how to do that.
 
  Any kind souls want to give me a hand up?  Thanks very much in
advance.
 
  ...Brad
 
  PS.  I do have a PHP book and I did try reading up on regular
expressions at
  php.net first, but I'm just not getting it. :-\
 
 
 
  --
  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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP compared to JSP

2002-05-04 Thread Matt Friedman

JSP does not ever run in the browser. JSP is a server side technology
designed to compete with ASP. PHP is similar in that it too is a server
side language and can be embedded into html pages. Java tends to be
considerably slower than PHP but the Java folks have made great strides
towards overcoming this. As far as compiling scripts, both Java and PHP
are capable of doing this if the correct software is installed on the
server. In PHP's case this is the Zend Optimizer - in the case of Java,
I am not certain but I think this would require a Sun web server; both
solutions cost $$$. However, as far as PHP is concerned there are many
open source free caching solutions available. This is perhaps true for
Java as well. Unless your site is going to get many users per second
this is probably not necessary. Ultimately, running LAMP (Linux, Apache,
MySQL and PHP) will cost less and is probably faster. Many solutions, to
my knowledge, requiring Java cost $$$ while LAMP is completely Open
source. (Read the licenses for more info). 

Matt Friedman

 

-Original Message-
From: Paras Mukadam [mailto:[EMAIL PROTECTED]] 
Sent: Saturday May 4, 2002 10:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP compared to JSP

Sorry if this is repeated, but I didn't see my query in the news group
so
reposting it !
---
Dear all,
How is PHP similar to / different than JSP ? I mean, in JSP the page is
compiled the first time it runs on the web-browser, then the next time
it
finds the .class file and just runs it. i.e. the compiling is just the
first time !! How does it work in PHP? Does PHP has any way to figure
out
whether it's first time ? that is does PHP compile .php file to some
.compiled_php type and then it gives the output ?

Thanks a lot.
Paras.



-- 
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] Slow in retriveing webpage

2002-05-04 Thread Matt Friedman

Grab the file using a script that is run by Cron, assuming your are on a
Linux type system. Grab it every 5 minutes or something. Store/cache it
on your web server. Then when you need the file in your other script,
grab it from the place where you've cached it. You're script can then
get the content almost instantly! 

Matt Friedman
 

-Original Message-
From: Joseph Then [mailto:[EMAIL PROTECTED]] 
Sent: Saturday May 4, 2002 10:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Slow in retriveing webpage

Hi!
I want to grab a webpage and I use the file() function to grab it.

The URL in the file() function works OK when I typed it in my address
bar.
The speed is OK.

$fcontents = file
(http://www.website.com/cgi-bin/cgifunction/webpage.cgi;);

However, when I use the above code and tried to run the PHP file, I have
to
wait for 10 seconds before I get any results.

I tried to isolate the problem and realised that the slowing down
portion is
the above line. I tried fopen() and the results is still the same.


I need to know if it is possible to speed up the above process.

If possible, please email me at [EMAIL PROTECTED]

Thank you for any help rendered.



-- 
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] help !!!

2002-05-04 Thread Matt Friedman

Try www.php.net. Oh, no that's for php. 

I might know if this was a Delphi list. Hrm...

Matt Friedman
Web Applications Developer
 

-Original Message-
From: Yoel Benitez Fonseca [mailto:[EMAIL PROTECTED]] 
Sent: Saturday May 4, 2002 10:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] help !!!

H!

 Excuse me, but I need help. Somebody can give me a 
 link from where I can download the version 1.0 of the Delphi.  
 
Thank you in advance.

Mark



-- 
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] Removing empty elements from an array

2002-04-28 Thread Matt Friedman

This is what you want.

http://www.php.net/manual/en/function.array-filter.php


Matt Friedman
Web Applications Developer
www.SpryNewMedia.com

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Sunday April 28, 2002 10:57 AM
To: Craig Westerman; php-general-list
Subject: Re: [PHP] Removing empty elements from an array

function filter($array)
{
if ( !is_array($array) )
{
die(Must be an array!);
}
foreach($array as $key = $value)
{
if($array[$key] == )
{
unset($array[$key]);
}
}
return($array);
}
- Original Message -
From: Craig Westerman [EMAIL PROTECTED]
To: php-general-list [EMAIL PROTECTED]
Sent: Sunday, April 28, 2002 10:36 AM
Subject: [PHP] Removing empty elements from an array


 I have an array that contains several empty elements. What is simplest
way
 to remove these elements?

 Array ( [0] = [1] =
 [2] =
 [3] = 16/Mar/02
 [4] =
 [5] = 17/Mar/02
 [6] = 18/Mar/02
 [7] = 19/Mar/02
 [8] = 20/Mar/02
 [9] = 21/Mar/02
 [10] = 22/Mar/02
 [11] = 23/Mar/02
 [12] =
 [13] = 24/Mar/02
 [14] = 25/Mar/02
 [15] =)

 Thanks

 Craig 
 [EMAIL PROTECTED]


 --
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] basename unix/windows

2002-04-25 Thread Matt Friedman

Replace the \ with / using str_replace or some such function before
using basename. Windows will handle either kind of path. Linux does not
know the \ as a file path separator. It only knows /

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com


-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Thursday April 25, 2002 9:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP] basename unix/windows

I'm running php on linux and wish to use basename() to get the file name
from a windows path.

basename() on our linux/php box can't seem to cope with the use of
backslash (\) in the Windows paths I'm feeding it. 

In other words:

basename(/usr/blah/doh/yuck/wow/abigfile.html)

resolves to : abigfile.html

but 

basename(adirectory\onawindowsbox\abigfile.html)

does not resovle to abigfile.html.

Does anybody have a workaround for this?

Thanks!

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



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




RE: [PHP] how to popup a new browser window from php

2002-04-19 Thread Matt Friedman

No.

You want a client side browser popup. 

PHP runs on the server. PHP does not run in a browser.

Javascript runs on the browser.

You need to use Javascript.

Matt Friedman
Web Applications Developer


-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Friday April 19, 2002 9:14 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] how to popup a new browser window from php

On Friday 19 April 2002 20:48, Brian McGarvie wrote:
 add this to the head section;

 script language=JavaScript
 function popupcontent(urll)

  {



window.open(urll,'popup','toolbar=no,location=no,directories=no,status=n

o,menubar=no,resizable=no,copyhistory=no,scrollbars=yes,width=400,height
 =250');

  }

 //--
 /SCRIPT

 then use the following to open a window however ya want it to appear;

 a

href=\javascript:popupcontent('announcements.php?action=viewthisone=$i
 d')\b$title/b/a

This looks suspiciously like javascript.

 works nicely :)

I'm sure it does. Now do it again *without* javascript :)

  Is there any easy way to popup a new browser from PHP
  without using any Javascript?

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
The mome rath isn't born that could outgrabe me.
-- Nicol Williamson
*/

-- 
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] Function that escapes special caracters from regular expressions

2002-04-07 Thread Matt Friedman

http://www.php.net/manual/en/function.preg-quote.php

Found this in the manual in about 3 secs.

Try to check the manual first before posting. ;-)

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] 
Sent: Sunday April 7, 2002 7:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Function that escapes special caracters from regular
expressions

Is there one?


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




FW: [PHP] - REPOST - Flock manual clarification please ;-)

2002-04-07 Thread Matt Friedman


From the manual:

snip
Note: Because flock() requires a file pointer, you may have to use a
special lock file to protect access to a file that you intend to
truncate by opening it in write mode (with a w or w+ argument to
fopen()).
/snip

The manual indicates that you may need to use a special lock file if
you intend to open a file with w or w+. I wrote some code to examine
this. (2 files) Each file locks a file after opening using w to do so.
Then, the file is locked using LOCK_EX. Subsequently executed, each file
appears to respect the lock applied by the other file. (Each file waits
for the lock to be released by the other) - So, I don't see this manual
entry applying in this case.

In regards to the snip above, under what circumstances might you have
to create a separate lock file? Is this an OS issue? Is it an issue when
concurrency is high? The manual says you may have to; I am looking for
some clarification as to when exactly you may have to follow the
snip advice.

Thanks as always,

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com




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



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




RE: FW: [PHP] - REPOST - Flock manual clarification please ;-)

2002-04-07 Thread Matt Friedman

Ok, that makes sense to me now. I see how you could lose some data.

Do you have any opinions on what a good algorithm might be for getting
locks without the potential for overwriting data? I suppose I could
create a second lock file which I would open using r - then, wait
for a lock on the lock file and then go on with any processing on the
actual data file. After the processing is done release the lock on the
lock file. Perhaps there are better ways to do this.

What do you think?

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: Jim Winstead [mailto:[EMAIL PROTECTED]] 
Sent: Sunday April 7, 2002 8:27 PM
To: [EMAIL PROTECTED]
Subject: Re: FW: [PHP] - REPOST - Flock manual clarification please ;-)

Matt Friedman [EMAIL PROTECTED] wrote:
 In regards to the snip above, under what circumstances might you
have
 to create a separate lock file? Is this an OS issue? Is it an issue
when
 concurrency is high? The manual says you may have to; I am looking
for
 some clarification as to when exactly you may have to follow the
 snip advice.

when you do an fopen(file,w), it truncates the file -- before you
can call flock(). so if one process locks the file, and starts writing
data, a second one could just come along and blow away all or part of
the data even though the first still has it locked. by the time the
second process calls flock() and notices that the first has it locked,
it has already truncated the file.

jim

-- 
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] - Flock manual clarification please ;-)

2002-04-06 Thread Matt Friedman

From the manual:

snip
Note: Because flock() requires a file pointer, you may have to use a
special lock file to protect access to a file that you intend to
truncate by opening it in write mode (with a w or w+ argument to
fopen()).
/snip

The manual indicates that you may need to use a special lock file if
you intend to open a file with w or w+. I wrote some code to examine
this. (2 files) Each file locks a file after opening using w to do so.
Then, the file is locked using LOCK_EX. Subsequently executed, each file
appears to respect the lock applied by the other file. (Each file waits
for the lock to be released by the other) - So, I don't see this manual
entry applying in this case.

In regards to the snip above, under what circumstances might you have
to create a separate lock file? Is this an OS issue? Is it an issue when
concurrency is high? The manual says you may have to; I am looking for
some clarification as to when exactly you may have to follow the
snip advice.

Thanks as always,

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com




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




RE: [PHP] Has anyone looked at phpinfo today?

2002-04-01 Thread Matt Friedman

I think if you look at today's date, you'll realize why the silly
picture on your phpinfo today.  

Good one guys! That's what I love about php - it's about enjoying
programming and making it fun.

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]] 
Sent: Monday April 1, 2002 9:45 AM
To: James Arthur; [EMAIL PROTECTED]
Subject: Re: [PHP] Has anyone looked at phpinfo today?

hm.  I've seen that before by appending something to the end of the
url
(not sure what though).

Tyler

- Original Message -
From: James Arthur [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 01, 2002 8:46 AM
Subject: [PHP] Has anyone looked at phpinfo today?


 ? phpinfo(); ?

 Notice anything different?

 --jaa

 --
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] parse error, mysql select

2002-04-01 Thread Matt Friedman

It doesn't like the ; at the end of the statement. I noticed this a
while ago. I'd prefer if it didn't choke on the ; but it seems to.
It's probably more correct to have the ; there - I don't know why it
chokes when going through php. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday April 1, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] parse error, mysql select

When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = SELECT DATE_FORMAT( exp_date, %W, %M
%d, %Y) AS thedate from tifrequest where user='$user' limit 1,1;


Thanks!  My eyes are shot!


-- 
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] SPAM or ADVERTISING

2002-03-30 Thread Matt Friedman

So the end justifies the means is what you are saying. Using an example
of someone who got what they wanted through devious and dishonest
actions as a justification for your actions is a demonstration of your
warped ideas of what is ok and what is not.

Spammers do not get it. They're only out for their own selfish ends, as
you have clearly demonstrated, and they don't care about anyone else. 

You should be ashamed, but I'm certain that you are not.

Matt Friedman
Web Applications Developer


-Original Message-
From: Alienator [mailto:[EMAIL PROTECTED]] 
Sent: Saturday March 30, 2002 8:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] SPAM or ADVERTISING

once apon a time there was a South African online company called
EasyInfo.co.za.
have a look, www.easyinfo.co.za, the pulled a stunt and stoll all the
unlisted numbers from the local telephone company telkomsa
www.telkom.co.za.
turns out, after the big court case they are now getting 3 times more
hit
and generating a shit load more of money that ever were in the past !

so, what is advertising(SPAM)...
a big fat stunt that someone pulls off to generate website traffic.
for the 700 of so hits that i got alon from this news group i generated
a
couple of thousand rands in just 2days.





-- 
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] localization - internationalization

2002-03-25 Thread Matt Friedman

Hi,

Just wondering how many folks are working on localization issues. I am
building an application and have built in support for multi-languages,
but I do not yet have anything set up for handling different monetary
and date formatting. What other issues should I consider?

Any pointers to help on this subject and your input are appreciated as
always.

Many thanks,
Matt Friedman
www.SpryNewMedia.com




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




RE: [PHP] localization - internationalization

2002-03-25 Thread Matt Friedman

Looking for some more detailed information on this subject.

Any experts out there?

Thanks,

Matt Friedman


-Original Message-
From: Andrey Hristov [mailto:[EMAIL PROTECTED]] 
Sent: Monday March 25, 2002 10:04 AM
To: Matt Friedman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] localization - internationalization

use setlocale() to set locale in every script.
then the output from different functions - number_format(), strftime(),
etc. will be according to the locale.
I've not tried this but it have to work.

Best regards,
Andrey


- Original Message - 
From: Matt Friedman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 5:03 PM
Subject: [PHP] localization - internationalization


 Hi,
 
 Just wondering how many folks are working on localization issues. I am
 building an application and have built in support for multi-languages,
 but I do not yet have anything set up for handling different monetary
 and date formatting. What other issues should I consider?
 
 Any pointers to help on this subject and your input are appreciated as
 always.
 
 Many thanks,
 Matt Friedman
 www.SpryNewMedia.com
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 



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




RE: [PHP] include, include_once bug or feature ?

2002-03-14 Thread Matt Friedman

I think that since you are including a file into a function - the vars
become local so they only exist when the function is running. Therefore,
a call to get_defined_vars will not show them since the vars do not
exist in the global scope. In fact, during the call to get_defined_vars,
the included vars do not exist at all. 

This is a feature, not a bug.

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
Email: [EMAIL PROTECTED]
 

-Original Message-
From: Pavel Plesov [mailto:[EMAIL PROTECTED]] 
Sent: Thursday March 14, 2002 7:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] include, include_once bug or feature ?

Hello!

I have a trouble :(

When I try this:

--[index.php]--
?php

function f($action)
{
switch($action){
case 'one': include_once('M/one.php'); break;
}
}

f('one');
?
--
--[M/one.php]--
?php

print pre\n;
print_r(get_defined_vars());
print /pre\n;

?
--

At output i'll gets nothing :(
No any global variables.
But, at index.php I get it all.

If I move include() to global scope, all ok.

It's feature, or bug ?


--
Pavel Plesov
Simpage support


-- 
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] How should I cache database data for php?

2002-01-21 Thread Matt Friedman

My experience has been that large sites that need lots of db and file
access and that are heavily trafficked use a file caching solution. 

Results of db queries and dynamic pages are loaded into flat files which
the client then browses. This is the type of system used by sites that
get in the millions of hits per month. It's simple and it works.
Generally the database is the bottle neck. Using a file cache system
avoids using the db. Pretty straightforward.

The other strategy is to scale the hardware which is wise also. Sites
that get that many hits are generating $$$ so the cost of hardware is
cheap for them. They may have several gigs of memory per server and very
fast processors. These machines can handle very large peaks in activity.

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
Email: [EMAIL PROTECTED]
 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED]] 
Sent: Monday January 21, 2002 10:07 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How should I cache database data for php?

Hello,

Jeff Bearer wrote:
 I want the app to query the caching layer just about the same way it
 queries the database, but add a few other details, time to live, cache
 name etc.  The caching layer will check to see if the query is cached,
 make sure it's not expired, and return the data just like a result set
 from the db query.  If it is expired, or doesn't exist then it will
 query and create the cache file for next time.
 
 I'm leaning toward storing the data in XML, and kicking around the
idea
 of storing it on a ram disk so it would have killer fast access time.

XML? Why?

In my experience, using XML for things that need to scale is a major
mistake. If you want to serve HTML, why storing data in XML? You will
need to parse and transform it in HTML which only makes things much
worse than just storing data in nicely normalized database tables.

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Event based applications?

2002-01-12 Thread Matt Friedman

JavaScript runs on the client, PHP runs at the server. PHP cannot access
client side events directly.

JavaScript cannot access the database (actually it can through Internet
Explorer, but that's different story...)

You'll use a combo of both languages. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
Email: [EMAIL PROTECTED]
 

-Original Message-
From: Morten Nielsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday January 12, 2002 1:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Event based applications?

Hi,

I am about to make an homepage. It is going to be very event based. When
the
user presses different buttons different functions should be called.
At the same time I am going to use a database to store some data.
My question is: Should I use PHP or JavaScripts?
I would like to have a server based page, but PHP doesn't support the
event
driven methods like JavaScripts.

Please send your comments,
Morten



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php executing system commands..

2002-01-11 Thread Matt Friedman

Try the backtick too.

print pre . `ls -l` /pre;

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
Email: [EMAIL PROTECTED]
 

-Original Message-
From: mike cullerton [mailto:[EMAIL PROTECTED]] 
Sent: Friday January 11, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php executing system commands..

on 1/11/02 1:35 AM, louie miranda at [EMAIL PROTECTED] wrote:

 Hi, can php execute system commands
 like df, and then print it to html ?

http://www.php.net/manual/en/ref.exec.php

 -- mike cullerton 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] ask cookie in win2000

2002-01-07 Thread Matt Friedman

Please don’t send html emails to the list. Switch to plain text email. 

You also should send your code to the list so we can see what you are
doing wrong. What is the error you are getting? You haven't provided
enough info in order to answer the question.

This question has been asked many times; you should search the archives
to find an answer.

Matt Friedman


-Original Message-
From: gendeng [mailto:[EMAIL PROTECTED]] 
Sent: Monday January 7, 2002 8:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] ask cookie in win2000

halo...
i want to know, why cookie not working in win2000. please help me.
 
Mpu Strees





  IncrediMail - Email has finally evolved - Click Here



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ooh forms or better

2002-01-07 Thread Matt Friedman

Hi,

I'm interested in finding a good solution for creating forms
programmatically; something like ooh forms.

I haven't been able to find decent docs on ooh forms but I'm under the
impression that it's very good. 

Does anyone know of examples of ooh forms and where the docs might be
found? Examples would be ideal.

I also found phpOpenForms which seems very good; anyone have experience
with it?

Many thanks,
Matt Friedman





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] connect MS Access

2002-01-01 Thread Matt Friedman

Please do not send html emails to this list. 

Send only plain text emails.

Matt Friedman


-Original Message-
From: gendeng [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday January 1, 2002 8:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] connect MS Access

halo... i want to know about connect to database. can php (for windows)
connect to MS Access.
 
Mpu Strees





  IncrediMail - Email has finally evolved - Click Here



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Can you fake a onClick?

2001-12-27 Thread Matt Friedman

Please turn off your read receipt request in your email client. It's
very annoying.

Create a redirect page using php. 

Something like
?
// log your hits here. Then...
header(Location: $QUERY_STRING);
?

Using a url such as:
http://www.domain.com/redirect.php?/someurl/somefile.ext

You should be able to track each file requested on your site this way.
Well, that's one way to do it anyway. Perhaps it will give you an
idea...

Matt Friedman


-Original Message-
From: Douglas Harter [mailto:[EMAIL PROTECTED]] 
Sent: Thursday December 27, 2001 8:14 PM
To: Bogdan Stancescu
Cc: PHP Mailing List
Subject: Re: [PHP] Can you fake a onClick?

Maybe I should have mentioned that CountIt is a php function. Does that
make
a difference? It is declared at function CountIt($filename) where
$filename
is the file containing the count.
- Original Message -
From: Bogdan Stancescu [EMAIL PROTECTED]
To: Douglas Harter [EMAIL PROTECTED]
Cc: PHP Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 27, 2001 9:09 PM
Subject: Re: [PHP] Can you fake a onClick?


 Yes: a href=javascript:CountIt('actual link here')Text/a

 And in ClickIt you'll have to append
 if (goto) {
   window.location=goto;
 }

 Obviously, you'll have to redefine ClickIt() to ClickIt(goto)

 I don't know if all the code is 100% accurate, but that's definitely
the
direction to go. You may have to change the JavaScript code to
parent.window.location=goto if you use frames.

 HTH

 Bogdan

 Douglas Harter wrote:

  My form contains a function called CountIt which increments a
counter
file on the site. I mainly use it to count the hits on the page. I also
have
multiple a links to  .zip  .txt files which can be accessed or
downloaded.  Is it possible somehow to fake an onclick event so that
when
the user clicks on the link I can use the CountIt function to increment
a
counter for that link?


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Delete File Contents?

2001-12-17 Thread Matt Friedman

http://www.php.net/manual/en/function.ftruncate.php 

 

Chris writes: 

 I've created a program that runs a process then stores the results to a
 file on the server. I would like the file to contain only the most
 recent update, but it seems I can only append to my using fopen. Is
 there a way to open the file and overwrite the data in that file? I've
 considered deleting the file and creating a new one but that seems like
 a lot to do. It would be nice if there were a way to set a pointer to
 the top of the file and overwrite. 
 
 Thanks,
 Chris 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED] 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] - References Clarification Please -

2001-12-09 Thread Matt Friedman

Hi,

I'm just trying to get my head around references and the uses etc... I
have reviewed the manual section on this a few times but I'm still a bit
fuzzy on it.

First of all, here's some code I'm using to pass a reference to an
object (which has global scope) to the constructor of a class Site:

function Site($dbObj)
{
 $this-db = $dbObj;
}

I think what should happen here is that $this-db is now a reference to
the global version of the object, by way of the  in the function
defn. Is this correct? 

Also, I'm not sure about the benefits of using references as opposed to
copies. If anyone would like to elaborate on the reasons for using a
reference instead of a copy, please do so; it would be much appreciated.


Many Thanks,
Matt Friedman





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Extending classes multiple times

2001-12-06 Thread Matt Friedman

I had been under the impression that one could extend a class only once.
That is, if I extend class A with class B I would then not be able to
extend B again with any other class. 

See: http://www.php.net/manual/en/keyword.extends.php
An extended class is always dependent on a single base class, that is,
multiple inheritance is not supported. Classes are extended using the
keyword 'extends'.

With some testing however, it appears that I can extend class B with
class C and class C with class D and so on...

Am I misinterpreting the manual? I suspect I am. Or is this a new
feature. Thoughts?

Thanks,

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
Email: [EMAIL PROTECTED]
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Extending classes multiple times

2001-12-06 Thread Matt Friedman

This is what I had thought. I wasn't sure and needed the clarification. 

Thanks as always! 

Matt Friedman


-Original Message-
From: Harshdeep S Jawanda [mailto:[EMAIL PROTECTED]] 
Sent: Thursday December 6, 2001 1:55 PM
To: Matt Friedman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Extending classes multiple times

I am not very sure what your question is, but multiple inheritance
means that a derived class can inherit (i.e., be derived from) more
than one class.

In multiple inhericance, you can have:

A   B
|   |
+---+---+
|
C

Here, C is simultaneously derived from A  B. You can't have this in
single inheritance (which is what the PHP manual is saying). This means
that C can be derived from either A or B, not both.

The following is always possible, irrespective of whether multiple
inheritance is supported or not:

A
|
+-B
|
+-C
|
+-D

This is three different classes (B, C and D) derived from A.

Hope this helps clarify your doubts.

--- Matt Friedman [EMAIL PROTECTED] wrote:
 I had been under the impression that one could extend a class only
 once.
 That is, if I extend class A with class B I would then not be able to
 extend B again with any other class. 
 
 See: http://www.php.net/manual/en/keyword.extends.php
 An extended class is always dependent on a single base class, that
 is,
 multiple inheritance is not supported. Classes are extended using the
 keyword 'extends'.
 
 With some testing however, it appears that I can extend class B with
 class C and class C with class D and so on...
 
 Am I misinterpreting the manual? I suspect I am. Or is this a new
 feature. Thoughts?
 
 Thanks,
 
 Matt Friedman
 Web Applications Developer
 www.SpryNewMedia.com
 Email: [EMAIL PROTECTED]
  
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 
 


=
Please send all emails to my automatically redirecting
address: [EMAIL PROTECTED]

Regards,
Harshdeep S Jawanda
[[EMAIL PROTECTED]]

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problems with the fopen() function

2001-11-10 Thread Matt Friedman

I would try urlencoding the query-string in that url. Or put the url in
single quotes instead.

Just shots in the dark, but try it out.

M.


- Original Message -
From: Tim Harvey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 10, 2001 9:44 PM
Subject: [PHP] Problems with the fopen() function


 Can somebody PLEASE help me with this problem I'm having.

 This is a script to search the web. It sends the parematers q,c  i to
the
 SeacrhHippo server using the fopen function. When the script executes
the
 following error messages are displayed:

 Warning: php_hostconnect: connect failed in /usr/home/public_html/test.php
 on line 118
 Warning: fopen(http://www.searchhippo.com/qxml?q=testc=i=,r;) - Bad
 file descriptor in /usr/home/public_html/test.php on line 118



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Total Newbie - concatenating variables.

2001-11-10 Thread Matt Friedman

Try:

for($i=0;$i$count;$i++)
{
  // in the global array, print the variable with the name: item$i
  print $GLOBALS[item$i];
}

or even:

for($i=0;$i$count;$i++)
{
  // in the post vars array, print the variable with the name: item$i
  // this one is probably more secure.
  print $HTTP_POST_VARS[item$i];
}

Also, as an aside, unlike concatenation in vbscript (blech) you don't have
to break out of quotes all the time. That's because like in perl, php
variables within double quotes are interpolated.

So instead of writing:
print(input type=text name=item . $i . );

you may write:
print (input type=text name=item$i);

Further, you don't need parenthesis with the print statement so you can
write:
print input type=text name=item$i;

It's just a matter of preference, but I think it looks cleaner.

When concatenating several variables together into a string this can save a
ton of keystrokes and is easier to read and maintain.

Regards,
Matt.



- Original Message -
From: David Mitchell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 10, 2001 9:19 AM
Subject: [PHP] Total Newbie - concatenating variables.


 Hi,

 This is my first foray into PHP (coming from a VB, ASP background). What I
 am trying to do should be ridiculously easy, but for some reason I can't
 figure out how to do this.
 I have a form that builds a dynamic number of text boxes in a loop:

 for($i=0;$i$count;$i++)
 {
 print(input type=text name=item . $i . );
 }

 that works fine. I end up with a number of textboxes named item0,
item1,
 item2 and so on...When I submit the form, I pass over the $count value
and
 I want to loop through the count so that I can ge the value for each
textbox
 by building the textbox name dynamically. For example:

 for($i=0;$i$count;$i++)
 {
 print($item . $i);
 }

 Trying to print the value of $item0, $item1, etc...Obviously this
 doesn't work. What am I overlooking here?

 Many thanks in advance,

 Dave



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] amp; in url's

2001-11-10 Thread Matt Friedman

I'm not sure if this answers your question but it seems to me that amp; is
an html encoding whereas if you want to put something in the url you should
urlencode it.

This will eliminate the s.

Matt.


- Original Message -
From: GaM3R [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 10, 2001 1:54 PM
Subject: [PHP] amp; in url's


; The separator used in PHP generated URLs to separate arguments.
; Default is .
;arg_separator.output = amp;

; List of separator(s) used by PHP to parse input URLs into variables.
; Default is .
; NOTE: Every character in this directive is considered as separator!
;arg_separator.input = ;

now how can i replicate this on a per vhost level? i dont want to run it
globally, i just need it for 1 vhost that im running that is meant to be all
xhtml 1.1 compliant but the dammm PHPSESSID is screwing things up


Cameron
outworld.cx



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] what's this???

2001-11-04 Thread Matt Friedman

http://www.php.net/manual/en/language.oop.php

This is what you want to read.

Matt.

- Original Message - 
From: Christian C. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 04, 2001 7:16 PM
Subject: [PHP] what's this???


 Hello :c)
 
 im looking at some  code i found on the net and
 i cant find any info on this... it's used like:
 $this-mode = $mode;
 
 I have looked in the online help doc but it did'nt
 return anything, any one know??
 
 --
 Thanks
 Christian Charette
 www.charetx2.com
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Zipping a folder on a win2000 server with php4.06

2001-10-30 Thread Matt Friedman

There is a command line version of winzip.

I don't know much about it, but a friend of mine was just saying the other
day that he had used it to zip some files at the server in an ASP
environment.

In php you could call the winzip exectutable using exec. In asp you'd use
some shell object or something like that.

Matt.


- Original Message -
From: Stefan Rusterholz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 8:00 AM
Subject: [PHP] Zipping a folder on a win2000 server with php4.06


Hi

Does someone out there know, how I can zip a folder with some files in it?
It should be readable for Winzip.

Enviroment: Win2000 Server.
VB was available if useful.
Additional Components (applications, dll's or whatever) could be loaded if
needed.

I didn't find a usable entry in the manual, so if you tell me to rtfm -
please point me to the corresponding entry also :)

Thanks in advance

Stefan Rusterholz, [EMAIL PROTECTED]
--
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
--
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
--



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Email limit

2001-10-29 Thread Matt Friedman

I imagine that's only limited by your available bandwidth. If you try to
send emails out faster than your bandwidth will allow you'll get a slowdown
on your email server.

I use sleep() between each email to lessen the load on the server.

Matt.

- Original Message -
From: Richard Baskett [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Monday, October 29, 2001 6:43 AM
Subject: [PHP] Email limit


 What is the limit to the amount of emails you can send out at once.. or in
a
 for loop, to php's mail function?

 Rick


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] @#$@# Reg Expressions

2001-10-29 Thread Matt Friedman


Try putting a ? after your quantifier for non-greedy matching.

Something like: $the_array=split(A (.*?)/A, $html,-1);

Matt.



- Original Message - 
From: brendan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 29, 2001 7:55 PM
Subject: [PHP] @#$@# Reg Expressions


 love em.. right now I hate em..
 
 can someone inform me why the below doesnt work?
 it is intended to strip out all the links in a page and return an array
 .. insanity is just starting to set in..
 
 cheers
 
 $html =GETSITE($url);
 // and put in a new line break behind every anchor tag
 $the_array=spliti(A (.*)/A, $html,-1);
 echo $the_array ;
 foreach($the_array AS $k) echo $k.HR;
 }
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Advanced Help Needed

2001-04-19 Thread Matt Friedman

I would put the code:
? phpinfo(); ?
at the bottom of your form page and run the page, without posting a file,
and see what the phpinfo says about file uploading. Perhaps it is disabled.

Even so, I can't understand why you would get a server not found. Hrm, well
maybe this will shed some light.


Matt Friedman
Spry New Media
http://www.sprynewmedia.com
Lead Programmer/Partner
email: [EMAIL PROTECTED]
phone: 250 744 3655
fax: 250 370 0436


- Original Message -
From: "Chris Anderson" [EMAIL PROTECTED]
To: "Marc Davenport" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 6:36 AM
Subject: Re: [PHP] Advanced Help Needed


 I have seen this before. For me it was a problem with the post
operation.I'd
 give specifics, but frankly I can't remember...sorry :(
 - Original Message -
 From: "Marc Davenport" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, April 19, 2001 6:19 PM
 Subject: [PHP] Advanced Help Needed


 I need some help figuring something out that my host denies is his
problem.

 I have a suspicion that only someone who has run into this problem once
 before has the answer.

 I have this form which posts to a PHP file.  Sometimes I pass a file
along.
 This was info for a database and a picture along with it.   This worked
fine
 for the longest time.  Now it does not.
 when I post a file in the form I recieve an "Cannot Find Server".  When
 there isnt a file posted then the form works fine.  I dont understand
 because I recieve no PHP generated error messages, but rather a problem
 finding the site entirely.

 Has anyone ever seen this?

 Help would be much
 Marc Davenport



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [phplib] Sessions in windows

2001-04-17 Thread Matt Friedman

This is an issue to do with IE cacheing the page too aggressively.

Add this to local.inc in your extended session class.

Someone contributed this to the list sometime ago, I'm sorry I don't have
their name to give them credit so I'll just say Thanks! and pass it along
myself.

BTW this is great for development; you may want to switch back to the
default cache handling once the site is online.

 var $allowcache = "iehack";

   function put_headers() {
# Allowing a limited amount of caching, as suggested by
# Padraic Renaghan on [EMAIL PROTECTED]
#
# Note that in HTTP/1.1 the Cache-Control headers override the Expires
# headers and HTTP/1.0 ignores headers it does not recognize (e.g,
# Cache-Control). Mulitple Cache-Control directives are split into
# mulitple headers to better support MSIE 4.x.
#
# Added pre- and post-check for MSIE 5.x as suggested by R.C.Winters,
# see
http://msdn.microsoft.com/workshop/author/perf/perftips.asp#Use%20Cache-Cont
rol%20Extensions
# for details
switch ($this-allowcache) {

  case "passive":
$mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) . " GMT";
header("Last-Modified: " . $mod_gmt);
# possibly ie5 needs the pre-check line. This needs testing.
header("Cache-Control: post-check=0, pre-check=0");
  break;

  case "public":
$exp_gmt = gmdate("D, d M Y H:i:s", time() +
$this-allowcache_expire * 60) . " GMT";
$mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) . " GMT";
header("Expires: " . $exp_gmt);
header("Last-Modified: " . $mod_gmt);
header("Cache-Control: public");
header("Cache-Control: max-age=" . $this-allowcache_expire * 60);
  break;

  case "private":
$mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) . " GMT";
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . $mod_gmt);
header("Cache-Control: private");
header("Cache-Control: max-age=" . $this-allowcache_expire * 60);
header("Cache-Control: pre-check=" . $this-allowcache_expire * 60);
  break;

   case "iehack":
  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  header("Cache-Control: no-cache");
  header("Cache-Control: post-check=0,pre-check=0");
  header("Cache-Control: max-age=0");
  header("Pragma: no-cache");
   break;

  default:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
header("Pragma: no-cache");
  break;
}

Matt Friedman
Spry New Media
http://www.sprynewmedia.com



- Original Message -
From: "Paul Cusack" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 10:33 AM
Subject: [phplib] Sessions in windows


 I have just installed phplib on my Windows ME and have used the test files
 for session management and everything appears to be working fine except
the
 Per Session Data counter does not increase when I reload the page.

 The strange thing is though that if I edit the php source code and then
 reload the page the counter increase to the correct number.

 Any ideas?

 PC


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Netscape 4.77 and PHP

2001-04-15 Thread Matt Friedman

This is almost always an html problem, not a php one.

If a table tag or something isn't closed properly netscape will show a blank
screen. IE is more (too) forgiving and assumes it knows where you meant to
put the tag.

Check your html and you'll fix it.

Matt Friedman
Spry New Media
http://www.sprynewmedia.com


- Original Message -
From: "Jason Caldwell" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 14, 2001 10:55 PM
Subject: [PHP] Netscape 4.77 and PHP


 I've created a test.php file that dynamically loads HTML.. works totally
 fine in IE 5, but when I test it with Netscape 4.77 -- nothing comes up...
 just a totally blank page.

 Anyone know why this might be happening?

 Thanks.
 Jason




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP.net is slow

2001-04-04 Thread Matt Friedman

I don't know about everyone else but I've found that since the changeover to
the new design of the php.net site, it's been very unreliable.

I used to be able to look up a function in seconds if I didn't quite
remember the usage. Now, I find that the doesn't won't even come up at
times.

Other times the search is very slow. If others have noticed this perhaps we
can alert the developers to the situation.

How about a downloadalbe version of the site? Does such a thing exist?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Executing a PHP file to write an html file

2001-04-01 Thread Matt Friedman

If you have the php cgi installed you can run a script like so:

exec("php -q /path/to/script.php")

You didn't include the command (php -q), you only included the path to the
script.

If you don't have the cgi, but you are running on *nix you can
exec("lynx http://www.host.com/script.php")
assuming lynx is installed.

Instead of exec, why not just include the script you want to run in your
page?

Matt Friedman
Spry New Media
http://www.sprynewmedia.com


- Original Message -
From: "David Robley" [EMAIL PROTECTED]
To: "PHP User" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, April 01, 2001 5:53 PM
Subject: Re: [PHP] Executing a PHP file to write an html file


 On Sun,  1 Apr 2001 03:06, PHP User wrote:
  Here is my problem.
  I have a file, static.php
  static.php writes to index.html by way of...
  $filename = "/web/h16/docs/index.html";
  $fp = fopen("$filename","w");
  fwrite($fp, "table width=\"230\"\n");
  etc..
 
  If I hit static.php from the command line, index.html gets written just
  fine. static.php does it's job.
 
  If I try to exec(), or  system() static.php from a browser the browser
  just hangs. eg. I add:
  system ('/usr/local/bin/php web/h16/docs/index.html);
  or
  exec ('/usr/local/bin/php web/h16/docs/index.html);
  To a file and get nothing. I tried with and without the absolute paths
  in the commands.
 
  What I want to be able to do is every time I update a Db, at the same
  time I want the index page to be rewritten to reflect the changes in
  the Db. And I don't want to have to go to the command line everytime I
  want to rewrite the index page. So I would just hit "SAve" in the
  update.php page, it would save to the Db, which it does now, and at the
  same time it hits static.php and therefore rewrites index.html
 
  I also tried header() but that was no good due to echo in the pages,
  gives that header already sent error.
 
  Is there a funtion I am missing somehwere that does the job?
 
  It's a Unix box running php 4.03, and the Db is MySQL
 
  Thanks Much!!

 Is it possible you have a permissions problem? Remember that your
 webserver will probably be running as something like nobody, which may
 not have the necessary permissions to wwrite to files in that particular
 directory.


 --
 David Robley| WEBMASTER  Mail List Admin
 RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
 AusEinet| http://auseinet.flinders.edu.au/
 Flinders University, ADELAIDE, SOUTH AUSTRALIA

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Search Engines

2001-04-01 Thread Matt Friedman

There are a few things that can help you get indexed by the search engines
if you are using a server side scripting language.

1. Try to avoid passing variables in the get string. That is, the stuff
after the "?" in a url.
2. If you want a page indexed, don't redirect from that page to another
page. The search spider will not follow the redirect.

Other than that, I can't think of more things that a spider wouldn't like
that have to do with php. If there are more, please correct me.

Matt Friedman
Spry New Media
http://www.sprynewmedia.com



- Original Message -
From: "Joe Montiel" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 01, 2001 8:52 PM
Subject: [PHP] Search Engines


 Hello,

 I am new to the list and to php...I would like to know how php does with
the
 major search engines. Do I need to do something extra to make it work?
Will
 it index if I am pulling my content from text files? (If this is in an
 archive somewhere, point me to it).

 Thank you!

 Joe


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Environment extract

2001-03-27 Thread Matt Friedman

print $HTTP_USER_AGENT; // the variable is already in the global scope.

also $ua = getenv('HTTP_USER_AGENT');

Most variables are automatically made a part of the environment in a PHP
script. It's one of the ways PHP makes scripting easier.

The online manual is invaluable for this type of info. http://www.php.net/

Also, write a short script and run it as so:
? phpinfo(); ?
You'll see a myriad of variables and their values. It's also handy for
debugging. You can include phpinfo() anywhere to see the output values of
your script.

Matt Friedman



- Original Message -
From: "Costas" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 8:01 AM
Subject: [PHP] Environment extract


 In perl the code to extract browser info is:
 $length = $ENV{'HTTP_USER_AGENT'};

 What is the equivalent code in PHP.

 Thanks





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Get info to a perl script and then continue without going to that perl script.

2001-03-26 Thread Matt Friedman

 http://php.net/manual/en/function.exec.php

 $return = exec("/pathtocgi/script.cgi VAR1 VAR2 ");

 if you want the data returned, its in $return.


If there are multiple lines returned, you'll only get the last line in
$return.

See the manual link to get the full info.

Matt Friedman


- Original Message -
From: "Chris Lee" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 26, 2001 7:25 AM
Subject: Re: [PHP] Get info to a perl script and then continue without going
to that perl script.





 --

  Chris Lee
  [EMAIL PROTECTED]



 ""Brandon Orther"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I have a script that takes information and sends it to a cgi script using
 the header("location:
 http://www.domain.com/script.cgi?var1=VAR1var2=VAR2").  Is there a way
for
 my script to send info to a cgi script but then keep the person connected
to
 the php script and not get the results of the cgi script?

 Thank you,

 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Seg Fault with fopen

2001-03-18 Thread Matt Friedman

Here's a function I'm trying to use to execute a php and then read the html.
I've tried the actual hostname instead of localhost but that's not working
either.

It's causing a segmentation fault. I'm running linux apache php 4.0.4

Any thoughts?

function get_web_page_desc($filename)
{
 $uri = 'http://localhost'.get_web_page_uri($filename);

 $fp   = fopen($uri, 'r');
 $contents  = fread($fp, 36 );

// do stuff with contents

 return strip_tags($para);
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Regex Masters: Please inspect this regex- Pulling urls out of page

2001-03-07 Thread Matt Friedman

I'm putting together a regex to pull all of the urls out of a web page. Not
the href tag, but just the url part of that tag.

Here's what I've come up with:

preg_match_all('/.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|)/i', $html,
$matches);
foreach($matches[2] as $m) print "P$m\n";

All regex masters please tell me if I'm missing something. It's working
well, but I'm still learning about perl regex and I'd like any input if at
all possible.

What's a good way to exclude things like javascript: urls and other non URI
info? I guess what I'm really looking for is all the http urls, no ftp, mms
etc... or anything like that.

If it's right, then hopefully someone can use it!

Matt Friedman


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Calling Perl from PHP -- Help --

2001-03-05 Thread Matt Friedman

I'm stumped. I've searched all over and can't figure this one out.

I have a perl script that waits for input on the command line. You type in a string 
and it returns a string.

I'd like to be able to this via php, since I can't rewrite the script in php, since 
it's a little over my head.

So, how do I open the perl script in php, send it some input and read the output?

Thanks,
Matt.



[PHP] Bug? - pg_pconnect failing with pgsql and pg_connect is ok.

2001-02-17 Thread Matt Friedman

I've recently been banging my head against the wall because I was getting a number of 
selects that would occasionally return zero rows, even though 1 or more rows should 
have been returned.

I cannot reproduce the problem with pg_connect. The problem only occurs when I am 
using pg_pconnect.

Has anyone run across this behavior? Any ideas why this might be occuring? Is it an 
apache issue?

Matt Friedman




Re: [PHP] Telnet with php?

2001-02-09 Thread Matt Friedman

there's fsockopen from which you might make a telnet client, methinks, but
you'd have to know the protocol etc...

look for it at the manual.

Matt Friedman
Spry New Media
http://www.sprynewmedia.com
Lead Programmer/Partner
email: [EMAIL PROTECTED]
phone: 250 744 3655
fax: 250 370 0436


- Original Message -
From: "Brandon Orther" [EMAIL PROTECTED]
To: "PHP User Group" [EMAIL PROTECTED]
Sent: Friday, February 09, 2001 2:12 PM
Subject: [PHP] Telnet with php?


 Hello,

 Is there a way to telnet with php?  If so does anyone know a good place to
 find a tutorial on it?

 Thank you,

 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] OT mod_rewrite says goodbye to POST vars (but interesting)

2001-02-01 Thread Matt Friedman

Well, not being able to find much help on mod_rewrite, I hoped some guru
here might be able to help me.

I'm using mod rewrite to do a pretty simple redirect (or rewrite that it) to
a php page that parses the original url and allows for the output of all
sorts of content.

Works great apart from the fact that the POST vars are lost along the way.
And I believe the cookie vars too, but get seems to be ok.

So, does anyone know how to do url redirection or rewriting or whatever that
allows the post vars to be maintained? Please don't refer me to tim's
article on phpbuilder on the subject as I've read every word twice and all
the annotations to no avail.

Many thanks as always.

Matt Friedman
Spry New Media



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHPLIB and PHPMyAdmin

2001-01-16 Thread Matt Friedman

Since phpmyadmin doesn't use an include path and an auto prepend file but
phplib does, what we do is run them under separate sub directories. Under
the phplib subdir we use an .htaccess to specify the phplib directives
needed to make it run and under the phpmyadmin subdir we don't specify
anything since phpmyadmin doesn't require this.

What we don't do is put the phplib .htaccess with it's directives under the
web root "/". That way we can specify varying configurations under various
sub directories.

So, you can have magic quotes on under one dir and off under another. Use
.htaccess for configuration.

best of both worlds.

Matt Friedman
Spry New Media

- Original Message -
From: "Ignacio Vazquez-Abrams" [EMAIL PROTECTED]
To: "Kevin Cawthorne" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, January 16, 2001 9:24 AM
Subject: Re: [PHP] PHPLIB and PHPMyAdmin


 On Tue, 16 Jan 2001, Kevin Cawthorne wrote:

  Hi,
 
  I want to install  PHPLIB but one of the configuration notes says "turn
off magic quotes in the php.ini file".
 
  OK But I'm, using phpMyAdmin, which I understand NEEDS magic quotes on
to work.
 
  Has anyone done this using the two together?
 
  Kevin Cawthorne
 

 Knowing which web server you're using helps, but if you're using Apache,
the
 way to do it is to turn it off in php.ini and then turn it on in
httpd.conf or
 .htaccess or wherever for the directory/location phpMyAdmin is in.

 --
 Ignacio Vazquez-Abrams  [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]