php-general Digest 18 Jan 2001 16:09:35 -0000 Issue 462

Topics (messages 35249 through 35370):

Re: Ethics question...
        35249 by: Egan
        35271 by: Angus Mann
        35277 by: Les Neste
        35278 by: Dallas Kropka
        35294 by: Egan
        35295 by: Romulo Roberto Pereira
        35297 by: Egan
        35300 by: Les Neste
        35319 by: Frank Joerdens
        35333 by: Jim Jagielski
        35339 by: CC Zona
        35360 by: jeremy brand

Re: phpwebhosting.com
        35250 by: Stephan Ahonen
        35307 by: jeremy

Re: identifying clicked link?
        35251 by: Philip Olson
        35255 by: andrew
        35275 by: Angus Mann

Re: Merging PHPLIB into PEAR
        35252 by: tarique.sanisoft.com
        35254 by: Philip Olson

Re: I love/hate FrontPage - need another HTML editor.
        35253 by: Gerald Buckmaster
        35269 by: Hrishi

preg_replace pain!
        35256 by: Nicholas Pappas
        35270 by: Maxim Maletsky
        35321 by: Christian Reiniger
        35352 by: Shaun Thomas

Re: A little problem
        35257 by: Brian Clark

Re: Apache .htaccess Help (OT)
        35258 by: Brian Clark

Re: changed database context message
        35259 by: Brian Clark

Re: Cookies still store old value(Help!!)
        35260 by: Brian Clark

Re: Grabbing referring keywords.....
        35261 by: Brian Clark

Re: php 4.0.5.dev will not read php.ini on NT
        35262 by: Brian Clark

Re: PHP not working on Win95/Apache
        35263 by: Brian Clark

Re: Postgres pconnect
        35264 by: Brian Clark

Re: Session and Cookies
        35265 by: Brian Clark

Something cool I found in Wired,
        35266 by: Dallas Kropka
        35341 by: Brian V Bonini

Re: APC version 1.0.4 released
        35267 by: The Doctor

archiving php lists ?
        35268 by: Mukul Sabharwal
        35296 by: Hank Leininger

popen in safe_mode with pipe
        35272 by: Lic. Rodolfo Gonzalez Gonzalez

fast question about session_start
        35273 by: Romulo Roberto Pereira
        35293 by: Romulo Roberto Pereira

Ms SQL  Error with php3.0
        35274 by: Dhaval Desai

HTTP_POST??
        35276 by: Wade Halsey
        35369 by: Chris Lee

Re: HTTP_POST
        35279 by: Richard Lynch

Re: Probs with browsecap.ini
        35280 by: Richard Lynch

Re: Forking email out
        35281 by: Richard Lynch

Re: How can I "download" information (file) without standard "save as" dialog ??
        35282 by: Richard Lynch
        35340 by: Benny Nissen

Re: mysql error
        35283 by: Richard Lynch

Re: session_start() and cache problem ...
        35284 by: Richard Lynch

Re: Images ??? ok,but...
        35285 by: Richard Lynch

Re: calling static class functions using a function variable
        35286 by: Richard Lynch
        35357 by: Shaun Batterton

Re: PHP connecting to FIlemaker Database
        35287 by: Richard Lynch

Re: determine number of days, hours & minutes between 2 dates
        35288 by: Richard Lynch

Re: How to avoid submitting twice?
        35289 by: Richard Lynch

Re: Ver3.0 Includes
        35290 by: Richard Lynch

Re: Installing with apache
        35291 by: Richard Lynch

stripping the keywords from a search engine... again...
        35292 by: Dallas Kropka
        35299 by: Brian Clark

below10host.com as webhost?
        35298 by: Jeff Lacy
        35303 by: Egan
        35308 by: jeremy

Re: Mailto: tag, how do I insert line breaks..?
        35301 by: David Bouw

db backup script needed
        35302 by: Maxim Maletsky
        35317 by: CC Zona

Re: how do i hide my .inc files in apache??
        35304 by: Matt Williams
        35305 by: Maxim Maletsky

Re: [PHP-WIN] best user authentication method?
        35306 by: Michael Rudel
        35343 by: Wacks, David

SESSIONS
        35309 by: David Tandberg-Johansen
        35314 by: Pavel Jartsev

flash and php
        35310 by: Jacky.lilst
        35312 by: andreas \(.work\)
        35320 by: Frank Joerdens

PDFLib and PHP and pdf_open_image_file
        35311 by: goood goood

Off The Topic But Please Help....
        35313 by: Statbat

general CGI question
        35315 by: Hrishi

Re: how reliable is Windows2000 / php ?
        35316 by: Phil Driscoll

Sorting an array
        35318 by: Nicklas af Ekenstam
        35322 by: Pavel Jartsev

Error connecting to MySQL server
        35323 by: Rosen

upgrade problems
        35324 by: Bart A. Verbeek

PHP Editor
        35325 by: Alaiddin Tayeh
        35366 by: Chris Lee

Newbie : info/tut on XML and PHP
        35326 by: Rahul Bhide

Re: Editor
        35327 by: Roman

Array help needed
        35328 by: CDitty
        35330 by: Knut Sætre
        35334 by: CDitty
        35336 by: php3.developersdesk.com

Re: Ethics question... (c) on ideas - OT rant
        35329 by: Chris Hayes

Re: Can I fork a PHP thread?
        35331 by: Terrence Chay

Re: best user authentication method?
        35332 by: Rick Hodger

Cobalt Raq/PHP Help Needed
        35335 by: Gareth Davies
        35337 by: Kevin Cawthorne

preg_replace problem
        35338 by: The Captain

PHP and XML locking up windows.
        35342 by: chad.chadlavy.com

Calendar program
        35344 by: Todd Cary
        35351 by: Jon Haworth
        35353 by: Todd Cary

(Newbie) String within a string
        35345 by: jalist
        35367 by: Chris Hayes

Re: [Apc-cache] Re: [PHP] APC version 1.0.4 released
        35346 by: George Schlossnagle

Spell checker?
        35347 by: Nik Gare
        35348 by: Kristi Russell

mssql_query bug in php4-04pl
        35349 by: Yuri Kruglov

Recompile GD ??
        35350 by: Miguel Loureiro

xslt_run problems
        35354 by: David Derr
        35358 by: Sterling Hughes

Problem with gettext support - Solaris 2.7
        35355 by: Albert Novak

Re: Problems compiling LDAP into php 4.0.2
        35356 by: Bill.Hoffman.walgreens.com

PHP Editors
        35359 by: Karl J. Stubsjoen
        35361 by: Alexander Wagner
        35362 by: jeremy brand
        35363 by: Roman

Re: Register globals when option is turned on
        35364 by: Carsten Gehling

Re: PHPLIB and PHPMyAdmin
        35365 by: Krznaric Michael

Re: PHP Editors... perhaps Ultraedit
        35368 by: John Huggins

prova
        35370 by: Giancarlo

Administrivia:

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

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

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


On Wed, 17 Jan 2001 20:59:41 -0600, "Scott Gerhardt"
<[EMAIL PROTECTED]> wrote:

>If your client paid you to develop the E-Commerce system  they would
>typically own all rights to it unless otherwise agreed upon.

I don't know what country you are speaking of, but in the U.S., that
view is a commonly held misconception.

Under U.S. copyright law, if the author is an independent contractor,
in the absence of a written agreement covering the work, the author
owns all copyrights to the work, with the exception that the client
who paid for the work is automatically granted a license to their one
copy (and only their one copy).  The client does *not* have copy
_rights_ which permit them to resell it, or even give it away, unless
the author specifically gave them those rights in writing, such as a
work for hire agreement.

If the author was working as an employee, OTOH, then the situation is
reversed, and the employer owns the copyrights by default.

As for the license of PHP itself, vs. an author's license to any code
he writes in the language known as PHP:

Writing application code in the PHP language does not make the code
you wrote automatically become open source,  Yes, the PHP processor is
open source, but its copyright is entirely separate and distinct from
any application system which may be written in the PHP language.

I if write a C program, it does not matter whether I compile it with
GCC which is GPLed, or with some proprietary C compiler.  Either one
is irrelevant for determining ownership of the copyrights which apply
to the code I wrote in the C language.

You cannot copyright ideas, and the PHP language is only an idea.

The PHP Apache module or other PHP processor is an *expression* of
ideas embodied in the PHP language.  And only its expression can be
copyrighted, not the idea itself.

Suppose RWS said you have to stop writing proprietary C programs, just
because someone might compile it with GCC?

I hope you would laugh. :-)


Egan






At 21:24 17/01/01 -0500, Shane McBride wrote:
>I have spent a lot of time working on a specific E-Commerce 
>(shopping-cart) to fill a need for a customer. Now that the project is 
>complete, I would like to market the product, which is entirely PHP and MySQL.
>
>My question is: Is it ethical to sell a product ( at a relatively 
>low-cost) written in PHP, especially since this group made it possible?

I guess that this is something that would be an issue for many people using 
mailing lists and/or newsgroups for help, and for all languages - not just PHP.

I think that so long as you don't try and mislead the guys who'll 
potentially be helping you, for example by saying that it's a personal 
project, or for school, or for a charity site etc. then there aren't really 
any ethical problems with it - people who help don't do so out of any 
expectation of a material reward, just out of a desire to make life easier 
for others who are less experienced or are encountering problems.

Sure, I'd be annoyed if I helped someone write 90% of his code and he then 
sold it, but when you're talking about people answering a few short 
questions in a forum like this, there's got to be an expectation on 
everyone's part that they're probably helping you with a commercial project.

Of course I have no idea of your arrangement with this particular customer 
- I personally wouldn't bill a customer for the entire development of a 
product and then sell it to the public, but then again I like to sleep at 
night :)

>If that's ok to do, does anyone have any ideas how I can put a time limit 
>on a demo that isn't easily defeated?

Other than using an encoder/compiler I can't see any way of implementing it 
into the software. I guess it depends on how you'll be distributing the 
code - if you're going to be sending it directly to clients, then I'm sure 
it wouldn't be too hard for you to check their sites to see if they've 
deployed it without buying a licence.






What Egan wrote is very true.  I speak with some knowledge -- having
weathered a copyright violation suit based on the action of one of my
employees -- and if you write it (as anything other than an employee) then
you own it, 'it' being the source code and the program compiled from that
source code.

Egan, you mentioned something new to me: that you as author own it except
for 'that one client who paid for it'.  Can you offer some citation to back
this up?

At 11:06 PM 1/17/2001 -0500, Egan wrote:
>On Wed, 17 Jan 2001 20:59:41 -0600, "Scott Gerhardt"
><[EMAIL PROTECTED]> wrote:
>
>>If your client paid you to develop the E-Commerce system  they would
>>typically own all rights to it unless otherwise agreed upon.
>
>I don't know what country you are speaking of, but in the U.S., that
>view is a commonly held misconception.
>
>Under U.S. copyright law, if the author is an independent contractor,
>in the absence of a written agreement covering the work, the author
>owns all copyrights to the work, with the exception that the client
>who paid for the work is automatically granted a license to their one
>copy (and only their one copy).  The client does *not* have copy
>_rights_ which permit them to resell it, or even give it away, unless
>the author specifically gave them those rights in writing, such as a
>work for hire agreement.
>
>If the author was working as an employee, OTOH, then the situation is
>reversed, and the employer owns the copyrights by default.
>
>As for the license of PHP itself, vs. an author's license to any code
>he writes in the language known as PHP:
>
>Writing application code in the PHP language does not make the code
>you wrote automatically become open source,  Yes, the PHP processor is
>open source, but its copyright is entirely separate and distinct from
>any application system which may be written in the PHP language.
>
>I if write a C program, it does not matter whether I compile it with
>GCC which is GPLed, or with some proprietary C compiler.  Either one
>is irrelevant for determining ownership of the copyrights which apply
>to the code I wrote in the C language.
>
>You cannot copyright ideas, and the PHP language is only an idea.
>
>The PHP Apache module or other PHP processor is an *expression* of
>ideas embodied in the PHP language.  And only its expression can be
>copyrighted, not the idea itself.
>
>Suppose RWS said you have to stop writing proprietary C programs, just
>because someone might compile it with GCC?
>
>I hope you would laugh. :-)
>
>
>Egan
>
>
>
>-- 
>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]
>
>

......................................................................
Les Neste
Cellphone 678-778-0382
Web http://www.lesneste.com




Ok, The ethical question has been pounded to death... So Ill address the
issue of the demo.... if you want a true demo, place a public copy on your
own site. Allow the potential users to come in and mess with it. If it is
truly good, you'll generate sales just from that... and until the Zend
compiler comes out.... you wont have a way to safely distribute the code
hack proof (Read: less hackable =:) )




-----Original Message-----
From: Shane McBride [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 9:12 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Ethics question...


Wow, I caused quite a debate. And I thought I would get slammed :)

BTW - PHP / Apache is going to be up to the client at this point. :)

- Shane

----- Original Message -----
From: "Maxim Maletsky" <[EMAIL PROTECTED]>
To: "'jeremy brand'" <[EMAIL PROTECTED]>; "Kath" <[EMAIL PROTECTED]>
Cc: "'Rasmus Lerdorf'" <[EMAIL PROTECTED]>; "Shane McBride"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 10:03 PM
Subject: RE: [PHP] Ethics question...


> hey, hey ... I wrote "Microsoft" just to tell you how _big_ a customer
could
> be...
> a simple comparison... no politics here ... :-))
>
> Cheers,
> Maxim Maletsky
>
>
>
> -----Original Message-----
> From: jeremy brand [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 12:02 PM
> To: Kath
> Cc: Maxim Maletsky; 'Rasmus Lerdorf'; Shane McBride;
> [EMAIL PROTECTED]
> Subject: Re: [PHP] Ethics question...
>
>
> > Soooooo true.
> >
> > But why would Microsoft be using PHP? =D
>
> Why would Microsoft be using Solaris, or Linux even?  (hint, the same
> reason -- their stuff works less good).
>
> :)
>
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 ::
[EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>        http://www.JEEP-FOR-SALE.com/ -- I need a buyer
>
>
> --
> 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]





On Thu, 18 Jan 2001 01:56:18 -0500, Les Neste
<[EMAIL PROTECTED]> wrote:

>What Egan wrote is very true.  I speak with some knowledge -- having
>weathered a copyright violation suit based on the action of one of my
>employees -- and if you write it (as anything other than an employee) then
>you own it, 'it' being the source code and the program compiled from that
>source code.
>
>Egan, you mentioned something new to me: that you as author own it except
>for 'that one client who paid for it'.  Can you offer some citation to back
>this up?

It's no different from buying a book at the bookstore.  The one copy
you pay for is yours to use.  However, that doesn't mean you also have
the right to take it down to a friendly neighborhood printer and have
them print up a few dozen extra copies for you.

It's mostly common sense.  The client does not get "copyrights" to
make additional copies, but that does not prevent them from using the
one copy they did pay for.  Just like a book bought at the bookstore.

Any copyright attorney should tell you the same thing, I expect.

Egan






Copyright? This do not exist!!! See the case of NAPSTER... This drive me
nuts!

Rom
----- Original Message -----
From: Egan <[EMAIL PROTECTED]>
To: Les Neste <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 2:38 AM
Subject: Re: [PHP] Ethics question...


On Thu, 18 Jan 2001 01:56:18 -0500, Les Neste
<[EMAIL PROTECTED]> wrote:

>What Egan wrote is very true.  I speak with some knowledge -- having
>weathered a copyright violation suit based on the action of one of my
>employees -- and if you write it (as anything other than an employee) then
>you own it, 'it' being the source code and the program compiled from that
>source code.
>
>Egan, you mentioned something new to me: that you as author own it except
>for 'that one client who paid for it'.  Can you offer some citation to back
>this up?

It's no different from buying a book at the bookstore.  The one copy
you pay for is yours to use.  However, that doesn't mean you also have
the right to take it down to a friendly neighborhood printer and have
them print up a few dozen extra copies for you.

It's mostly common sense.  The client does not get "copyrights" to
make additional copies, but that does not prevent them from using the
one copy they did pay for.  Just like a book bought at the bookstore.

Any copyright attorney should tell you the same thing, I expect.

Egan



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





On Thu, 18 Jan 2001 02:45:01 -0500, "Romulo Roberto Pereira"
<[EMAIL PROTECTED]> wrote:

>Copyright? This do not exist!!! See the case of NAPSTER

The law is one thing.  Whether people obey it or not, is another.


Egan






At 02:50 AM 1/18/2001 -0500, Egan wrote:
>On Thu, 18 Jan 2001 02:45:01 -0500, "Romulo Roberto Pereira"
><[EMAIL PROTECTED]> wrote:
>
>>Copyright? This do not exist!!! See the case of NAPSTER
>
>The law is one thing.  Whether people obey it or not, is another.

I agree.  I would also say that the law is one thing, and common sense is
another.



......................................................................
Les Neste
Cellphone 678-778-0382
Web http://www.lesneste.com




On Wed, Jan 17, 2001 at 07:02:06PM -0800, jeremy brand wrote:
> > Soooooo true.
> > 
> > But why would Microsoft be using PHP? =D
> 
> Why would Microsoft be using Solaris, or Linux even?  (hint, the same
> reason -- their stuff works less good).

Do you know for a fact that they do? If so, how? That'd be a very cool
tidbit of information to share . . .

Cheers, Frank




Egan wrote:
> 
> On Thu, 18 Jan 2001 02:45:01 -0500, "Romulo Roberto Pereira"
> <[EMAIL PROTECTED]> wrote:
> 
> >Copyright? This do not exist!!! See the case of NAPSTER
> 
> The law is one thing.  Whether people obey it or not, is another.
> 

If we expect people to honor our various open source licenses, we
should likewise honor other's copyrights, NDAs, agreements, etc...

-- 
===========================================================================
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
          "Casanova will have many weapons; To beat him you will
              have to have more than forks and flatulence."




In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
(Frank Joerdens) wrote:

> > > But why would Microsoft be using PHP? =D
> > 
> > Why would Microsoft be using Solaris, or Linux even?  (hint, the same
> > reason -- their stuff works less good).
> 
> Do you know for a fact that they do? If so, how? That'd be a very cool
> tidbit of information to share . . .

In the Macromedia Dreamweaver newsgroup, there's always someone spotting 
some more pages from the microsoft.com site which were written in DW 
instead of FrontPage or InterDev.  Not quite the same factoid as you were 
seeking, but it does show that not everything with a shiny M$ logo on it is 
necessarily built with M$ products.

-- 
CC




> > > Why would Microsoft be using Solaris, or Linux even?  (hint, the same
> > > reason -- their stuff works less good).

Www.microsoft.com used to be served off of Solaris (where else could
you run a high performance installation of Oracle? ;).  Hotmail was
(is) FreeBSD.  Anyone would be stupid to not be using linux in their
interprise somewhere.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer





> OC12
> 622 Mb
>
> Monthly Fee
> $550,000
>
> Setup Fee
> call   (prolly between 10k and 20k)

Hmm, I think my allowance should be able to cover that. It'll really speed
up all the instant messaging I do.

Sig for a Day
Stephan Ahonen, ICQ 491101
"Don't eat that, you'll spoil your dinner. And while you're at it, get me
one."
Come back tomorrow for a different sig!
Backspace a single "s" to reply by email





I've had good experience with he.net

They've got good prices, and I've been content with their speed and
support.

Unix, apache, php, etc.



--
Jeremy Kelley <[EMAIL PROTECTED]>          pgp keyid 0xAECBA355
Phil 1:21                                      www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -----Original Message-----
> From: Toby Butzon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 00:04
> To: Egan; [EMAIL PROTECTED]
> Subject: Re: [PHP] phpwebhosting.com
>
>
> > 125 users at $10 per month, is a maximum revenue of $1,250 per month
> > per server.  From that meager revenue, they are able to
> provide their
> > customers with an OC-12.  I would like to meet the genius
> who is able
> > to pull that financial rabbit out of a hat!
>
> ...and one machine is chewing up a whole OC-12?
>
> Who says they don't have multiple machines on the same OC-12?
>
> Just thought I'd throw in a comment; sounds to me like a wise
> choice would
> be to pick another host. I've personally had a good experience with
> Abhost.net, and their hosting pricing is similarly affordable
> but not quite
> as unbelievable.
>
> --Toby
>
> ----- Original Message -----
> From: "Egan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 17, 2001 4:46 PM
> Subject: Re: [PHP] phpwebhosting.com
>
>
> > I was curious so I looked at their site.
> >
> > They shout "unlimited" as loud as they can, for every
> service you can
> > imagine.  But their FAQ says:
> >
> > > Though we do not have any pre-set limits, you will not be allowed
> > > to and/or over five GB of bandwidth/month.
> >
> >
> > "Yes there is NO limit. Read our lips. There is really NO
> limit.  But
> > even though there is NO limit, you still can't have more
> than 5GB per
> > month for our competition killing price of $9.95"
> >
> > "Anyone should be able to understand that, right?"
> >
> > They also claim they will limit each server to a max of 125
> users.  So
> > let's do a little math ...
> >
> > 125 users at $10 per month, is a maximum revenue of $1,250 per month
> > per server.  From that meager revenue, they are able to
> provide their
> > customers with an OC-12.  I would like to meet the genius
> who is able
> > to pull that financial rabbit out of a hat!
> >
> >
> > Egan
> >
> >
> >
> > --
> > 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]
>





Andrew,

Close :-)

    <a href='page_two.php?id=1'>click</a>

OR to complicate matters, add multiple names/values  :

    <a href='page_two.php?id=1&foo=stuff&blah=shoes'>click</a>

Where on page_two.php if you had :

    echo "$id $foo $blah";

Will print the following :

    1 stuff shoes

Note the ? for first name=value and & for the proceeding ones.  Or you may
have been trying to do :

    $id = 1;

    echo "<a href='page_two.php?id=$id'>click</a>";

OR can also be written as :

    $id = 1;

    <a href='page_two.php?id=<?php echo $id; ?>'>click</a>

And both the above will turn into :

    <a href='page_two.php?id=1'>click</a>

That's the gist.  Check out devshed.com for some basic php tutorials.
Also, be sure to check out :

    http://www.zend.com/zend/tut/using-strings.php

For various forms of syntax with strings.


Philip


On Wed, 17 Jan 2001, andrew wrote:

> How can I pass an anchor tag attribute to a page?
> e.g. If I want to echo "1" on page_two:
> 
> 
> page_one.php contains:
> 
> <a href="page_two.php" > <? $id="1"?>click</a>
> 
> 
> page_two.php contains:
> 
> <? echo($id); ?>
> 
> but page_two is coming up blank after a delay... what I am doing wrong?
> 
> 
> thanks,
> andrew
> 
> 
> -- 
> 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]
> 





Phillip,

Thanks!  This is very helpful!

I very much appreciate it.

regards,
andrew


On 1/17/01 11:20 PM, "Philip Olson" <[EMAIL PROTECTED]> wrote:

> Andrew,
> 
> Close :-)
> 
>   <a href='page_two.php?id=1'>click</a>
> 
> OR to complicate matters, add multiple names/values  :
> 
>   <a href='page_two.php?id=1&foo=stuff&blah=shoes'>click</a>
> 
> Where on page_two.php if you had :
> 
>   echo "$id $foo $blah";
> 
> Will print the following :
> 
>   1 stuff shoes
> 
> Note the ? for first name=value and & for the proceeding ones.  Or you may
> have been trying to do :
> 
>   $id = 1;
> 
>   echo "<a href='page_two.php?id=$id'>click</a>";
> 
> OR can also be written as :
> 
>   $id = 1;
> 
>   <a href='page_two.php?id=<?php echo $id; ?>'>click</a>
> 
> And both the above will turn into :
> 
>   <a href='page_two.php?id=1'>click</a>
> 
> That's the gist.  Check out devshed.com for some basic php tutorials.
> Also, be sure to check out :
> 
>   http://www.zend.com/zend/tut/using-strings.php
> 
> For various forms of syntax with strings.
> 
> 
> Philip
> 
> 
> On Wed, 17 Jan 2001, andrew wrote:
> 
>> How can I pass an anchor tag attribute to a page?
>> e.g. If I want to echo "1" on page_two:
>> 
>> 
>> page_one.php contains:
>> 
>> <a href="page_two.php" > <? $id="1"?>click</a>
>> 
>> 
>> page_two.php contains:
>> 
>> <? echo($id); ?>
>> 
>> but page_two is coming up blank after a delay... what I am doing wrong?
>> 
>> 
>> thanks,
>> andrew
>> 
>> 
>> -- 
>> 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]
>> 
> 
> 





At 23:10 17/01/01 -0500, andrew wrote:
>How can I pass an anchor tag attribute to a page?
>e.g. If I want to echo "1" on page_two:
>
>
>page_one.php contains:
>
><a href="page_two.php" > <? $id="1"?>click</a>

All you're doing there is setting the variable id to "1". You're not even 
printing it.

>page_two.php contains:
>
><? echo($id); ?>
>
>but page_two is coming up blank after a delay... what I am doing wrong?

Alot :)

You have to use forms if you want to pass variables along between pages, 
unless you use cookies or PHP4 sessions (which use cookies).

You could use standard URL anchors for moving between pages and passing 
variables along - they'd have to be GET type. e.g.

page_one.php would be: (although it could be shortened or formatted 
differently)

<?php
// Below: Set the variable id to 1.
$id  = "1";
// Below: append the id as a GET variable to the url.
echo "<a href=\"page_two.php?id=$id\"> click </a>";
?>

and page_two.php would be:

<?php
// Below: Make sure that id was actually appended to the URL in page_one.php
if(isset($HTTP_GET_VARS["id"]))
{
// Below: If it was there, set it as a variable
$id = $HTTP_GET_VARS["id"];
echo "$id";
}
?>

I suggest you read through the PHP manual some more, especially the section 
on Variables, and the sub-section "Variables from outside PHP" 
(http://www.php.net/manual/en/language.variables.external.php). It would 
also be a good idea to read through some tutorials from some PHP websites, 
such as:

http://www.phpbuilder.com/
http://www.phphelp.com/

Those two should also have some links to other sites.

Good luck!

Angus.





On Wed, 17 Jan 2001, Alex Black wrote:

> what are the plans in PEAR for dependencies on the pear components?
Also what will be the implications for sites/developers already using
PHPlib7.2c 

This move has really got me excited BUT also a bit aprehensive 

A clarification would be appreciated!

Cheers
Tarique

-- 
=========================================
       B2B Application Providers
        http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.net
=========================================






A discussion can be seen here :

    http://marc.theaimsgroup.com/?l=php-pear&m=97975277420628&w=2

Where the pearPosse have been and are discussing the issue.  Looks
interesting.

Philip



On Thu, 18 Jan 2001, [EMAIL PROTECTED] wrote:

> On Wed, 17 Jan 2001, Alex Black wrote:
> 
> > what are the plans in PEAR for dependencies on the pear components?
> Also what will be the implications for sites/developers already using
> PHPlib7.2c 
> 
> This move has really got me excited BUT also a bit aprehensive 
> 
> A clarification would be appreciated!
> 
> Cheers
> Tarique
> 
> -- 
> =========================================
>        B2B Application Providers
>         http://www.sanisoft.com
>  Vortal for Nagpur http://nagpurcity.net
> =========================================
> 
> 
> -- 
> 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]
> 





James,

I too have used various WYSIWYG html coders, and most of the time, I found
my self hampered by application limitations.  It is a fair way to study code
generated...but that method of learning can be dangerous as well.  I also
find I have quicker response/fixes to bugs in handcode.

Now I exclusively use EditPlus2 - it's worth every dollar I paid for it, and
in my opinion, has helped me gain customers - once they watched me script
and parse code with it.  It is good to see others appreciate the simplicity
and power of Edit+.  I like it due to the fact it is not limited to HTML and
there is alot of user support templates, auto-completion, etc available.
Working with HTML, ASP, C, VBScript, Java, PHP, mySQL, and just plain old
text files, is a real pleasure with this hand-coding product.

No, I don't believe they have a public stock offering. :^)


*              Gerald E Buckmaster Jr             *
*           Professional Imagery Analyst          *
*    Webmaster, Imagery Analysis Support Site     *
*                Tucson, Arizona                  *

<snip>
Subject: Re: [PHP] I love/hate FrontPage - need another HTML editor.

Having used both FrontPage and Dreamweaver in the past I have resorted back
to a text editor.  Not that either was bad or good.  Just found that I had
the best control when doing the writing myself.

I currently use EditPlus2 for text editing.  It has everything I need and
cost very little.  I use it for PERL, PHP, JavaScript, Java and even mySQL.
It allows you to format your own syntax highlighting and templates.
</snip>





If you're still interested, try cooledit for linux/unix
http://cooledit.sourceforge.net/


-------------------------------------------
Yeah, there are more important things in life than money, but they won't go
out with you if you don't have any.





        I was hoping someone could help me with this regular expression...

        $pattern = "/\[b\](.*)\[\/b\]/Ui";
        $message = preg_replace($pattern, "<B>\\1</B>", $message);

        The above works for:
        [b]bold text[/b]

        But does not work for:
        [b]bold text
        w/ newline[/b]

        Can anyone help me sort this little issue out?

        Many thanks!!

        Nick





        
 maybe :  $pattern = "/\[b\]([.\n]*)\[\/b\]/Ui";.

have you tried it succesfully?
P.S: I am not sure that \n in preg is a newline, you could also try this:

$pattern = "/\[b\]([.".chr(10).chr(13)."]*)\[\/b\]/Ui";.

one of these ...

Cheers,
Maxim Maletsky

-----Original Message-----
From: Nicholas Pappas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 3:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_replace pain!


        I was hoping someone could help me with this regular expression...

        $pattern = "/\[b\](.*)\[\/b\]/Ui";
        $message = preg_replace($pattern, "<B>\\1</B>", $message);

        The above works for:
        [b]bold text[/b]

        But does not work for:
        [b]bold text
        w/ newline[/b]

        Can anyone help me sort this little issue out?

        Many thanks!!

        Nick


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




On Thursday 18 January 2001 07:40, Nicholas Pappas wrote:

> I was hoping someone could help me with this regular expression...
>
>       $pattern = "/\[b\](.*)\[\/b\]/Ui";
>         $message = preg_replace($pattern, "<B>\\1</B>", $message);
>
>       The above works for:
>       [b]bold text[/b]
>
>       But does not work for:
>       [b]bold text
>         w/ newline[/b]

add a "s" modifier to the expression and

=>

$pattern = "/\[b\](.*)\[\/b\]/Uis";

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

"use the source, luke." (obi-wan gnuobi)




On Thu, 18 Jan 2001, Christian Reiniger wrote:

> On Thursday 18 January 2001 07:40, Nicholas Pappas wrote:
> 
> > I was hoping someone could help me with this regular expression...
> >
> >     $pattern = "/\[b\](.*)\[\/b\]/Ui";
> >         $message = preg_replace($pattern, "<B>\\1</B>", $message);
> >
> >     The above works for:
> >     [b]bold text[/b]
> >
> >     But does not work for:
> >     [b]bold text
> >         w/ newline[/b]
> 
> add a "s" modifier to the expression and
> 
> =>
> 
> $pattern = "/\[b\](.*)\[\/b\]/Uis";

That, and:

$pattern = "|\[b\](.*?)\[/b\]|is"

Shorter regex by one character, and you can use it in perl, too.
Remember, U is a tacked on feature, but ? has always been there,
it's your friend.  I used pipes to remove the necessity of escaping
the forward slash.

Cheers!

-- 
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas                INN Database Programmer              |
| Phone: (309) 743-0812          Fax  : (309) 743-0830                |
| Email: [EMAIL PROTECTED]    AIM  : trifthen                      |
| Web  : www.townnews.com                                             |
|                                                                     |
|     "Most of our lives are about proving something, either to       |
|     "ourselves or to someone else."                                 |
|                                           -- Anonymous              |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+







Hello Emiliano, 

(EM == "Emiliano Marmonti") [EMAIL PROTECTED] writes:

EM> I have a little problem: Sometimes when you invokes some .php
EM> page, appears "could not redefine function...". It looks like a

Try:

<?php

if(! defined('__FOO__')):
   define('__FOO__', 1);

   /* functions */

endif;

?>

-Brian
--
You may be recognized soon. Hide.







Hello Website4S, 

(Wac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] writes:

Wac> Sorry this is off topic but I just can`t find anywhere with
Wac> reliable information to help me get my .htaccess working on my
Wac> server. I have followed many tutorials and none of them give me a
Wac> working password protected dir, so if anyone can help I would
Wac> appreciate it.

Wac> My .htaccess file is as follows:

<snip>

Wac> And My .htpasswd file just contains the user shaun101 with the
Wac> scrambled up password. They are both in the same directory so
Wac> when I log into my server I first click usr then home etc etc.
Wac> But for some reason no matter what I do I still get direct access
Wac> to the directory volunteer when I go to it in a browser.

Wac> Anyone have any ideas what I`m doing wrong??

It's not going to happen if AllowOverride in http.conf is set to None,
depending on where it's at.

http://httpd.apache.org/docs/misc/FAQ.html#htaccess-work

-Brian
--
In the long run every program becomes rococo - then rubble.







Hello Slappy, 

(SS == "Slappy Smith") [EMAIL PROTECTED] writes:

SS> i am getting this message on top of one of my pages. i have read
SS> up on it and everyone says its a warning message but from the
SS> things ive seen online no one seems to know how to get rid of it.

Something along the lines of this?:

"X-Powered-By: PHP/4.0.2-dev Content-type: text/html"

If so, stick this at the top of your script(s):

#!/path/to/php -q

(obviously change the /path/to/php)

-Brian
--
There are two ways to write error-free programs,
and only the third one works.







Hello Hendry, 

(HS == "Hendry Sumilo") [EMAIL PROTECTED] writes:

HS> When User "A" enter ,the cookies will store User "A" name,when he
HS> enters the lecturer page,he will be directed to login page
HS> again(because he is not allowed to enter lecturer page) and so do
HS> User "B". BUT THE PROBLEM HAPPENS LIKE THIS: When User "A" enters
HS> ,and then User "B" enters,User "B" CAN ENTER THE STUDENT PAGE AND
HS> THE COOKIES STORE USER USER "A" VALUE.BUT WHEN I REFRESH IT ,THE
HS> COOKIES WILL STORE NOTHING AND REDIRECT TO LOGIN PAGE. Can i know
HS> what the problem is?

If you show us some code, maybe. *hint*

:-)

HS> Hendry Sumilo

-Brian
--
Once you understand how to write a program,
get someone else to write it. 







Hello Dallas, 

(DK == "Dallas Kropka") [EMAIL PROTECTED] writes:

DK> (Note: I know about using $HTTP_REFERER But how can I take that
DK> info and strip it, if that is what I need to do?)

I've never done this, but I think the basic idea would be to determine
what the query strings of each spider/search-engine look like, take
$HTTP_REFERER and determine which engine it came from, parse it (using
explode() probably (maybe by the ? mark; again I haven't done this)),
then maybe explode() it again based on &, then  explode() each
key/value pair on = -- if they even use that type of query string.
That's why I mentioned, "determine which engine it came from."

All wild guesses, but that may lead you in the right direction.

-Brian
--
Simplicity does not precede complexity, but follows it.







Hello Robert, 

(R == "Robert") [EMAIL PROTECTED] writes:

R> PHP 4.0.5.dev I installed it on my Windows 2000 Pro machine with
R> IIS and MySQL and it works like a champ I installed it on my
R> Windows NT Server with IIS and MSSQL and it will not read the
R> php.ini file I put it in the following folders to try to get it to
R> work

R> C:\winnt
R> C:\
R> C:\winnt\system32
R> C:\windows          <-------created just to see if it would work

Stick <?php phpinfo(); ?> into a file and load it in a browser. Look
for the line that says something along the lines of:

php.ini file path is set to: X

Where X is the base directory. I'm not sure about 4.x's phpfino()
saying those exact words, but where ever it says it should be,
put it in that directory and try it.

R> GRRR!!!
R> What's up here?
R> Thanks

-Brian
--
If a listener nods his head when you're
explaining your program, wake him up.







Hello Phil, 

(PS == "Phil Scopes") [EMAIL PROTECTED] writes:

PS> I am trying to run PHP in Windows '95 with Apache server.  I followed all
PS> the instructions in the installation doc, including editting the Apache and
PS> PHP configuration files, and putting the PHP.INI file in my Windows
PS> directory, and when I try to run a PHP file, I just see everything from the
PS> file as plain text in the browser.  What might I be doing wrong?

Did you restart Apache after you setup PHP? (common mistake)

Do you have lines similar to this in your httpd.conf?:

AddType application/x-httpd-php .php .php3 .phtml


-Brian
--
Disclaimer: Any errors in spelling, tact,
or fact are transmission errors.







Hello Wade,

(HWM == "H. Wade Minter") [EMAIL PROTECTED] writes:

HWM> So, can I change all of the pg_connect calls to pg_pconnect call
HWM> and have the pages use persistent connections, or is there
HWM> something more that needs to be done?

Yes. AFAIK.

-Brian
--
The trouble with a lot of self-made men
is that they worship their creator.







Hello Hendry, 

(HS == "Hendry Sumilo") [EMAIL PROTECTED] writes:

HS> Can someone tell me how to use Session Object because when the
HS> user login the page I want to store the login,pass,and type_login
HS> so that I can pass this throughout the process. I found that i can
HS> store that by using cookies ,but the problem ,some computer can't
HS> store cookies,and it caused redirect to main page. So,that i was
HS> asked to use Session Object By ASP people,and i wonder how to do
HS> that in PHP?

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

HS> thank you very much

-Brian
--
Syntactic sugar causes cancer of the semi-colons.







        Ok, I know that this is PHP, but I thought that allot of the freelancers
out there could find it as appealing as I do.

In the current issue of Wired... page 163, there is a new product featured
called Groove found at www.groove.net and while only for windows at the
moment.... it allows people to conference with their customers, partners,
and well, anyone via voice, text, and SKETCH "chat" systems.... Best of all,
its free. Its says its peer -> peer , and identifies you with a handle like
ICQ... so it seems secure.

This is something that I'm going to try.... I think it will make
communication with the partners easier, and maybe increase production
some.... Just thought that some might get a kick out of this.

Oh, ya, it also supports file sharing.

Anyway, thought this could be helpful to some... please pardon the
infringement.

Dallas K.





Sounds a lot like Netmeeting....

> -----Original Message-----
> From: Dallas Kropka [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 12:41 AM
> To: PHP LIST
> Subject: [PHP] Something cool I found in Wired,
>
>
>
>       Ok, I know that this is PHP, but I thought that allot of
> the freelancers
> out there could find it as appealing as I do.
>
> In the current issue of Wired... page 163, there is a new product featured
> called Groove found at www.groove.net and while only for windows at the
> moment.... it allows people to conference with their customers, partners,
> and well, anyone via voice, text, and SKETCH "chat" systems....
> Best of all,
> its free. Its says its peer -> peer , and identifies you with a
> handle like
> ICQ... so it seems secure.
>
> This is something that I'm going to try.... I think it will make
> communication with the partners easier, and maybe increase production
> some.... Just thought that some might get a kick out of this.
>
> Oh, ya, it also supports file sharing.
>
> Anyway, thought this could be helpful to some... please pardon the
> infringement.
>
> Dallas K.
>
>
> --
> 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]
>
>





On Wed, Jan 17, 2001 at 07:00:12PM -0500, Daniel Cowgill wrote:
> Fixes this time around:
> 
> * class hierarchies more than two levels deep should work now :)
> * should compile cleanly under PHP 4.0.2 through 4.0.4pl1
> 
> Dan
> 
>

Where do we get this??
 




hi,

how do sites like http://marc.theaimsgroup.com, make
mailing list indexes, like even phpbuilder and zend's
site which archive the list.

How do they index all the message ?

thanks.

=====
To Find Out More About Me : http://mukul.tsx.org/

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




On 2001-01-18, =?iso-8859-1?q?Mukul=20Sabharwal?=
<[EMAIL PROTECTED]> wrote:

> how do sites like http://marc.theaimsgroup.com, make
> mailing list indexes, like even phpbuilder and zend's
> site which archive the list.

> How do they index all the message ?

Well, this is pretty OT, but since my alternative is to keep working on a
boring report I'm writing, I'll waste some bandwidth... ;)

We (marc.theaimsgroup.com, which is also lists.kde.org) use a mishmash of
really ugly perl that I (mostly) have written over the past ~4 years. 
There were a few design priorities / realities that played a big part in
how we ended up doing things:

-We hated the "huge index page" problem that Hypermail often gets into
-We hated the "searches pick up the text from forward/back links" problem
  that ht://Dig and glimpse often got into
-We hated the "generate different links to the same document so your
  browser history is completely confused" problem that DejaNews got into
-We hated banner ads and other useless fluff that makes accessing content
  painful and slow
-We hated sites that were not lynx-friendly
-I was the primary author, and I knew little about perl and less about
  databases when we started (and have been stuck with my mistakes since...)
-I am lazy and busy, a bad combination

First, a database-insertion script takes messages in from sendmail and
stuffs them into a database of message-headers and message-bodies.  From
there the messages get associated with the appropriate list, thread, and
author and get full-text, author-, and thread-indexed by some background
daemons.  We use MySQL and a fairly uninspired database layout (which I've
been slowly evolving behind the scenes as I pick up a clue here and there
about DB design) to store everything.

The full-text index architecture is probably the best part (read: I had the
most help from "real database programmer" coworkers when it was
architected).  RDBMS's really aren't the "right" tool for such a job, but
we wanted to do it that way anyway, and haven't been disappointed.  For
each message/thread/author, a unique list of words is built.  A
"dictionary" table maps from word:wordid where wordid is an int.  Each
message/thread/author has a unique int id as well.  wordid:msgid (or thrdid
or authid) pairs are stored in index tables (with a composite primary key
on wordid:msgid, thus insuring unique pairs and also making a "select *
where wordid=49" quite fast).  This means we throw away all positional
information (which is why things like phrase-searching aren't supported
yet).

The web interface is a big honking perl script which wishes it could grow
up to be clean code running under mod_perl (so it could be as fast as all
those PHP sites :), but I'm too lame^H^H^H^Hbusy to ever get around to
doing the rewrite.  When a full-text search is done, the wordid's of all
input words are grabbed from the dictionary.  Then the appropriate lookup
table (we keep a seperate table per list, a design tradeoff) is joined with
itself with something like (a sample 3-word query here):

SELECT w1.msgid FROM wrdmsg AS w1, wrdmsg AS w2, wrdmsg AS w3
        WHERE w1.wordid=search_term_wordid_1
          AND w2.wordid=search_term_wordid_2
          AND w3.wordid=search_term_wordid_3
          AND w1.msgid=w2.msgid
          AND w1.msgid=w3.msgid

...With appropriate LIMITs, etc.  These msgids are then used to pull up the
appropriate message header info to print the results of a search.  The
reason for the word -> wordid mapping is because straight numeric
comparisons are much more efficient for the DB engine to make (and also
much smaller on-disk to repeat wordid's once per message than words).

When we designed this years ago we tested a few different algorithms, ways
of storing the data, etc.  We did quick mock-up tests simulating up to
about 100,000 messages, and were pretty sold on this architecture.  One
thing it is not is terribly disk-efficient, but it performs pretty well (at
4.3 million mails now and counting...).  The site's hardware, connectivity,
and basic care & feeding are donated by the AIMS Group guys (the same
people, under a different name, that created the site with me years ago).
It's currently running on a dual P2-400--nice, but not amazing hardware.  

There are lots of ways it could be better; sometimes I wish it was my day
job so I could Do It Right, other times I'm glad it's just a hobby ;)

--
Hank Leininger <[EMAIL PROTECTED]>




Hello,

I need to encode some text using GPG in a PHP program. I've a class wich
uses popen like this:

//--- start ---

// parameters to gpg omited...

$command = "echo '$text' | gpg <snip>";

$fd = popen("$command","r")
if (!$fd) {
   return -2;
}

$enc = "";

while (!feof($fd)) {
   $enc .= fgets($fd,4096);
}

pclose($fd);

//--- end ---

That's with PHP4. It works ok in non-safe-mode, but with safe-mode turned
on it doesn't. I'd like to use safe mode. Does anyone know a better (or
correct) way to open this kind of pipe under safe_mode? (I've read a
comment in the manual telling about opening the pipe for read-write mode,
but it seems not to work wit the echo stuff in the first part of the
command).

Thank you.
Rodolfo.







Hello!

Two scripts: first.php and second.php

I am a little bit confused... since I session_start() in first.php, I will need to 
session_start() in second.php also?

first.php

<?
session_start();

session_register ("data01");

header("Location: second.php")

?>

thank you,

Rom




just discover - session by cookie sucks!!!!

using db session handling it is better!

Rom
----- Original Message -----
From: Romulo Roberto Pereira <[EMAIL PROTECTED]>
To: php-general <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 1:39 AM
Subject: [PHP] fast question about session_start


Hello!

Two scripts: first.php and second.php

I am a little bit confused... since I session_start() in first.php, I will
need to session_start() in second.php also?

first.php

<?
session_start();

session_register ("data01");

header("Location: second.php")

?>

thank you,

Rom






HI!

I am switching from MYSQL to MsSql.

While I tried making a conection like donw below...I
get the following error:

<?php

$connect=mssql_connect("10.0.0.1","sa","");

if($connect)
{
echo"Success";
}
else
{
echo"Failure u Loser";
}


?>



Fatal error: Call to unsupported or undefined function
mssql_connect() in C:\HTTPD\HTDOCS\mssql.php3 on line
3

I have uncommented the ; in the php3.ini file.

I am using Windows 98 and Omnichttpd 2.0 Server.

Please help me out.

Thanx a liot!
Dhaval Desai







__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Hi

I have a while loop which populates rows in a table, in each row is a checkbox which 
has a unique name:

<td><input type="checkbox" name="<?php print $SkyAccNo;?>" value="ON"></td> 

On another page I want to output all the details in a specific table row, how do I 
check which checkbox has been checked so that specific row can be displayed?

Thanks for any help

Wade 




Try this, I know Ive botched your origonal code...

somepage.php
<?
 while(...)
 {
  ...
  echo "<td><input type='checkbox' name='account_num[$SkyAccNo]'
value='$SkyAccNo'></td>\n";
 }
?>

someotherpage.php
<?
 function checked($val_1, $val_2)
 {
  if ($val_1 == $val_2)
   return " checked ";
 }

 foreach($account_num as $pos => $val)
 {
  echo "<td><input type='checkbox' name='account_num[$SkyAccNo]'
value='$SkyAccNo' " . checked(@$account_num[$pos], $SkyAccNo) . " ></td>\n";
 }

 while(...)
 {
  ...
  echo "<td><input type='checkbox' name='account_num[$SkyAccNo]'
value='$SkyAccNo' " . checked(@$account_num[$SkyAccNo], $SkyAccNo) . "
></td>\n";
 }
?>

email me if you have more questions.

Chris Lee
Mediawaveonline.com


""Wade Halsey"" <[EMAIL PROTECTED]> wrote in message
025401c0811c$214dfb40$256410ac@WADEH">news:025401c0811c$214dfb40$256410ac@WADEH...
Hi

I have a while loop which populates rows in a table, in each row is a
checkbox which has a unique name:

<td><input type="checkbox" name="<?php print $SkyAccNo;?>" value="ON"></td>

On another page I want to output all the details in a specific table row,
how do I check which checkbox has been checked so that specific row can be
displayed?

Thanks for any help

Wade







> <td><input type="checkbox" name="<?php echo$SkyAccNo;?>" value="ON"></td>
>
>For example there will be three rows with different values and each
checkbox will have a unique name.
>On the next page once a submit button has been pushed I want to do:
>sqlExecute( "Select * from SkyDiary where AccNo = (Here I want the value of
the checkbox)
>
>Do I use HTTP_POST_VARS here and if so how??

You could do it that way...

But it would be way more easier to do more like this:

<INPUT TYPE=CHECKBOX NAME=account[] VALUE="<?php echo $SkyAccNo;?>">

Then, in your receiving script:

$accnos = implode(', ', $account);
sqlExecute("select * from skydiary where accno in ($accnos)");

Note the use of IN and () within the SQL.

Assumption:  The account numbers are integers.  If not, you'll need to use
more like this:

$accnos = implode("', '", $account);
... where accno in ('$accnos')");

The point being that you need to wrap '' around each non-integer datum for
SQL.






> I'm using the function get_browser(), but the whole thing does not seem
> to work properly. Please have a look at http://web.flynet.de/info.php
> to see what I mean.
> 
> Is there anyone who could tell me what's probably wrong?
> 
> I'm using PHP 4.04, which compiled ok. I seems to find the
> browsecap.ini, but the output is buggy.

Do you have a real browscap.ini, or that empty one?

Open it up and look at it.

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm







>Due to the sheer size of my mailing list, it would seems sensible to try
streamlining the send -mailing script I run.
>
>In PERL I think the command to split the sending proccess was "fork", where
the script launches a new command allowing >the script to continue on while
each person is emailed.
>
>Do any of you know of a similar technique in PHP 4+ ?

You could dink around with exec() and & and shell scripts and get PHP to
fork a sendmail for each email, but that's not going to gain you a whole
lot, really...  I mean, sendmail itself is a pretty big program to run.

Way better to spew your email direct to port 25 (SMTP).

Of course, that would require that your read all those gnarly RFCs and
stuff...  Except there are already user-contributed libraries of functions
and classes to do this :-)

Try Manuel Lemos email class, for one.

There's still an upper bound on how much email PHP can handle, and it does
not approach a custom mailing list program...  If you are not customizing
each email, you should also consider just integrating with majordomo, ezmlm,
smartlist, etc.






> "save as" dialog that will come up in all cases (you may have a 
> workaround this problem). If the dialog is not shown up the 
> download destination (directory) need to be passed to the server 
> when the session is initialized so that the web browser knows 
> where to save the information. Is this possible with PHP ???

I don't think it's possible, but it really has nothing to do with PHP.

HTTP just doesn't have that as part of its design...

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm







""Richard Lynch"" <[EMAIL PROTECTED]> skrev i en meddelelse
050101c0811f$0c609780$[EMAIL PROTECTED]">news:050101c0811f$0c609780$[EMAIL PROTECTED]...
> > "save as" dialog that will come up in all cases (you may have a
> > workaround this problem). If the dialog is not shown up the
> > download destination (directory) need to be passed to the server
> > when the session is initialized so that the web browser knows
> > where to save the information. Is this possible with PHP ???
>
> I don't think it's possible, but it really has nothing to do with PHP.
>
> HTTP just doesn't have that as part of its design...
>

Thanks for the info.

Benny






>         mysql_select_db("jamesmc",$db);
>         $result = mysql_query("SELECT * FROM comment WHERE pid='$poid'
ORDER by
> cid desc",$db);
>         $comm = mysql_fetch_array($result);

This is in the FAQ, I think...  Better re-read that.

Start using or die() a lot:

mysql_select_db("jamesmc", $db) or die("Could not select db");
$result = mysql_query(...) or die(mysql_error());

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






> The other website does use session_start(). A "HEAD /  HTTP/1.0" gives

> I have the extra lines : Expires, Cache-Control, Pragama.
>
> I would like to get rid of those 3 lines : is it possible and how could
> I achieve that ?

Probably by sending your own (blank) headers with those names.

<?php
    header("Expires: ");
    .
    .
    .
?>

That will quite possibly make the session stuff not work too well with
browser caching, however.

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






>I can see... I mean, the images appears, now, is it possible when uploading
images, do a copy to a small file, ie I will have 2 >files for each image,
but with different sizes, where the small one is a small size of the
original image...confused. This is >because

You can create a thumbnail on the server using ImageMagic (aka "convert") or
other command-line image manipulation software using http://php.net/exec

There are several examples of this in the code archives linked from
http://php.net/links.php

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






> $junk="xml::hi_handler";
> $junk();
>
> Fatal error: Call to undefined function: xml::hi_handler()

Perhaps this:

$j1 = "xml";
$j2 = "hi_handler";
$j1::$j2();

Wait.  Are you saying you don't have an instance of an xml object?...  I'm
surprised you can even call xml::hi_handler() without one in the first
place....

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






Well, essentially, a static class method is a method that can be called
without any instances of the class.  It's just a nice way to group
functions for your class.  

Check out chapter 13 of the php manual:
http://www.php.net/manual/en/language.oop.php
"Static class methods are apparently supported in php v4.02"... using
:: notation.

On Thu, 18 Jan 2001, Richard Lynch wrote:

> > $junk="xml::hi_handler";
> > $junk();
> >
> > Fatal error: Call to undefined function: xml::hi_handler()
> 
> Perhaps this:
> 
> $j1 = "xml";
> $j2 = "hi_handler";
> $j1::$j2();
> 
> Wait.  Are you saying you don't have an instance of an xml object?...  I'm
> surprised you can even call xml::hi_handler() without one in the first
> place....
> 
> By Day:                                |By Night:
>     Don't miss the Zend Web Store's    |   There's not enough room here...
>     Grand Opening on January 23, 2001! |   Start here:
>     http://www.zend.com                |   http://l-i-e.com/artists.htm
> 
> 
> 
> 

-- 





> Has anyone used PHP to connect to a FileMaker database?
>
> If you have a url to a tutorial please e-mail me.

I'm pretty sure somebody posted something about that on the AMP
(Apache/MySQL/PHP) mailing list last week or so...  I think they got it to
work via ODBC...

To unsubscribe from this list, just send a blank message to
[EMAIL PROTECTED]

To switch to or start with the digest version, send a blank message to
[EMAIL PROTECTED]

This list is hosted as a public service by Dynapolis Internet Communities
http://www.dynapolis.com    Listmaster <[EMAIL PROTECTED]>



By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






> The subject pretty much explains it all.  I have 2 dates (YYYYMMDDHHSS
> format) and want to determine the number of days, hours, minutes and
seconds
> left from the later date to the earlier date.  I figure I could do all
this
> using date arithmatic, divide by 60 seconds in a minute, 60 minutes in an
> hour, 24 hours in a day and so forth, but was wondering if there a better
> (or easier way) to do this before I start coding away.?

If those come from MySQL, use MySQL's date_add function.  Or something like
that...

http://mysql.org/

If they are just from some raw text file...  I'm betting that somebody has
done the subtraction and formatting part for PHP dates, so you just need to
use http://php.net/substr and http://php.net/mktime

Check the code archives linked from http://php.net/links.php for date
algorithms.


By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






> Here is the code that i have wrote, which is going
> logically some where wrong.

It looks to me like you are not checking if they already voted until after
you let them vote a second (or third or...) time.

Move the check for previous votes to the very top of the script.


By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






> Are includes supported in ver 3.0?
> I'm having troubles with my includes.  Here is the include (after this
> evening we will ver 4.0):
> 
> include ($DOCUMENT_ROOT . "/gophp/Main.php");

include has been around, like, longer than me :-)

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






> ./configure --with-mysql --with_apache=../apache_2.0a9

Don't use relative dir with ./configure.  It's not that smart.

By Day:                                |By Night:
    Don't miss the Zend Web Store's    |   There's not enough room here...
    Grand Opening on January 23, 2001! |   Start here:
    http://www.zend.com                |   http://l-i-e.com/artists.htm






Posted earlier but got no response.... so here it is again...





Ok, I need either a tutorial or someone who has done so in the past to tell
me how to do this.... I want to log and reference the key words used to find
my site from referring search engines... like so:

AltaVista:


         211     3d studio max tutorials
          81     body jewelry
          43     bodyjewelry
          32     3d studio max
          21     body jewelry
          11     3d studio tutorials


I cannot relay on any log file, I have to create it myself.... (Long story
here, don't ask...). I am very interested in learning this.... if anyone
knows of a tutorial then please pass that on as well...

Thanks much.

Dallas K

(Note: I know about using $HTTP_REFERER But how can I take that info and
strip it, if that is what I need to do?)






Hello Dallas, 

(DK == "Dallas Kropka") [EMAIL PROTECTED] writes:

DK> Posted earlier but got no response.... so here it is again...

I gave you a quick explanation of one way to do it earlier, but I know
of no tutorials off the top of my head.

Here is a lengthy example if you _have_ to see code:

<?php

$URI = 
'http://www.altavista.com/cgi-bin/query?q=foo+and+bar+and+baz&kl=XX&pg=q&Translate=on';

/* the above would obviously be $HTTP_REFERER */
/* I typed in 'foo and bar and baz'           */

$parts = explode('?',$URI);
$query = explode('&',$parts[1]);
$terms = explode('=',$query[0]);
$keywords = explode('+',$terms[1]);

print 'They used: <br>';
while(list(,$keyword) = each($keywords))
{
    print "$keyword<br>";
    /*
      still going to print
      'and' and 'or' and 'not' and ..
    */
}

?>

But there has to be an easier solution out there that's already been
ridden to death. The above is going to get nasty rather quickly I'd
imagine, and every search engine, more than likely, is going to have a
completely different query string. There's no way I'm going to look.
:)

I wouldn't reinvent the wheel; go do some searching, poke through
someone's "stats" code. I'm sure this has been done before in PHP, and
I _know_ it's been done in Perl -- which is fairly easy to translate.

-Brian
--
A)bort, R)etry, I)gnore, V)alium?






Hello everyone,

I was wondering if anyone had thought/opinions on below10host.com as a web
host?  I though phpwebhosting.com would be good, but then I read that some
people really hated it, so I just wanted to check to make sure this would be
okay and nobody had really trouble with it.

Thanks,

Jeff






On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
<[EMAIL PROTECTED]> wrote:

>anyone had thought/opinions on below10host.com as a web host?

I'm speaking as a budding competitor, so keep that in mind. :-)

According to their web page, below10host.com gives you 6GB per month
for $9.95.  By way of comparison, webservpro charges $49.95 per month
for the same 6GB.

My analysis of costs tells me that at $49.95 for 6GB, webservpro does
not have a large margin of profit in their price.  How can any hosting
company sell the same 6GB per month for $9.95 and make enough profit
to stay in business?

At such a low price, I don't know how it's possible, unless a large
majority of their customers consume so little of their quota so as to
offset the loss incurred from customers who consume it all.

6GB per month is a fairly active site.  If you really have that much
traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
have much less traffic, you could choose a lower priced plan.

I believe in the adage of getting what you pay for.  Value is a
balance between low price on the one hand, vs. high quality on the
other.  The lowest price is not necessarily the best value.

Egan







Alright, so here's my question on the whole phpwebhosting.blah thing...

If they are extremely pro-PHP for hosting, how come they haven't
responded to some of the _slams_ they've received on this list?  I'd be
surprised to hear that no-one working for PHPwebhosting wasn't at least
lurking on this list.

I went to their site at the onset of the conversation and it did look
_very_ promising.  I'd like to hear something of a rebuttal from an
employee of them.  And preferably a tech of somekind.  -Gray people make
me nervous-

--jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>          pgp keyid 0xAECBA355
Phil 1:21                                      www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -----Original Message-----
> From: Egan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 09:32
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] below10host.com as webhost?
>
>
> On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
> <[EMAIL PROTECTED]> wrote:
>
> >anyone had thought/opinions on below10host.com as a web host?
>
> I'm speaking as a budding competitor, so keep that in mind. :-)
>
> According to their web page, below10host.com gives you 6GB per month
> for $9.95.  By way of comparison, webservpro charges $49.95 per month
> for the same 6GB.
>
> My analysis of costs tells me that at $49.95 for 6GB, webservpro does
> not have a large margin of profit in their price.  How can any hosting
> company sell the same 6GB per month for $9.95 and make enough profit
> to stay in business?
>
> At such a low price, I don't know how it's possible, unless a large
> majority of their customers consume so little of their quota so as to
> offset the loss incurred from customers who consume it all.
>
> 6GB per month is a fairly active site.  If you really have that much
> traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
> have much less traffic, you could choose a lower priced plan.
>
> I believe in the adage of getting what you pay for.  Value is a
> balance between low price on the one hand, vs. high quality on the
> other.  The lowest price is not necessarily the best value.
>
> Egan
>
>
>
>
> --
> 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]
>





Hi, thanks for the help..

The \r\n trick didn't work.. You can only see this back in the source..
But, the RFC "standard??" trick did work just perfectly.!!!

Thanks Ignacio, I don't anything about the RFC.. Probably some standard
which describes these
special chars..? Will search for it to see if it can learn me some more
things.. :-)

Bye Bye
David

> > Hi,
> >
> > I have a non PHP questions which probably doesn't fit in this mailling
> > lists, but I have a feeling that someone can help me because it is very
HTML
> > related.
> >
> > I was busy making a small piece of PHP echo code which generates a link
> > which enables you to click this and startup your email software with a
basic
> > message in it..
> >
> > The URL is basically the following:
> > mailto:$email?body=Dear $name, We would like to inform you.... With kind
> > regards, $sender&subject=Message send on $date about $subject
&bcc=$bccopy
> >
> > When clicked you will get the $email text as email address, the Dear
> > $name... etc as body of the email etc etc..
> >
> > Now here the non-PHP questions.. I searched everywhere, but how can I
get
> > line breaks inserted IN the email program..??
> > After the 'Dear $name,' part I would like to have 2 line breaks.. Then
after
> > the We would like to inform you... another 2 breaks..
> >
> > I tried \n, I tried <BR> (<BR> you simply see this as email text.)..
> >
> > Is this possible.. Hope someone understande the problem.. (I am not
trying
> > to get breaks in my source, or what you see on the screen, but line
breaks
> > in the email text..
> >
> > Thanks.
> > Bye Bye
> > David
> >
>
> RFC 2368 says that you use "%0D%0A" for newlines and "%20" for spaces
(Section
> 5: Encoding). Remember: the RFCs are your friends :)
>
> --
> Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>
>
>
>
>





Hello guys,
 
I need a script that backs up the database running under cron.
 
I just wrote an internal (quite important, but not fast growing) database
and I HAVE TO release it by next Monday.
Something is going quite strange in it on updates, it often updates other
fields that it shouldn't touch... some staff amazingly is getting inserted
where I don't tell him to... some fields are even being deleted... 
 
you can imagine this nightmare...
 
in other words I haven't had time enough to test it and in order to release
it I want to back it up the working database on a daily basis. So I can
still hack with it while it is being operated...  
 
oopps, again wrote too long ...
 
anyway, is there any script like that (fast and dirty is ok) to run on
MySQL, PHP4.0.2 ?
 
P.S: I have a quite good idea on how to write it, but NO TIME.....
 
Thanks

Maxim Maletsky - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109

http://www.j-door.com <http://www.j-door.com/> 
http://www.japaninc.net <http://www.japaninc.net/> 
http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/> 


 




In article <DC017B079D81D411998C009027B7112AA93458@EXC-TYO-01>, 
[EMAIL PROTECTED] (Maxim Maletsky) wrote:

> anyway, is there any script like that (fast and dirty is ok) to run on
> MySQL, PHP4.0.2 ?

What about putting a mysqldump call into a crontab?

-- 
CC





> My vote is still just for include files to have a standard (already
> accepted) extension.

I think you may be missing the point on this one.
The question wasn't what to name included files but how to stop apache
parsing or showing the contents of the include files.

The obvious solution of course is to have the included files outside the web
tree.

M@





if they are called the same then you can add them ... how? good question ...
how is .htaccess added.. the same way. there, in httpd.conf you can select
which files not to show wit h, i think regular expression..  if you don't
have the access to httpd.conf, or simply do not wish to use it, then just
put a dot (.) infront the files you wich to hide, they won't be then shown..
(if apache is configured that way, it is usually the default installation)

but, the best way, as you sayd is to have the whole library outside (better
parralel) directory of your www root.
or
password protect a folder with them all with .htaccess
or
use .htaccess to not to show them anymore...

Cheers,
Maxim Maletsky

-----Original Message-----
From: Matt Williams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 5:48 PM
To: Php-General@Lists. Php. Net
Subject: RE: [PHP] how do i hide my .inc files in apache??



> My vote is still just for include files to have a standard (already
> accepted) extension.

I think you may be missing the point on this one.
The question wasn't what to name included files but how to stop apache
parsing or showing the contents of the include files.

The obvious solution of course is to have the included files outside the web
tree.

M@


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




Hi Romulo,

If you're only working (and all your clients, too) with M$, means M$-Win,
M$-IIS, M$-IE, so the best method is NTLM, but all Users must be registered
in your PDC as Users. Its very usable in Intranets.

Greetinx,
  Mike
(Germany)

-----Ursprüngliche Nachricht-----
Von: Romulo Roberto Pereira [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 17. Januar 2001 05:27
An: php-general; php-windows
Betreff: [PHP-WIN] best user authentication method?


hello!

What is the best user authentication methd for linux (apache)? and for
windows (IIS)? 




I agree. If you have a Linux system, you can emulate this by having one NT
server with MS security and link to that page, have it set a copy (upon
authentication) and PHP can read the rest.

DOES anyone know if there is a way to us MS Authentication directly from
Linux?  I am looking into LDAP right now, but am hoping there is an easier
way

--Dave

-----Original Message-----
From: Michael Rudel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 2:00 AM
To: 'Romulo Roberto Pereira'; php-general; php-windows
Subject: [PHP] AW: [PHP-WIN] best user authentication method?


Hi Romulo,

If you're only working (and all your clients, too) with M$, means M$-Win,
M$-IIS, M$-IE, so the best method is NTLM, but all Users must be registered
in your PDC as Users. Its very usable in Intranets.

Greetinx,
  Mike
(Germany)

-----Ursprüngliche Nachricht-----
Von: Romulo Roberto Pereira [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 17. Januar 2001 05:27
An: php-general; php-windows
Betreff: [PHP-WIN] best user authentication method?


hello!

What is the best user authentication methd for linux (apache)? and for
windows (IIS)? 

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




Hello!

Could anyone give me an direction where I can find information something
like "session for dummies"!
It's not funny anymore. I don't have anymore hair left.... :-]

david






David Tandberg-Johansen wrote:
> 
> Hello!
> 
> Could anyone give me an direction where I can find information something
> like "session for dummies"!
> It's not funny anymore. I don't have anymore hair left.... :-]

http://www.zend.com/zend/tut/session.php


-- 
Pavel a.k.a. Papi




Hi people,
Can PHP3 work with flash movie? I mean, something like using Php3 to run flash content 
from db? If so, is there anywhere I can find out more information?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




hi,

see   www.artfuntasy.com

just flash4, php3, mysql


greetings

andreas

----- Original Message -----
From: "Jacky@lilst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 11:23 PM
Subject: [PHP] flash and php


Hi people,
Can PHP3 work with flash movie? I mean, something like using Php3 to run
flash content from db? If so, is there anywhere I can find out more
information?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"






On Thu, Jan 18, 2001 at 04:23:58PM -0600, Jacky@lilst wrote:
> Hi people,
> Can PHP3 work with flash movie? I mean, something like using Php3 to run flash 
>content from db? If so, is there anywhere I can find out more information?

I use swift-generator from www.swift-tools.com, which integrates nicely
with any server-side scripting method. It's not open source but still
rather inexpensive (unlike Macromedia Generator).

- Frank




I have an problem with PDFLib and PHP.
I'm trying to include images in PDF file using pdf_open_image_file
If in my source code is line:

  $o=pdf_open_image_file($pdf,"gif","pict.gif");

i get the error:  Cannot find server or DNS Error (The page cannot be
displayed). What's wrong.

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





Hi,

I have installed apache for the first time and am using it now for my php and cgi 
development. But I have two problems, please help although they are off the topic.

1. In my htdocs folder, I am able to access any file which is in the htdocs folder but 
I am not able to access any file which in the sub folder of htdocs. It says file not 
found. Lets suppose If I have a test.php file in php folder in htdocs and I access it 
in http://localhost/php/test.php than it says file not found although it is in php 
folder in htdocs.

2. How do I configure apache to handle cgi. My cgi is installed in c:\perl\
Where my cgi scripts should be placed in the apache folder.


Thanks again
Statbat




Hello,

I need to know how to get apache to parse CGI output with the SSI parser (the
[php] script will have includes, which need to go through mod_include).
changing the mime-type to x-server-parsed or anything hooked by mod_include
doesnt help.

thanks,
Hrishi





I can't speak for Windows 2000, but for NT4, I've been running PHP4 as a CGI
under IIS, with MySQL since PHP4 was in beta, on several machines, with
moderate loading. I've never had a single problem, nor have I had to reboot
the machines during the last year.

That's stable enough for me! I have had no success in making php work
reliably as an ISAPI module, although several people have reported better
results on W2000.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org





Hi!

I have an array that looks kinda like this:

NAME            ADDRESS
John Doe        Some Street 1
Jane Doe        Another Street 2
Bill Gates      Helsinki 666

How do I sort this array based on NAME? ADDRESS?

Thanks!!

- Nicklas





Nicklas af Ekenstam wrote:
> 
> Hi!
> 
> I have an array that looks kinda like this:
> 
> NAME            ADDRESS
> John Doe        Some Street 1
> Jane Doe        Another Street 2
> Bill Gates      Helsinki 666
> 
> How do I sort this array based on NAME? ADDRESS?

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


-- 
Pavel a.k.a. Papi




Hi,
When I try to connect to MySQL server I get message "Can't connect to MySQL
server  (10060 )!

Please Help!
Thanks
Rosen Marinov







Hello,
I tried to upgrade php3* to php4 on my win98 machine. Downloaded the binarie
and tried to install it. Every time I trie to request a *.php-file I get the
following error:

>> PHP:  Unable to parse configuration file.

Does anyone know what this meens and how to solve it??

php 3 always worked, but after install php4 keeps giving me these errors.
I use it with MS pws on win98.

Thanks





I am using write.exe in the windows to edit my php files, is there any
editor which I can test my syntax befor using the browser to execute it?

any help will be appreciated.

Thanks






I run Linux for server / testbed / devel so I cant say here for sure, but I
know in linux if I wanted to test a script without running it on my
webserver (Ive had scripts that crash apache) I compile php as a cgi and do
this.

php -q test.php

the '-q' just means "dont send the http headers"

can you compile/download php for windows as a cgi ? that would solve your
problem eh.

Chris Lee
Mediawaveonline.com





"Alaiddin Tayeh" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am using write.exe in the windows to edit my php files, is there any
> editor which I can test my syntax befor using the browser to execute it?
>
> any help will be appreciated.
>
> 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]
>






Hi Gurus ,
    Can you give me pointers(read urls) to "Good Sites" on tutorials or info
from scratch on XML with PHP.
Thanks in Advance.
~Rahul






I write code in PHPEd from http://www.soysal.com/PHPEd

        roman




Hello all,

I have 6 numbers that are in an array.  I need to know how many times each 
number shows up in that array.

ex....
Numbers: 1,3,5,1,4,1

Output needed:  (Not necessarily like this)
1 3
3 1
5 1
4 1

Can anyone help me with this?  I looked in the manual, but couldn't find 
anything that was quite what I needed.  I have tried sorting then 
array_count_values, but ended up with a result like this.  Some results 
have counts, some don't.

1
2 1
4 1
4
4 3
5 1

Thanks

Chris





Try this:

$array = array(1,2,3,4,5,3,3,1);
foreach(array_values($array) as $s)
{
$count[$s]++;
}
foreach(array_keys($count) as $s)
{
echo "Number: " .  $s. " count: " .  $count[$s] . "<Br>";
}




> -----Opprinnelig melding-----
> Fra: CDitty [mailto:[EMAIL PROTECTED]]
> Sendt: 18. januar 2001 12:40
> Til: [EMAIL PROTECTED]
> Emne: [PHP] Array help needed
> 
> 
> Hello all,
> 
> I have 6 numbers that are in an array.  I need to know how 
> many times each 
> number shows up in that array.
> 
> ex....
> Numbers: 1,3,5,1,4,1
> 
> Output needed:  (Not necessarily like this)
> 1 3
> 3 1
> 5 1
> 4 1
> 
> Can anyone help me with this?  I looked in the manual, but 
> couldn't find 
> anything that was quite what I needed.  I have tried sorting then 
> array_count_values, but ended up with a result like this.  
> Some results 
> have counts, some don't.
> 
> 1
> 2 1
> 4 1
> 4
> 4 3
> 5 1
> 
> Thanks
> 
> Chris
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Thanks.  Getting this error.  Cannot increment/decrement overloaded objects 
nor string offsets.  Any idea?

Chris

At 05:54 AM 1/18/01, Knut Sætre wrote:
>Try this:
>
>$array = array(1,2,3,4,5,3,3,1);
>foreach(array_values($array) as $s)
>{
>$count[$s]++;
>}
>foreach(array_keys($count) as $s)
>{
>echo "Number: " .  $s. " count: " .  $count[$s] . "<Br>";
>}
>
>
>
>
> > -----Opprinnelig melding-----
> > Fra: CDitty [mailto:[EMAIL PROTECTED]]
> > Sendt: 18. januar 2001 12:40
> > Til: [EMAIL PROTECTED]
> > Emne: [PHP] Array help needed
> >
> >
> > Hello all,
> >
> > I have 6 numbers that are in an array.  I need to know how
> > many times each
> > number shows up in that array.
> >
> > ex....
> > Numbers: 1,3,5,1,4,1
> >
> > Output needed:  (Not necessarily like this)
> > 1 3
> > 3 1
> > 5 1
> > 4 1
> >
> > Can anyone help me with this?  I looked in the manual, but
> > couldn't find
> > anything that was quite what I needed.  I have tried sorting then
> > array_count_values, but ended up with a result like this.
> > Some results
> > have counts, some don't.
> >
> > 1
> > 2 1
> > 4 1
> > 4
> > 4 3
> > 5 1
> >
> > Thanks
> >
> > Chris
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >





Addressed to: CDitty <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from CDitty <[EMAIL PROTECTED]> Thu, 18 Jan 2001 05:40:13 -0600
>
> Hello all,
>
> I have 6 numbers that are in an array. I need to know how many times
> each  number shows up in that array.
>
> ex.... Numbers: 1,3,5,1,4,1
>
> Output needed: (Not necessarily like this) 1 3 3 1 5 1 4 1
>
> Can anyone help me with this? I looked in the manual, but couldn't
> find  anything that was quite what I needed. I have tried sorting
> then  array_count_values, but ended up with a result like this. Some
> results  have counts, some don't.
>
> 1 2 1 4 1 4 4 3 5 1
>

$Input = array( 1, 3, 5, 1, 4, 1 );
$Output = array();

while( list( $index, $value ) = each( $Input )) {
   $Output[ $Value ] ++;
   }


ksort( $Output );

reset( $Output )
while( list( $index, $value ) = each( $Output )) {
   echo( 'There are ' . $value . ' - ' .
         $index . "s in the array<BR>\n"
   }


Not tested, but this should turn return:

There are 3 - 1s in the array
There are 1 - 3s in the array
There are 1 - 4s in the array
There are 1 - 5s in the array




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com





> You cannot copyright ideas, and the PHP language is only an idea.

I beg to disagree. The copyrighting or patenting of software is currently a 
topic, at least in the European Union. 

<OT subject='copyright on ideas' type='emotional rant' ot='genetics'>
In the gene world it is general (mis)practise to patent medical plants which 
have been used for ages in other countries (Peruvian wonderflower, Indian 
Neem tree) and often they even get away with it (AKA 'Biopiracy').

Also many companies are patenting gene sequences which is a DISCOVERY not an 
INVENTION. That's huge now. Some company copyrighted some gene while 
assuming that MAYBE it MIGHT be useful for infections, cancer and they named 
23 other diseases but forgot HIV. Eventually it turns out to be interesting 
concerning HIV and they now also want to (financially and legally) CONTROL 
HIV research. Patenting an invention is officially impossible in most 
countries but they get away with it.

Sorry I know its OT but this remark hit a very sensitive spot. Bloody 
Monsanto, Aventis, Syngenta's. 
If you don't know them: they're like the microsoft in agriculture, where 
better solutions are not getting enough attention and chances because of the 
big ones having less scrupules and more PR and lobby. 
</OT>


Chris
 





--------------------------------------------------------------------
--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
--------------------------------------------------------------------

 




on 1/17/01 10:12 AM, Chris Lee at [EMAIL PROTECTED] wrote:
>> There are occasions when I'd like to execute some long-running task
>> in the background, in response to some user action.  It seems that

> Im nearly posative this isnt what your looking for, but I thought I would
> see if maybe it was :)
 
> compile php as a cgi so you can run it from the command prompt. then just
> run the php file from the command prompt through exec ()

> <?
> exec("php -q somephpfile.php &");
> ?>

    If you want the thing to always complete then you'll need to nohup the
exec call. Otherwise, the "php -q" would be a child process of the php
module and will be killed when the web page script quits (assuming you
compiled PHP as a module (shared or otherwise)). That kill would occur when
the it finishes outputting the page or the browser has closed the connection
(moves onto another page).

    Another note is I believe exec() returns the last line of the output of
the command. This means that you'll see the browser stuck on the last
flush() before function handle_some_action() until you reach the timeout
specified in php.ini (usually 30 seconds) as the php module will need to
wait for the command to complete before it returns a line. popen() would
also do this (I believe the pipe blocks until the output is filled). So for
this to work you've got to set it so that it returns immediately...
something like..
  "nohup php -q somephpfile.php >&/dev/null &"
(or somesuch).

>> In the cases I'd like to do this, I can manage synchronization
>> externally...
>> (i.e., implement join by waiting for a /tmp file to appear or
>> something),
>> so I'm not asking for a join, or any sychronization facilities.

    I'm not too certain what is meant by this, so I don't know if what I was
any help. :-)

    Note that the "somephpfile.php" does not need to have set_time_out(0)
because when php is run from the command line it will keep executing even
after the timer has expired. I don't know if this is a bug or a feature.

    Take care,

            terry

-- 
terry chay, Director of Engineering, <http://www.QIXO.com/>
QIXO /kick.so/ - Integrating Many Travel Web Sites Into One
W: 1.408.394-8102     F:1.408.516.9090    M: 1.408.314.0717
E-Mail: <mailto:[EMAIL PROTECTED]>     ICQ: 16069322
PGP Fingerprint: 6DCF 1634 547C 935D 4912  2A44 A4A2 79AB DFFF F110 






Miles Thompson <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> IIS I'm not familiar with, and Apache has a native scheme involving
.htaccess.
>
> If you want a portable authentication method, I'd recommend authenticating
> against a list of users/passwords contained in a database. Using MySQL,
> PostgreSQL or Interbase would keep your database platform neutral, and low
> cost.
>
> Here's code picked up from a Rasmus Lerdorf article which authenticates
> against a MySQL database, there are variations on this everywhere. I put
> this in a file called auth.inc, and then the top of every page which
> requires authentication simply includes "auth.inc".
>
> ------------cut------------
> <?       require( "dbname.inc" );

[SNIP]

Better yet, as this *is* supposed to be secure, call your files .php as
opposed to .inc. I have seen this far too many times to count now, and it's
a massive developer induced security hole. If you name your files .inc, 99%
of webservers, if asked for a .inc file will pass it straight through as
plain text....thus exposing usernames, passwords, possible bugs in your code
and god knows what else. If you name it .php, it gets parsed as a PHP
script, and so no output.

--
Rick Hodger






Hi all, this list to date has been extremely helpful and I thought you might be able 
to help with my latest problem.

I have a Cobalt Raq and need to host many different domain names but have them all 
point to one directory. e.g.

web site is called www.frogtrade.com - I am currently allowing various companies to 
use www.frogtrade.com/companyname which allows them access to the system. Some 
clients, however want to use their own domain name rather than the frogtrade name. The 
Cobalt Raq, by default creates an entirely new directory structure. How do I get this 
to point at the same frogtrade directory structure?

I am desperate for this help, but don't know where else to turn. Any help greatly 
appreciated!!

Thanks,
Gareth Davies
Progressive Business Services Ltd

+44 (0) 1274 889592   Office
+44 (0) 1274 889656   Fax
+44 (0) 7970 733851   Mobile (24 Hour)




use ServerAlias in the httpd.conf file under the site you want it to point
to.

Ive got a RAQ3 and it works fine

Kevin Cawthorne

----- Original Message -----
From: "Gareth Davies" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 12:55 PM
Subject: [PHP] Cobalt Raq/PHP Help Needed


Hi all, this list to date has been extremely helpful and I thought you might
be able to help with my latest problem.

I have a Cobalt Raq and need to host many different domain names but have
them all point to one directory. e.g.

web site is called www.frogtrade.com - I am currently allowing various
companies to use www.frogtrade.com/companyname which allows them access to
the system. Some clients, however want to use their own domain name rather
than the frogtrade name. The Cobalt Raq, by default creates an entirely new
directory structure. How do I get this to point at the same frogtrade
directory structure?

I am desperate for this help, but don't know where else to turn. Any help
greatly appreciated!!

Thanks,
Gareth Davies
Progressive Business Services Ltd

+44 (0) 1274 889592   Office
+44 (0) 1274 889656   Fax
+44 (0) 7970 733851   Mobile (24 Hour)






I have a regular expression that's not giving me the results i really need.

I have a bunch of strings coming at me that need to be truncated if they're
over 15 characters... but not to truncate until after it reaches the first
word.

This regular expression just doesn't seem to want to work 100%:

$myString = preg_replace("/.{15}\w)?\s.*/","\\1",$myString);


This will turn:

'PROJECT - Marketing Pitch'

into

'PROJECT - Marketing\1'


However... when i change it to:  /(.{15}\w)+.*/
everything seems to work fine.
I can't really use this regex though, because it will keep matching that 15
character word until it reaches the end.  I need it to stop matching after
it finds the first match (if it needs to match at all).

In perl:
+ <- means match 1 or many times
* <- means match 0 or many times
? <- means match 0 or 1 time

Could someone help me see my error... i'm driving myself bananas trying to
find it.  Perhaps pcre in PHP doesn't support the ? in the regular
expressions.

Best Regards,
Rob





Hi,

I am having a problem parsing xml with php.  I am running on windows 98 with apache 
1.3.14.  Here is a code snippet:

<?php

$file="data\logs.xml";

function startElement($parser, $name, $attrs) {
    global $map_array;
    if ($htmltag = $map_array[$name]) {
        print "<$htmltag>";
    }
}

function endElement($parser, $name) {
    global $map_array;
    if ($htmltag = $map_array[$name]) {
        print "</$htmltag>";
    }
}

function characterData($parser, $data) {
    //print $data;
}

$xml_parser = xml_parser_create();
// use case-folding so we are sure to find the tag in $map_array
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");

if (!($fp = fopen($file, "r"))) {
    die("could not open XML input");
}

print "<pre>";

while ($data = fread($fp, 4096)) {
    print $data;
    
    if (!xml_parse($xml_parser, $data, feof($fp))) {
        die(sprintf("XML error: %s at line %d",
                    xml_error_string(xml_get_error_code($xml_parser)),
                    xml_get_current_line_number($xml_parser)));
    }
    
}

print "</pre>";

xml_parser_free($xml_parser);
?>

End of snippet...

When I try to run this, I get an error box saying that apache has performed an illegal 
operation and then my computer locks up.  If I comment out the set_*_handler 
statements, everything runs fine.

Apache will display the xml file just fine if I hit it directly. (If that is of any 
value.)

Anyone have any idea what's wrong?

Thanks in advance for your help,
Chad






Does a calendar program exist in PHP similar to Yahoo's program?
(http://www.yahoo.com/calendar)

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






This should achieve a similar effect as that URI:

<?php
        echo "404 Document Not Found";
?>

;-)

Cheers
Jon

-----Original Message-----
From: Todd Cary [mailto:[EMAIL PROTECTED]]
Sent: 18 January 2001 13:56
To: [EMAIL PROTECTED]
Subject: [PHP] Calendar program


Does a calendar program exist in PHP similar to Yahoo's program?
(http://www.yahoo.com/calendar)

Todd

--
Todd Cary
Ariste Software
[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]




Whooops!  Wrong URL!

http://calendar.yahoo.com

Todd

Todd Cary wrote:

> Does a calendar program exist in PHP similar to Yahoo's program?
> (http://www.yahoo.com/calendar)
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [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]

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






I'm trying to grab a string from within a string based on a matching word or
phrase. Example...

$string = "This is a string I need to grab the middle out of"
$query_word = "need"

I need to get x amount of characters either side of $query_word, so the
result string would be like...

"string I need to grab the"

And I need the result string to be full words, not like..."ing I need to
grab th"

I've half managed to do it using strpos and substr but the code is really
messy and I'm getting half-formed words back. Anyone got any suggestion on
how to accomplish this?

Thanks very much in advance.

Steve






jalist:
> I'm trying to grab a string from within a string based on a matching word or
> phrase. Example...

You say you want the middle, not two words before and two words after.

I see several ways.


 1. Explode into an word-array and use that:
        1. prepare string 
                        a) add spaces after comma's and fullstops by some replace 
                                operation (replace ',' by ', ').
                        b) remove double spaces
        2. split to an array using explode (space as string separator)
                Now you have every word in a separate place in the array
        3. Get # of words by count($array)
    4. Divide by two and get nearest integer (hence floor and +0.5!)    
                $mid= floor(count($array)/2 + 0.5)
                OH NO, correction, that's the middle, you wanted a specific word.
                I'm afraid you'll have to walk thorugh the array to find the word      
 
                you need. 

                        for (i=0;i<count($array);i++)
                        {
                        if ($array[$i]==$searchword)
                                {   $fragment= "...".
                                         $array[$mid-2] ." "    
                                         $array[$mid-1] ." "
                                         $array[$mid]   ." "
                                         $array[$mid+1] ." "
                                         $array[$mid+2] ."...";
                                        ##extra job for you: make sure  $i >= 2 
                                        ##                                             
         and $i <= count-2
                                        ## or you'll get an error 

                                [exit the for loop somehow, maybe drop 
                                        this in a function and RETURN;]
                                }
                        
                        }

        

OR

 2. Continue with the strpos and strrpos, organize it a bit better.
        For instance find the middle of the string. Split at nearest
        space in leftstring and rightstring.

                Make a function chop_last_word, chop last two or three words from      
 
                leftstring and add to resultstring in right order.

                Same for rightstring.

     I think the array way is cleaner.

Chris

--------------------------------------------------------------------
--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
--------------------------------------------------------------------

 




http://apc.communityconnect.com/download.html
The Doctor wrote:
> 
> On Wed, Jan 17, 2001 at 07:00:12PM -0500, Daniel Cowgill wrote:
> > Fixes this time around:
> >
> > * class hierarchies more than two levels deep should work now :)
> > * should compile cleanly under PHP 4.0.2 through 4.0.4pl1
> >
> > Dan
> >
> >
> 
> Where do we get this??
> 
> 
> _______________________________________________
> Apc-cache mailing list
> [EMAIL PROTECTED]
> http://lists.communityconnect.com/mailman/listinfo/apc-cache





Hi,
I have a site which will be updated periodically by someone else, so have
made some forms with textareas for them to upload the text into the MySQL
database.  I was wondering if there is a PHP function/class which could
spell check these forms?

TTFN
Nik





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

There's also aspell which is deprecated.

Kristi

----- Original Message ----- 
From: "Nik Gare" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 9:12 AM
Subject: [PHP] Spell checker?


> Hi,
> I have a site which will be updated periodically by someone else, so have
> made some forms with textareas for them to upload the text into the MySQL
> database.  I was wondering if there is a PHP function/class which could
> spell check these forms?
> 
> TTFN
> Nik
> 
> 
> -- 
> 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]
> 





Hi all,
Instead of positive MS SQL result identifier on success, function 
mssql_query() returns empty result for DELETE or UPDATE SQL statement. SQL 
statement is executed although, but if  I use (for example) follow 
construction:

$res = mssql_query($sql,$db) or die_msg("Error message");

then even if sql query in $sql executed succesfully, $res is empty and 
function die_msg is called!

Because of this I was forced to switch back to php4-0-3 !

regards,
YK

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





How can I do it ???  I installed jpeg-6b, and I readed that before recompile PHP(with 
option : --with-jpeg-dir=/.../jpeg-6b), I must recompile gd, its really necessary ? If 
si, how recompile gd.
Thanks
Miguel Loureiro < [EMAIL PROTECTED] >





I am having an issue hopefully someone else has encountered already.  I
have successfully compiled the latest expat(0.50) and sablot(1.95.1)
libraries and configured and compiled php4 and apache1.3.14 to use the
Sablotron Extensions.  

I think anyway it was successful because it says "Sablotron XSLT
support - enabled" in a phpinfo page.

When I try to actually do a transform though, I get this fatal error
that is somewhat confusing:

Fatal error: msgtype: error in /usr/local/apache/htdocs/index.php on
line 4

I have included the code that I am running, and have noticed that I
only get an error when trying to do the transform.  In other words, the
xslt_create() line works fine. (qs.xml and qs.xsl exist in the same
directory as the index page)

CODE:
<?
$parser = xslt_create();
print "Parser Handle[$parser]";
xslt_run($parser, './qs.xsl', './qs.xml');                  
print "Here is the output:".xslt_fetch_result($parser);
xslt_free($parser);
?>

OUPUT:
Parser Handle[Resource id #1]
Fatal error: msgtype: error in /usr/local/apache/htdocs/index.php on
line 4


Any help is of course greatly appreciated.

David

--

ls





> 
> I am having an issue hopefully someone else has encountered already.  I
> have successfully compiled the latest expat(0.50) and sablot(1.95.1)
> libraries and configured and compiled php4 and apache1.3.14 to use the
> Sablotron Extensions.
> 
> I think anyway it was successful because it says "Sablotron XSLT
> support - enabled" in a phpinfo page.
> 
> When I try to actually do a transform though, I get this fatal error
> that is somewhat confusing:
> 
> Fatal error: msgtype: error in /usr/local/apache/htdocs/index.php on
> line 4
> 
> I have included the code that I am running, and have noticed that I
> only get an error when trying to do the transform.  In other words, the
> xslt_create() line works fine. (qs.xml and qs.xsl exist in the same
> directory as the index page)
> 
> CODE:
> <?
> $parser = xslt_create();
> print "Parser Handle[$parser]";
> xslt_run($parser, './qs.xsl', './qs.xml');
> print "Here is the output:".xslt_fetch_result($parser);
> xslt_free($parser);
> ?>
> 
> OUPUT:
> Parser Handle[Resource id #1]
> Fatal error: msgtype: error in /usr/local/apache/htdocs/index.php on
> line 4
> 
> Any help is of course greatly appreciated.
> 

The basic error outputting in sablotron was broken, it means that something is
wrong with your XML or XSL file (syntax wise).  This has been fixed in CVS, you
can upgrade, or a work-around to see what exactly is wrong, is to simply go:


function xsl_error($parser, $code, $level, $errors)
{
        echo "Parser: $parser\n<br>\n";
        echo "Code:   $code\n<br>\n";
        echo "Level:  $level\n<br>\n";
        echo "Errors: \n<br>\n<br>\n";
        var_dump($errors);
}

// initialize parser here

xslt_set_error_handler($parser, "xsl_error");

// xslt_run here


-sterling




Hi!

When I try to compile PHP 4.0.4 as Apache module with gettext support, the
gettext support doesn't function. But when I compile PHP as CGI, the gettext
support works fine. Where is the the problem (other functions works fine in
both case)?

I use Apache 1.3.14 with DSO support, GNU gettext 0.10.35, Solaris 5.7 and I
have compiled PHP 4.0.4 with gcc 2.95.2 and these options:

./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/apache/config \
--with-low-memory --with-gettext=/usr/local

Does anyone have faced with similar problem or have solution for it?

Albert









     I am using openldap 2.0.7.   I am still using PHP 4.0.2 because when I
attempted upgrade to 4.0.4  - ODBC would not compile in. That is strange
because it works fine in 4.0.2.

BEH




Jani Taskinen <[EMAIL PROTECTED]>@sniper.igw.kolumbus.fi> on 01/17/2001
04:07:44 PM

Sent by:  <[EMAIL PROTECTED]>


To:   <[EMAIL PROTECTED]>
cc:   <[EMAIL PROTECTED]>

Subject:  Re: [PHP] Re: Problems compiling LDAP into php 4.0.2


On Wed, 17 Jan 2001 [EMAIL PROTECTED] wrote:

>      I switched from Netscape to Openldap and it now compiles fine.
>Unfortunately Apache bombs when I try to start it with the following
error:
>
>Syntax error on line 237 of /usr/local/apache/conf/httpd.conf:
>Cannot load /usr/local/apache/libexec/libphp4.so into server:
>/usr/local/apache/libexec/libphp4.so: undefined symbol: ldap_value_free

You're probably using some 2.x.x version of OpenLDAP?
You should then upgrade PHP to 4.0.4pl1. And then the Netscape
LDAP SDK should work ok too.

--Jani









So what editor is recommended?  I'm a little familiar with Emacs (kinda
cool, but I'm use to keywords and such being colored - as in Interdev).

Thanks!





Karl J. Stubsjoen wrote:
> So what editor is recommended?  I'm a little familiar with Emacs (kinda
> cool, but I'm use to keywords and such being colored - as in Interdev).

Try emacs with a php-mode (there are several, search for them).

Wagner

-- 
One maniac alone can do what 20 together cannot




There is no recommended editor.  Use whatever you like, as long as it
stores the files in plain text.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer

On Thu, 18 Jan 2001, Karl J. Stubsjoen wrote:

> Date: Thu, 18 Jan 2001 08:02:44 -0700
> From: Karl J. Stubsjoen <[EMAIL PROTECTED]>
> To: PHP Mailing List <[EMAIL PROTECTED]>
> Subject: [PHP] PHP Editors
> 
> So what editor is recommended?  I'm a little familiar with Emacs (kinda
> cool, but I'm use to keywords and such being colored - as in Interdev).
> 
> 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]
> 
> 





no i work in PHPEd from www.soysal.com/PHPEd for win 9x/2000

romaN

-----Original Message-----
From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 4:03 PM
To: PHP Mailing List
Subject: [PHP] PHP Editors




So what editor is recommended?  I'm a little familiar with Emacs (kinda
cool, but I'm use to keywords and such being colored - as in Interdev).

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]





From: "Ignacio Vazquez-Abrams" <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 11:33 PM


> On Wed, 17 Jan 2001, Carsten Gehling wrote:
>
> > Is there a way to programatically enable the register_globals option for
a
> > php-script?
> >
> > For certain reasons I have the register_globals option set to "Off".
> > However, phpMyAdmin will not work unless it is set to "On" therefore, I
> > thought of making a check in the "config.inc.php" if the option is set,
and
> > if not, set it.
> >
> > Is there a function that I can call?
> >
> > - Carsten
> >
>
> Ugh. Don't do it that way. Instead use <Directory>, <Location>, or
.htaccess
> to turn it on for phpMyAdmin.

Hmmm... Can you exlpain it a bit more? Cause I frankly don't understand what
mean ;-)

BTW: You may want to know that I run Win2k and IIS 5.0, not Linux/Apache

- Carsten






What's the syntax to turn on magic_quotes_gpc in .htaccess?

Mike

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


On Tue, 16 Jan 2001, Kevin Cawthorne wrote:

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

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

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>


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




Karl,

I suggest Ultraedit (on the PC) at http://www.ultraedit.com.  I use it along
side Dreamweaver with good results and good organization.  Ultraedit (out of
the box) does not know about PHP; you configure it with one of the several
wordlist files and then you will have syntax highlighting.  I try to use
Dreamweaver to organize and FTP the files back and forth from server to
workstation.  However, I have frequently used the built in FTP Load/Save
ability in Ultraedit; This is a great timesaver.

All of this is besides the point if you already know another editor like
Emacs where finding a PHP mode in that editor will get you going full speed
in less time.

Still, an editor is just an editor so I will suggest at least looking at
Ultraedit.  If you have any problems configuring the wordlist (a tedious
task) please feel free to email me off list and I will help you as best I
can.

Regards.
John

>
> So what editor is recommended?  I'm a little familiar with Emacs (kinda
> cool, but I'm use to keywords and such being colored - as in Interdev).
>
> Thanks!
>





ciao


Reply via email to