Re: [PHP] is it safe to stripslashes() on all form variables?

2001-04-17 Thread Yasuo Ohgaki
Previous post does not address how to avoid making this kind of security hole.

Anyway, if anyone want to avoid creating security hole like this. Do not
stripslashes() added by magic_quote. If you use stripslashes(), use addslashes()
again. If you do not use magic_quote, use addslashes() before feeding to
database, shell or whatever that might be dangerous w/o slashes.

Disabling magic quote will reduce amount of code and increase performance a
little, unless application is very small. Without magic_quote, script does not
have to get rid of slashes to use value from browser and add slashes again
before feeding to database. Code would be cleaner and easier to read also.
(Especially for programmers are not used to PHP.)

Hope this helps someone.
--
Yasuo Ohgaki


""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
9bg8tl$rvl$[EMAIL PROTECTED]">news:9bg8tl$rvl$[EMAIL PROTECTED]...
> If you strip slashes, it will make a security hole.
>
> For example,
>
> SELECT * FROM tablename WHERE name = '$name';
> what if $name is
> \'garbage\';DROP TABLE tablename;SELECT \'something
>
> After stripslashes($name)
> SELECT * FROM table WHERE name = 'garbage';DROP TABLE tablename;SELECT
> 'something';
>
> Regards,
> --
> Yasuo Ohgaki
>
>
> ""Noah Spitzer-Williams"" <[EMAIL PROTECTED]> wrote in message
> 9bf7ec$m1m$[EMAIL PROTECTED]">news:9bf7ec$m1m$[EMAIL PROTECTED]...
> > would there be any problems caused if i used the stripslashes() function on
> > all posted variables from a form to eliminate sql query errors?
> >
> >  - Noah
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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


RE: [PHP] is it safe to stripslashes() on all form variables?

2001-04-17 Thread Jason Murray
> Disabling magic quote will reduce amount of code and increase
> performance a little, unless application is very small. Without
> magic_quote, script does not have to get rid of slashes to use
> value from browser and add slashes again before feeding to
> database. Code would be cleaner and easier to read also.
> (Especially for programmers are not used to PHP.)

And, you should never assume magic quotes is on or off. If you're
developing for an environment you cannot control, but using an 
environment that you CAN control, you should code around magic 
quotes' presence or absence as neccessary:



This code would happily exist on servers both with and without 
magic quotes enabled.

Jason 

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


Re: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Alexander Skwar

So sprach Shaun am Mon, Apr 16, 2001 at 06:53:40PM -0500:
> this
> while($row = mysql_fetch_object($rs)){
>  echo ''; 
>  echo $device; 
>   echo '\n'; 
>} 
> 
> should be

while($row = mysql_fetch_object($rs)){  
 echo '';  
 echo $row->device; 
echo '\n';
   }  
  
*G*

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 10 hours 19 minutes

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




Re: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Alexander Skwar

So sprach Jason Murray am Tue, Apr 17, 2001 at 11:55:44AM +1000:
> Brief correction.
> 
> >   while($row = mysql_fetch_row($rs))
> 
>  ^^^ should be "array".

Why should it be array and not, let's say, object?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 10 hours 20 minutes

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




RE: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Jason Murray

> > >   while($row = mysql_fetch_row($rs))
> > 
> >  ^^^ should be "array".
> 
> Why should it be array and not, let's say, object?

Because I went on to use it as if I'd used fetch_array in the rest
of the example code, I'd wager. 

:)

Jason

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




Re: [PHP] baffled :<:

2001-04-17 Thread Plutarck

In the loop, try using print_r($myarray) in the loop to see if the data is
in there at all.

Other than that, switch the while loop to:

while ($myrow = mysql_fetch_assoc($result)) {


That should fix it...


--
Plutarck
Should be working on something...
...but forgot what it was.


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> can any one see a problem with this loop?
>
>$db = include"connect.inc";
> $foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card";
>
>  $result = mysql_query($foo,$db);
>
>
> while ( ($myrow = mysql_fetch_array($result) ) ) {
>
> $id = $myrow["id"];
> $card = $myrow["card"];
> $serial = $myrow["serial"];
> $avail = $myrow["avail"];
> $pn = $myrow["pn"];
> $cat = $myrow["cat"];
> $box = $myrow["box"];
> $quote = $myrow["quote"];
> }
> ?>
>
> if i call say just $card it only displays the one record (the last one),
the minute i try to call $myrow["card"]; i get nothing at all... any idea's?
>
> I have script identical to this that works perfectly .. only difference is
this one has different names for the values
>
> Peter Houchin
> [EMAIL PROTECTED]
> =
>  _  __   /\
> /_/_/_\/  |_/  \
>/_/_/___  __  __   __  / \
>\_/_/_\  /_/ /_/ /_/  /_/  \   _ /
>  ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/
>  \_//_/_/ /_/_/_/ /_/ \/_/v
>     
> /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>/_/_ _/_/ __  __   __  /_/   __ __
>   /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\/_//_/_/_/
>  /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
> /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/
> =
> Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
> * We rent the dot in .COM!  **
>



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




[PHP] How to unsubscribe

2001-04-17 Thread Joachim Fuchs

How to unsubscribe?
In typical lists, there is a small info how to unsubscribe. In the
php-general list, this is not the case.
Several effords failed.
Who can unsubscribe "manually"?
Best regards,
Joachim
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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




Re: [PHP] ZOPE PHP

2001-04-17 Thread elias

what is ZOPE?
can you give me a URL about it?

-elias
""Romulo Roberto Pereira"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello!
>
> Any comments in PHP for Zope? I don't know much thought... Some people
told
> me that Zope is good a while ago... And I saw that know they have a PHP
> layer... How good is this?
>
> Thank you,
>
> Rom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




RE: [PHP] How to unsubscribe

2001-04-17 Thread Maxim Maletsky

See the footer below...


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Joachim Fuchs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 5:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to unsubscribe


How to unsubscribe?
In typical lists, there is a small info how to unsubscribe. In the
php-general list, this is not the case.
Several effords failed.
Who can unsubscribe "manually"?
Best regards,
Joachim
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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

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




Re: [PHP] How to unsubscribe

2001-04-17 Thread Felix Kronlage

On Tue, Apr 17, 2001 at 10:40:07AM +0200, Joachim Fuchs wrote:

> In typical lists, there is a small info how to unsubscribe. In the
> php-general list, this is not the case.

take a look at the signature:

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

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 


-- 
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-CVS] cvs: CVSROOT / avail

2001-04-17 Thread Thies C. Arntzen

thies   Tue Apr 17 00:31:36 2001 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  fix my own karma
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.146 CVSROOT/avail:1.147
--- CVSROOT/avail:1.146 Sat Apr 14 01:26:21 2001
+++ CVSROOT/avail   Tue Apr 17 00:31:35 2001
@@ -5,7 +5,7 @@
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,mboeren,fireclaw,jmcastagnetto|php4/pear,pearweb,pear
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin|php4,php3,php31,phpfi
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin,hholzgra|functable
-avail|rasmus,sterling,jimw,ssb|pres
+avail|rasmus,sterling,jimw,ssb,thies|pres
 
avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,dbenson,bmcadams,swm,zhang,kevin,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective,mboeren,ufux,virtual,fireclaw,hadar_p,asautins,dbenson|phpdoc
 avail|andrei,fmk,zimt,jan,changelog,miester|php-gtk



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




RE: [PHP] Dynamic built web pages administration

2001-04-17 Thread Maxim Maletsky

We all are working on something like this.

Search Source Forge to get some better ideas.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Romulo Roberto Pereira [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 3:53 PM
To: Php-General
Subject: [PHP] Dynamic built web pages administration


Hello,

I was wondering if anybody have developed something related to dynamic web
pages building and administration. I need to store the content of the site
in the database and later as the user navigate, mount the content using
templates. This part is easy, since PHP is very powerfull in this area. My
problem would be to let the user modify the actual page content... how? any
ideas?

TIA,

Rom


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

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




RE: [PHP] How to unsubscribe

2001-04-17 Thread B. van Ouwerkerk

At 17:56 17-4-01 +0900, Maxim Maletsky wrote:
>See the footer below...

Yeah, or learn to read headers:
list-help: 
list-unsubscribe: 
list-post: 

You see..

Bye,


B.


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




[PHP] RE: A slightly amusing, though mostly dangerous, endless loop

2001-04-17 Thread Greig, Euan

Is the anti-recursion feature you mention automatically activated or do you need to 
configure it to take effect?

This error with print_r is documented in the manual, but would still be (have been) an 
easy trap to fall into!

-Original Message-
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: 14 April 2001 12:59
To: [EMAIL PROTECTED]
Subject: A slightly amusing, though mostly dangerous, endless loop


This is a bug which was apparently fixed in v 4.0.4pl1 at least, but it
still present in 4.0.3

I just found it kind of amusing and it makes a nice warning.

Consider this:

print_r($GLOBALS);


That's it. It prints all the variables available, however part of it is an
array called GLOBALS. Which then prints all available variables, including
an array called GLOBALS...

And it will continue until you hit the Stop button or until the script times
out. But if you have ignore.user.abort on, it will continue till it times
out. If you've screwed with your scripts timeout settings...

...so be wary of that, and ensure you don't try and print out the variables
available in GLOBALS in older versions of PHP. It was fixed with the
anti-recursion feature, which automatically breaks endless loops.



--
Plutarck
Should be working on something...
...but forgot what it was.






**
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**

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




[PHP] 'Embedding' a PDF file

2001-04-17 Thread Alexis Antonakis

Hi,

I've got a couple of questions relating to PDF files.

Firstly, to display a PDF file in your browser, I presume that you must have
a 'plug-in' installed?

Secondly, is it possible to display a PDF file within a table, as I have
only ever seen them fill up the entire browser?

TIA
Alexis


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




RE: [PHP] 'Embedding' a PDF file

2001-04-17 Thread Henrik Johansson

Hi alexis.

Yes, with Internet Explorer equipped with the shell-integration component in
a Windows
environment, this is possible with the Adobe Acrobat plugin.
For Netscape, this is not currently (to my knowledge) an option.
Further, to display a pdf-document in only a part of IE, the easiest way, i
guess, would be
to use frames as a base for Your HTML/PHP-documents.

Best Regards,
Henrik Johansson! 

> --
> From: Alexis Antonakis[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: den 17 april 2001 11:32
> To:   Php-General@Lists. Php. Net
> Subject:  [PHP] 'Embedding' a PDF file
> 
> Hi,
> 
> I've got a couple of questions relating to PDF files.
> 
> Firstly, to display a PDF file in your browser, I presume that you must
> have
> a 'plug-in' installed?
> 
> Secondly, is it possible to display a PDF file within a table, as I have
> only ever seen them fill up the entire browser?
> 
> TIA
> Alexis
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



Re: [PHP] ZOPE PHP

2001-04-17 Thread Felix Kronlage

On Tue, Apr 17, 2001 at 11:51:52AM -0700, elias wrote:

> what is ZOPE?

Content Management System (CMS) written in python, I believe.

> can you give me a URL about it?

http://www.zope.org/

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 

 PGP signature


Re: [PHP] ZOPE PHP

2001-04-17 Thread Moody

Look at http://www.zope.org
and http://weblogs.userland.com/zopeNewbies/

have fun :-)

Moody

- Original Message -
From: "elias" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 7:51 PM
Subject: Re: [PHP] ZOPE PHP


> what is ZOPE?
> can you give me a URL about it?
>
> -elias
> ""Romulo Roberto Pereira"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello!
> >
> > Any comments in PHP for Zope? I don't know much thought... Some people
> told
> > me that Zope is good a while ago... And I saw that know they have a PHP
> > layer... How good is this?
> >
> > Thank you,
> >
> > Rom
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Dynamic built web pages administration

2001-04-17 Thread Dean Hall

Rom.

""Romulo Roberto Pereira"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I was wondering if anybody have developed something related to dynamic web
> pages building and administration. I need to store the content of the site
> in the database and later as the user navigate, mount the content using
> templates. This part is easy, since PHP is very powerfull in this area. My
> problem would be to let the user modify the actual page content... how?
any
> ideas?
>
> TIA,
>
> Rom

I don't know if I can answer your question thoroughly in a short space, but
suffice it to say that you'd have to provide web pages (hopefully properly
configured for proper access restrictions) where your users can edit content
in a text area (for instance) that, when submitted, updates the content in
the database.

I'm sure there are some good projects (content management systems) that do
this on SourceForge. I'm writing a web application platform (not on
Sourceforge yet) called WunSite, but content management like this is
optional in mine and is not the focus of WunSite.

Dean.
http://hall.apt7.com



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




Re: [PHP] array_push but with key, value pairs

2001-04-17 Thread Dean Hall

Joseph.

"Joseph Blythe" <[EMAIL PROTECTED]> wrote:
...
> Ok fine, I now have an associative array with a numeric index, but
> hangon I wanted to push the key => value into the array. How would I do
> this, I have tried a couple of things but am having some really crazy
> results ;-)

'array_push' is only useful for numerically-indexed arrays. It's basically a
shortcut for getting the length of the array and putting a value in the last
available spot in an array. It treats the array like a stack.

In an associative array (or hash), the array is indexed by strings, so the
order you input them in is irrelevant (for the most part). I think in PHP
you can actually retrieve the values in the same order as you put them in,
but this does not have to be the case. Hash keys should be arbitrarily
ordered.

> $input = array();
> while ( list($key, $val) = each($HTTP_POST_VARS) ) {
>   if ( $key != "Submit" )  {
>   array_push($input, $val);
>   }
> }

Instead of 'array_push', do this:

$input[$key] = $val;

Dean
http://hall.apt7.com





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




Re: [PHP] set_error_handler()

2001-04-17 Thread Dean Hall

""Boget, Chris"" <[EMAIL PROTECTED]> wrote:
> Can you use the above function to set the error
> handler to a custom class?  If so, how?  I've been
> having no luck no matter what I do...
>
> Chris

Chris.

I tried doing something like:

set_error_handler("Error::handleError");

myself, and to no avail. It seems that the namespace resolution in PHP is
still very primitive. I know "Error::handleError()" will work in normal
context, but it doesn't seem to work in dynamic evaluations. Perhaps when
PHP gets real namespace support.

Dean.
http://hall.apt7.com



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




[PHP] Time needed for a SQL-statement

2001-04-17 Thread B. Tenhumberg

Hi!

Is there a way to get the time the database needed for execution a statement?
I use MySQL and PHP...

-- 
Berthold Tenhumberg
 
(live long and prosper...)

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




RE: [PHP] Time needed for a SQL-statement

2001-04-17 Thread Maxim Maletsky

Have you tried EXPLAIN ?

EXPLAIN
SELECT
*
FROM 
tables
WHERE
this='this' AND
that='that'
ORDER BY
this, that
;

A query like this would return you some of the stats. Catch the time it
gives you and vuale...
not sure though, it might be useless if the time taken to do that is
equivalent as to select pulling the results out. (think it is)


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: B. Tenhumberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 5:44 PM
To: PHP General
Cc: MySQL
Subject: [PHP] Time needed for a SQL-statement


Hi!

Is there a way to get the time the database needed for execution a
statement?
I use MySQL and PHP...

-- 
Berthold Tenhumberg
 
(live long and prosper...)

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

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




[PHP] highlighting search results (revisited)

2001-04-17 Thread Matt Williams

I am trying to write a little search script to search a mysql db.

I would like to highlight the search words for the displayed results, like
sourceforge etc...

After a little help, I have got it to hightlight when searching for one
word. The problem is if I do a search for more than one word it repeats the
hightlighting.

here's the code I got so far

$bg = explode("%",$string);
while($db->next_record())
{
$title = $db->f("title");
$des = $db->f("description");
for($z=0; $z <  count($bg); $z++)
{
if(next($bg) == false)
{
reset($bg);
}
$bgstring = current($bg);
$title = preg_replace("/($bgstring+)/ie", "'\\1'", $title);
$des = preg_replace ("/($bgstring+)/ie", "'\\1'", $des);
}
echo $title.NL;
echo $des.NL.NL;

}
The problem is is I search for class or span it screws up the code as it
replaces the span or class in the original tag.

How could I stop this?
I know this another rex ex thing and I'm gonna get the oreilly book when I'm
next in the city but untill then it's driving me bonkers.

TIA

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]




[PHP] Is this kind of code safe?

2001-04-17 Thread Greig, Euan

I was playing around with various ways of doing conditional output of text, and I 
tried the following. 


   value is a

   value is not a


It seems to work, ie it outputs different text depending on the value of $test. But is 
it safe, can I rely on this behaviour? Maybe I just missed something somewhere, but I 
thought I would have to use echo or print in such circumstances. It'll be nice if I 
was wrong.

Euan Greig
Technical Consultant
BRANN DATA
[EMAIL PROTECTED]
01285 645997





**
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**

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




RE: [PHP] Is this kind of code safe?

2001-04-17 Thread Jason Murray

>  $test="b";
> if ($test=="a"):
> ?>
>value is a
>  else:
> ?>
>value is not a
>  endif;
> ?>
> 
> It seems to work, ie it outputs different text depending on 
> the value of $test. But is it safe, can I rely on this 
> behaviour? 

Yes can rely on it, but I just think it's somewhat ugly. If I'm combing
through a file looking for outputs, stepping through multiple ?> and http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Is this kind of code safe?

2001-04-17 Thread Greig, Euan

Thanks for that Jason (and so quick!). I agree it's ugly, but I can see it being 
useful occasionally.

Euan

-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: 17 April 2001 12:38
To: 'Greig, Euan'; [EMAIL PROTECTED]
Subject: RE: [PHP] Is this kind of code safe?


>  $test="b";
> if ($test=="a"):
> ?>
>value is a
>  else:
> ?>
>value is not a
>  endif;
> ?>
> 
> It seems to work, ie it outputs different text depending on 
> the value of $test. But is it safe, can I rely on this 
> behaviour? 

Yes can rely on it, but I just think it's somewhat ugly. If I'm combing
through a file looking for outputs, stepping through multiple ?> and http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] RFC: Storing User Info

2001-04-17 Thread Christian Reiniger

On Monday 16 April 2001 20:41, you wrote:
> I'm looking for comments on this one.  I'm developing a site that
> will have user logins on it.  What's the best way to do this?  What to
> store, and how?
>
> - Are people more inclined to use a username when they need to log
>   in to something, or would asking for an email (as the userID) be
>   better?

Use usernames. Some people have email addresses with about 50 chars 
(students at my uni e.g. get one like 
[EMAIL PROTECTED]). Nobody likes to type that 
each time to log in.

> - How about storing passwords?  All of this info will be stored in
>   an MySQL DB.  How do admins generally do this type of stuff?
>   Encrypt the password stored in the DB, and decrypt it on the fly
>   to compare?  Store it in plain text?  Or store it encrypted,
>   and when the user logs in, encrypt that passwd (from the form)
>   and compare the strings?  (not sure if the latter would work)

The last one with a one-way encryption function like md5(). That way (1) 
passwords are stored encrypted and (2) encrypted passwords can not be 
decrypted again. And yes, it does work.

> - What about sending people passwords through email?  Like when
>   someone signs up the first time, they supply a passwd.  How do
>   people feel about sending that login information to the user in
>   plain text via email?  Or do you?

That's ok. At least there are no real alternatives yet.

> - What about when the user forgets their login?  Just fetch the
>   info from DB and mail it out to the (registered) email address?

Yup

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

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

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

2001-04-17 Thread Dennis Haller

Hi all,
I've got this problem with variables. In the code below I've got the
variables: $jaar and $vak, if I echo them they r displayed correctly, but if
the function unlink is called it doesnt seem to know what $jaar and $vak
are. If I do $the_path = "/home/H0RNET/ftp/jaar1/PRO/";  then the function
unlink works just fine.
Do I have to declare the 2 variables again? What is the problem here?

Thx,
H0RNET




";
while ($file = $handle->read()) {
if (($file != ".") && ($file != "..")) {
$con = <<$file

DELETE
giveup;
$upl = $upl."$con";
  }
}
$upl = $upl."";

echo $upl;
?>




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




Re: [PHP] php like cgi

2001-04-17 Thread Christian Reiniger

On Monday 16 April 2001 22:40, you wrote:
> Hi..
>
>   I'm tring to use a php-script like cgi, but the only thing i got is
> "Internal Server Error..."
>
>  That's my test-script..
> ---
> #!/bin/php -q

Are you 100% sure that it's /bin/php ? That's a pretty unusual location 
for PHP to be installed in. /usr/bin/php or /usr/local/bin/php are the 
common ones


>
>   echo "Content-type: text/html\n\n";

unneccessary if you leave out the -q

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

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

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




Re: [PHP] Speed of MySQL connections - Socket vs. Non-Socket

2001-04-17 Thread Christian Reiniger

On Tuesday 17 April 2001 02:10, you wrote:
> So sprach Brian Clark am Mon, Apr 16, 2001 at 08:01:04PM -0400:
> > Ahhh, yes, I see that was stupid. Sorry, Alexander. :)
>
> Ah, thanks Joe for clearing up this confusion :))
>
> Now that this is sorted out:  What might be the best way to do some
> benchmarking wrt. this?  (Links are fine)

run "ab" (comes with apache) on two scripts, one using method A 
repeatedly, the other using method B repeatedly

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

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

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




RE: [PHP] set_error_handler()

2001-04-17 Thread Boget, Chris

> ""Boget, Chris"" <[EMAIL PROTECTED]> wrote:
> > Can you use the above function to set the error
> > handler to a custom class?  If so, how?  I've been
> > having no luck no matter what I do...
> I tried doing something like:
> set_error_handler("Error::handleError");
> myself, and to no avail. It seems that the namespace 
> resolution in PHP is still very primitive. I know 
> "Error::handleError()" will work in normal context, 
> but it doesn't seem to work in dynamic evaluations. 
> Perhaps when PHP gets real namespace support.

Well, in the mean time, I found a way around it that
seems to work ok. :P  What I did is included in the
last message I sent in this thread.

Chris



[PHP] php equivalent for `command`

2001-04-17 Thread Greig, Euan

Is there a php equivalent for the use of ` (I think) in Unix/Perl? So for example echo 
"`$x++`" would first evaluate $x++ and then print the resulting value.

Euan Greig
Technical Consultant
BRANN DATA
[EMAIL PROTECTED]
01285 645997





**
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**

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




Re: [PHP] cgi vs. module

2001-04-17 Thread Christian Reiniger

On Tuesday 17 April 2001 07:10, you wrote:
> RE: PHP as a CGI or Module
>
> This has been discussed some but I am interested to see if one is more
> popular then the other.  My experience has been most people run PHP as
> a apache module but is there a specific benefit to run it as a cgi
> program?  

Modules are *way* faster (I haven't done benchmarks myself, but heard of 
a 10x speed increase compared to CGIs)

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

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

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




Re: [PHP] baffled :<:

2001-04-17 Thread Christian Reiniger

On Tuesday 17 April 2001 07:59, you wrote:
> can any one see a problem with this loop?

> while ( ($myrow = mysql_fetch_array($result) ) ) {
> 
> $id = $myrow["id"];
> $card = $myrow["card"];
> $serial = $myrow["serial"];
> $avail = $myrow["avail"];
> $pn = $myrow["pn"];
> $cat = $myrow["cat"];
> $box = $myrow["box"];
> $quote = $myrow["quote"];
> }
> ?>
> 
> if i call say just $card it only displays the one record (the last
> one), the minute i try to call $myrow["card"]; i get nothing at all...
> any idea's?
 

Sure. Let's say you pull 4 records from the DB, with the "card" field set 
to "A", "B", "C" and "D" respectively. Now you loop over the records, 
setting $card to "A", then setting $card to "B", then to "C" and finally 
to "D". In other words: in each iteration you overwrite all previous 
values

> I have script identical to this that works perfectly .. only difference
> is this one has different names for the values
 

I don't believe that, sorry :)

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

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

--
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] Running php as a CGI

2001-04-17 Thread Boget, Chris

We compiled PHP to be used as a CGI and it's
working great.  However, whenever we run a
php script, the following message gets outputted
at the start of the output:

"X-Powered-By: PHP/4.0.3pl1
Content-type: text/html"

Is there any way we can suppress that message?
I looked all over the docs and missed that info if
it's there.  If the details on how to suppress this
is in the documentation, a link would be most
appreciated (or a link to anywhere else that might
have this info).  Otherwise, any insight would 
be greatly appreciated!

Chris



[PHP] Mail help!!!!!

2001-04-17 Thread Bruno Freire

Hi! My name is Bruno.

Somebody can tell me how to send the same message to more than one recipient
without repeat de code??

something like

  $corpo.="\n";
  $corpo.="\tData de Saída:\t\t$dt_saida\n\n\n";
  $corpo.="\tClique no link abaixo para visualização da Folha de
Cotação:\n\n";
  $corpo.="\t";
  $remetente="From: [EMAIL PROTECTED]";
  mail(email_one and email_two,$assunto,$corpo,$remetente);


and not 

  $corpo.="\n";
  $corpo.="\tData de Saída:\t\t$dt_saida\n\n\n";
  $corpo.="\tClique no link abaixo para visualização da Folha de
Cotação:\n\n";
  $corpo.="\t";
  $remetente="From: [EMAIL PROTECTED]";
  mail($email_ONE,$assunto,$corpo,$remetente);

  $corpo.="\n";
  $corpo.="\tData de Saída:\t\t$dt_saida\n\n\n";
  $corpo.="\tClique no link abaixo para visualização da Folha de
Cotação:\n\n";
  $corpo.="\t";
  $remetente="From: [EMAIL PROTECTED]";
  mail($email_TWO,$assunto,$corpo,$remetente);



Re: [PHP] Mail help!!!!!

2001-04-17 Thread Johannes Janson

Hi,

I think you can put more than one recipient into the mail-function
by seperating them with a ",". Look in the manual for detailed info.

Johannes

"Bruno Freire" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
454D444FF5C0D211891800A0C98C7D90359A44@SERVIDOR">news:454D444FF5C0D211891800A0C98C7D90359A44@SERVIDOR...
Hi! My name is Bruno.

Somebody can tell me how to send the same message to more than one recipient
without repeat de code??

something like

  $corpo.="\n";
  $corpo.="\tData de Saída:\t\t$dt_saida\n\n\n";
  $corpo.="\tClique no link abaixo para visualização da Folha de
Cotação:\n\n";
  $corpo.="\t";
  $remetente="From: [EMAIL PROTECTED]";
  mail(email_one and email_two,$assunto,$corpo,$remetente);


and not

  $corpo.="\n";
  $corpo.="\tData de Saída:\t\t$dt_saida\n\n\n";
  $corpo.="\tClique no link abaixo para visualização da Folha de
Cotação:\n\n";
  $corpo.="\t";
  $remetente="From: [EMAIL PROTECTED]";
  mail($email_ONE,$assunto,$corpo,$remetente);

  $corpo.="\n";
  $corpo.="\tData de Saída:\t\t$dt_saida\n\n\n";
  $corpo.="\tClique no link abaixo para visualização da Folha de
Cotação:\n\n";
  $corpo.="\t";
  $remetente="From: [EMAIL PROTECTED]";
  mail($email_TWO,$assunto,$corpo,$remetente);




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




Re: [PHP] Job in Whistler, BC

2001-04-17 Thread Pierre-Yves Lemaire

Last time I worked there I had to sleep in my car for a month!
No housing...
Skied like hell tho :)



At 09:33 PM 4/16/01 -0700, you wrote:


>   You'll probably won't get to see the now :-<.
>
>
>__John Monfort_
>_+---+_
>  P E P I E  D E S I G N S
>www.pepiedesigns.com
>"The world is waiting, are you ready?"
>-+___+-
>
>On Mon, 16 Apr 2001, Mark Maggelet wrote:
>
> > On Mon, 16 Apr 2001 20:00:27 -0700, Dddogbruce \(@home.com\)
> > ([EMAIL PROTECTED]) wrote:
> > >Whistler's cool!
> >
> > Yeah, and a php job at a ski resort?! Hmm, that's way too good to be
> > true.
> >
> >
> > --
> > 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]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


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




RE: [PHP] cookies

2001-04-17 Thread Grimes, Dean

Are you using IE 5.01 by chance? I was having very strange problems with
cookies and headers. 5.00 and 5.5 both worked without problems, however 5.01
has some real bugs. Some of the problems I was having included: cookies not
deleting, executing headers caused PHP to behave abnormally and other
unexplainable random problems. I had these problems on both Win9x and NT but
after upgrading to 5.5 all of the problems went away. Just for the heck of
it I tested 5.00 as well and had no problems.

Good luck,

Dean




-Original Message-
From: Pat Hanna [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 5:13 PM
To: php help
Subject: [PHP] cookies


I'm setting cookies for a shopping cart and they are setting fine but they
will not delete. I've tried every way of deleting them and they just won't
go away. Someone please help.
--
Patrick Hanna
Database integration--E-commerce solutions
The Wentworth Company

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




RE: [PHP] PHP4.0.4pl1+PdfLib3.03+SCO

2001-04-17 Thread Grimes, Dean

I had the exact same problem Haven't had time to work it though.

-Original Message-
From: Chris Fry [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 3:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP4.0.4pl1+PdfLib3.03+SCO


Pdflib 3.03 compiles OK and builds a static library -
/usr/local/lib/libpdf.a.

PHP fails to configure - cannot find PDF_show_boxed in the library -
pdflib extension requires pdflib 3.x.

This command is in the library and the header file. Configure finds my
tiff & jpeg library (--with-tiff-dir=/usr/local
--with-jpeg-dir=/usr/local) but is either not finding the library
(--with-pdflib=/usr/local) or is not able to find PDF_show_boxed in the
library.

Can anyone help??

Chris

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.



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

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




Re: [PHP] Running php as a CGI

2001-04-17 Thread Knut H. Hassel Nielsen

On Tue, 17 Apr 2001, Boget, Chris wrote:

> We compiled PHP to be used as a CGI and it's
> working great.  However, whenever we run a
> php script, the following message gets outputted
> at the start of the output:
>
> "X-Powered-By: PHP/4.0.3pl1
> Content-type: text/html"
>
> Is there any way we can suppress that message?
> I looked all over the docs and missed that info if
> it's there.  If the details on how to suppress this
> is in the documentation, a link would be most
> appreciated (or a link to anywhere else that might
> have this info).  Otherwise, any insight would
> be greatly appreciated!
>
> Chris
>

Yup!

Just run it with the flag '-q' to QUELL HTML-headers.

Example :

 #! /path/to/php -q
 

Or just run them with 'php -q script_name'

Good luck

-- 
Knut
--
Knut H. Hassel Nielsen
Principal Engineer / Avdelingsingeniør
Norwegian University of Science and Technology / NTNU
Department of Computer and Information Science / IDI
N-7491 Trondheim, Norway
Phone Office / Telefon jobb : (+47) 73 59 18 46
Fax   Office / Telefax jobb : (+47) 73 59 17 33
Cell. Phone / Mobiltelefon  :   91 59 86 06


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




Re: [PHP] baffled :<:

2001-04-17 Thread John Lim


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> can any one see a problem with this loop?
>
>$db = include"connect.inc";
> $foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card";
>
>  $result = mysql_query($foo,$db);
>
>
> while ( ($myrow = mysql_fetch_array($result) ) ) {
>
> $id = $myrow["id"];
> $card = $myrow["card"];
> $serial = $myrow["serial"];
> $avail = $myrow["avail"];
> $pn = $myrow["pn"];
> $cat = $myrow["cat"];
> $box = $myrow["box"];
> $quote = $myrow["quote"];
> }

If you are doing print $myrow["card"] here, $myrow at this point is false,
so that's why you see nothing. It's reset to false by the final $myrow =
mysql_fetch_array($result).

Here's wishing you more sleep and less debugging next time :-)

Regards, John

> ?>
>
> if i call say just $card it only displays the one record (the last one),
the minute i try to call $myrow["card"]; i get nothing at all... any idea's?
>
> I have script identical to this that works perfectly .. only difference is
this one has different names for the values
>
> Peter Houchin
> [EMAIL PROTECTED]
> =
>  _  __   /\
> /_/_/_\/  |_/  \
>/_/_/___  __  __   __  / \
>\_/_/_\  /_/ /_/ /_/  /_/  \   _ /
>  ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/
>  \_//_/_/ /_/_/_/ /_/ \/_/v
>     
> /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>/_/_ _/_/ __  __   __  /_/   __ __
>   /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\/_//_/_/_/
>  /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
> /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/
> =
> Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
> * We rent the dot in .COM!  **
>



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




[PHP] Reauthenticate

2001-04-17 Thread Marcelo Pereira

Hi All,

I'm in trouble to authenticate each user (using a database).
When the user sucesfully login on your area the php script send a cookie,
and every php script reads this cookie. So when the user log ou the php
script expires the cookie and then the user cannot bookmark the page and
turn back.. but, if the user clicks the 'logout' button, I expire the
cookie e show the main screen, but, by other side, if the user click at
'back button' then he can see the page... I would like to:

- Each page look for the cookie, even if the back button is pressed.
- If the cookie isn't there, then a 'expires page' is showed

Which is the better way to do it ???

Thanks in advance,

Marcelo Pereira
Programmer


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




Re: [PHP] How do i include ASP script into PHP...??!

2001-04-17 Thread John Lim

Easy. Just use fopen('http://localhost/file.asp')  then fread the data you
want.  I do this technique to read Access tables from a Linux box.


""Joe Truong"" <[EMAIL PROTECTED]> wrote in message
9bfd8q$gum$[EMAIL PROTECTED]">news:9bfd8q$gum$[EMAIL PROTECTED]...
> How can i include ASP scripts into PHP files or is it posible?
> thanxz
> -Joe
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] Form Field

2001-04-17 Thread Mike

Im trying to pass a form variable to anouther page with the following:
  name="R1">

Everything works fine if there are no spaces(Buffalo) but if there are
spaces ( San Francisco) I only get the first word.I've never had this
problem before and I dont know what I did.Any suggestions?
Thanks
Mike P
[EMAIL PROTECTED]




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




Re: [PHP] Installing PHP Extentions for IIS - W2K - Is it possible?

2001-04-17 Thread John Lim

The PHP developers are a diverse and perverse  group. You can get them from
http://php4win.de


""SED"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I was downloading the latest version of PHP (Win32 Binaries) for IIS
server,
> but no external extensions are included. Why? Is it not supported for IIS
> server?
>
> I'm having great difficulty adding those extensions manually (editing the
> PHP.ini), I always get errors like following example shows (the file sure
is
> there):
>
> Unable to load dynamic library 'C:\PHP\extensions\php_gd.dll'
> - The specified procedure could not be found.
>
> This happens for other extensions also (which I copied from Apache
> PHP_4.0.4pl1.zip download).
>
> Has anyone experienced the problem I'm having - and if so, how did you
> overcome it?
>
> Regards,
> Sumarlidi Einar Dadason
>
> SED - Graphic Design
>
> --
> Phone:   (+354) 4615501
> Mobile:  (+354) 8960376
> Fax: (+354) 4615503
> E-mail:  [EMAIL PROTECTED]
> Homepage:www.sed.is <- New Homepage!
> --
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Form Field

2001-04-17 Thread Marcelo Pereira

Hi,

How about enclose the parameters with quotes ???

See ya,

Marcelo Pereira
Programmer

- Original Message -
From: Mike <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 10:17 AM
Subject: [PHP] Form Field


> Im trying to pass a form variable to anouther page with the following:
>   name="R1"> echo ($row[0][0]); ?>
>
> Everything works fine if there are no spaces(Buffalo) but if there are
> spaces ( San Francisco) I only get the first word.I've never had this
> problem before and I dont know what I did.Any suggestions?
> Thanks
> Mike P
> [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] Form Field

2001-04-17 Thread Picard, Cyril

Try this : 
$urlrow = htmlentities (urlencode($row[0][0]));

name="R1">

(I'm not sure you need urlencode, but htmlentities should help you)




> -Message d'origine-
> De:   Marcelo Pereira [SMTP:[EMAIL PROTECTED]]
> Date: mardi 17 avril 2001 15:35
> À:Mike
> Cc:   [EMAIL PROTECTED]
> Objet:Re: [PHP] Form Field
> 
> Hi,
> 
> How about enclose the parameters with quotes ???
> 
> See ya,
> 
> Marcelo Pereira
> Programmer
> 
> - Original Message -
> From: Mike <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 17, 2001 10:17 AM
> Subject: [PHP] Form Field
> 
> 
> > Im trying to pass a form variable to anouther page with the following:
> >  
> name="R1"> > echo ($row[0][0]); ?>
> >
> > Everything works fine if there are no spaces(Buffalo) but if there are
> > spaces ( San Francisco) I only get the first word.I've never had this
> > problem before and I dont know what I did.Any suggestions?
> > Thanks
> > Mike P
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP 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] Returning part of a string, ereg..

2001-04-17 Thread Chad Day

I'm horrible at regex's, maybe someone can help me out.

What I'm trying to do is parse a string in the format:  number-number-number
(ex.  1-23123-312039128)

I need to pull that second number, regardless of length

This code returns nothing:

$part = ereg("([0-9]{1})-([0-9])-", $f, $regs);

but

$part = ereg("([0-9]{1})-([0-9]{1,10})-", $f, $regs);

will return the number, but I don't want to take a chance and limit it to 10
characters.  I thought the first bit of code would work.. any ideas what is
wrong?

Thanks,
Chad


-- 
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] Persistent connection & many scripts ?

2001-04-17 Thread Picard, Cyril

Hi all
I use PHP to query a PostgreSQL database.
Today I know how to query the database with a PHP script, but I have to
establish a connection to the database in each script.

Is there a way to get the following : 
connect.php : a script where the user enters its login and password, and
connect to the DB by the submit button (submit button which action url is
query.php).
query.php : a script that performs a query using the connection from
connect.php

I know that I could send the login/password to the query.php to establish
the connection ; but it is not what I would like (sometimes - often - the
connection time is bigger than the query time itself !)
Thanks for your help !





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




Re: [PHP] Returning part of a string, ereg..

2001-04-17 Thread Morgan Curley

try
$part = ereg("([0-9]{1})-([0-9]*)-", $f, $regs);

your original exp was looking for 1 digit followed by a dash follwed by 1 
digit followed by a dash

the * should match 0 or more occurences of the previous match ( in this 
case 0 or more numbers )

you shouldn't need the {1} in there either.

morgan

At 09:36 AM 4/17/2001 -0400, Chad Day wrote:
>$part = ereg("([0-9]{1})-([0-9]{1,10})-", $f, $regs);


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




RE: [PHP] How do i include ASP script into PHP...??!

2001-04-17 Thread Jason Murray

> Easy. Just use fopen('http://localhost/file.asp')  then fread 
> the data you want.  I do this technique to read Access tables 
> from a Linux box.

But that gives you the RESULTS of the ASP script, not the script
itself.

Jason

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




Re: [PHP] Reauthenticate

2001-04-17 Thread Plutarck

When using sessions, which you might want to do, PHP automatically sends
header's that tell the user's browser not to bookmark the page.

The reason they can click the back button and see the page is because their
browser is caching the page. If they press the Refresh key they won't be
able to see the page, as long as you check for their cookie on that page
anyway.


So it's not fool proof (nothing is), but use header to send the Pragma:
No-cache setting.

Note: You can't _force_ the browser not to cache the page. You can only
_request_ that it not be cached.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Marcelo Pereira"" <[EMAIL PROTECTED]> wrote in message
006701c0c742$4b843b60$0b01a8c0@hmmg">news:006701c0c742$4b843b60$0b01a8c0@hmmg...
> Hi All,
>
> I'm in trouble to authenticate each user (using a database).
> When the user sucesfully login on your area the php script send a cookie,
> and every php script reads this cookie. So when the user log ou the php
> script expires the cookie and then the user cannot bookmark the page and
> turn back.. but, if the user clicks the 'logout' button, I expire the
> cookie e show the main screen, but, by other side, if the user click at
> 'back button' then he can see the page... I would like to:
>
> - Each page look for the cookie, even if the back button is pressed.
> - If the cookie isn't there, then a 'expires page' is showed
>
> Which is the better way to do it ???
>
> Thanks in advance,
>
> Marcelo Pereira
> Programmer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Persistent connection & many scripts ?

2001-04-17 Thread Plutarck

Ideally you could use pconnect, then save the connection ID into a session.
Then just try and use the connection like that.

That _should_ work. But you may just want to use pconnect and not bother
with the rest...that might be just as good as what you are trying to do.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Picard, Cyril"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all
> I use PHP to query a PostgreSQL database.
> Today I know how to query the database with a PHP script, but I have to
> establish a connection to the database in each script.
>
> Is there a way to get the following :
> connect.php : a script where the user enters its login and password, and
> connect to the DB by the submit button (submit button which action url is
> query.php).
> query.php : a script that performs a query using the connection from
> connect.php
>
> I know that I could send the login/password to the query.php to establish
> the connection ; but it is not what I would like (sometimes - often - the
> connection time is bigger than the query time itself !)
> Thanks for your help !
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] Dynamic Pages and Google ???

2001-04-17 Thread Jon Shoberg


So I was having a conversation with a manager/educator in the IT Industry :)

In a discussion concerning search engines he stated how he dislikes dynamic
web pages (PHP/ASP/JSP/CFM) because search engine spiders 'choke' on dynamic
content or gives those pages a lower ranking.  I can't see this as being
true. I epically can't see the search spider "choking" on dynamic pages
returning well-formed/valid HTML.

Any thoughts?


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




Re: [PHP] php equivalent for `command`

2001-04-17 Thread Plutarck

The backtick operator " ` " is used like an exec() or passthru() function.

But I know what you mean. For instance, try running this in a script:

$n = 1;

echo "The number is: $n++";
echo "The number is: $n++";
echo "The number is: $n++";

PHP will not increment a variable inside of a string. However, now try this:

$n = 1;

echo "The number is: " . $n++ . "";
echo "The number is: " . $n++ . "";
echo "The number is: " . $n++ . "";

But now try this:

$n = 1;

echo "The number is: " . ++$n . "";
echo "The number is: " . ++$n . "";
echo "The number is: " . ++$n . "";


To do what you are wanting to do, just use the post-increment or
pre-increment operators, just like in Perl. Just be aware that PHP will not
do any mathematical functions on variables which are inside of a string.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there a php equivalent for the use of ` (I think) in Unix/Perl? So for
example echo "`$x++`" would first evaluate $x++ and then print the resulting
value.
>
> Euan Greig
> Technical Consultant
> BRANN DATA
> [EMAIL PROTECTED]
> 01285 645997
>
>
>
>
>
> **
> Any opinions expressed in this email are those of the individual and
> not necessarily the Company. This email and any files transmitted with
> it, including replies and forwarded copies (which may contain alterations)
> subsequently transmitted from the Company, are confidential and solely for
> the use of the intended recipient. If you are not the intended recipient
> or the person responsible for delivering to the intended recipient, be
> advised that you have received this email in error and that any use is
> strictly prohibited.
>
> **
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Is this kind of code safe?

2001-04-17 Thread Plutarck

Don't use that on such small outputs, simply for the reason that it's really
hard to read and follow. It also screws up Syntax highlighting.

However, it works just like you would hope it would. When you call an ending
tag, PHP just outputs whatever is there without parsing it. But it doesn't
forget what it was doing, and will pick up right where it left off once you
call an opening tag.

But it can be pretty useful so you don't have to use here-doc printing, or
escape a bunch of things inside of a string.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thanks for that Jason (and so quick!). I agree it's ugly, but I can see it
being useful occasionally.
>
> Euan
>
> -Original Message-
> From: Jason Murray [mailto:[EMAIL PROTECTED]]
> Sent: 17 April 2001 12:38
> To: 'Greig, Euan'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Is this kind of code safe?
>
>
> >  > $test="b";
> > if ($test=="a"):
> > ?>
> >value is a
> >  > else:
> > ?>
> >value is not a
> >  > endif;
> > ?>
> >
> > It seems to work, ie it outputs different text depending on
> > the value of $test. But is it safe, can I rely on this
> > behaviour?
>
> Yes can rely on it, but I just think it's somewhat ugly. If I'm combing
> through a file looking for outputs, stepping through multiple ?> and  tags is very annoying.
>
> Jason
>
>
> **
> Any opinions expressed in this email are those of the individual and
> not necessarily the Company. This email and any files transmitted with
> it, including replies and forwarded copies (which may contain alterations)
> subsequently transmitted from the Company, are confidential and solely for
> the use of the intended recipient. If you are not the intended recipient
> or the person responsible for delivering to the intended recipient, be
> advised that you have received this email in error and that any use is
> strictly prohibited.
>
> **
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP-CVS] cvs: php4 /ext/odbc php_odbc.c

2001-04-17 Thread Sterling Hughes

On Tue, 17 Apr 2001, Jani Taskinen wrote:

> On Mon, 16 Apr 2001, Sterling Hughes wrote:
>
> >>
> >> -#ifndef HAVE_DBMAKER
> >> -  if ((*pv_onoff)) {
> >> -#else
> >>if (pv_onoff && (*pv_onoff)) {
> >> -#endif
> >>convert_to_long_ex(pv_onoff);
> >>rc = SQLSetConnectOption(conn->hdbc, SQL_AUTOCOMMIT,
> >> 
>((*pv_onoff)->value.lval) ?
> >>
> >
> >This should be breaking something, no?
> >
> >Either way an "if" statement is started therefore it needs to be finished.
> >
>
> Maybe you should get thicker glasses? :)
>
> #ifndef <-- see this ? :-p
>

Maybe *you* need glasses :)

#ifndef HAVE_DBMAKER
if ((*pv_onoff)) {
#else
if (pv_onoff && (*pv_onoff)) {
#else

Either way an "if" block is started but not finished.

As Dan pointed out, it looks as if the diff got truncated.

-Sterling


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




Re: [PHP] PHP4.0.4pl1+PdfLib3.03+SCO

2001-04-17 Thread Paul Gardiner

Hello again Dean, Chris,

Snap I'm afraid. I didn't spend too much time on it but it's on the list of
things to do. If I manage to get any further I'll let you know.

If this is urgent though Chris, let me know your exact configure/build
procedure and which versions you're using of the tiff, jpeg etc and also how
you built these. As there's not as many of us on SCO it maybe better if we
put our heads together to get it sorted - you know what they say :o)

Best regards,
- Paul -

- Original Message -
From: "Grimes, Dean" <[EMAIL PROTECTED]>
To: "'Chris Fry'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 1:36 PM
Subject: RE: [PHP] PHP4.0.4pl1+PdfLib3.03+SCO


> I had the exact same problem Haven't had time to work it though.
>
> -Original Message-
> From: Chris Fry [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 16, 2001 3:26 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP4.0.4pl1+PdfLib3.03+SCO
>
>
> Pdflib 3.03 compiles OK and builds a static library -
> /usr/local/lib/libpdf.a.
>
> PHP fails to configure - cannot find PDF_show_boxed in the library -
> pdflib extension requires pdflib 3.x.
>
> This command is in the library and the header file. Configure finds my
> tiff & jpeg library (--with-tiff-dir=/usr/local
> --with-jpeg-dir=/usr/local) but is either not finding the library
> (--with-pdflib=/usr/local) or is not able to find PDF_show_boxed in the
> library.
>
> Can anyone help??
>
> Chris
>
> --
> Chris Fry
> Quillsoft Pty Ltd
> Specialists in Secure Internet Services and E-Commerce Solutions
> 10 Gray Street
> Kogarah
> NSW  2217
> Australia
>
> Phone: +61 2 9553 1691
> Fax: +61 2 9553 1692
> Mobile: 0419 414 323
> eMail: [EMAIL PROTECTED]
> http://www.quillsoft.com.au
>
> You can download our Public CA Certificate from:-
> https://ca.secureanywhere.com/htdocs/cacert.crt
>
> **
>
> This information contains confidential information intended only for
> the use of the authorised recipient.  If you are not an authorised
> recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> e-mail.
> In this case, you should not read, print, re-transmit, store or act
> in reliance on this e-mail or any attachments, and should destroy all
> copies of them.
> This e-mail and any attachments may also contain copyright material
> belonging to Quillsoft Pty Ltd.
> The views expressed in this e-mail or attachments are the views of
> the author and not the views of Quillsoft Pty Ltd.
> You should only deal with the material contained in this e-mail if
> you are authorised to do so.
>
> This notice should not be removed.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] working with SSL

2001-04-17 Thread phpman

How do I establish an SSL socket connection with PHP?
I have PHP compiled in an Apache Mod_SSL server. Do I need to compile PHP
with
some sort of open_ssl option? I have --enable-sockets in the command line.
Please help!!!

-dave





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




RE: [PHP] Persistent connection & many scripts ?

2001-04-17 Thread Picard, Cyril

Yes... I'm not familiar with sessions. This should be like this ? : 

In connect.php : 
clique ici
?>

In query.php



> -Message d'origine-
> De:   Plutarck [SMTP:[EMAIL PROTECTED]]
> Date: mardi 17 avril 2001 16:03
> À:[EMAIL PROTECTED]
> Objet:Re: [PHP] Persistent connection & many scripts ?
> 
> Ideally you could use pconnect, then save the connection ID into a
> session.
> Then just try and use the connection like that.
> 
> That _should_ work. But you may just want to use pconnect and not bother
> with the rest...that might be just as good as what you are trying to do.
> 
> 
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
> 
> 
> ""Picard, Cyril"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi all
> > I use PHP to query a PostgreSQL database.
> > Today I know how to query the database with a PHP script, but I have to
> > establish a connection to the database in each script.
> >
> > Is there a way to get the following :
> > connect.php : a script where the user enters its login and password, and
> > connect to the DB by the submit button (submit button which action url
> is
> > query.php).
> > query.php : a script that performs a query using the connection from
> > connect.php
> >
> > I know that I could send the login/password to the query.php to
> establish
> > the connection ; but it is not what I would like (sometimes - often -
> the
> > connection time is bigger than the query time itself !)
> > Thanks for your help !
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] variables empty

2001-04-17 Thread phpman

hey,

try this...

$the_path = "/home/H0RNET/ftp/" . $jaar . "/" . $vak . "/";

unlink ($the_path . $d);



""Dennis Haller"" <[EMAIL PROTECTED]> wrote in message
9bharm$1td$[EMAIL PROTECTED]">news:9bharm$1td$[EMAIL PROTECTED]...
> Hi all,
> I've got this problem with variables. In the code below I've got the
> variables: $jaar and $vak, if I echo them they r displayed correctly, but
if
> the function unlink is called it doesnt seem to know what $jaar and $vak
> are. If I do $the_path = "/home/H0RNET/ftp/jaar1/PRO/";  then the function
> unlink works just fine.
> Do I have to declare the 2 variables again? What is the problem here?
>
> Thx,
> H0RNET
>
>
>
>
>  $the_path = "/home/H0RNET/ftp/$jaar/$vak/";
>
> if ($d)
> {
> unlink ("$the_path$d");
> }
>
>
> $handle = dir($the_path);
> $upl = $upl."";
> while ($file = $handle->read()) {
> if (($file != ".") && ($file != "..")) {
> $con = << $file
> 
> DELETE
> giveup;
> $upl = $upl."$con";
>   }
> }
> $upl = $upl."";
>
> echo $upl;
> ?>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Dynamic built web pages administration

2001-04-17 Thread Plutarck

If you are storing the content in a database, your job is a ton easier.

Just add an edit link on the page you want people to be able to edit. It
will link over to an edit page with the value of the current page sent in
the URL via get.

Get the content from the database pointed to by the url, and stick it in a
variable.

On the edit page have a text area. Set the "value" to the content the person
can edit.

When someone clicks submit, just take the content they submit and stuff it
into the database using UPDATE.

Of course you will need to do safety features like stripslashes() or the
special character functions before storing the data, just to be safe. You
will also want to have the option only available for registered users, and
you probably want to limit it to users you know won't be malicious.

There are many little tricks like using a little piece of javascript to
execute a file on the hard drive that shouldn't be executed, malicious
ActiveX controls, java applets, etc, that you don't want users writing to
the page.

But for administration used by only trusted people, it's actually pretty
simple to put together. For use by people who aren't trusted...


--
Plutarck
Should be working on something...
...but forgot what it was.


""Romulo Roberto Pereira"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I was wondering if anybody have developed something related to dynamic web
> pages building and administration. I need to store the content of the site
> in the database and later as the user navigate, mount the content using
> templates. This part is easy, since PHP is very powerfull in this area. My
> problem would be to let the user modify the actual page content... how?
any
> ideas?
>
> TIA,
>
> Rom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] HTML and slashes.

2001-04-17 Thread Dddogbruce \(@home.com\)

Hi.

Considering PHP takes " 's " into consideration as part of the script,
and adds a slash infront of them I need a way to overcome this.  And
second of all, I need a way to prevent HTML code from being seen, none
the less used on the output.


 $subject :  mailto:$email\">$name   $submition  " );
fclose( $fp );
 }
else
 {
include ( "guestbooks.php" );
 }
?>

All help's welcome, since I need it..  :P

-Owen


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




Re: [PHP] Form Field

2001-04-17 Thread Mike


What I need to do is append parenthesis to the front and back of
('1'.$row[0][0]), but when I do that it doesn't parse correctly. What I'm
getting now is:
Value=1San Francisco
What I need is:
Value="1San Francisco"
Thanks
Mike P
[EMAIL PROTECTED]


""Mike"" <[EMAIL PROTECTED]> wrote in message
9bhfma$hma$[EMAIL PROTECTED]">news:9bhfma$hma$[EMAIL PROTECTED]...
> Im trying to pass a form variable to anouther page with the following:
>   name="R1"> echo ($row[0][0]); ?>
>
> Everything works fine if there are no spaces(Buffalo) but if there are
> spaces ( San Francisco) I only get the first word.I've never had this
> problem before and I dont know what I did.Any suggestions?
> Thanks
> Mike P
> [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] HTML and slashes.

2001-04-17 Thread Johannes Janson

Hi,

there is NO way of hiding the html from the user.
the browser can't output otherwise. You can only
try to make it difficult to get the source.

Where does the " 's " problem come in? More detail plz.
Is it a part of a text? Then try htmlspecialchars() or
htmlentities().

Johannes


""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi.
>
> Considering PHP takes " 's " into consideration as part of the script,
> and adds a slash infront of them I need a way to overcome this.  And
> second of all, I need a way to prevent HTML code from being seen, none
> the less used on the output.
>
>  $space = " ";
> if( $submitfrm )
>  {
> echo "your entry will be added shortly.";
> $submitmsg = file( "gb.txt" );
> $fp = fopen( "gb.txt", 'a' );
> rewind($fp);
> fwrite( $fp, "
>  $subject :   href=\"mailto:$email\">$namesize=\"1\">$submition  " );
> fclose( $fp );
>  }
> else
>  {
> include ( "guestbooks.php" );
>  }
> ?>
>
> All help's welcome, since I need it..  :P
>
> -Owen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Form Field

2001-04-17 Thread Jack Dempsey

Why don't you just put the quotes outside the php?

That will give you
foo

-jack

Mike wrote:
> 
> What I need to do is append parenthesis to the front and back of
> ('1'.$row[0][0]), but when I do that it doesn't parse correctly. What I'm
> getting now is:
> Value=1San Francisco
> What I need is:
> Value="1San Francisco"
> Thanks
> Mike P
> [EMAIL PROTECTED]
> 
> ""Mike"" <[EMAIL PROTECTED]> wrote in message
> 9bhfma$hma$[EMAIL PROTECTED]">news:9bhfma$hma$[EMAIL PROTECTED]...
> > Im trying to pass a form variable to anouther page with the following:
> >   name="R1"> > echo ($row[0][0]); ?>
> >
> > Everything works fine if there are no spaces(Buffalo) but if there are
> > spaces ( San Francisco) I only get the first word.I've never had this
> > problem before and I dont know what I did.Any suggestions?
> > Thanks
> > Mike P
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




RE: [PHP] Dynamic Pages and Google ???

2001-04-17 Thread Jeff Holzfaster

I too would be interested in learning what others on this list might have to
say about this.  Knowing how a search engine such as Google indexes a site
or a page might be a good starting point in answering this debate: dynamic
vs. static.

Jeff




So I was having a conversation with a manager/educator in the IT Industry :)

In a discussion concerning search engines he stated how he dislikes dynamic
web pages (PHP/ASP/JSP/CFM) because search engine spiders 'choke' on dynamic
content or gives those pages a lower ranking.  I can't see this as being
true. I epically can't see the search spider "choking" on dynamic pages
returning well-formed/valid HTML.

Any thoughts?


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




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




Re: [PHP] Returning part of a string, ereg..

2001-04-17 Thread Plutarck

This:

ereg("([0-9]{1})-([0-9])-", $f, $regs);

What that means is "Capture a single occurance of 0-9, then a hyphen, then
capture a single occurance of 0-9 if it is imediately folowing by a hyphen."

Try this instead:

([0-9]{1})-([0-9]+)-

The "+" means "one or more". So "[0-9]+" is the same as "[0-9]{1,}". For
instance, "{x,y}" matches at least x amount of characters, but no more than
y amount of characters. Leave y off to match "x or more of the mentioned
characters". But don't forget that comma.


Regex is incredibly hard until you learn it. Then it doesn't seem hard
anymore :)


--
Plutarck
Should be working on something...
...but forgot what it was.


""Chad Day"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm horrible at regex's, maybe someone can help me out.
>
> What I'm trying to do is parse a string in the format:
number-number-number
> (ex.  1-23123-312039128)
>
> I need to pull that second number, regardless of length
>
> This code returns nothing:
>
> $part = ereg("([0-9]{1})-([0-9])-", $f, $regs);
>
> but
>
> $part = ereg("([0-9]{1})-([0-9]{1,10})-", $f, $regs);
>
> will return the number, but I don't want to take a chance and limit it to
10
> characters.  I thought the first bit of code would work.. any ideas what
is
> wrong?
>
> Thanks,
> Chad
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] cgi vs. module

2001-04-17 Thread Plutarck

The only reason I am aware of to use PHP as a CGI is on Windows. Both apache
and the php module for windows apache is considered "beta quality", so most
people don't want to install beta software on their production machine.

But just on my local system I've never had a problem with PHP as CGI. I
honestly thought I had PHP as a module until I re-read my phpinfo, lol. And
I assumed that NuSphere would install it as a module...;)


--
Plutarck
Should be working on something...
...but forgot what it was.


"Franklin Hays" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> RE: PHP as a CGI or Module
>
> This has been discussed some but I am interested to see if one is more
> popular then the other.  My experience has been most people run PHP as a
> apache module but is there a specific benefit to run it as a cgi
> program?  What about very large servers such as web hosts?  I am currently
> wrestling with some issues (apaches global variables) that aren't working
> with php -cgi and wonder if this is a common occurance with php-cgi or
> just a misconfiguration on the hosts end.  Does one version serve the
> pages faster or provide less overhead on the server?
>
> I have read a few FAQ's on this but interested to see what is happening in
> the real world.  Is one form more popular then the other?
>
> //frank
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP-CVS] cvs: php4 /main SAPI.h fopen_wrappers.c /sapi/cgi cgi_main.c

2001-04-17 Thread Stig Sæther Bakken

[Jon Parise <[EMAIL PROTECTED]>]
> On Mon, Apr 16, 2001 at 11:20:47PM -, Stig Bakken wrote:
> 
> There's a lot of whitespace pollution in this commit (bad tab
> spacing).  I'd fix it, but I don't want to commit over anything you
> might be in the middle of.

Ah, thanks for the heads-up.

 - Stig

-- 
  Stig Sæther Bakken <[EMAIL PROTECTED]>
  Fast Search & Transfer ASA, Trondheim, Norway

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




Re: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Plutarck

I had that same problem.

Use the "distinct" keyword in your SQL query.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> One thing I've come across and forgot to mention is
>
> say in my db i have multiple values that are the same as well as different
values... how can i restrict it to showing each value just once?
>
> -Original Message-
> From: Alexander Skwar [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 17, 2001 10:17 AM
> To: Peter Houchin
> Cc: Php-General@Lists. Php. Net
> Subject: Re: [PHP] Populating HTML List boxes From DB
>
>
> So sprach Peter Houchin am Tue, Apr 17, 2001 at 10:08:36AM +1000:
> > 1: is there a way to populate a list box from a db?
>
> Sure.
>
> >
> > 2: if some one could point me in the right direction, with out actually
giving a example, as to how to go about it as i've
> >got no idea
>
> Uhm, no example?  I'll try.  ... failed *G*
>
>$query = "SELECT ListboxText, ListboxValue FROM Table";
>   $rs = mysql_select( $query );
>   while( $row = mysql_fetch_object( $rs ) ){
> echo '';
> echo htmlentities( $row->ListboxText );
>   }
> ?>
>
> Alexander Skwar
> --
> How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
> Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
>iso-top.de - Die günstige Art an Linux Distributionen zu kommen
> Uptime: 2 hours 3 minutes
>



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




Re: [PHP] cgi vs. module

2001-04-17 Thread Jack Dempsey

If someone wants to run PHP scripts for other purposes then dynamic web
content, say to act like shell scripts, then you'll want to have it be
compiled as a CGI...so, its more than just the windows thing...

-jack

Plutarck wrote:
> 
> The only reason I am aware of to use PHP as a CGI is on Windows. Both apache
> and the php module for windows apache is considered "beta quality", so most
> people don't want to install beta software on their production machine.
> 
> But just on my local system I've never had a problem with PHP as CGI. I
> honestly thought I had PHP as a module until I re-read my phpinfo, lol. And
> I assumed that NuSphere would install it as a module...;)
> 
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
> 
> "Franklin Hays" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > RE: PHP as a CGI or Module
> >
> > This has been discussed some but I am interested to see if one is more
> > popular then the other.  My experience has been most people run PHP as a
> > apache module but is there a specific benefit to run it as a cgi
> > program?  What about very large servers such as web hosts?  I am currently
> > wrestling with some issues (apaches global variables) that aren't working
> > with php -cgi and wonder if this is a common occurance with php-cgi or
> > just a misconfiguration on the hosts end.  Does one version serve the
> > pages faster or provide less overhead on the server?
> >
> > I have read a few FAQ's on this but interested to see what is happening in
> > the real world.  Is one form more popular then the other?
> >
> > //frank
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] Dynamic Pages and Google ???

2001-04-17 Thread Philip Hallstrom

I'm not an expert in this, but I suspect that some search engines will
probably ignore URL's that look like this:

/path/to/dynamic.php?arg=1&foo=bar

because it sees the ? and knows that it's a dynamic result and perhaps
very likely to change.

I had always assumed that's why many sites (such as amazon) use urls
like this instead:

/path/to/dynamic.php/arg/1/foo/bar

which don't have the ? so perhaps the engine does cache it?

just my 2 cents.

-philip

In article <[EMAIL PROTECTED]> you write:
>
>So I was having a conversation with a manager/educator in the IT Industry :)
>
>In a discussion concerning search engines he stated how he dislikes dynamic
>web pages (PHP/ASP/JSP/CFM) because search engine spiders 'choke' on dynamic
>content or gives those pages a lower ranking.  I can't see this as being
>true. I epically can't see the search spider "choking" on dynamic pages
>returning well-formed/valid HTML.
>
>Any thoughts?

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




Re: [PHP] Job in Whistler, BC

2001-04-17 Thread Plutarck

It should be noted that programming facilities are entirely outdoor. But
they do provide those little hand-held vacuums to suck the snow out from
between your keyboard keys.










Nah, I'm just kidding. But it is in Canada, so you will be forced to type
"a\'boot" hundreds of times a day ;)

(a little poke at our canadian friends. Which I am perfectly willing to do,
because I'm waaay down here on the gulf of mexico, and they'd have to
come through Georgia, Alabama, or Mississippi to come down and disagree with
me. God isn't willing to go through Georgia, Alabama, or Mississippi, so I
think I'm safe ;)


--
Plutarck
Should be working on something...
...but forgot what it was.


"Mark Maggelet" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Mon, 16 Apr 2001 20:00:27 -0700, Dddogbruce \(@home.com\)
([EMAIL PROTECTED]) wrote:
>Whistler's cool!

Yeah, and a php job at a ski resort?! Hmm, that's way too good to be
true.


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




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




Re: [PHP] Dynamic Pages and Google ???

2001-04-17 Thread Michael Kimsal



Jon Shoberg wrote:

> So I was having a conversation with a manager/educator in the IT Industry :)
>
> In a discussion concerning search engines he stated how he dislikes dynamic
> web pages (PHP/ASP/JSP/CFM) because search engine spiders 'choke' on dynamic
> content or gives those pages a lower ranking.  I can't see this as being
> true. I epically can't see the search spider "choking" on dynamic pages
> returning well-formed/valid HTML.
>
> Any thoughts?

Each spider is different, and they've changed over time.  Often they don't
index a page that has a ? in it - they definitely won't be able to follow
form input tags and such - the possibilities for input are limitless.

Some can follow
blah.com/index.php?alh=fff

and links of that nature.  If you've got redirects in there,tho, they'll often
choke on those.

Apache has an advantage over IIS because you can normally
pass in parameters in the $PATH_INFO area -
http://www.blah.com/index.php/blag/222/dsfsd/dlkjsdf
calls the index.php with /blag/222/dsfsd/dlkjsdf as parameters you can grab in
your
script.  IIS doesn't allow for this.  :(  (not natively anyway)

Some search engines wouldn't FOLLOW a ? in a link,
but will accept one as a 'submitted page' to index if you submit it manually.

Again, all of this information is necessarily vague.  What works one year
doesn't work the next.

This was all info and experienced gleaned while building keywordcount.com a few
years
ago - the whole landscape has changed, and getting 'indexed' by search engines
is nice,
but imo can be a big waste of time and money given that there are many factors
beyond your control entirely.  SEOs will bash me upside the head for that one,
but it's been my experiences over the past couple years.  :)



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




Re: [PHP] HTML and slashes.

2001-04-17 Thread Dddogbruce \(@home.com\)

> there is NO way of hiding the html from the user.
> the browser can't output otherwise. You can only
> try to make it difficult to get the source.

I want to hide the HTML from the browser.  If someone adds some malicious
code, or even  I don't want it to underline.

> Where does the " 's " problem come in? More detail plz.
> Is it a part of a text? Then try htmlspecialchars() or
> htmlentities().

Say I right "Hiya, my name's Owen" on the submission part of the form.  It'll
show up as "Hiya, my name\'s Owen" on the output (which is a .txt file.)

HTH,
Owen


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




Re: [PHP] RFC: Storing User Info

2001-04-17 Thread Plutarck

As others suggested, use md5 or one of the mhash functions. You can't
retrieve the password, but you shouldn't need to anyway.

When someone looses their password, get rid of their old one and mail them
their randomly created new one. Then just allow them to change it to
whatever they want.

Make sure to tell them to use a valid email address or require a
confirmation, otherwise when people loose their password they can never get
it back.

People tend to email you when they loose their password, so be sure to make
it clear that "once it's gone, it's really gone, and you just have to pick a
new one".


I try to avoid emailing a user with their password with exception to when
they loose it. Then again, there isn't really much of an alternative...


--
Plutarck
Should be working on something...
...but forgot what it was.


""Ashley M. Kirchner"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I'm looking for comments on this one.  I'm developing a site that
> will have user logins on it.  What's the best way to do this?  What to
> store, and how?
>
> - Are people more inclined to use a username when they need to log
>   in to something, or would asking for an email (as the userID) be
>   better?
>
> - How about storing passwords?  All of this info will be stored in
>   an MySQL DB.  How do admins generally do this type of stuff?
>   Encrypt the password stored in the DB, and decrypt it on the fly
>   to compare?  Store it in plain text?  Or store it encrypted,
>   and when the user logs in, encrypt that passwd (from the form)
>   and compare the strings?  (not sure if the latter would work)
>
> - What about sending people passwords through email?  Like when
>   someone signs up the first time, they supply a passwd.  How do
>   people feel about sending that login information to the user in
>   plain text via email?  Or do you?
>
> - What about when the user forgets their login?  Just fetch the
>   info from DB and mail it out to the (registered) email address?
>   Or, generate a new, generic one, mail that one out, and tell the
>   user to login and change it again?
>
> Suggestions please.
>
> AMK4
>
> --
> W |
>   |  I haven't lost my mind; it's backed up on tape somewhere.
>   |
>   ~
>   Ashley M. Kirchner    .   303.442.6410 x130
>   SysAdmin / Websmith   . 800.441.3873 x130
>   Photo Craft Laboratories, Inc. .eFax 248.671.0909
>   http://www.pcraft.com  . 3550 Arapahoe Ave #6
>   .. .  .  . .   Boulder, CO 80303, USA
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] HTML and slashes.

2001-04-17 Thread Jack Dempsey


I want to hide the HTML from the browser.  If someone adds some
malicious
code, or even  I don't want it to underline.

Could you rephrase this? You want to "hide" the HTML from the browser?
If the browser doesn't see any HTML, good luck getting a web page. 
If you're trying to hide the HTML from the user, you're in for some
fun...you can do things like disable right clicking, but then they can
view source the page. 
You can make the page contain frames and then they'd see the frameset,
and wouldn't be able to click into the source...but then they could
check the page referenced in the url attribute of your
frameset...basically, as said before, you can't completely cut the end
user off from the HTML output...what are you worried about anyway, with
the  example?

As far as the name\'s problem, check php.net for info about magic
quotes...you probably have them on...if they are on, PHP will
"magically" put a \ in front of ' or " so you don't have to worry about
that when you enter your data into wherever...you can disable it in your
php.ini, or at runtime...

-jack
> 
> > Where does the " 's " problem come in? More detail plz.
> > Is it a part of a text? Then try htmlspecialchars() or
> > htmlentities().
> 
> Say I right "Hiya, my name's Owen" on the submission part of the form.  It'll
> show up as "Hiya, my name\'s Owen" on the output (which is a .txt file.)
> 
> HTH,
> Owen
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] Dynamic Pages and Google ???

2001-04-17 Thread Plutarck

Getting listed in search engines really is important. But in the vein of
what you were talking about, people shouldn't really "worry" about it.

Note: Getting listed in directories like Yahoo is way more important than
having any search engine list you. You always receive a far more targeted
user with places like Yahoo, because they really do want to see what you
have to say.


Back on topic, the only search engines worth bothering with can handle
dynamic pages just fine. There is _no_ difference in a static html page and
a dynmically created one.

However, be _very_ careful with sessions. Sessions can force a query string
onto the end of every page on your first page, causing the spider to be
unable to visit any other page in your site!

Also be extremely careful about the use of  and browser sniffing.
So many sites do something classically stupid so that when someone sees
their site in a search engine, the description is "Your browser does not
support frames. Your browser must support frames to view this site."...I
just want to slap the webmaster every time I see that.


In short, on your index page (which is what you want bookmarked the most) do
not have links with query strings in them, do not use redirects, do not use
frames (period. if you want to use them everywhere else on the site that's
ok, but don't do it on the main page!), do not use session_start(), and do
not complain if the user has disabled javascript- if you want your site to
be well listed in search engines.

With all that taken into effect, I can see why the person you were talking
to disliked dynamic sites. But if the webmaster knows the rules of the
search engines, dynamic sites work just perfectly.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Michael Kimsal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Jon Shoberg wrote:
>
> > So I was having a conversation with a manager/educator in the IT
Industry :)
> >
> > In a discussion concerning search engines he stated how he dislikes
dynamic
> > web pages (PHP/ASP/JSP/CFM) because search engine spiders 'choke' on
dynamic
> > content or gives those pages a lower ranking.  I can't see this as being
> > true. I epically can't see the search spider "choking" on dynamic pages
> > returning well-formed/valid HTML.
> >
> > Any thoughts?
>
> Each spider is different, and they've changed over time.  Often they don't
> index a page that has a ? in it - they definitely won't be able to follow
> form input tags and such - the possibilities for input are limitless.
>
> Some can follow
> blah.com/index.php?alh=fff
>
> and links of that nature.  If you've got redirects in there,tho, they'll
often
> choke on those.
>
> Apache has an advantage over IIS because you can normally
> pass in parameters in the $PATH_INFO area -
> http://www.blah.com/index.php/blag/222/dsfsd/dlkjsdf
> calls the index.php with /blag/222/dsfsd/dlkjsdf as parameters you can
grab in
> your
> script.  IIS doesn't allow for this.  :(  (not natively anyway)
>
> Some search engines wouldn't FOLLOW a ? in a link,
> but will accept one as a 'submitted page' to index if you submit it
manually.
>
> Again, all of this information is necessarily vague.  What works one year
> doesn't work the next.
>
> This was all info and experienced gleaned while building keywordcount.com
a few
> years
> ago - the whole landscape has changed, and getting 'indexed' by search
engines
> is nice,
> but imo can be a big waste of time and money given that there are many
factors
> beyond your control entirely.  SEOs will bash me upside the head for that
one,
> but it's been my experiences over the past couple years.  :)
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] HTML and slashes.

2001-04-17 Thread Johannes Janson

use srtipslashes() before writing it to the
file.

Johannes
""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > there is NO way of hiding the html from the user.
> > the browser can't output otherwise. You can only
> > try to make it difficult to get the source.
>
> I want to hide the HTML from the browser.  If someone adds some malicious
> code, or even  I don't want it to underline.
>
> > Where does the " 's " problem come in? More detail plz.
> > Is it a part of a text? Then try htmlspecialchars() or
> > htmlentities().
>
> Say I right "Hiya, my name's Owen" on the submission part of the form.
It'll
> show up as "Hiya, my name\'s Owen" on the output (which is a .txt file.)
>
> HTH,
> Owen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




RE: [PHP] Dynamic built web pages administration

2001-04-17 Thread Romulo Roberto Pereira

dear Plutark,

Thank you for your input.

But, let's say that I have the following:


 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text



 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text


My user don't know html. At all... So how do I do to create an edit admin
that let him only modify the text?

I did something like this:



 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text





 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some
text
 some text some text some text some text some text some text some text some
text



It works fine, because I identify the edit areas by the comment tags.
The problem with this is that if I put an option like Add New Page to the
admin system, the user would have to surround the tags with the comments, I
mean, he would have to edit the HTML.

Pretty toff thing!!!

Jesus!!

Thank you,

Rom

-Original Message-
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 10:25 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Dynamic built web pages administration


If you are storing the content in a database, your job is a ton easier.

Just add an edit link on the page you want people to be able to edit. It
will link over to an edit page with the value of the current page sent in
the URL via get.

Get the content from the database pointed to by the url, and stick it in a
variable.

On the edit page have a text area. Set the "value" to the content the person
can edit.

When someone clicks submit, just take the content they submit and stuff it
into the database using UPDATE.

Of course you will need to do safety features like stripslashes() or the
special character functions before storing the data, just to be safe. You
will also want to have the option only available for registered users, and
you probably want to limit it to users you know won't be malicious.

There are many little tricks like using a little piece of javascript to
execute a file on the hard drive that shouldn't be executed, malicious
ActiveX controls, java applets, etc, that you don't want users writing to
the page.

But for administration used by only trusted people, it's actually pretty
simple to put together. For use by people who aren't trusted...


--
Plutarck
Should be working on something...
..but forgot what it was.


""Romulo Roberto Pereira"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I was wondering if anybody have developed something related to dynamic web
> pages building and administration. I need to store the content of the site
> in the database and later as the user navigate, mount the content using
> templates. This part is easy, since PHP is very powerfull in this area. My
> problem would be to let the user modify the actual page content... how?
any
> ideas?
>
> TIA,
>
> Rom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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


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




Re: [PHP] HTML and slashes.

2001-04-17 Thread Plutarck

Check magic_quotes_runtime in your ini. If it's on, turn it off.

Use the htmlspecialchars() family of functions. They will "hide" HTML in
that the browser will not attempt to parse. so "" will be displayed as
"", and not make all the text turn to bold.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > there is NO way of hiding the html from the user.
> > the browser can't output otherwise. You can only
> > try to make it difficult to get the source.
>
> I want to hide the HTML from the browser.  If someone adds some malicious
> code, or even  I don't want it to underline.
>
> > Where does the " 's " problem come in? More detail plz.
> > Is it a part of a text? Then try htmlspecialchars() or
> > htmlentities().
>
> Say I right "Hiya, my name's Owen" on the submission part of the form.
It'll
> show up as "Hiya, my name\'s Owen" on the output (which is a .txt file.)
>
> HTH,
> Owen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] Javascript mailing list

2001-04-17 Thread Boget, Chris

A bit OT, yes, but I don't want to ask an
inappropriate question here (not that this
isn't an inappropriate question :p).
Can someone recommend a good Javascript
mailing list?

Chris



Re: [PHP] RE: A slightly amusing, though mostly dangerous, endless loop

2001-04-17 Thread Plutarck

It's automatically enabled, and I don't think it's available for disabling.
I recall hearing something about a feature being added to PHP to help
prevent infinate loops, and it apparently works with print_r.

It should probably be listed more prominately and in any place where
$GLOBALS is mentioned.

The first time I saw it I was thinking, "Geeze, this page sure is taking a
long time to load...and why are so many variables available on this site..."


--
Plutarck
Should be working on something...
...but forgot what it was.


""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is the anti-recursion feature you mention automatically activated or do
you need to configure it to take effect?
>
> This error with print_r is documented in the manual, but would still be
(have been) an easy trap to fall into!
>
> -Original Message-
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: 14 April 2001 12:59
> To: [EMAIL PROTECTED]
> Subject: A slightly amusing, though mostly dangerous, endless loop
>
>
> This is a bug which was apparently fixed in v 4.0.4pl1 at least, but it
> still present in 4.0.3
>
> I just found it kind of amusing and it makes a nice warning.
>
> Consider this:
>
> print_r($GLOBALS);
>
>
> That's it. It prints all the variables available, however part of it is an
> array called GLOBALS. Which then prints all available variables, including
> an array called GLOBALS...
>
> And it will continue until you hit the Stop button or until the script
times
> out. But if you have ignore.user.abort on, it will continue till it times
> out. If you've screwed with your scripts timeout settings...
>
> ...so be wary of that, and ensure you don't try and print out the
variables
> available in GLOBALS in older versions of PHP. It was fixed with the
> anti-recursion feature, which automatically breaks endless loops.
>
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
>
>
>
>
> **
> Any opinions expressed in this email are those of the individual and
> not necessarily the Company. This email and any files transmitted with
> it, including replies and forwarded copies (which may contain alterations)
> subsequently transmitted from the Company, are confidential and solely for
> the use of the intended recipient. If you are not the intended recipient
> or the person responsible for delivering to the intended recipient, be
> advised that you have received this email in error and that any use is
> strictly prohibited.
>
> **
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Javascript mailing list

2001-04-17 Thread Plutarck

I know of only the one on marc.aimsgroup.com. They list quite a few mailing
lists of all types.

But I still don't know any newsgroups :(


--
Plutarck
Should be working on something...
...but forgot what it was.


""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> A bit OT, yes, but I don't want to ask an
> inappropriate question here (not that this
> isn't an inappropriate question :p).
> Can someone recommend a good Javascript
> mailing list?
>
> 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]




Re: [PHP] Javascript mailing list

2001-04-17 Thread Seung-woo Nam

How about newsgroups instead?
comp.lang.javascript seems to be pretty active.

Seung-woo Nam
"Boget, Chris" wrote:
> 
> A bit OT, yes, but I don't want to ask an
> inappropriate question here (not that this
> isn't an inappropriate question :p).
> Can someone recommend a good Javascript
> mailing list?
> 
> 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]




Re: [PHP] Javascript mailing list

2001-04-17 Thread Andy Woolley

The JavaScript Weenie is about the best I know of at:

http://webdevelopersjournal.com/subform.html

See you there.

Andy.

- Original Message - 
From: "Boget, Chris" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 4:56 PM
Subject: [PHP] Javascript mailing list


> A bit OT, yes, but I don't want to ask an
> inappropriate question here (not that this
> isn't an inappropriate question :p).
> Can someone recommend a good Javascript
> mailing list?
> 
> Chris
> 


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




[PHP] OT - cyber squatting?

2001-04-17 Thread Kurth Bemis

this is totally OT - however I don't where else to ask.

i need information on cyber squatting. as in what laws there are against 
it, etc.i believe that there was a law passed making cyber squatting 
illegal...but i can't find it at the library of congressany help?

~kurth


-- 
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] Session Variables & Cookies

2001-04-17 Thread Bob Clingan

I've tried to follow the example in the online manual, but and I believe my
session/cookie variables are being stored. Is there some specific way I need
to call them? Can anyone provide a brief example?

Thanks.

--Bob
--

  +---+
  |  Bob Clingan| OneStopSite, LLC|
  | | www.onestopsite.com |
  |  Web Developer/Programmer   | Phone: 410-893-9800 |
  |  [EMAIL PROTECTED]| Fax:   410-893-8065 |
  +---+



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




Re: [PHP] PHP3 and PHP_SELF

2001-04-17 Thread Dan Lowe

Tried this on a host running 3.0.16:



Worked just fine.

 -dan

Previously, Alan Ward said:
> Does the variable $php_self work in PHP3? I am helping a friend with some
> forms, and their host still uses PHP3.

-- 
If man evolved from monkeys and apes, why do we still have monkeys and apes?
  -George Carlin

-- 
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] get_class()

2001-04-17 Thread Boget, Chris

Given the following code:

-

class myClass {
  function myClass() {
$classVar = get_class( $this );

  }
}

$thisInstance = new myClass();

-

What value should $classVar contain?

"myClass"

or

"thisInstance"

?
The documentation leads me to believe that it is the 
latter value, but in practice it contains the former.  
If it is supposed to have the latter value, is there any
way I can get the fomer?  Any way that I can get the 
name "thisInstance"?

Chris



Re: [PHP] OT - cyber squatting?

2001-04-17 Thread Plutarck

I assume you mean registering a web address of a company, just to keep them
from registering it or to try and make them pay you for it?

Check NetworkSolutions "domain name dispute" policies.

InterNIC has a pretty good policy, actually. If someone registers a name
with is copyrighted, trademarked, or is clearly only valuable because it is
familiar to a registered trademark of copyright, they are in violation and
the domain name can be taken away from them and awared to the rightful owner
via arbitration.

To avoid having a domain name taken away they must prove either that they
have made a good-faith effort to build a destinctive trademark of brand
which does not impede upon a pre-existing copyright, and that the name was
not registered for the sole purpose of keeping someone from rightfully
registering it.


Is that what you meant?


--
Plutarck
Should be working on something...
...but forgot what it was.


"Kurth Bemis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> this is totally OT - however I don't where else to ask.
>
> i need information on cyber squatting. as in what laws there are against
> it, etc.i believe that there was a law passed making cyber squatting
> illegal...but i can't find it at the library of congressany help?
>
> ~kurth
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] OT - cyber squatting?

2001-04-17 Thread Kurth Bemis

At 12:21 PM 4/17/2001, Plutarck wrote:

thats is exactly what i'm looking for. :-)

thanks

~kurth

>I assume you mean registering a web address of a company, just to keep them
>from registering it or to try and make them pay you for it?
>
>Check NetworkSolutions "domain name dispute" policies.
>
>InterNIC has a pretty good policy, actually. If someone registers a name
>with is copyrighted, trademarked, or is clearly only valuable because it is
>familiar to a registered trademark of copyright, they are in violation and
>the domain name can be taken away from them and awared to the rightful owner
>via arbitration.
>
>To avoid having a domain name taken away they must prove either that they
>have made a good-faith effort to build a destinctive trademark of brand
>which does not impede upon a pre-existing copyright, and that the name was
>not registered for the sole purpose of keeping someone from rightfully
>registering it.
>
>
>Is that what you meant?
>
>
>--
>Plutarck
>Should be working on something...
>...but forgot what it was.
>
>
>"Kurth Bemis" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > this is totally OT - however I don't where else to ask.
> >
> > i need information on cyber squatting. as in what laws there are against
> > it, etc.i believe that there was a law passed making cyber squatting
> > illegal...but i can't find it at the library of congressany help?
> >
> > ~kurth
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] cgi vs. module

2001-04-17 Thread Dan Lowe

Previously, Franklin Hays said:
> 
> RE: PHP as a CGI or Module

Generally people will almost always use the module because it's faster and
simpler, and gives you some IPC kind of advantages that the CGI doesn't
have ("internal" cross-talk with Apache).

Reasons to use the CGI:

1. Windows servers must use CGI form

2. If you want to use command-line PHP scripts you need the CGI form

3. If you want suExec support I believe you need to use the CGI form

 -dan

-- 
If you try to fail, and succeed, which have you done?  -George Carlin

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




[PHP] PHP and a C++ application

2001-04-17 Thread Xinkun Wang

I am doing a project with PHP to a text database. Basically the text
database is created in C++. But I only can use exec() function
to transfer query commands as an array parameter to its interface, and get 
result from a temp file. Not like php directly call mysql function, and I 
want to (if possible) create my function which can do things like mysql 
function. Anyone know how to do it? Or anyone can tell me which is the best 
solution to connect a C++ application from PHP?

Xinkun


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


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




Re: [PHP] Time needed for a SQL-statement

2001-04-17 Thread Ulf Wendel



"B. Tenhumberg" schrieb:
> Is there a way to get the time the database needed for execution a statement?
> I use MySQL and PHP...

Hmm, how about metering the overall time required by mysql_query() using
microtime(), http://www.php.net/manual/en/function.microtime.php. As
long as there's no network bottleneck between the database (server) and
the application (server) you should be able to use that time as an
approximate value.

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de

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




Re: [PHP] variables empty

2001-04-17 Thread Ulf Wendel



Dennis Haller schrieb:
> I've got this problem with variables. In the code below I've got the
> variables: $jaar and $vak, if I echo them they r displayed correctly, but if
> the function unlink is called it doesnt seem to know what $jaar and $vak
> are. If I do $the_path = "/home/H0RNET/ftp/jaar1/PRO/";  then the function
> unlink works just fine.
> Do I have to declare the 2 variables again? What is the problem here?
> 
> Thx,
> H0RNET
> 
>  $the_path = "/home/H0RNET/ftp/$jaar/$vak/";
> 
> if ($d)
> {
> unlink ("$the_path$d");
> }

What's the value of $d is unlink ever executed? Try unlink($the_path .
$d).

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de

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




Re: [PHP] get_class()

2001-04-17 Thread Plutarck

"This function returns the name of the class of which the object obj is an
instance."

The name of the class is "myClass", therefore the behavior is as it should
be.

"thisInstance" is an object, not a class. If you are trying to do something
imparticular you'll have to be more specific.

As for getting the name "thisInstance", I'm not really sure why you'd need
to, so I can't think of a work-around.

Since "thisInstance" is the name of the object, you need some object related
function. I've never had to do it, so I have no clue how, but maybe someone
else will know :)


--
Plutarck
Should be working on something...
...but forgot what it was.


""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Given the following code:
>
> -
>
> class myClass {
>   function myClass() {
> $classVar = get_class( $this );
>
>   }
> }
>
> $thisInstance = new myClass();
>
> -
>
> What value should $classVar contain?
>
> "myClass"
>
> or
>
> "thisInstance"
>
> ?
> The documentation leads me to believe that it is the
> latter value, but in practice it contains the former.
> If it is supposed to have the latter value, is there any
> way I can get the fomer?  Any way that I can get the
> name "thisInstance"?
>
> 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]




  1   2   3   >