Re: [PHP] encryption

2001-07-20 Thread Francis Fillion

The best thing will be to sync clock, if it's in an other time zone just
get your script to do +x or -x. Even they hours are not really
important, except that if you use it as a key, they minutes are
important. It's easy to sync time if it's for they admin, but for the
user at large it's not possible. Or before sending your generated key
you could get time from the server and generate they appropriate key
using your key + time.

For the client-side stuff, well it is not a problem for they admin of
the site, since it will be they only one to use this kind of
authentification, but if you want to use it for every user you need a
key that both know, so even if you have they algorithm you need the key
to have the good result. You could use the IP adress to make the key,
both know it (well not really ...), some people will not be able to use
it, people who work in a corporate environment and use internal IP
adress in house and use an other IP adress when they get on they
Imternet (masquering), so the IP adress on the client side and on the
server side is not the same. 

 Or at subscription time to make a cookie with the key and keep the key
somewhere on the server side, extract the key only in the client side
everytime after that to connect, so you only have a one time clear text
key/password exchange on the net. Everytime after that a new key will be
generated with the cookie key combined with the password and the
samethings will be made on the server.You could even use the key to
encrypt all data that are send to the server from the client, so that
way you have a cheap secure connection, eh I'm starting to mimic
SSH,SSL,...?

Anyway whe could have fun making it! ;)

P.S. Sorry for my crappy english, my native language is french so ...

P.S.2. Sometime I talk about two key, I need a key (paraphrase?) to
start my algorithm to have they final key.

Sheridan Saint-Michel wrote:
> 
> How do you get around the Server and client running on different times?
> I would think that would screw up the system as they would be generating
> them
> at different times?
> 
> Other than that possible problem I like the idea.
> However, I would like to point out that anything done client-side can not
> be completely secure as anyone can get your algorithm from the JavaScript.
> 
> Maybe You could devise some system with keys where the PHP page would
> write the Javascript Function with a different key based on time or
> something?
> That might work.
> 
> Thoughts?
> Sheridan
> 
> - Original Message -
> From: Francis Fillion <[EMAIL PROTECTED]>
> To: Tom Malone <[EMAIL PROTECTED]>
> Cc: PHP Users <[EMAIL PROTECTED]>
> Sent: Thursday, July 19, 2001 5:14 PM
> Subject: Re: [PHP] encryption
> 
> > One of my friends has a rsa key somethings, what it does is that at
> > every few minutes it generate a random number so for login on his server
> > he need this random key and his password to get in, the server generate
> > the same key as his rsa key and has his password.
> >
> > SO the best things to do will be to make two program that use something
> > to generate a random alphanumeric something on the server side and on
> > your client side so when you connect to the server both have you has
> > this key + your password, if it's OK it start a PHP session. And the key
> > should be regenerated once you have login. SO  even if somebody extract
> > the clear text key+password from your connection he can't connect
> > because this key+password is already passdue, the only possible attack
> > then is to find the algorithm that you use+password, by changing your
> > algorithm once in a while you can really limit this, they other attack
> > could be a man in the middle attack, that could hurt.
> >
> > Good idea, I have to use this (let's put-it down on my project
> > list,...), I could even put the generate stuff on my pda, I could login
> > from anywhere... ;)
> >
> > Tom Malone wrote:
> > >
> > > I guess I should clarify - I'm just making a login for myself for the
> admin
> > > section of my website, so I only need to be able to protect my own
> password.
> > > I'm not sure if that information if helpful at all, but I haven't been
> able
> > > to figure out how to do it.
> > >
> > > Tom
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, July 19, 2001 3:21 PM
> > > To: Sheridan Saint-Michel
> > > Cc: php-general
> > > Subject: Re: [PHP] encryption
> > >
> > > Ahh, well then, another solution could be to use SSL, depends on your
> > &

Re: [PHP] encryption

2001-07-19 Thread Francis Fillion
t;
> > > >
> > > >
> > > > Do _not_ use these types of functions to add security to a form unless
> > > > you're using an SSL or TLS (etc.) encrypted session. The only
> potential
> > way
> > > > around this issue is for you to write a JavaScript program that does
> the
> > > > hashing on the client side before being sent over the Internet (which
> > would
> > > > make this function unnecessary)."
> > > >
> > > > I am pretty new to PHP and absolutely clueless as far as
> > > > encryption/algorithims are concerned. Could anyone possibly point me
> to
> > a
> > > > viable solution for this problem?
> > > >
> > > > Thanks in advance!
> > > >
> > > > Tom Malone
> > > >
> 
> --
> Jeff Bearer, RHCE
> Webmaster
> PittsburghLIVE.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Restoring a backup

2001-07-19 Thread Francis Fillion

mysql -u yourusername -p "password" myfile_db <
/home/ftpadmin/pub/myfile_db.backup

Don wrote:
> 
> Hi,
> 
> I have a cron script that issues a:
> 
> mysqldump --opt -p  myfile_db  /home/ftpadmin/pub/myfile_db.backup
> 
> Now, I wish to do the opposite, that is, restore it into my database.  After
> issuing a:
> 
> mysql -p
> 
> and entering the password, what command do I enter to restore my database
> from the backup file?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] XSLT module bugs (?)

2001-07-19 Thread Francis Fillion

Hi again Maxim, when this problem started I found that in the xslt php
cvs (because the manual on the php site doesn't seen to be accurate
anymore)

mixed xslt_process(resource processor,
string xml,
string xsl[,
string result[,
array  arguments[,
array  parameters]]])


so xslt_process need a resource processor, so it has to have an error,
because I don't pass any process.

Are you sure that you're using 4.0.6? If so what was your configure
option?
 
Thanks again.

Maxim Derkachev wrote:
> 
> Hello Francis,
> 
> Thursday, July 19, 2001, 6:05:55 PM, you wrote:
> 
> FF> Here what I use xslt_process($xslString, $xmlString, $this->result);
> 
> FF> and it give me this error
> 
> FF> Warning: Supplied argument is not a valid XSLT Processor resource in
> FF> /home/httpd/html/xml/include/class.transform_xsl.php on line
> FF> 74
> 
> Haven't seen such an error yet.
> 
> --
> Best regards,
> Maxim Derkachev mailto:[EMAIL PROTECTED]
> System administrator & programmer,
> Symbol-Plus Publishing Ltd.
> phone: +7 (812) 324-53-53
> www.books.ru, www.symbol.ru
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] XSLT module bugs (?)

2001-07-19 Thread Francis Fillion

Here what I use xslt_process($xslString, $xmlString, $this->result);

and it give me this error 

Warning: Supplied argument is not a valid XSLT Processor resource in
/home/httpd/html/xml/include/class.transform_xsl.php on line
74

Maxim Derkachev wrote:
> 
> Hello Francis,
> 
> Thursday, July 19, 2001, 5:43:37 PM, you wrote:
> 
> FF> The ® is because (well I think) of the utf-8 code, try utf8_decode() to
> FF> decode it and to get it back.
> 
> Not bugs, as I know now.
>  make the things work well.
> 
> FF> P.S. What is they command that you made for php 4.0.6 to parse your xml
> FF> file, I'm not able to parse a xml file with sablotron since 4.0.6.
> 
> xslt_process(). Works well since the first try. I don't process file,
> I compose xml in a string first.
> 
> --
> Best regards,
> Maxim Derkachev mailto:[EMAIL PROTECTED]
> System administrator & programmer,
> Symbol-Plus Publishing Ltd.
> phone: +7 (812) 324-53-53
> www.books.ru, www.symbol.ru

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] XSLT module bugs (?)

2001-07-19 Thread Francis Fillion

The ® is because (well I think) of the utf-8 code, try utf8_decode() to
decode it and to get it back.

P.S. What is they command that you made for php 4.0.6 to parse your xml
file, I'm not able to parse a xml file with sablotron since 4.0.6.


Maxim Derkachev wrote:
> 
> Hi all.
> 
> Just met two bugs (?) in the xslt module.
> 1st. I replace HTML entities in the CDATA parts with their ascii
> equivalents ('<' -> '<', '>' -> '>', etc.)
> After XSLT transformation, '<' went back to '<', while any other
> remain untouched.
> 
> 2nd. After the transformation, &#; are substituted with
> their char equivalents, prepended with  character. E.g. ®
> ('registered' sign) become ® .
> 
> Could someone advise?
> 
> P.S. PHP4.0.6, Sablotron 0.6.
> 
> --
> Best regards,
> Maxim Derkachev mailto:[EMAIL PROTECTED]
> System administrator & programmer,
> Symbol-Plus Publishing Ltd.
> phone: +7 (812) 324-53-53
> www.books.ru, www.symbol.ru
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Re: PHP vs Perl Question

2001-07-18 Thread Francis Fillion

Well then, maybe you don't have/need to learn perl, perl is a pretty
good language for system administration of any sort, if you were on
Unix/Linux well yes of course but on WIndows. I think the better things
for you is to learn PHP and know everythings about it. If you have to
use time for php and perl, you will lose your time, begin with php and
after that if you want to learn perl go for it.

Tom Malone wrote:
> 
> I haven't been to Barnes & Noble yet, so I'm not sure if I will get the
> O'Reilly or the Wrox book yet, but supposing I went with O'Reilly, I wonder
> which would be better: Learning Perl 3rd Edition, or Learning Perl on Win32
> Systems? I don't have much experience with Unix or Linux (minimal), but on
> the other hand, I use Windows ME, not NT. Also, I wonder if the Learning
> Perl on Win32 book might not me geared more towards NT administrators (I'm a
> web designer). Sorry this is so OT, but I really need to know and you people
> are the experts.
> 
> Tom
> 
> >I'd go for it. Perl can be messy, but it is also quite powerful and
> >doesn't HAVE to be messy. It is EVERYWHERE both in terms of availability
> >and use. But most of all, it is a fun language to play with... and if you
> >do any system admin it is an indispensable tool.
> 
> >I recommend _Beginning Perl_ from Wrox over _Learning Perl_ by O'Reilly,
> >but only by a hair. Both are good.
> 
> >c
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] a good PHP editor

2001-07-18 Thread Francis Fillion

Thanks, this mode look better, well it has better color coding then they
old one, option in function are in bold pink... ;)

Chris Lott wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Emacs on windows is great, and php-mode (there are a few. One that I have
> a link close to hand for is at: http://sourceforge.net/projects/php-mode/
> ) is cool. I don't usually recommend it because it can be a pain to get
> setup optimally, but once it is you can do everything within it: edit
> documents, edit code and compile/test, use news, check mail, you name it.
> 
> c
> 
> -BEGIN PGP SIGNATURE-
> Version: PGP 7.0.3- signed for information authentication and security
> Comment: Key ID: 0x51046CFD
> 
> iQA/AwUBO1YiENaLYehRBGz9EQJnqgCg2FVY0EoHWgat8b5BSycAdNa9kf8AoL80
> yQtjZOcK+MYAC6VKrl+cFIbE
> =X7QV
> -END PGP 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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] a good PHP editor

2001-07-18 Thread Francis Fillion
-9_\x7f-\xff]*\\)->\\)?\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\s-*("
 (2 font-lock-variable-name-face t t)
 (3 font-lock-function-name-face t t)
 )
   ;; Fontify variable name references.
  
'("\\(\\$\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*->\\)?\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\)"
 (1 font-lock-variable-name-face t t)
 (2 font-lock-variable-name-face t t)
 )
   '("\\<\\$\\(this\\)->"
 (1 font-lock-keyword-face t t) ;; "this" as keyword
 )
   ;; Fontify class names
  
'("\\<\\(class\\)\\s-+\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\(\\(\\s-+extends\\s-+\\)\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\)?\\s-*\\{"
 (1 font-lock-keyword-face t t)  ;; class keyword
 (2 font-lock-type-face t t)  ;; class name
 (4 font-lock-keyword-face t t)   ;; extend keyword
 (5 font-lock-type-face t t) ;; super class name
 )
   )))
  )

(defvar php-font-lock-keywords php-font-lock-keywords-3
  "Default expressions to highlight in PHP mode.")

;; font-lock-add-keywords is only defined in GNU Emacs
(if (not (string-match "XEmacs" emacs-version))
(font-lock-add-keywords 'php-mode php-font-lock-keywords))

;; Add char '#' as a start comment delimiter
;; we don't need to set up the end comment delimiter
(modify-syntax-entry ?\# "< b")





Alexander Skwar wrote:
> 
> So sprach »Francis Fillion« am 2001-07-18 18.07.2001 um 18:11:35 -0400 :
> >  The best editor is emacs, you can have one in windows too and it's
> 
> Actually I like vim better :)  Emacs is just so HUGE :)
> 
> > I use they php mode, it's not perfect but it do the job, I will need to
> 
> Does Emacs (Emacs?  Hmm, what about XEmacs?) have a PHP mode?  Last time
> I checked, it did not - although I used XEmacs back then.
> 
> 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: 1 hour 17 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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] a good PHP editor

2001-07-18 Thread Francis Fillion

 The best editor is emacs, you can have one in windows too and it's
free  as beer ;)

I use they php mode, it's not perfect but it do the job, I will need to
learn lisp someday...

doug wrote:
> 
> Hiya everybody,
> I'm relatively new to PHP and I'm looking for a good text editor on
> win2k for creating/manipulating php pages. Notepad is great if your in a
> bind, and I've tried phpedit and activestate's Komodo and both seem to have
> problems (crashing etc...). Anybody got any suggestions? Free/small fee
> programs doesn't matter Thanks
> 
> Doug Henry
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] PHP vs Perl question

2001-07-18 Thread Francis Fillion

 I do love perl, even if I mostly code with PHP, but I use perl for
stuff that run with a crontab (a script that run on every x date or
hours), I know that you can do that with PHP now too, but Perl is a
really great and funny language to learn, the best regular expression
that I ever use (I still use the perl regular expresion in PHP), just
for that you should learn they language. Once you know a language it's
easy to change or learn an other one, the best thing should be learn
what you need and get good on this one and if you need an other language
then the stuff that you have learned will help you up to learn you new
stuff.

Book: Learning Perl from O'reilly, O'reilly have the better good,
amazing book for Perl.

Tom Malone wrote:
> 
> I'm pretty new to programming - besides JavaScript, PHP is really the first
> language I've used.
> I'm just wondering, and I'm sure you all would know - should I learn Perl?
> Is it considered a necessity for a web developer to know Perl, or is it not
> a worthwhile endeavor, considering how easy PHP is to learn and use? Someone
> I know told me not to bother, but I just wanted a second opinion.
> (BTW - if you think it is worthwhile to learn Perl, what is a good book to
> begin with?)
> 
> Thank you!
> Tom Malone
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Question about hosting

2001-07-18 Thread Francis Fillion

 Well for myself I will better like to have the 2 computer design, 1 for
httpd and 1 for mysql, it's alway's better that way the few nano that
you lose in transit are way better then a server that do both stuff. Now
the problem (that eat a lot of time is php and mysql, doh!). So you have
optimise that, is mysql will be mostly for read or write data what kind
of %, if you need more read or more accurate read then write I suggest
you to have a lot of heap table (in memory table, put them read only and
get them to regenerate at every x times), copy of the mainly used data
in your application, with a lot of ram that will speed-up the main
thing. Then an other thing is to take big table and put them in smaller
table, way faster for writing/reading (hum, I don't quite remember if
mysql is row locking or table locking during write?).

Then they other best stuff is to make your dynamic page (.php) and to
make them static page (.html) this way you will get way faster viewing
page, you don't have they overload of neither php, nor mysql processing.
khttpd anyone?

Anyway, you could do a lot of stuff, load-balacing, an other server for
just your image, ...

If you want more, you should go at http://www.slashdot.org/ and do a
little search on that subjectthey had a few good article on that on the
last few month, year,...

Jay Paulson wrote:
> 
> Hello everyone-
> 
> I need some expert advice so I turn you to all! :)
> 
> I'm am currently in the process of making 7 web sites using PHP and MySQL
> backend.  I'm porjecting that all of these sites combined will get a million
> plus hits a month easy when it's all said and done.  What I'm wanting to do
> is to put the database on it's own machine and put the sites on a different
> machine to reduce the cpu load.  However, I'm not 100% sure this is the best
> option.  I know there are a ton of variables to consider with this situation
> and I'm trying to figure out the best way to go so I don't have to redo it
> again.
> 
> I'm thinking with the traffic these servers are going to incur if they are
> on one computer then I should probably have a dual CPU with a gig of ram or
> more and two hard drives.. Once CPU for serving up the pages and once CPU to
> run the db.  Also, one HD for the db and one HD for the pages in trying to
> get the most performace out of one machine.
> 
> Some of the dedicated options that people have thrown to me are in the range
> of a 450 CPU with 512 Ram and 30GB drive.  I don't think that with so many
> pages being served that this system will handle it.
> 
> Any suggestions?
> 
> Thanks,
> jay
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] count number of email sent to us

2001-07-18 Thread Francis Fillion

Yes you can send javascript stuff to php, juste use a form





function whatever(){
document.test.click.value= nomberofclick;
 document.test.submit();
}   


or something like that and $click will have the number of click in
xy.php

I'm not sure if this is good, can someone double check?

Jack wrote:
> 
> Sorry, It is mistyping here. I mean, we normally use variables from php to
> do something in javascript function. But how could we use value from
> variables in javascript function to do something in php function?
> Jack
> [EMAIL PROTECTED]
> "Love your enemies, it will drive them nuts"
> - Original Message -
> From: Zak Greant <[EMAIL PROTECTED]>
> To: Jack <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 18, 2001 2:39 AM
> Subject: Re: [PHP] count number of email sent to us
> 
> > Check the list archives - this question gets posed quite often.
> >
> > --zak
> >
> > - Original Message -
> > From: "Jack" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 18, 2001 1:38 PM
> > Subject: Re: [PHP] count number of email sent to us
> >
> >
> > > Yes, that is the point here. We normally use variables from php to do
> > > something in php function, how could we use javascript variables to do
> > > something in php function?
> >
> >
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] submitting free-form text to a database

2001-07-16 Thread Francis Fillion

If I remember the best things with M$ oriented database, is to to double
it so "'" should be "''" and it should be ok. Anyway, that's what I do
when I have to do stuff with those software.

garman wrote:
> 
> >= Original Message From Duncan Hill <[EMAIL PROTECTED]> =
> >On Mon, 16 Jul 2001, garman wrote:
> >
> >> box where the user enters a description of the item he is selling.
> >> If the user's input contains an apostrophe (aka a single quote "'")
> >> or even a double quote, the code gets confused.
> >
> >addslashes()
> >
> >RTM :)
> 
> I was originally using regular expressions to achieve the same effect as
> addslashes().  But I switched to addslashes() anyway, and the problem
> persists.
> 
> My guess is that MS Access uses a method other than slashes to escape quotes.
> 
> Matt
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] newbie question

2001-07-12 Thread Francis Fillion

Try this : $st = ereg_replace ("\+is", "and_is", $st);

you have to escape the + sign it mean other things then just literal

André Weidemann wrote:
> 
> The ereg_replace for some reason doesn't always work.
> I tried this:
> 
> 
>  $st = " This +is a test";
> $st = ereg_replace ("=+is", "and_is", $st);
> echo "$st";
> ?>
> 
> 
> 
> ..and got:
> REG_BADRPT in /usr/local/httpd/htdocs/test.php on line 5
> What is wrong and how can I do what I want to?
> 
> Thanx a lot in advance,
>  André.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Regular expression, parsing bad html in a xml document (strange)

2001-07-12 Thread Francis Fillion

Lazy me, after a short break, alway's helping, I found out wthat it has
to be:
/\<(?!\?xml|\!DOCTYPE|\!ENTITY|image|item|\/item)/


the  ?! negate this text, I though that I could put it in every value
like this (?!\?xml|?!\!ENTITY ... but no by putting in first he do it
for all (k.i.s.s. Francis).


Cu

Francis Fillion wrote:
> 
> I'm having problem with regular expression, not a good eek this week it
> seen like I alway's get a wall of problem. I know that it surely been
> ask a 1000 times, I look around, didn't find anythings, if you find
> somethings please point me out.
> 
> So here what I want to do, I need to parse a xml document , but before
> to parse it I need to get rid of bad html that I don't want, but the
> document that I want require some stuff that I need too, so I don't want
> to get ride of all they HTML.
> 
> So what I want to do, I already did a little bite of code that get out
> my good element and check for bad stuff, the only bad thing is that
> "text do bad things with my xml parser.
> 
> Here what I try
> 
> $simple = << 
>
>  
>  ]>
>  
> text
>
> texttext
>   link="http://www.windplanet.com/";
> url="http://www.windplanet.com/images/news/988991159.gif";
> align="left" width="235"  height="131"  size="13310"/>
> text
> text
>   link="http://www.windplanet.com/";
> url="http://www.windplanet.com/images/news/988991159.gif"; align="left"
> width="235"  height="131"  size="13310"/>
>  
> 
> XMLDATA;
> //$simple = str_replace("\n\n"," <br/>  <br/> ",$simple);
> 
> /* trouve moi tous les < sauf suivant ceci ... */
> $data = $simple;
> print $data;
> 
>if(preg_match_all("/\<(?:(?:\!|\/|\?|)(?:   foreach( $cbadhtml as $key => $myarray){
>   foreach( $myarray as $key2 => $myarray2){
>     print "You can't use HTML here so ".
> htmlentities($myarray2) ." is not allowed\n";
>   }
> }
> // what html? we exit
> //exit;
> 
> }
> 
> It find all the < but doesnt' remove the one that I accept, so how can I
> find the bad < and transform them to < ?
> 
> Thank you and have a nice day.
> 
> --
> Francis Fillion, BAA SI
> Broadcasting live from his linux box.
> And the maintainer of http://www.windplanet.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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Regular expression, parsing bad html in a xml document (strange)

2001-07-12 Thread Francis Fillion

I'm having problem with regular expression, not a good eek this week it
seen like I alway's get a wall of problem. I know that it surely been
ask a 1000 times, I look around, didn't find anythings, if you find
somethings please point me out.

So here what I want to do, I need to parse a xml document , but before
to parse it I need to get rid of bad html that I don't want, but the
document that I want require some stuff that I need too, so I don't want
to get ride of all they HTML.

So what I want to do, I already did a little bite of code that get out
my good element and check for bad stuff, the only bad thing is that
"text
 
 
 ]>
 
text 
   
texthttp://www.windplanet.com/";
url="http://www.windplanet.com/images/news/988991159.gif"; 
align="left" width="235"  height="131"  size="13310"/>
text
text
 http://www.windplanet.com/";
url="http://www.windplanet.com/images/news/988991159.gif"; align="left"
width="235"  height="131"  size="13310"/>
 

XMLDATA;
//$simple = str_replace("\n\n"," <br/>  <br/> ",$simple); 

/* trouve moi tous les < sauf suivant ceci ... */
$data = $simple;
print $data;
if(preg_match_all("/\<(?:(?:\!|\/|\?|)(?: $myarray){
  foreach( $myarray as $key2 => $myarray2){
print "You can't use HTML here so ". 
htmlentities($myarray2) ." is not allowed\n";
  }
}
        // what html? we exit 
//exit;
  
}

It find all the < but doesnt' remove the one that I accept, so how can I
find the bad < and transform them to < ?

Thank you and have a nice day.

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Re: Warning: mail() is not supported in this PHP build

2001-07-11 Thread Francis Fillion

 Did you restart your web server? If he is not, it will be they old
build that will show, because it will be they old server that will be
running.

Kyle wrote:
> 
> Somebody mentioned that PHP checks to see if sendmail was installed when it
> was installing.
> 
> Just I have another question, does anyone know where PHP puts everything
> when it installs? I keep recompiling PHP and Apache, and every time I run
> phpinfo() it still has the original build date. I tried deleting:
> 
> /usr/local/lib/php
> 
> /usr/local/include/php
> 
> /src/modules/php4/
> 
> - Kyle
> 
> "Kyle" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Warning: mail() is not supported in this PHP build in testmail.php on line
> 1
> >
> > I don't remember disabling it when I compiled, and I can't find anything
> to
> > specifically enable it when compiling.  I'm running PHP 4.0.6.  My
> > sendmail_path is correct in my php.ini.
> >
> > I tried recompiling php4 and apache but it seems that it isn't overwriting
> > the php modules.  What files are used? I tried deleting the  > src>/src/modules/php4 folder.
> >
> > Any help would be greatly appreciated.
> >
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] How do I get PHP's User-Agent?

2001-07-11 Thread Francis Fillion

Oops, I mean get php to open a page that get 
$HTTP_USER_AGENT and to send it back to you, or to show it to you.

Nathan wrote:
> 
> I need to create an authentication hash based on the user agent, to
> connect to a server but I need PHP?s User Agent, which is usually
> something like PHP/4.0.X. Is there a variable or way to get this? Thank
> you.

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Re: How do I get PHP's User-Agent?

2001-07-11 Thread Francis Fillion

Just that: $HTTP_USER_AGENT



Philip Hallstrom wrote:
> 
> You could have PHP open a URL that contained the phpinfo(); function and
> then just look through that...
> 
> -philip
> 
> On Wed, 11 Jul 2001, Nathan wrote:
> 
> > I need to create an authentication hash based on the user agent, to
> > connect to a server but I need PHP?s User Agent, which is usually
> > something like PHP/4.0.X. Is there a variable or way to get this? Thank
> > you.
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Fatal error: Call to undefined function: mysql_pconnect() in ...

2001-07-11 Thread Francis Fillion

Did you try a 


to see if mysql is compiled in

Matthew Loff wrote:
> 
> Have you tried a non-persistant connection?  Does that work?
> 
> mysql_connect()?
> 
> -Original Message-
> From: Tom Beidler [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 3:12 PM
> To: php list
> Subject: [PHP] Fatal error: Call to undefined function: mysql_pconnect()
> in ...
> 
> I'm working with an new ISP and I'm having trouble connecting to MySQL
> through PHP 4.
> 
> Here's some server specifics;
> PHP Version 4.0.4pl1
> Apache/1.3.14
> 
> DBA supportenabled
> Supported handlersgdbm db2 db3
> 
> I'm getting the following error;
> 
> Fatal error: Call to undefined function: mysql_pconnect() in /home/...
> on line 5
> 
> Line 5 is;
> 
> $connection = mysql_pconnect("localhost","myuserid","mypass")
> 
> It's a new box so I'm assuming it's something in the configuration. I
> don't have access to the server so I'm trying to troubleshoot for the
> ISP. Any help would be greatly appreciated.
> 
> Thanks,
> Tom
> 
> --
> PHP General Mailing List (http://www.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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] PArsing xml document with php

2001-07-11 Thread Francis Fillion

I'm trying to parse a xml document in php and to get in an array, but it
sometime give me really strange result.

Like if I have: 

$simple="  test ";
$parser = xml_parser_create();
xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
xml_parse_into_struct($parser,$simple,$vals,$index);
xml_parser_free($parser);


It will give me this in $index
Array
(
[ITEM] => Array
(
[0] => 0
)

)
###
And this in $vals
Array
(
[0] => Array
(
[tag] => ITEM
[type] => cdata
[level] => 1
[value] => *test 
)

)


What does the "*" means? Why is it there? Have any other's have
experienced any problem with php and xml?


Compiled with those option:
./configure   --enable-track-vars  --with-gd=../gd-1.8.3 
--with-swf=../php4-swf  --with-mysql   --enable-xslt
--with-xslt-sablot=../Sablot-0.60  --with-apxs
--enable-sablot-errors-descriptive --with-xml
--with-dom=/usr/include/libxml --with-zlib

ON Apache 1.3.20, php 4.0.6 and redhat 6.2

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] Variable Next To Variable?

2001-07-11 Thread Francis Fillion

 You could use an array:

like



Way better this way
and you oculd do:

$y=1;
while($y 
> Sorry if this has been brought up 100 times.
> 
> I want to do this:
> 
> $y = "1";
> 
> while ($y <= "$Number_Children") {
> if (!$C_Last_Name$y) {
> error stuff;
> $y++;
> }
> }
> 
> The form submitting information to this code has field name like
> C_Last_Name1 C_Last_Name2 depending on how many Children
> are signing up for something. So I need $y to represent the number.
> 
> Hope that makes sense. Thanks for any help.
> Jeff Oien
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] XSLT - sablot - 4.0.6

2001-07-11 Thread Francis Fillion


I have been looking around for this for all day, now I need your help.

I just compiled php 4.0.6 with those extension:
./configure   --enable-track-vars  --with-gd=../gd-1.8.3 
--with-swf=../php4-swf  --with-mysql   --enable-xslt
--with-xslt-sablot=../Sablot-0.60  --with-apxs
--enable-sablot-errors-descriptive

Then by trying to use the stuff that I was working on before that, since
the beginning of one of the first sablot extension, it doesn't work out,
the function that I was using xslt_process seen to not work anymore,
well not as I want. So I look around and find this
from Sebastian Bergmann"
 Coordinate with Sterling, but here you go: ext/sablotron is no longer
beeing worked on and ext/xslt is the 'next generation'" at
http://marc.theaimsgroup.com/?l=php-dev&m=99454710008416&w=2.

Then I look in the CVS to see what I can find and I find
README.XSLT-BACKENDS in /php4/ext/xslt/

I look at your stuff, well the README and find some help in this:
 $args = array("/_xml" => $xml,
   "/_xsl" => $xsl);
 
 $xh = xslt_create();
 $data = xslt_process($xh, "arg:/_xml", "arg:/_xsl", NULL, $args);
 xslt_free($xh);
 
 print( "The results of the transformation were\n" );
 print( "\n\n" );
 print( $data );
 print( "\n\n" );

But it still doesn't work it get me my data, but it print out the xml
document first and then my parse result, how come?

First, what did I didn't understand?
Second, how can I use sablotron as before with the new version, the
backend stuff?

Well OK, I can live with the change to have more then a XSLT parser,
it's good for me, but how do I choose the one that I want, I didn't see
any news about this (search around, deja, php site and zend, not much in
mailing list except the stuff below), I guess I will have to subscribe
to devel mailing list.

And is this scary for me "This function is EXPERIMENTAL. That means,
that the behaviour of this function, this function name, in concreto
ANYTHING
 documented here can change in a future release of PHP WITHOUT NOTICE.
Be warned, and use this function at your own risk." I though that with
sablot, it was near production, but it didn't seen so now.



Thanks you.



-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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]