[PHP] PHP newsgroups still down?

2001-06-25 Thread Michael Simcich

I hadn't checked the php news servers since the mailing list went back
online. At least to me, at this moment, the news servers seem to be
missing in action. Anyone know what the scoop is on this?

Michael Simcich
AccessTools 


-- 
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: FTP Problem in PHP Version 4.0.4pl1

2001-06-25 Thread David Robley

On Mon, 25 Jun 2001 16:56, muttaqin wrote:
> Hello David,
>
> I have did reconfigure with command :
> ./configure -prefix=/usr/local/php --with-mysql --enable-ftp \
> -with-apache=/usr/local/downloads/apache_1.3.17
>
> And I have restart apache.
> but the problem is the same.
>
> Thank's
>
> - Original Message -
> From: David Robley <[EMAIL PROTECTED]>
> To: muttaqin <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, June 25, 2001 11:52 AM
> Subject: Re: FTP Problem in PHP Version 4.0.4pl1
>
> > On Mon, 25 Jun 2001 13:02, muttaqin wrote:
> > > Had some problem calling the ftp_connect() functions. How to
> > > configure the ftp module?
> > >
> > > We use PHP Version 4.0.4pl1
> > >
> > > Fatal error: Call to undefined function: ftp_connect() in
> > > /home/httpd/html/php/test.php on line 6
> > >
> > > Configure Comand :
> > > './configure' '-prefix=/usr/local/php' '--with-mysql'
> > > '-with-apache=/usr/local/downloads/apache_1.3.17'
> > >
> > > thanks,
> >
> > You need to configure with --enable-ftp
> >
> > Check the output of configure --help for a comprehensive listing.
> >
> > --
> > David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
> > CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
> >
> >"Ummm, Trouble with grammar have I! Yes!" -Yoda-

Im not sure - but if you check your config.log and look for ftp there may 
be some clues there. You did re-install the new php, of course.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   If Windows sucked, it would be good for something!

-- 
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] [OT-ish] Optional Extras.

2001-06-25 Thread ..s.c.o.t.t..

off the top of my head, you could try using a 
"lookup table" to define the extra options...

ford_spec table:
id  desc
--- ---
1   air conditioning
2   whatever

ford_cars table:
car extra1  extra2
--  --- -
'contour'   1   0
'probe' 0   1

"contour" would have "aircond" but no "whatever"
"probe" would have no "aircond" but would have "whatever"

so to add more options specific to a manufacturer, 
you could make an entry into "ford_spec" and then
create an "extra3" field in "ford_cars"... this system,
at least, would enable you to have as many extras
as you wanted for each manufacturer, and have
different options available for different manufacturers.

i dont know how efficient this would be, and there are
probably a bunch of better ways to do it, but i've seen
this method used before by someone who developed
a batteries catalog and needed to store different
manufacturers with different options for their batteries.


> -Original Message-
> From: Dave Mariner [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 25, 2001 12:54
> To: [EMAIL PROTECTED]
> Subject: [PHP] [OT-ish] Optional Extras.
> 
> 
> Please excuse me if you consider this to be off-topic, but this is the best
> place I can think of to ask the (slightly long-winded) question.
> 
> Imagine you have a car database (MySQL driven). Different models have
> different optional extras (air-con, central locking, immobiliser etc). I
> need to store the optional extras in a searchable form - i.e. the customer
> may have a wish-list of electric windows, aircon, and power steering.
> However the optional extras list is not and will not be finalised when the
> system goes live (probably will never be finalised!). Therefore I cannot do
> the quick-and-dirty hack of putting all the options as binary fields in my
> car database, so must come up with a more elegant solution. I've thought of
> storing e.g. 10 tuples car.option1->aircon code, car.option2->powersteering
> code. etc. and also going down the header-detail route.
> My current quandry is to which is going to be better for the search
> aspect, considering I'd also like to give them a "best fit" option. Would it
> be to create a cursor on my fixed criterion (price, age etc) and then
> iterate through each of those manually in my php script (see - it isn't
> entirely off topic ;0) ) counting the matches for that record in the
> optional-extra detail table? Or would it be to do a select where
> (optionalextra1=mychoice1 or optionalextra2 = mychoice1 ..) and
> (optionalextra2=mychoice2 or optionalextra2 = mychoice2.. ) and  etc
> etc (yeuch!).
> 
>  I have a sneaking suspicion that there's a more elegant way than either
> of these, but can't think of it at the moment.
> 
>  If you come up with the solution there's a beer in it for you the next
> time you're in Paphos, Cyprus!
> 
> 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] date -> day

2001-06-25 Thread Philip Olson


mktime can be pretty useful :

  $year  = 2001;
  $month = 6;
  $day   = 1;

  print date('l',mktime(0,0,0,$month,$day,$year));

as it creates a unix timestamp, and date() appreciates that.


Regards,
Philip


On Mon, 25 Jun 2001, Tyler Longren wrote:

> Hello,
> 
> I have something like this:
> $Month = "6";
> $Year = "2001";
> $Date = "1";
> 
> Is there any relatively simple way to get the day out of that?  For example,
> the day for 6-1-2001 would be Friday.
> 
> Thanks,
> Tyler
> 
> 
> -- 
> 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-WIN] Problems running php from samba network shares...

2001-06-25 Thread Mattias Segerdahl

Hello all,

I have a slight problem that someone out there might be able to help me
with. I recently installed Windows 2000 with Internet Information Server 5.0
and php 4.0.7-dev. When configuring the IIS 5.0 default webserver, I did the
following

=> Properties
=> Directory Security
=> Edit
=> Anonymous access -> Edit

Here I supplied a user I had created which already was on the samba server,
a user called webbert. The samba server has a directory called /www which is
accisable for the user webbert. Which full access, both group and user, and
read,execute for world.

I then did,

=> Properties
=> Home Directory
=> Choose the checkbox a"A share located on another computer"

Here I supplied the samba server share and the correct user, webbert.

This is all fine and dandy, I can access this directory using a client based
browser, surf around and check html files.

But when I try to access a php file, I get the following error message...



--
PHP Windows 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] Help with PHP/Oracle and serializing data

2001-06-25 Thread Michael Champagne

I'm developing a web application and would like to be able to store the state
of the application in an Oracle table by serializing a bunch of variables and
storing them in the database.  Has anyone done this?  What datatype would be
best to use here?  I'm not serializing too much data now, but other
applications that we do in the future may.  Would this be a place to use a
CLOB or should I stick with varchar2?  Thanks!

-- 
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]



**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

-- 
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] Practical flock() implementation

2001-06-25 Thread CC Zona

In article <030a01c0fd4a$0f797840$6401a8c0@Lynchux100>,
 [EMAIL PROTECTED] ("Richard Lynch") wrote:

> > argument, so don't I *have* to fopen the file before going to flock()?  Or
> > should I fopen first in "r" mode, acquire the lock, then re-open in "w"
> > mode, counting on the lock to stay in effect even though it's a different
> > file pointer?
> 
> Yup.  You are holding the lock, and it's yours

Kewl.  That's just what I needed to know.  Thanks, Manuel and Richard!

> Possibly spurious NOTE:
> 
> Most beginners who think they need a lock file are doing something that
> should be in a database, but they are not familiar with databases, so use
> files instead.
> 
> Don't.
> 
> The database guys have worked really hard to (A) take care of all these
> locking issues and (B) make it just as easy to use as files.

...and (C) faster in most cases--as counter-intuitive as that seems--and 
(D) indexed, and (E) etc...  No, not a spurious note at all.  It's a good 
point that can save some poor soul (though unfortunately not me on this 
ocassion! ) a lot of grief.

-- 
CC

-- 
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] converting Word documents to something sensible

2001-06-25 Thread Phil Driscoll

Thanks to all who replied.

I've downloaded all the likely candidates and will have a play with them and 
report back. So far I've had very good results with wvHtml which has coped 
admirably with all the word docs I have to hand.

If anyone else has already evaluated any of the converters I (and I'm sure 
others on the list) would be grateful to hear your results.

Cheers
-- 
Phil Driscoll

-- 
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] Session-problems in linux

2001-06-25 Thread Diego Fulgueira Pastor

I had EXACTLY the same problem about a month a go, but using IIS on Win2k.
The session file contains only ":foo|", so it's just the same.
There are a couple of things to check:
1. Make sure the browser is receiving the cookie.
2. Make sure the browser is returning the cookie (should appear using
phpinfo()).
3. Make sure a file named with the value of the PHPSESSID cookie exists on
the server.

I solved the problem by turning off session.auto_start on php.ini and then
using the following code to start the session:

function MySetCookie
($CkyName, $CkyVal, $exp, $pth, $Domain)
{ 
$exp = strftime("%A, %d-%b-%Y %H:%M:%S", $exp); 
$cookiestr = sprintf ("%s=%s; domain=%s; path=%s; expires=%s", 
$CkyName, $CkyVal, $Domain, $pth, $exp); 
$mycky = (isset($mycky) ? "$mycky\n" : "")."Set-Cookie: $cookiestr"; 
header($mycky); 
} 
session_start();
MySetCookie("PHPSESSID",session_id(),0, "/", "");

Make sure this code appears before any header is sent, that is, before any session, 
cookie or header instruction.
If you do all this and still have the same problem, try registering each session 
variable that you are going to use just after starting the session. I don't know why, 
but sometimes PHP requires all session variables registered before you can access 
their values.

Hope it's been of some help.
Cheers, 
Diego.



-Original Message-
From: Tjelvar Eriksson [mailto:[EMAIL PROTECTED]]
Sent: Monday, 25 June, 2001 7:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Session-problems in linux


Hi everyone,
I can't get the sessions working in linux.

I changed:
/usr/local/lib/php.ini session.auto_start = 1

so when the browser go to the page, a cookie is recieved.

In the /tmp-dir a file is created and everything looks great.

However, when I register a variable and set it to a value,
only the name, not the value is stored. I've tried to store
strings, arrays, integers but no luck.

I do:
session_register("foo");
$foo="Great day";

and the file will only contain ":foo|" with no accompanying value.

I'm really stuck here, and everything works fine in windows
but not in RH7.1. I would be very greatful for any hints here.

/t eriksson




-- 
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] a standalone PHP script to update MySql server

2001-06-25 Thread scott [gts]

sure.  install PHP as a binary and run the script just
like you'd run any other script

;)

> -Original Message-
> From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 25, 2001 4:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] a standalone PHP script to update MySql server
> 
> 
> It's pretty easy to use PHP to update MySql server through the web sever. 
> Is there an easy way to use PHP scripts to update the MySql sever in a 
> standalone mode (without the web sever)? Any sample scripts?
> 
> 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] Remove value from array

2001-06-25 Thread Kristian Duske

> http://php.net/manual/en/language.types.array.php
> there is written:
> "To change a certain value, just assign a new value to it. If you want to
> remove a key/value pair, you need to unset() it."

Damn, I looked for that and didn't find it =). Anyway, thanks for the heads
up. I was pretty sure it wasn't possible to completely remove a key / value
pair from an array.

Kristian


-- 
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] Help with simple regular expression

2001-06-25 Thread mailing_list

> > That's because POSIX is greedy.  Or Perl is greedy.  Whatever.
> 
> Perl is greedy. It *should* have worked with eregi...
> 
> > > 

Yes, Perl is greedy (there has to be some kind of default behaviour)!

BUT it is SO easy to make it decent:
//
that's it!!!


michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


-- 
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] [OT-ish] Optional Extras.

2001-06-25 Thread Rich Cavanaugh

Dave,
I did something similar and I came up with an interesting way of
approaching it:

Assign IDs to each car (obviously).
Assign an ID to each option.
Match up your car IDs and option IDs in a seperate table.

Here's some table defs:

create table cars (
carid   int auto_increment,
namevarchar(255)
);

create table options (
optid   int auto_increment,
namevarchar(255)
);

create table caroptions (
carid   int,
optid   int
);

(if my sql is off, don't flame me, you at least get the idea)

Here's the search:

$words should be a comma delimited list if the options the user chose.

select count(o.carid) as cnt, o.carid as id, c.name from caroptions as o,
cars as c where and o.optid in ({$words}) and o.carid = c.carid group by
o.carid, c.name order by cnt DESC

This would give you a list of cars ordered by the best match to worst match.


again - this is all off the top of my head, I'm sure it's not word for word
correct.
--
Rich Cavanaugh

-Original Message-
From: Dave Mariner [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 3:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [OT-ish] Optional Extras.


Please excuse me if you consider this to be off-topic, but this is the best
place I can think of to ask the (slightly long-winded) question.

Imagine you have a car database (MySQL driven). Different models have
different optional extras (air-con, central locking, immobiliser etc). I
need to store the optional extras in a searchable form - i.e. the customer
may have a wish-list of electric windows, aircon, and power steering.
However the optional extras list is not and will not be finalised when the
system goes live (probably will never be finalised!). Therefore I cannot do
the quick-and-dirty hack of putting all the options as binary fields in my
car database, so must come up with a more elegant solution. I've thought of
storing e.g. 10 tuples car.option1->aircon code, car.option2->powersteering
code. etc. and also going down the header-detail route.
My current quandry is to which is going to be better for the search
aspect, considering I'd also like to give them a "best fit" option. Would it
be to create a cursor on my fixed criterion (price, age etc) and then
iterate through each of those manually in my php script (see - it isn't
entirely off topic ;0) ) counting the matches for that record in the
optional-extra detail table? Or would it be to do a select where
(optionalextra1=mychoice1 or optionalextra2 = mychoice1 ..) and
(optionalextra2=mychoice2 or optionalextra2 = mychoice2.. ) and  etc
etc (yeuch!).

 I have a sneaking suspicion that there's a more elegant way than either
of these, but can't think of it at the moment.

 If you come up with the solution there's a beer in it for you the next
time you're in Paphos, Cyprus!

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]




[PHP] strange behavior on manipulating the array of class object

2001-06-25 Thread Moriyoshi Koizumi

Hello.

I'm new to this list, and I once looked over the archives,
but the problem like this might not have been proposed, so I ask...

please see the code below
sorry to be too long.

(the result of this code is supposed to be seen with HTML browser)

cls = array();
}
function add( $cls ) {
array_push ( $this->cls, $cls );
}
function one() {
reset( $this->cls );
while( $obj = current( $this->cls ) ) {
print 'foo->one() invokes '.get_class( $obj 
)."->one()\n";
$obj->one();
next( $this->cls );
}
}
function two() {
reset( $this->cls );
while( $obj = current( $this->cls ) ) {
print 'foo->two() invokes '.get_class( $obj 
)."->two()\n";
$obj->two();
next( $this->cls );
}
}
}

class bar
{
var $some;
function bar() {
$this->some = 'set in constructor ( 
this value was expected to be changed at foo->one() ) ';
}
function one() {
$this->some = 'modified';
}
function two() {
print 'bar->two->some = '.$this->some."";
}
}

$fubar = new foo();
$fubar->add( new bar() );
$fubar->add( new bar() );
$foo = new foo();
$foo->add( $fubar );

$foo->one();
$foo->two();
?>

and the results should have been like 

foo->one() invokes foo->one()
foo->one() invokes bar->one()
foo->one() invokes bar->one()
foo->two() invokes foo->two()
foo->two() invokes bar->two()
bar->two->some = modified
foo->two() invokes bar->two()
bar->two->some = modified

but you probably obtain

foo->one() invokes foo->one()
foo->one() invokes bar->one()
foo->one() invokes bar->one()
foo->two() invokes foo->two()
foo->two() invokes bar->two()
bar->two->some = set in constructor ( this value was expected to be changed at 
foo->one() ) 
foo->two() invokes bar->two()
bar->two->some = set in constructor ( this value was expected to be changed at 
foo->one() )




-- 
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] Enter to BR

2001-06-25 Thread Joeri Vankelst

How can I get an Enter typed in a HTML textfield to be inerpreted as a BR or
a P tag?
Someone sugested I use the split() function, but I wouldn't know how...

Joeri Vankelst



-- 
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] Expand/parse variables in file

2001-06-25 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Gunther E. Biernat") wrote:

> I'm trying to read a plain text file where I embedded some variables. E.g.
> 
> abc $a def
> 
> Sucking this file in a string and setting $a to "whatever" results in "abc $a 
> def" rather than "abc whatever def". 

Is the string in your plain text file enclosed in single-quotes by any 
chance?

(Just a wild guess.  It's easier if you show actual code/text.)

-- 
CC

-- 
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] Passing an array to a C program from a php script??

2001-06-25 Thread Nicolas Guilhot

Hi all,

I have a big array (nearly 1000 lines) that I would like to pass to a C
program. I don't want to create a temporary file to pass my array (If
possible ?!?), and I don't think the command line will fit my needs.

Is there a way to execute a program with a php string as the standard
input. Something like shell redirection 'c_program < input.file' but with
input.file being a php variable and not a real file ?? Any other solution
??

Hope I am clear enough !

Any help would be appreciated.


Nicolas

-- 



-- 
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] Help with simple regular expression

2001-06-25 Thread Mark Maggelet

another way to match this that works with preg or ereg is to go like
this:
]*>

On Mon, 25 Jun 2001 15:31:29 -0400, scott [gts]
([EMAIL PROTECTED]) wrote:
>exactly.  use the non-greedy "?" with the perl regex's
>to have perl match the least amount of characters it can.
>
>preg_match('//', $text, $matches)
>
>in the case of perl regexp's, you have to specifically
>tell the regexp not to be greedy.  the "?" regexp modifier
>is how you do this.  (otherwise, the regexp will try and
>match the maximum amount of text that it can, which
>usually isnt what you want, since it'll match *eveything*
>between "blah" and the last occurance of ">" in the text)
>
>so, in the case of this text:
>
>sasfd asdf asdf
>
>
>the greedy will match something like this:
> now>
>sasfd asdf asdf
>
>
>and the non-greedy will match something like this:
>now
>
>
>
>
>
>> -Original Message-
>> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
>> Subject: Re: [PHP] Help with simple regular expression
>>
>>
>> That's because POSIX is greedy.  Or Perl is greedy.  Whatever.
>>
>> When one of them does that, use the other one.
>>
>> Instead of eregi, use pregi.
>>
>> Disclaimer:  What I know about Regex could fit in a matchbook.
>>
>> --
>> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
>> [EMAIL PROTECTED]
>> Wanna help me out?  Like Music?  Buy a CD: http://l-i-
>>e.com/artists.htm
>> Volunteer a little time: http://chatmusic.com/volunteer.htm
>> - Original Message -
>> From: "Aral Balkan" <[EMAIL PROTECTED]>
>> Newsgroups: php.general
>> Sent: Sunday, June 24, 2001 7:34 PM
>> Subject: [PHP] Help with simple regular expression
>>
>>
>> > Hi all,
>> >
>> > I'm trying to match the body tag in an HTML file (eg. > > bgcolor="gg">) with the following regular expression and
>>eregi:
>> >
>> > 
>> >
>> > Unfortunately it matches everything from the body tag onwards
>>and doesn't
>> > stop at the greater-than sign. It should be simple thing but I'm
>>stumped!
>> To
>> > me the regex reads match string that begins with >by zero or
>> > more of anything and ending with a greater-than sign.
>> >
>> > Any help would be greatly appreciated! :)
>> >
>> > Aral
>> > __
>> > ([EMAIL PROTECTED])
>> > New Media Producer, Kismia, Inc.
>> > ([EMAIL PROTECTED])
>> > Adj. Prof., American University
>> > ¯¯
>> >
>> >
>> >
>> > --
>> > 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: php-list-
>>[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: php-list-
>>[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: php-list-
>[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] Expand/parse variables in file

2001-06-25 Thread Gunther E. Biernat

All,

This ought to be simple, but I can't crack it...

I'm trying to read a plain text file where I embedded some variables. E.g.

abc $a def

Sucking this file in a string and setting $a to "whatever" results in "abc $a def" 
rather than "abc whatever def". Where's the difference to directly doing the following:

$a = "whatever";
$b = "abc $a def";
echo $b;

which results in "abc whatever def" ???

What am I missing?

Thanks in advance.



mit freundlichen Gruessen / yours sincerely


Gunther E. Biernat
Web Application Engineer
__

RealNetworks GmbH   Tel.: +49-40-415204-24
Weidestraße 128 Fax.: +49-40-415204-11
22083 Hamburg   Mail: [EMAIL PROTECTED]
Germany URL : http://de.real.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]




Re: [PHP] Oracle Database keeps disconnecting - or something

2001-06-25 Thread Rouvas Stathis

"Thies C. Arntzen" wrote:
> 
> On Sun, Jun 24, 2001 at 09:50:05PM +0300, Rouvas Stathis wrote:
> > "Thies C. Arntzen" wrote:
> > >
> > > On Fri, Jun 22, 2001 at 09:16:08PM +0300, Rouvas Stathis wrote:
> > > > Do you experience any other sort of problems other than those warnings?
> > > > I mean, is anything wrong with the data? Normally, nothing should be
> > > > wrong.
> > > >
> > > > I have seen the same messages (especially the "service handle not
> > > > intitialized" one) in my server too.
> > > > I have traced it to attemtps to close an already closed connection, as
> > > > in
> > > >
> > > > $cone = OciLogon(...);
> > > > ...stuff...
> > > > OciLogout($cone);
> > > > ...stuff...
> > > > OciLogout($cone);
> > >
> > > believe me - this is not the cause of the message.
> >
> > any ideas?
> 
> what do you mean? i simply _know_ that calling "OciLogout" will
> not cause the "failed to roll.." message - that's all i said.

Agreed. OciLogout is not the cause of the msg.
What I meant was, what do you think is causing such messages? 

-Stathis.

-- 
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] Easy to copy MySQL table??

2001-06-25 Thread Ray Noel

Hi,

Is there any easy way to copy a "template" mysql table to enable data to 
processed in batches?
I would prefer to just copy a table rather than hard-code a table create 
query, if possible.

Regards
Ray



-- 
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] Accessing a Berkeley DB V1.85 using PHP V4.0.5

2001-06-25 Thread David Robinson (AU)

Hello


I am trying to access a Berkeley database V1.85 using PHP V4.0.5 (on Windows
2000) without success.

I have tried the dbmopen() routines and dba_open(..., ..., "dbm") routines.
dbmopen() etc. are successful but the results suggest that they do not
support this database
format. The dba_open() routine returns 'Warning: no such handler: dbm in
"dba.php" on line 26'.

php_db.dll and php_dba.dll are dynamically loaded.

1) Is DB1 another name for Berkeley DB 1.x?

2) Which database routines do I need to use?

3) Alternatively, can I use mysql V3.23 to manage the berkeley DB?
I did not find any useful information in this regard.

4) I wish to avoid converting the database format if at all possible.

5) The database is a Redhat Source Navigator project.


Any help offered would be greatly appreciated.


Regards
David Robinson
([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] date -> day

2001-06-25 Thread Tyler Longren

Hello,

I have something like this:
$Month = "6";
$Year = "2001";
$Date = "1";

Is there any relatively simple way to get the day out of that?  For example,
the day for 6-1-2001 would be Friday.

Thanks,
Tyler


-- 
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] Remove value from array

2001-06-25 Thread mailing_list

> > Hello,
> > how can I complete remove an item out of an array ?
> > I tried unset() as well as setting the value to null.
> >
> > Both result in the value being null but not the item being deleted.
> 
> As far as I know, this is not possible. You can, however, create a new
> array
> and copy all values except the deleted one from the old array, for example
> with two array_slice() calls.

http://php.net/manual/en/language.types.array.php
there is written:
"To change a certain value, just assign a new value to it. If you want to
remove a key/value pair, you need to unset() it."

michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


-- 
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] shared object not open

2001-06-25 Thread Martin Schmidt

Hi,

I am just starting with PHP, I installed the new version on my Suse 7.1
with apache 1.3.14, because I need a tool for accessing databases
(Informix/Oracle).

Everything seemed fine, until I tried to start apache, it told me:

Cannot load /usr/lib/apache/libphp4.so into server: shared object not
open

All my investigations showed me a very "kind" member of bug.php.net, who
told someone else, that this isn't a bug and we should connect the
mailing-lists. He generously had a hint : /etc/ld.so.conf and ldconfig.
In the archive of the mailing lists I found the same informations ( a
little bit more informative), but my ld.so.conf is o.k. and at this
point any help stops.
I hope, that someone found out what's happening here and helps me.

So I have:
Intel Celreon 366 on Asus Mainboard, 256 MB RAM, Adaptec 2940UW with all
together 20GB HD, 5 swap-Areas with 128MB each.
SuSE 7.1 Prof-Edition, from this distribution I installed apache and PHP
(everything working fine, but no idea how to activate
informix/oracle-support)

Apache says, PHP4-module installed.

Thanks a lot for any help


Martin Schmidt


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

2001-06-25 Thread Brave Cobra

Hi,

I know it doesn't have a lot to do with PHP, and then again...

I'm trying to get PHP authentication to work on an IIS 5.0 server.
The thing is, the server is not sending my desired headers. The script, I'm
using, works perfectly. I've tested that, on an Apache server online. Works
brilliantly. ;)
What do I need to do to get it working, apart from adding the entry for the
ISAPI filters, using the php4isapi.dll?
Do I need a registry entry somewhere? I've read about that somewhere.
Can it work when using the php.exe(or CGI-version)?(using the ISAPI dll
version is not working either, although I've read the install file over and
over again...)
I can get PHP to work, using the cgi(or exe) version of PHP, although I
don't think, I can get PHP authentication to work this way. Correct me if
I'm wrong here.

In other words, how do I configure my IIS to get PHP working with PHP
authentication?

tnx

Brave Cobra



-- 
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] Remove value from array

2001-06-25 Thread Philip Olson

Here's an example :

 a [2] => c

$bar = array('a','b','c');

  $piece = array_splice ($bar, 1 ,1);

  print_r($piece);  // [0] => b 

  print_r($bar);// [0] => a [1] => c 

?>

http://www.php.net/manual/function.array-splice.php


regards,
philip


On Mon, 25 Jun 2001, Bret R. Zaun wrote:

> Hello,
> how can I complete remove an item out of an array ?
> I tried unset() as well as setting the value to null.
> 
> Both result in the value being null but not the item being deleted.
> 
> Any help is appreciated
> Heiko
> 
> 
> 
> -- 
> 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-ish] Optional Extras.

2001-06-25 Thread Dave Mariner

Please excuse me if you consider this to be off-topic, but this is the best
place I can think of to ask the (slightly long-winded) question.

Imagine you have a car database (MySQL driven). Different models have
different optional extras (air-con, central locking, immobiliser etc). I
need to store the optional extras in a searchable form - i.e. the customer
may have a wish-list of electric windows, aircon, and power steering.
However the optional extras list is not and will not be finalised when the
system goes live (probably will never be finalised!). Therefore I cannot do
the quick-and-dirty hack of putting all the options as binary fields in my
car database, so must come up with a more elegant solution. I've thought of
storing e.g. 10 tuples car.option1->aircon code, car.option2->powersteering
code. etc. and also going down the header-detail route.
My current quandry is to which is going to be better for the search
aspect, considering I'd also like to give them a "best fit" option. Would it
be to create a cursor on my fixed criterion (price, age etc) and then
iterate through each of those manually in my php script (see - it isn't
entirely off topic ;0) ) counting the matches for that record in the
optional-extra detail table? Or would it be to do a select where
(optionalextra1=mychoice1 or optionalextra2 = mychoice1 ..) and
(optionalextra2=mychoice2 or optionalextra2 = mychoice2.. ) and  etc
etc (yeuch!).

 I have a sneaking suspicion that there's a more elegant way than either
of these, but can't think of it at the moment.

 If you come up with the solution there's a beer in it for you the next
time you're in Paphos, Cyprus!

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] Installation problems with MySQL

2001-06-25 Thread Cesar Cuneo

Hello,

Can anyone please help me with MySQL installation?

I am installing MYSQL on Windows 2000  version 3.23.38-win.zip

But when I try to run it in the command line I receive the following
statements:




C:\mysql>cd bin

C:\mysql\bin>mysql -p
Enter password:
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

C:\mysql\bin>scripts/mysql_install_db
'scripts' is not recognized as an internal or external command,
operable program or batch file.

C:\mysql\scripts>cd..

C:\mysql>cd bin

C:\mysql\bin>mysqladmin -password newpassword
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to MySQL server on 'localhost' (10061)'
Check that mysqld is running on localhost and that the port is 3306.
You can check this by doing 'telnet localhost 3306'

C:\mysql\bin>

Please help me .

Cesar

-Original Message-
From: infoz [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 8:38 AM
To: [EMAIL PROTECTED]; Peter Van Dijck
Subject: Re: [PHP] damn $REQUEST_URI


$HTTP_HOST

Run a page with  on your server & you'll see all sorts of
goodies in there.

- Tim
  http://www.phptemplates.org

- Original Message -
From: "Peter Van Dijck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 7:10 AM
Subject: [PHP] damn $REQUEST_URI


> $REQUEST_URI gets me home/dir/index.php
> but I need to get the domain name.
>


--
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] converting Word documents to something sensible

2001-06-25 Thread Wolfgang Ebneter

How about staroffice ? It reads *.doc files and you can save them as *.rtf 
files.
>
> Phil Driscoll wrote:
> > I have to build a web site for a local government education authority in
> > the UK which will allow them to make available a large range of documents
> > to schools. They INSIST on submitting documents in Word format. I think
> > it is immoral to make the schools have to accept documents in that format
> > so I am determined to translate them to something sensible (html, rtf or
> > pdf will do) at the server. The server is a Linux box so there's no
> > opportunity to play any tricks with COM.
> >
> > Has anyone come across any tools to do this, using php or otherwise?

-- 
Wolfgang Ebneter M.Sc. Data Engineering
Medienzentrum Osnabrück
[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] Help with simple regular expression

2001-06-25 Thread scott [gts]

exactly.  use the non-greedy "?" with the perl regex's
to have perl match the least amount of characters it can.

preg_match('//', $text, $matches)

in the case of perl regexp's, you have to specifically
tell the regexp not to be greedy.  the "?" regexp modifier
is how you do this.  (otherwise, the regexp will try and
match the maximum amount of text that it can, which
usually isnt what you want, since it'll match *eveything*
between "blah" and the last occurance of ">" in the text)

so, in the case of this text:

sasfd asdf asdf


the greedy will match something like this:
 now>
sasfd asdf asdf


and the non-greedy will match something like this:
now





> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] Help with simple regular expression
>
>
> That's because POSIX is greedy.  Or Perl is greedy.  Whatever.
>
> When one of them does that, use the other one.
>
> Instead of eregi, use pregi.
>
> Disclaimer:  What I know about Regex could fit in a matchbook.
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: "Aral Balkan" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> Sent: Sunday, June 24, 2001 7:34 PM
> Subject: [PHP] Help with simple regular expression
>
>
> > Hi all,
> >
> > I'm trying to match the body tag in an HTML file (eg.  > bgcolor="gg">) with the following regular expression and eregi:
> >
> > 
> >
> > Unfortunately it matches everything from the body tag onwards and doesn't
> > stop at the greater-than sign. It should be simple thing but I'm stumped!
> To
> > me the regex reads match string that begins with  > more of anything and ending with a greater-than sign.
> >
> > Any help would be greatly appreciated! :)
> >
> > Aral
> > __
> > ([EMAIL PROTECTED])
> > New Media Producer, Kismia, Inc.
> > ([EMAIL PROTECTED])
> > Adj. Prof., American University
> > ¯¯
> >
> >
> >
> > --
> > 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]




RE: [PHP] freebsd and exec problem

2001-06-25 Thread scott [gts]

always check permissions
make sure the web server can read/execute what it needs to.

also, have you tried running the program from a 
shell and seeing if it generated any errors?

> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 25, 2001 3:12 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] freebsd and exec problem
> 
> 
> Is PHP timing out after 30 seconds?...
> 
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: "Gary Starks" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> Sent: Sunday, June 24, 2001 2:22 AM
> Subject: [PHP] freebsd and exec problem
> 
> 
> > I am having a strange problem that I have yet to solve.
> >
> >
> > I am running apache 1.3.14 and php 4.0.5 on FreeBSD 4.3
> >
> > My problem is that when I am trying to execute a program via php the
> program
> > dies after a short amount of time.
> >
> > I have tried execing in the background, calling another program that execs
> > it into the background (both instances using:
> > exec("nohup /my/program &");
> >
> > This same syntax worked on a Linux Mandrake 8.0 machine with the same
> > webserver and php setup.  It just isnt working on a FreeBSD 4.3 machine.
> >
> > The program starts to exec but when I close the calling webpage it
> > terminates, or if i leave that page open it terminates after a short
> period
> > of time.
> >
> > But if I run the same command from the command line, it works perfectly.
> >
> > Any ideas on what I can check or what I need to change to get this to work
> > correctly?
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.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]




RE: [PHP] php not working

2001-06-25 Thread scott [gts]

here's my apache config i use at home 
(where i have the binary version, *not* server module)

ScriptAlias /pbin/ /usr/local/php-bin/

AddType application/x-httpd-php .php

Action application/x-httpd-php /pbin/php



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of brent
> Sent: Sunday, June 24, 2001 7:49 PM
> To: Php-General@Lists. Php. Net
> Subject: [PHP] php not working
> 
> 
> Hi. Need help badly.
> 
> I've been trying in vain to get PHP 4.0.5 working with Apache 1.3.20.
> Red Hat 7.0
> 
> I've added the lines:
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
> to my httpd.conf file
> 
> and :
> application/x-httpd-php  php phtml pht
> to mime.types
> 
> I even tried the LoadModule trick, but since I didn't compile as a
> module, that just gave me an error when I restarted the  server.
> 
> I'm new to Apache and PHP set up so I'm probably missing something
> obvious. And I've RTFM and archives and books and everything I can find,
> 
> but still no luck.
> 
> TIA for any suggestions.
> 
> Brent
> 
> 
> 
> 
> 
> 
> -- 
> 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: MySQLGUI

2001-06-25 Thread Jochen Kaechelin

> What do we require to use the MySQLGUI with our MYSQL  server.
> 
> We are looking to manage the users and tables over the web 
> from an NT
> machine. Can you  please advise us.
> 
> I think that you may have a very large market out there is 
> it works in the
> way that i have been lead to believe. 

Take a look at:

http://www.anse.de/mysqlfront/




-- 
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] a standalone PHP script to update MySql server

2001-06-25 Thread Zhu George-CZZ010

It's pretty easy to use PHP to update MySql server through the web sever. Is there an 
easy way to use PHP scripts to update the MySql sever in a standalone mode (without 
the web sever)? Any sample scripts?

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]




Re: [PHP] Batch Coding Help Please

2001-06-25 Thread KPortsmout

Hi,

Unfortunately that won`t work for me because I don`t have access to setting 
up a Cronjob on this account, thanks for the suggestion though. 

Ade

-- 
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] file("http://www.php.net") error?

2001-06-25 Thread elias

Dunno,...
Maybe you should specify the full file path, ie:
file(http://www.163.com/index.htm) ?

""atan"" <[EMAIL PROTECTED]> wrote in message
9h0s59$l4h$[EMAIL PROTECTED]">news:9h0s59$l4h$[EMAIL PROTECTED]...
> file("http://www.163.com";) error?
> this is a test:
> 
>  $fcontents = file ('http://www.php.net');
> while (list ($line_num, $line) = each ($fcontents)) {
>  echo "Line $line_num: " . htmlspecialchars ($line) . "\n";
> }
> ?>
> /
> This program run no error in my server ;
> but it not work when i sent it to the Server (mtkj.51.net)
> The message:
>
> Warning: file("http://www.163.com";) - Permission denied in
> /z1/mtkj/public_html/test.php on line 2
> Warning: Variable passed to each() is not an array or object in
> /z1/mtkj/public_html/test.php on line 3
>
> why?
>
>
>
> --
> 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: [PHP-DB] access to a access db via php

2001-06-25 Thread Miles Thompson

Mathias,

Welcome and we hope you'll have fun.

At 12:53 PM 6/25/01 +0200, you wrote:
>Hello NG,
>it's the first time I use this NG and I'm not sure whether I'm I right here
>or not.
>The problem: I'm a beginner in php (just started to read the first
>introductions). I created a "guestbook" with FP2000. The entrys where safed
>in and shown from a db. FP 2000 nearly created it by itself using asp. The
>problem is that my provider doesn't support a db connection via asp. They
>told me that php3 is supported. My question: Can I use the created db (where
>my guestbook entrys are safed) and edit and show results via php? I think
>yes but all tutorials I found about it described a odbc connection and I
>think the provider I'm using doesn't support this , too.

Confirm with your ISP:
- which version of PHP is supported
- is ODBC support compiled in
- is an Access database supported

>Is there any
>possibilty to work in an access DB without any odbc connection (cause then I
>need a server which supports DNS and so on and all Servers I knew are too
>expensive for me at the moment). Maybe I can access the db via php like a
>text file?

Why do you need DNS? If an IP number is needed for ODBC connectivity to 
work you can just use localhost (127.0.0.1) for development, retrieving the 
value from an include file. On your production machine you use a file with 
the same name, but with the appropriate IP number.

OR - Do you mean DSN -- Data Source Name? If so you can establish that on 
your local Windows machines, and your ISP will certainly have to give you 
one for database access on their server. The DSN can be passed to the PHP 
odbc_connect call as a variable. Same as for IP numbers as above.

Go to www.php.net and check which databases are supported. They are listed 
alphabetically in the manual. There's a double whammy here - the manual 
reflects the current version, your ISP may be a couple of versions behind.

I believe you will find direct support for Access, but again your ISP has 
to have compiled it in for it to function. The beauty of ODBC is that you 
have a more portable interface you can take to other databases.

Yes you can use a text file, but it's more likely that your ISP supports 
MySQL which will give you good results with a guestbook app. With a text 
file you will end up with a lot of sequential reads - a real performance 
killer.

>There are many question I have, sorry if this description isn't precise
>enough. I'm glad about any hints, comments, suggestions, links or whatsoever
>that would help me.
>Thanks in advance to read and answer this long posting.
>MFG Matthias
>
>
>
>--
>PHP Database 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] damn $REQUEST_URI

2001-06-25 Thread infoz

$HTTP_HOST

Run a page with  on your server & you'll see all sorts of
goodies in there.

- Tim
  http://www.phptemplates.org

- Original Message -
From: "Peter Van Dijck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 7:10 AM
Subject: [PHP] damn $REQUEST_URI


> $REQUEST_URI gets me home/dir/index.php
> but I need to get the domain name.
>


-- 
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] damn $REQUEST_URI

2001-06-25 Thread Attila Strauss

hi,

try

$SERVER_NAME

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

regards
attila strauss



> $REQUEST_URI gets me home/dir/index.php
> but I need to get the domain name.
> 
> Can't seem to find it anywhere, what's the environment variable for the 
> domain name again? Thanks!
> Peter
> 


-- 
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] damn $REQUEST_URI

2001-06-25 Thread Maxim Maletsky

$url = sprintf("http://%s/%s";, $HTTP_HOST, $REQUEST_URI);

Cheers,
Maxim Maletsky


-Original Message-
From: Peter Van Dijck [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 8:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] damn $REQUEST_URI


$REQUEST_URI gets me home/dir/index.php
but I need to get the domain name.

Can't seem to find it anywhere, what's the environment variable for the 
domain name again? Thanks!
Peter
~~
http://liga1.com building multiple language/culture websites
http://poorbuthappy.editthispage.com online ethnology, up&down


-- 
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] Batch Coding Help Please

2001-06-25 Thread Gianluca Baldo

Hi,
I do the following in a similar case:
- I have a table with the emails to send (the addresses)
- I run a PHP script as a cronjob every X minutes (15 in my case)
- the script sends up to 1000 e-mail and delete the corresponding entry from the
  table for each e-mail sent (you may want to simply mark as "sent" an
  address if it is the case).

This work fine for me.

Cheers,
   Gianluca

Kac> I am building a custom e-mailer for one of my websites using PHP and MySQL, I 
Kac> know there are loads out there already but my goal here is to learn this 
Kac> coding myself so I can modify it to my needs as and when they change. 

Kac> My list only has around 5000 subscribers at the moment and I have heard that 
Kac> with large lists like this it is ideal to batch send the emails. So my 
Kac> question is how do you batch code? 

Kac> This is the code I have in place at the moment 

Kac> $query=mysql_db_query($dbase,"SELECT * FROM Subscribers, Members where 
Kac> Subscribers.ListID='$ID' and Members.MID=Subscribers.MemberID");
Kac> $num_rows=mysql_num_rows($query);

Kac> for ($i=0; $i<$num_rows; $i++)
Kac>  {
Kac>   mysql_data_seek($query, $i);
Kac>   $array=mysql_fetch_array($query);
Kac>   $Email="$array[Email]";
Kac>   mail($Email, $MsgTitle, "$Message\n\n\n$Content", $Header);
Kac>  }




[EMAIL PROTECTED]

BcnInédita
EURO RSCG INTERACTION
www.bcninedita.com
Planella, 39
08017 Barcelona
Tel.34 932 531 950 (directo 93 253 19 53)
Fax. 34 932 114 546 


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




AW: [PHP] apache and php ate up all my memory :-[

2001-06-25 Thread Sebastian Stadtlich

i lowered the config parameter 
MaxRequestsPerChild 30
so at least it keeps running, but i think that can't be the solution...
as soon as i increase it the memory consumtion increases linear
here is the info :

top:
  1:39pm  up 24 days, 20:55,  1 user,  load average: 0.00, 0.00, 0.00
57 processes: 56 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.3% user,  0.3% system,  0.0% nice, 99.2% idle
Mem:   254456K av,  189052K used,   65404K free,   0K shrd,   23128K
buff
Swap:  273064K av,7008K used,  266056K free   77824K
cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
32543 root  14   0  1060 1060   840 R 0.3  0.4   0:00 top
32353 apache 9   0  3516 3516  2304 S 0.1  1.3   0:00 httpd
32476 root  10   0  1952 1924  1452 S 0.1  0.7   0:00 sshd
1 root   8   0   124   7268 S 0.0  0.0   0:08 init
2 root   8   0 00 0 SW0.0  0.0   0:00 keventd
3 root   9   0 00 0 SW0.0  0.0  13:53 kswapd
4 root   9   0 00 0 SW0.0  0.0   0:00 kreclaimd
5 root   9   0 00 0 SW0.0  0.0   0:07 bdflush
6 root   9   0 00 0 SW0.0  0.0   0:00 kupdated
7 root  -1 -20 00 0 SW<   0.0  0.0   0:00
mdrecoveryd
   72 root   9   0 00 0 SW0.0  0.0   0:00 khubd
  408 root   9   0   352  332   284 S 0.0  0.1   0:04 syslogd
  413 root   9   0   764  180   168 S 0.0  0.0   0:02 klogd
  518 root   9   0   132   4444 S 0.0  0.0   0:01 automount
  530 daemon 9   0   108   4440 S 0.0  0.0   0:00 atd
  545 named  9   0  2424 1336   928 S 0.0  0.5   0:00 named
  546 named  9   0  2424 1336   928 S 0.0  0.5   0:00 named
  550 named  9   0  2424 1336   928 S 0.0  0.5   0:19 named
  551 named  9   0  2424 1336   928 S 0.0  0.5   0:01 named
  552 named  9   0  2424 1336   928 S 0.0  0.5   0:03 named
  562 root   9   0   532  452   368 S 0.0  0.1   0:14 sshd
  673 root   9   0   456  440   388 S 0.0  0.1   0:01 crond
  709 root   9   0644 4 S 0.0  0.0   0:00 mingetty
  710 root   9   0644 4 S 0.0  0.0   0:00 mingetty
  711 root   9   0644 4 S 0.0  0.0   0:00 mingetty
  712 root   9   0644 4 S 0.0  0.0   0:00 mingetty
  713 root   9   0644 4 S 0.0  0.0   0:00 mingetty
  714 root   9   0644 4 S 0.0  0.0   0:00 mingetty
11076 root   8   0  4360 3648  2112 S 0.0  1.4   0:09
miniserv.pl
27813 root   9   0   812  392   332 S 0.0  0.1   0:02 sendmail
12669 root   9   0  1032 1032   844 S 0.0  0.4   0:00
safe_mysqld
12697 mysql  9   0  8940 8940  2332 S 0.0  3.5   0:15 mysqld
12699 mysql  8   0  8940 8940  2332 S 0.0  3.5   0:17 mysqld
12700 mysql  9   0  8940 8940  2332 S 0.0  3.5   0:27 mysqld
12701 mysql  9   0  8940 8940  2332 S 0.0  3.5   0:00 mysqld
 3113 mysql  9   0  8940 8940  2332 S 0.0  3.5   1:02 mysqld
 3759 mysql  9   0  8940 8940  2332 S 0.0  3.5   0:01 mysqld
19135 root   9   0  1108 1108   868 S 0.0  0.4   0:00 xinetd
20367 root   9   0  2048 2048  1800 S 0.0  0.8   0:00 httpd
30676 root   9   0   628  624   544 S 0.0  0.2   0:00 crond
30677 root   8   0   908  908   768 S 0.0  0.3   0:00 run-parts
30679 root   9   0   552  552   464 S 0.0  0.2   0:00 awk
30680 root   9   0   880  880   756 S 0.0  0.3   0:00 sa1
30682 root   9   0   512  512   448 S 0.0  0.2   0:00 sadc
32210 apache 9   0  9104 9104  2312 S 0.0  3.5   0:00 httpd
32238 apache 9   0  6132 6132  2304 S 0.0  2.4   0:00 httpd
32243 apache 9   0  3880 3880  2308 S 0.0  1.5   0:00 httpd
32337 apache 9   0  5540 5540  2312 S 0.0  2.1   0:00 httpd
32354 apache11   0  4732 4732  2324 S 0.0  1.8   0:00 httpd
32355 apache 9   0  4464 4464  2296 S 0.0  1.7   0:00 httpd
32440 apache 9   0  4112 4112  2320 S 0.0  1.6   0:00 httpd
32453 apache 9   0  3220 3220  2280 S 0.0  1.2   0:00 httpd
32454 apache 9   0  3392 3392  2312 S 0.0  1.3   0:00 httpd
32485 wgsebast   9   0  1324 1324  1008 S 0.0  0.5   0:00 bash
32517 root   9   0  1196 1196   848 S 0.0  0.4   0:00 su
32518 root   9   0  1464 1464  1052 S 0.0  0.5   0:00 bash
32542 apache 9   0  3024 3024  2292 S 0.0  1.1   0:00 httpd

ps waux | grep mysql && ps waux | grep httpd

[root@ds217-115-141-23 wgsebastian]# ps waux | grep mysql && ps waux |
grep httpd
root 12669  0.0  0.4  2140 1032 ?SJun22   0:00 /bin/sh
/usr/bin/safe_mysqld --defaults-file=/etc/my.cnf
mysql12697  0.0  3.5 53228 8944 ?SJun22   0:15
/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --data
mysql12699  0.0  3.5 53228 8944 ?SJ

RE: [PHP] Remove value from array

2001-06-25 Thread Kristian Duske

> Hello,
> how can I complete remove an item out of an array ?
> I tried unset() as well as setting the value to null.
>
> Both result in the value being null but not the item being deleted.

As far as I know, this is not possible. You can, however, create a new array
and copy all values except the deleted one from the old array, for example
with two array_slice() calls.

Argh, I'm not used to clicking reply and having to change the recipients
adress =)

Kristian


-- 
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] damn $REQUEST_URI

2001-06-25 Thread Peter Van Dijck

$REQUEST_URI gets me home/dir/index.php
but I need to get the domain name.

Can't seem to find it anywhere, what's the environment variable for the 
domain name again? Thanks!
Peter
~~
http://liga1.com building multiple language/culture websites
http://poorbuthappy.editthispage.com online ethnology, up&down


-- 
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 still not working

2001-06-25 Thread Michael Hall


Do you restart Apache after making changes to httpd.conf?

You can use 'path/to/apache/bin/apachectl restart' to do this.

Just a thought.

Mick

On Mon, 25 Jun 2001, brent wrote:

> Trying a re-post from yesterday...
> 
> My setup is as follows:
> 
> RH Linux 7.0
> PHP 4.0.5
> Apache 1.3.20
> 
> I've either added or uncommented the following lines from httpd.conf:
> 
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
> 
> and to mime.types:
> 
> application/x-httpd-php  php phtml pht
> 
> Adding a LoadModule won't work because I didn't compile as a module.
> 
> I've seen some posts about AddHandler for PHP3, so I tried adding the
> following to the .conf file:
> 
> AddHandler php-script  .php
> 
> having no idea whether this syntax was correct or not since the only
> example I found
> in the archuves refered to v. 3.
> 
> So I still get the html/php code showing up in my browser with no
> interpretation by PHP.
> Any suggestions (with the exception of "Hey, maybe you should stick with
> Windows")
> are greatly appreciated.
> 
> TIA
> 
> Brent
> 
> 
> 
> 
> 
> 
> -- 
> 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] Batch Coding Help Please

2001-06-25 Thread KPortsmout

Hi, 

I am building a custom e-mailer for one of my websites using PHP and MySQL, I 
know there are loads out there already but my goal here is to learn this 
coding myself so I can modify it to my needs as and when they change. 

My list only has around 5000 subscribers at the moment and I have heard that 
with large lists like this it is ideal to batch send the emails. So my 
question is how do you batch code? 

This is the code I have in place at the moment 

$query=mysql_db_query($dbase,"SELECT * FROM Subscribers, Members where 
Subscribers.ListID='$ID' and Members.MID=Subscribers.MemberID");
$num_rows=mysql_num_rows($query);

for ($i=0; $i<$num_rows; $i++)
 {
  mysql_data_seek($query, $i);
  $array=mysql_fetch_array($query);
  $Email="$array[Email]";
  mail($Email, $MsgTitle, "$Message\n\n\n$Content", $Header);
 }


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

2001-06-25 Thread Tim Zickus


Check the permissions on the files in /proc, which is where uptime gets its
info from, most likely.

You could probably even read the pseudo-file '/proc/loadavg' as 'nobody'
directly from PHP given the appropriate file permissions.

- Tim
  http://www.phptemplates.org

> Richard Lynch's advice was correct, I cannot run uptime under nobody for
> some reason.  Does anyone know how to change this?  The permissions are
set
> to allow everyone to execute it.



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

2001-06-25 Thread Andy Woolley

Does anyone know if it's possible to capture TCP_TIMESTAMP using a socket.

If you could do that you wouldn't need to execute /usr/bin/uptime

Andy.

---
Need a DHTML Menu?
Try www.milonic.com/menu it's free
---

- Original Message -
From: "Richard Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 8:34 AM
Subject: Re: [PHP] PHP Uptime error


> > I have a PHP script with the following code in it;
> >
> > $uptime = passthru ("/usr/bin/uptime");
> >
> > but when I load the PHP page I get the following;
> >
> > 8:26pm up 0 min, 0 users, load average: 0.00, 0.00, 0.00
> >
> > which is wrong (I have checked the uptime via telnet).  Can anybody
please
> > help me try and fix this?
>
> When you checked uptime via telnet, were you logged in as "nobody", or
> whomever PHP runs as?...  If not, you haven't really duplicated the
> circumstances where PHP exists.
>
> I can't think why "nobody" wouldn'y be allowed to do "uptime", but maybe
> there's some security issue involved.  Too bad those load numbers aren't
> right though :-)
>
> You may have to resort to creating a suid shell script with some "real"
user
> as owner for PHP to be able to run it to do uptime.  See "man suid" for
> details.
>
> BE CAREFUL.  A mis-configured suid script is a security risk.  Actually,
> that's like saying a sucking chest wound is a "cut" :-^
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> 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] Web Mail

2001-06-25 Thread Rosen

Hi
Can comeone reccomend me PHP script for Web Mail , which
can create mail accounts on mail server?

Thanks,
Rosen Marinov






-- 
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 still not working

2001-06-25 Thread brent

Trying a re-post from yesterday...

My setup is as follows:

RH Linux 7.0
PHP 4.0.5
Apache 1.3.20

I've either added or uncommented the following lines from httpd.conf:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

and to mime.types:

application/x-httpd-php  php phtml pht

Adding a LoadModule won't work because I didn't compile as a module.

I've seen some posts about AddHandler for PHP3, so I tried adding the
following to the .conf file:

AddHandler php-script  .php

having no idea whether this syntax was correct or not since the only
example I found
in the archuves refered to v. 3.

So I still get the html/php code showing up in my browser with no
interpretation by PHP.
Any suggestions (with the exception of "Hey, maybe you should stick with
Windows")
are greatly appreciated.

TIA

Brent






-- 
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] Help with simple regular expression

2001-06-25 Thread Christian Reiniger

On Monday 25 June 2001 09:27, Richard Lynch wrote:
> That's because POSIX is greedy.  Or Perl is greedy.  Whatever.

Perl is greedy. It *should* have worked with eregi...

> > 
> >
> > Unfortunately it matches everything from the body tag onwards and
> > doesn't stop at the greater-than sign. It should be simple thing but
> > I'm stumped!

Greedy means: it tries to match as much as possible. In your case it 
matches "" - a 
string starting with "" :)

-- 
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)

This is JohnC IMHO, I compaired tri-word groupings here and in his plan
and got a good match.

- /. posting discussing the likelihood that an AC post that claimed to be
posted by John Carmack during his honeymoon (and having the login info at
home) was actually from him.

--
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] how can i use postfix instead of sendmail???

2001-06-25 Thread Michael Hall

> > Is postfix more efficient than sendmail?

I don't know about efficient but it is certainly more secure and *way*
easier to configure.

> > Can you give me the url which describes how to use it or write here ?
> www.google.com/linux >> "postfix"
> and you get:
> http://www.redhat.com/support/docs/faqs/RH-postfix-FAQ/book1.html
> Which seems pretty much like what you want.
> (PS: this took me 15 seconds, couldn't you try a web search?)

Yeah ... apart from that, www.postfix.org is also a winner. Why not
download it and have a look?

Basically, you need to replace sendmail with postfix. Its really easy and
all described in the docs that come with it.

Mick


-- 
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] Remove value from array

2001-06-25 Thread Bret R. Zaun

Hello,
how can I complete remove an item out of an array ?
I tried unset() as well as setting the value to null.

Both result in the value being null but not the item being deleted.

Any help is appreciated
Heiko



-- 
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] Oracle Database keeps disconnecting - or something

2001-06-25 Thread Thies C. Arntzen

On Sun, Jun 24, 2001 at 09:50:05PM +0300, Rouvas Stathis wrote:
> "Thies C. Arntzen" wrote:
> > 
> > On Fri, Jun 22, 2001 at 09:16:08PM +0300, Rouvas Stathis wrote:
> > > Do you experience any other sort of problems other than those warnings?
> > > I mean, is anything wrong with the data? Normally, nothing should be
> > > wrong.
> > >
> > > I have seen the same messages (especially the "service handle not
> > > intitialized" one) in my server too.
> > > I have traced it to attemtps to close an already closed connection, as
> > > in
> > >
> > > $cone = OciLogon(...);
> > > ...stuff...
> > > OciLogout($cone);
> > > ...stuff...
> > > OciLogout($cone);
> > 
> > believe me - this is not the cause of the message.
> 
> any ideas?

what do you mean? i simply _know_ that calling "OciLogout" will
not cause the "failed to roll.." message - that's all i said.

tc

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

2001-06-25 Thread Richard Lynch

Oh yeah:  I forgot:

*AFTER* the loop, you need to add another spurious .

You'll have an empty row with no TD's in it, and the browser won't even put
in a blank line or anything.

Just spew out an extra  at the end and call it done.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "McShen" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Saturday, June 23, 2001 10:13 PM
Subject: [PHP] ->>coding help


> Hi
>
> I have a script which queries mySQL and outputs 32 links at once. Here is
my
> scipt
> 
> 
> $connection = mysql_connect("***","","");
> if ($connection==false)
>{
> echo mysql_errno().":".mysql_error()."";
> exit;
>}
>
> $end = $list + 16;
>
> $query = "SELECT * FROM refer ORDER BY hits desc LIMIT $list, $end";
> $result = mysql_db_query ("celebzone", $query);
>
> $num = mysql_num_rows($result);
>
> $j=0;
> $i=0;
> echo "\n";
> echo "\n";
> while ($j!=$num)
> {
> @$r = mysql_fetch_array($result);
> @$id = $r[id];
> @$title = $r[title];
>
>   echo "\n";
>   echo "$title";
>   echo "\n";
> // new row in table every other link
> $i++;
>  if (($i % 2) < 1)
>   {
>   echo "\n\n";
>   }
>
> $j++;
> }
> echo "";
>
> echo "\n";
>
>
> ?>
> ---
> And here is the link to see it in action
> http://www.celebritieszones.com/ln.php?list=0
>
> If you check my HTML source, at the end, right before , you will
see
> an extra . I know the cause of this. It's because of this
> ---
> "
> $i++;
>  if (($i % 2) < 1)
>   {
>   echo "\n\n";
>   }
> "
> -
>
> I don't know how to fix the problem. Please help me re-write the script a
> bit so that it doesn't add the extra .
>
> Thanks in advance.
>
>
>
> --
> 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 Uptime error

2001-06-25 Thread Richard Lynch

> I have a PHP script with the following code in it;
>
> $uptime = passthru ("/usr/bin/uptime");
>
> but when I load the PHP page I get the following;
>
> 8:26pm up 0 min, 0 users, load average: 0.00, 0.00, 0.00
>
> which is wrong (I have checked the uptime via telnet).  Can anybody please
> help me try and fix this?

When you checked uptime via telnet, were you logged in as "nobody", or
whomever PHP runs as?...  If not, you haven't really duplicated the
circumstances where PHP exists.

I can't think why "nobody" wouldn'y be allowed to do "uptime", but maybe
there's some security issue involved.  Too bad those load numbers aren't
right though :-)

You may have to resort to creating a suid shell script with some "real" user
as owner for PHP to be able to run it to do uptime.  See "man suid" for
details.

BE CAREFUL.  A mis-configured suid script is a security risk.  Actually,
that's like saying a sucking chest wound is a "cut" :-^

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Running external programs

2001-06-25 Thread Richard Lynch

>Warning: Unable to fork [cscript d:\temp\rgroup.vbs -t a -g new.group.01]
in >d:\inetpub\wwwroot\nntpadm\creategroup.php on line 3
>
>What am I doing wrong?

Using Microsoft :-)

IIRC, the deal is this -- When PHP went to version 4, the threading stuff
got real, but MS doesn't have real threads, so "forking" to run exec() and
whatnot just plain isn't going to work.  PHP could let you try, but you'd
pretty much crash PHP and/or whatever you forked, which in Microsoft-land
means crashing the whole machine requiring a re-boot.

Disclaimer:  This is my hazy memory of something I never really understood
properly in the first place.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
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] freebsd and exec problem

2001-06-25 Thread Richard Lynch

Is PHP timing out after 30 seconds?...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "Gary Starks" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, June 24, 2001 2:22 AM
Subject: [PHP] freebsd and exec problem


> I am having a strange problem that I have yet to solve.
>
>
> I am running apache 1.3.14 and php 4.0.5 on FreeBSD 4.3
>
> My problem is that when I am trying to execute a program via php the
program
> dies after a short amount of time.
>
> I have tried execing in the background, calling another program that execs
> it into the background (both instances using:
> exec("nohup /my/program &");
>
> This same syntax worked on a Linux Mandrake 8.0 machine with the same
> webserver and php setup.  It just isnt working on a FreeBSD 4.3 machine.
>
> The program starts to exec but when I close the calling webpage it
> terminates, or if i leave that page open it terminates after a short
period
> of time.
>
> But if I run the same command from the command line, it works perfectly.
>
> Any ideas on what I can check or what I need to change to get this to work
> correctly?
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.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] php not working

2001-06-25 Thread Richard Lynch

> I even tried the LoadModule trick, but since I didn't compile as a
> module, that just gave me an error when I restarted the  server.

And therein lies the rub.

If you compiled as a stand-alone binary (aka CGI) you don't want AddHandler,
you want "Action".

Something not unlike:

Action application/x-httpd-php4 /full/path/to/wherever/you/hid/php

PS  You probably do want to try to do the Module thingie ASAP.  Way mo'
betta.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Creating formatted documents

2001-06-25 Thread Richard Lynch

> I need to create a document that confirms to certain formatting criteria
> and then be able to give the surfer the ability to download the
> completed document preferrable, pdf.  In other words, the document is a
> "legal" document and has some dynamic fields.  Can this be done in php
> and if so, is there some code available that can give me an idea on how
> to do it?

You'll need the fdf toolkit from Adobe -- fdf being something like PDF, only
the first F is for "Form".

You'll also need to re-compile PHP to include support for fdf/PDF after
you've installed fdf.

Finally, you'll need to read up on PHP/PDF functions in the manual and
various web-sites.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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 authenticating and session management

2001-06-25 Thread Richard Lynch

> 1.)
> I see from www.php.net , people said they will generate a Session ID by
> themselves
> srand((double)microtime()*100);
> $unique_str = md5(rand(0,999));
> why not to generate by ourself ?
> PHP will create itself .

Once upon a time, a long time ago, there was no built-in PHP session
support.

Thus, one had to generate session IDs for oneself.

When I was a newbie, we *walked* to school.  In the snow.  Uphill.  Both
ways. :-)

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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 Files on Browser

2001-06-25 Thread Richard Lynch

> Sorry for this stupid question but I'm a newby trying to install php on my
> win98 computer and find that neither netscape nor IE 5.5 won't open php
> files that are located on my c: drive but will access php files on the
net.
> There must be a simple explanation.

PHP only kicks in because the web-server (Apache or IIS or Xitami or
OmniHTTP or whatever) sees the .php extension and hands off the file to PHP.

If your browser is looking directly at a PHP file, there's no web-server
involved, so nobody "knows" to fire up PHP.

If you're trying to do some development on your Win98 box, you'll have to
install some sort of web-server.

Apache is free, painless to install, and in all other respects, superior to
all the other options :-)

http://apache.org

After you install Apache, you'll need to edit the "httpd.conf" file to make
Apache aware that you are using PHP, and then you'll need to surf to your
own little web-server using:
http://127.0.0.1/whatever.php

127.0.0.1 is always the computer you are using.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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 the value of a

2001-06-25 Thread Richard Lynch

> I always use "InputImageName_x > 0" to know if a button was clicked.
>
> How can I get the value on my input type=image?

You can't.

> Like: 
>
> how can I get "002545645" with "$contatc"?

Well, okay, what you *COULD* do is something like this:










--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] gd library on win2k?

2001-06-25 Thread Richard Lynch

> how can i install the gd library for php on win2k using iis5?

The IIS5 part is irrelevant, I think...

Dig around for a file++ whose name is composed of "GD", "PHP", and ".DLL".

Put it next to all your other PHP DLL files.

Alter your php.ini to refer to it the way it refers to other PHP DLLs.

It's Windows:  Pray.

++ Disclaimer:  I have no idea if such a file exists or not...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Practical flock() implementation

2001-06-25 Thread Richard Lynch

> argument, so don't I *have* to fopen the file before going to flock()?  Or
> should I fopen first in "r" mode, acquire the lock, then re-open in "w"
> mode, counting on the lock to stay in effect even though it's a different
> file pointer?

Yup.  You are holding the lock, and it's yours

> I'd also be grateful if someone could clarify the difference between
> blocking and locking (i.e. "If you don't want flock() to block while
> locking, add LOCK_NB (4 prior to PHP 4.0.1) to operation.").

blocking == Do you want your script to just sit there waiting forever for
the lock?

Possibly spurious NOTE:

Most beginners who think they need a lock file are doing something that
should be in a database, but they are not familiar with databases, so use
files instead.

Don't.

The database guys have worked really hard to (A) take care of all these
locking issues and (B) make it just as easy to use as files.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Running scripts from within PHP similar to SSI

2001-06-25 Thread Richard Lynch

If you are running PHP as a Module (you should be) try the
http://php.net/virtual function.

If not, you can use exec(), but pass any vars the thing needs:

# Your CGI may be expecting command-line args or flags or...
# I presumed it was URL-style input.
exec("./cgi-bin/txtcounter.cgi?foo=$foo&bar=$bar", $results, $error);
while(list(,$line) = each($results)){
echo $line, "\n";
}
if ($error){
echo "txtcounter.cgi returned OS error $error.  Usually
paths/permissions.\n";
}

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Bilal Deniz <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, June 24, 2001 1:04 AM
Subject: [PHP] Running scripts from within PHP similar to SSI


> Hi All,
>
> Just wondering if it were possible to do like the following SSI line:
>
> 
>
> from within php.
>
> I know a php alternative should be made, but for the time being and for
> future's sake
>
>
> So far i've tried back ticks, passthru(), exec(), but the problem is
> that the URI and other variables aren't being passed to the perl script
> in question.
>
> Any idea would be appreciated.
>
> Deniz
>
> --
> 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] newbie algorithm help!!!!!

2001-06-25 Thread Richard Lynch

> > i have a mysql table with approx. 30 entries.
> >
> > I wanna get them(i know how to do that) and list them in a 2-column
table.

For those minimalist-typists among us... :-)

$rowcount = 0;
echo "\n";
while (list($whatever) = mysql_fetch_row($result)){
echo "$whatever\n";
$rowcount++;
if ($rowcount % 2 == 0){
echo "\n";
}
}

Change the 2 to other number for more columns.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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 include directory which falls under .htaccess protection

2001-06-25 Thread Richard Lynch

> I have a .htaccess file with the following in it
> order allow,deny
> allow from all
> require user pilot
> Authname MySite
> Authtype Basic
>
> The page itselfs prompts for and accepts username/password correctly,
> however on that page are a number of included files.. The included files
are
> in a subdirectory of the root of the site and hence fall under the
> jursidiction of the .htaccess. PHP cannot however access these.. I guess
> because it also needs to be authenticated...
>
> Oh, I checked the PHP code etc... and everything works fine...

Almost for sure you don't have the include_path set properly for PHP to
*find* the files, and Apache (which handles the Auth stuff) is not involved
in any way, shape, or form.

Your include_path is set in php.ini, plus any dynamic changes made in
httpd.conf and/or .htaccess files using:
php_value include_path
"./:/path/to/your/home/dir/here:/any/more/paths/you/like/here"

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] readfile() question

2001-06-25 Thread Richard Lynch

> I was wondering what happens if you call the readfile function to output a
> large binary file to a client with a slow connection.
> Does the script run until the whole file is sent to the client (leading to
> timeout errors on servers with a low max execution time) or does it fill
> some sort of buffer on the web server which then takes over and sends the
> file to the client?

Yes. :-)

Odds are pretty good that you can count on network activity to screw this up
sooner or later, no matter how big that buffer might be.

Add some code to guesstimate how long it ought to take, double it and add 30
(metric time)* and use the time_limit function.  Or use 0 time limit, and
pray you never mess up the code that spews all that to the browser.

In any situation like this, the time to add a little code to anticipate a
problem is almost always a "win".

* If you don't understand why double it and add 30 is metric time, you need
to buy Bob&Doug's _Great_White_North album.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] mysql_free_result() question

2001-06-25 Thread Richard Lynch

> > Do I mysql_free_result the $Query or the $Result? If it's $Result, would
> > this be the same as just going unset($Result)?
>
> mysql_free_result() frees the ressources that the MySQL server allocated
for
> the results of your query. This is in the memory space of the MySQL
server,
> while if you unset($Result), it only frees the MySQL result id (an integer
> if I remember corretly) in the memory space of your script. So, no,
calling
> unset() is not the same to call mysql_free_result().

I could be wrong, and often am :-), but I believe that PHP4 "knows" about
MySQL resources, and if you don't have any variables capable of accessing
them any more (IE, you did unset($result)), then it's smart enough to do the
mysql_free_result for you...

This is, however, no excuse for you not writing less sloppy code in the
first place, now that you are educated enough to know what you are doing.
:-)  Use mysql_free_result() if the memory de-allocation is important to
you.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Using post method thru php-script

2001-06-25 Thread Richard Lynch

> $fp = fsockopen('secure.aaa.com',443,&$err_num,&$err_msg);

Talking to an SSL server on port 443 is a bit more complicated than chatting
up an HTTP server on port 80.

You have to pre-negotiate your encryption algorithms and send some public
keys back and forth to generate some more public/private key-pairs and...

While DIY is tons of fun, with a deadline of the 27th looming, I'd look into
using "cURL".

Search the archives for URLs and further info on cURL.  Last I heard,
somebody was gonna integrate cURL direct into PHP, but I've been out of it
for awhile.

Oh yeah: I'm back! :-)

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] how can i use postfix instead of sendmail???

2001-06-25 Thread Jason Murray

> Is postfix more efficient than sendmail?
> Can you give me the url which describes how to use it or write here ?

www.google.com/linux >> "postfix"

and you get:

http://www.redhat.com/support/docs/faqs/RH-postfix-FAQ/book1.html

Which seems pretty much like what you want.

(PS: this took me 15 seconds, couldn't you try a web search?)

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]