php-general Digest 25 Apr 2001 22:19:37 -0000 Issue 649

Topics (messages 50265 through 50376):

Re: Autoupdate of page
        50265 by: Richard

Re: File Transfer over HTTPS
        50266 by: Meir kriheli

selected <option bla bla >
        50267 by: Hasbullah Pit (sebol)
        50279 by: Wade

Re: Very important.
        50268 by: B. van Ouwerkerk
        50269 by: B. van Ouwerkerk

Re: user login names/values
        50270 by: Thimo von Rauchhaupt

Re: DOCUMENT_ROOT
        50271 by: Maxim Maletsky
        50292 by: Jaxon
        50301 by: PHPBeginner.com

Re: PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPE R?
        50272 by: Maxim Maletsky
        50281 by: Yasuo Ohgaki
        50282 by: Daniel BI
        50285 by: Pavel Jartsev

Re: How to turn off warnings ???
        50273 by: ahmad varoqua
        50284 by: Christian Reiniger

Re: payment verification...
        50274 by: B. van Ouwerkerk
        50289 by: elias

Parsing HTML files from an external web server
        50275 by: James Kneebone

Re: Fatal Errors and Error Handling
        50276 by: Svein Roar Nilsen
        50280 by: Christian Reiniger

Re: checking url
        50277 by: Subodh Gupta

Escaping Characters
        50278 by: Wade
        50295 by: Yasuo Ohgaki
        50297 by: PHPBeginner.com
        50314 by: Yasuo Ohgaki

Problem in sending mail with mail() function
        50283 by: Vishak K Tomy
        50317 by: Sigitas Paulavicius

roblem in sending mail with mail() function
        50286 by: Vishak K Tomy

Generating XML
        50287 by: Young Chi-Yeung Fan
        50321 by: Jeff Carnahan

PHP and system()
        50288 by: Tym Rehm

HTTP message
        50290 by: Young Chi-Yeung Fan

Retrieving and Printing Categories
        50291 by: Jordan Elver
        50300 by: PHPBeginner.com

mcrypt help please
        50293 by: ryan.barnett1

SVG & PHP
        50294 by: Nick Winfield
        50307 by: Phil Driscoll
        50308 by: Matthew Luchak

php FTP
        50296 by: ryan.barnett1
        50302 by: PHPBeginner.com
        50305 by: Matt Schroebel
        50312 by: Miles Thompson
        50315 by: Matt Schroebel

Wierd error messages
        50298 by: Euan Greig
        50306 by: Brian S. Dunworth

OOP and Future of PHP
        50299 by: Reuben D Budiardja
        50320 by: Rasmus Lerdorf
        50337 by: Steven Haryanto

Some questions on PHPUnit
        50303 by: Steven Haryanto

safe uploading with PHP
        50304 by: Steven Haryanto
        50319 by: Rasmus Lerdorf

Re: checking if e-mail address and syntax are valid
        50309 by: Nikhil Goyal

rounding up
        50310 by: Joseph Bannon
        50311 by: Matt Williams
        50313 by: John Huggins

forms and RETURN key
        50316 by: Bill Rausch

Newbie struggling to set $PGDATA
        50318 by: Geoff Caplan

Re: getting rows from separate tables stacked in a single array ? (newbie, mysql)
        50322 by: Nicolas Mermet

Re: Lines
        50323 by: Rafael Faria

Upload a File
        50324 by: Rafael Faria
        50325 by: Rafael Faria
        50327 by: Rasmus Lerdorf

Re: MSIE on Windows can't open PDF via SSL
        50326 by: DAve Goodrich

simple querying mysql in a WML card problem :(
        50328 by: Sandeep Hundal
        50343 by: James, Yz

Re: Can I install Lihnux on My Windows 95 machine ?
        50329 by: sono.selectcomm.ab.ca
        50334 by: B. van Ouwerkerk

maximum length of email address
        50330 by: Dennis Gearon
        50335 by: Steven Haryanto

LDAP listing from Exchange
        50331 by: Mike Tuller
        50333 by: Mike Tuller

Re: Newbie Question
        50332 by: Jeff Warrington

Payflow Pro extension in php 4.0.4pl1
        50336 by: Henning Kilset Pedersen
        50341 by: Dan Harrington
        50344 by: Henning Kilset Pedersen
        50346 by: Robert Covell
        50350 by: Henning Kilset Pedersen

IMLIB
        50338 by: Charles
        50374 by: Matt McClanahan
        50375 by: Rasmus Lerdorf

Count....
        50339 by: Rafael Faria
        50340 by: Henning Kilset Pedersen

Re: Count.... --oops, addendum
        50342 by: Henning Kilset Pedersen

ForceType or what?
        50345 by: Mihailo Dzigurski
        50349 by: John Platte

SQL Query time?
        50347 by: James, Yz
        50352 by: Martín Marqués
        50373 by: Steve Lawson

php slowdown under apache on win 2000 only under netscape
        50348 by: Laurence Gordon
        50353 by: Laurence Gordon

update form design question.
        50351 by: Larry Hotchkiss

Payflow, story continued
        50354 by: Henning Kilset Pedersen
        50355 by: John Donagher
        50357 by: Dan Harrington
        50359 by: Robert Covell
        50365 by: Dan Harrington
        50366 by: John Donagher
        50367 by: John Donagher
        50369 by: Kelly Cochran

Session kill and apache
        50356 by: Dominique Paquin

PHP, MSSQL7 & Transactions
        50358 by: rememberthatstore.com
        50363 by: Frank M. Kromann

I need help from you.
        50360 by: javieryep.godmarketing.com
        50362 by: Chris Anderson

Securing Mail body contents then sendng through PHP?
        50361 by: Scott Brown

Passing arrays from page to page
        50364 by: Clif

MySQL and LIKE?
        50368 by: Jason Caldwell
        50371 by: Sam Masiello

php3 work partially
        50370 by: Mauricio Alarcon
        50372 by: Philip Olson

translating a function from Perl to PHP
        50376 by: Black Dragon

Administrivia:

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

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

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


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


You can set a JavaScript to refresh after an amount of time, or call this
function whenever the table is updated.


echo "<script language='javascript'>jscode....</script>";        // as soon
as you are done.


-Richard


""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message
004101c0cba9$b330b840$211412d1@null">news:004101c0cba9$b330b840$211412d1@null...
> Hitting refresh would do it, you cant do anything client wise because the
> box is being filled by the server code
> ----- Original Message -----
> From: "Martin Skjöldebrand" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 24, 2001 3:53 PM
> Subject: [PHP] Autoupdate of page
>
>
> > IS there a standard way of "auto-updateing" the contents of a page after
a
> > databas insert or edit? Do a SELECT updates the contents I can update
> > tables I've noticed. Contents in select boxes (as in
> >
> >  while ($row = mysql_fetch_row($secquery_res)) {
> >                     print "<option>$row[0]</option>";
> >                   }
> > )
> >
> > is not automatically updated to match edits or inserts done on the same
> > page. You have to initialize the select box again. Or is there another
> way?
> >
> > 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 General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






On Wednesday 25 April 2001 01:15, Rasmus Lerdorf wrote:
> > If I wanted to use this utility to copy a file from a users (Windows)
> > workstation to my (Linux) webserver, how would I do this?  The program on
> > the users workstation will create a file called "info.txt" and place it
> > in c:\wow.  I want it to go to my server upload.mydomain.com.  How do I
> > get the file c:\wow\info.txt from the user to my web server over https?
>
> You'll need the user to run some program that sends it.  Like the curl
> thing if it actually works on Windows.
>
> -Rasmus

If you're running ssh on the server you can try the scp (secure copy ?) 
protocol. For windows there's is a freeware called winscp (loop it up in 
google). But this has nothing to do with php.

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd




I have this one :-

        <select name="jenis_biasiswa">
          <option selected>Penuh</option>
          <option>Separuh</option>
          <option>Sendiri</option>
        </select>
and a field of table which contained with 
'Penuh' OR 'Separuh' OR 'Sendiri'

I want to make it Ither one is 'selected' during a particular time.
i'm thinking of having something like this:-


<select name="jenis_biasiswa">
<option <? function_that_determine_it_selected_or_not(Penuh)?>
>Penuh</option>
<option <? function_that_determine_it_selected_or_not(Separuh)?>
>Separuh</option>
<option <? function_that_determine_it_selected_or_not(Sendiri)?> >
Sendiri</option>
</select>

Is that any prebuild/example funtion for  that
function_that_determine_it_selected_or_not(Sendiri) then print
"Selected" ?

thanks in advance


-- 
Hasbullah Bin Pit (sebol) http://ikhlas.com

" Melihat keadaan sistem kehakiman sekarang ini,
  Saya tak hairan kalau saya disabitkan dengan kesalahan 
 'Menceraikan isteri di luar mahkamah' ketika saya masih bujang"
                               - Hasbullah Pit -




I am sure my solution is not the most elegant, but this is what I did:

<?
switch($acc_state){
 case "0":
 $st0 = selected;
 break;
 case "AL":
 $stAL = selected;
 break;
.....

print "<SELECT size=1 tabindex=11 name=accstate>
                <option value=\"0\" $st0 ></option>
                <option value=\"AL\" $stAL >ALABAMA</option>
....
?>

""Hasbullah Pit (sebol)"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have this one :-
>
>         <select name="jenis_biasiswa">
>           <option selected>Penuh</option>
>           <option>Separuh</option>
>           <option>Sendiri</option>
>         </select>
> and a field of table which contained with
> 'Penuh' OR 'Separuh' OR 'Sendiri'
>
> I want to make it Ither one is 'selected' during a particular time.
> i'm thinking of having something like this:-
>
>
> <select name="jenis_biasiswa">
> <option <? function_that_determine_it_selected_or_not(Penuh)?>
> >Penuh</option>
> <option <? function_that_determine_it_selected_or_not(Separuh)?>
> >Separuh</option>
> <option <? function_that_determine_it_selected_or_not(Sendiri)?> >
> Sendiri</option>
> </select>
>
> Is that any prebuild/example funtion for  that
> function_that_determine_it_selected_or_not(Sendiri) then print
> "Selected" ?
>
> thanks in advance
>
>
> --
> Hasbullah Bin Pit (sebol) http://ikhlas.com
>
> " Melihat keadaan sistem kehakiman sekarang ini,
>   Saya tak hairan kalau saya disabitkan dengan kesalahan
>  'Menceraikan isteri di luar mahkamah' ketika saya masih bujang"
>                                - Hasbullah Pit -
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>







>I think, removing the guy of the list would help us to avoid meeting the
>virus on this list again.

Come on.. this is a very_old_common_virus. Any half decent AV product 
should keep your system clean from this. Rather warn the person and help 
him to get rid of the virus..

If everyone who send a virus to a list should have been kicked off the 
listadmins would have a daytime job on this..

Bye,


B.






>I may have lost several weeks of work to this virus, and I advise you all 
>to watch out, as it was likely sent inadvertantly.

Does the word "backup" ring any bells????
Ever hear about "antivirus software"????

Bye,



B.





Just to mention security, look at this page:

http://www.livin4.com/jhacker/jh1.htm

A simple login isn?t that easy,








NO, not the directory of the current script.

the directory of your virtual host.

DOCUMENT_ROOT is your WEB ROOT

common. I gave an example... look into your apache (vHOST) DocumentRoot is
what your $DOCUMENT_ROOT is

Sincerely, 

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


 
-----Original Message-----
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 7:03 PM
To: Yasuo Ohgaki
Cc: PHP General Mailing List
Subject: Re: [PHP] DOCUMENT_ROOT


Thanks for the reply,
I'm not using virtual hosts on my local machine but I am on the production 
machine. What should DOCUMENT_ROOT return? I though it returns the directory

of the current script. So if I had a site in 
/usr/local/apache/htdocs/cha/script.php then I would expect DOCUMENT_ROOT to

return /usr/local/apache/htdocs/cha/, is that right?

Is it posible to setup a virtual host on localhost?

Cheers,

Jord

On Wednesday 25 April 2001 01:05, you wrote:
> If you are using Apache virtual host, it will set virtual host's document
> root. Is this what you want?
>
> Regards,
> --
> Yasuo Ohgaki
>
>
> "Jordan Elver" <[EMAIL PROTECTED]> wrote in message
> 01042417535900.00987@localhost">news:01042417535900.00987@localhost...
>
> > Hi,
> > Has any got any idea why $DOCUMENT_ROOT returns /usr/local/htdocs on my
> > home machine but it should return /usr/local/htdocs/sitename or where
> > ever I put it, but on my production machine it return what it should
like
> > /usr/local/sitename or whatever?
> >
> > I'm trying to use it to help include files in different directories (see
> > my previous post, site structure). Got any ideas about this?
> >
> > Cheers,
> >
> > Jord
> >
> > --
> > PHP General Mailing List (http://www.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]




Not to beat a dead horse, but assuming a site structure like this:

/htdocs
/htdocs/modules
/htdocs/includes
/htdocs/templates

where all my PHP logic scripts are in htdocs, and all the bits and pieces
are in the other dirs, is there any way to set include_path to:

$include_path = "$DOCUMENT_ROOT/config; $DOCUMENT_ROOT/includes;
$DOCUMENT_ROOT/templates;"

so I can just include("filename.inc.php"); where ever I am in my structure,
without worrying about putting in a relative or absolute path, AND do this
without altering the php.ini?? (cuz I may not have access to it in a shared
hosting env)

cheers,
jaxon






what about having an .htaccess file in each web root?
You can't have vartiables in your server's config files.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Jaxon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 10:33 PM
To: Maxim Maletsky
Cc: PHP General Mailing List
Subject: RE: [PHP] DOCUMENT_ROOT


Not to beat a dead horse, but assuming a site structure like this:

/htdocs
/htdocs/modules
/htdocs/includes
/htdocs/templates

where all my PHP logic scripts are in htdocs, and all the bits and pieces
are in the other dirs, is there any way to set include_path to:

$include_path = "$DOCUMENT_ROOT/config; $DOCUMENT_ROOT/includes;
$DOCUMENT_ROOT/templates;"

so I can just include("filename.inc.php"); where ever I am in my structure,
without worrying about putting in a relative or absolute path, AND do this
without altering the php.ini?? (cuz I may not have access to it in a shared
hosting env)

cheers,
jaxon



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






correct: 

we are PHP developers, not JavaScript.

However, I am sure that the amount and configurations of your computers
don't matter here.
try to look for a simple problem. Try to rewrite it all again, etc... not a
big deal - don't hit your head to the wall.


Sincerely, 

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



-----Original Message-----
From: Daniel BI [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 7:12 PM
To: PHP digest
Subject: [PHP] PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?


Did anybody have the same error?

I have this simple script:

===============
<?
session_start() ;
?>

<FORM METHOD=POST NAME="form1"
    ENCTYPE="multipart/form-data" ACTION="another_script.php">

<SELECT NAME="sel" onChange='hidden_filed.value=this.value<<3">
<OPTION VALUE=1> First option
</SELECT>

<INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0>
================

on a computer the output is perfect, on the second computer,
there is a strange error, I've ever seen in my life!

the output on the second computer, in the 'select' line, is this:

<SELECT NAME="sel" onChange='hidden_filed.value=this.value< <3">

as you can see, there is a space between the two " < ", and some times
there it show some garbage between those two " < " .

this only disappears when I remove the " session_start " statement!
ANY IDEA, PLEASE?!.. I am loosing many our and cannot figure out
how to fix that!.. I need sessions, I cannot just give it up!

the first computer is a Pentium II, on linux RH 6.1
with apache-1.4.13+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1

and it's working just fine!

but... the second computer is Pentium III on linux RH 7.0, same
configuration, but with php-4.0.1pl2, (purchased!!!...) and it does
yeld that error.
I tried with the php-4.0.1pl1 (as with the first computer) but curiously...
it does act the same wrong way..
it seems to be something about sessions, but independently of the
php version...
I compiled the apache server with the 'public' UID, 'guest' GUID, and
they are present in my linux user and group list. the session does
actually write any info correctly. (i tried a session_register('blabla') and
it works)...
the error only disappears when I remove the " session_start " statement!

ANY help or idea would be greatly appreciated!

thanx,
Daniel BI



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




Do you enable trans-sid? What happen if you disable it?
(There are several trans-sid related bugs are fixed since 4.0.1, I think.)

Regards,
--
Yasuo Ohgaki


""Daniel BI"" <[EMAIL PROTECTED]> wrote in message
002201c0cd70$2f8d6240$02001aac@adsl">news:002201c0cd70$2f8d6240$02001aac@adsl...
> Did anybody have the same error?
>
> I have this simple script:
>
> ===============
> <?
> session_start() ;
> ?>
>
> <FORM METHOD=POST NAME="form1"
>     ENCTYPE="multipart/form-data" ACTION="another_script.php">
>
> <SELECT NAME="sel" onChange='hidden_filed.value=this.value<<3">
> <OPTION VALUE=1> First option
> </SELECT>
>
> <INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0>
> ================
>
> on a computer the output is perfect, on the second computer,
> there is a strange error, I've ever seen in my life!
>
> the output on the second computer, in the 'select' line, is this:
>
> <SELECT NAME="sel" onChange='hidden_filed.value=this.value< <3">
>
> as you can see, there is a space between the two " < ", and some times
> there it show some garbage between those two " < " .
>
> this only disappears when I remove the " session_start " statement!
> ANY IDEA, PLEASE?!.. I am loosing many our and cannot figure out
> how to fix that!.. I need sessions, I cannot just give it up!
>
> the first computer is a Pentium II, on linux RH 6.1
> with apache-1.4.13+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1
>
> and it's working just fine!
>
> but... the second computer is Pentium III on linux RH 7.0, same
> configuration, but with php-4.0.1pl2, (purchased!!!...) and it does
> yeld that error.
> I tried with the php-4.0.1pl1 (as with the first computer) but curiously...
> it does act the same wrong way..
> it seems to be something about sessions, but independently of the
> php version...
> I compiled the apache server with the 'public' UID, 'guest' GUID, and
> they are present in my linux user and group list. the session does
> actually write any info correctly. (i tried a session_register('blabla') and
> it works)...
> the error only disappears when I remove the " session_start " statement!
>
> ANY help or idea would be greatly appreciated!
>
> thanx,
> Daniel BI
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi !
Don't bother with it, anybody!

I recompiled all under php-4.0.4pl1 version and it
works just fine! It seems it was the php version's fault..

thank u all!

Daniel BI

 > Did anybody have the same error?
 >
 > I have this simple script:
 >
 ===============
 <?
 session_start() ;
 ?>

 <FORM METHOD=POST NAME="form1"
     ENCTYPE="multipart/form-data" ACTION="another_script.php">

 <SELECT NAME="sel" onChange='hidden_filed.value=this.value<<3">
 <OPTION VALUE=1> First option
 </SELECT>

 <INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0>
 </FORM>
 ================
 >
 > on a computer the output is perfect, on the second computer,
 > there is a strange error, I've ever seen in my life!
 >
 > the output on the second computer, in the 'select' line, is this:
 >
 > <SELECT NAME="sel" onChange='hidden_filed.value=this.value< <3">
 >
 > as you can see, there is a space between the two " < ", and some times
 > there it shows some garbage between those two " < " .
 >
 > this only disappears when I remove the " session_start " statement!
 > ANY IDEA, PLEASE?!.. I am loosing many hours and cannot figure out
 > how to fix that!.. I need sessions, I cannot just give it up!
 >
 > the first computer is a Pentium II, on linux RH 6.1
 > with apache-1.3.14+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1
 >
 > and it's working just fine!

 > but... the second computer is Pentium III on linux RH 7.0, same
 > configuration, but with php-4.0.1pl2, (purchased!!!...) and it does
 > yeld that error.
 > I tried with the php-4.0.1pl1 (as with the first computer) but
 curiously...
 > it does act the same wrong way..
 > it seems to be something about sessions, but independently of the
 > php version...
 > I compiled the apache server with the 'public' UID, 'guest' GUID, and
 > they are present in my linux user and group list. the session does
 > actually write any info correctly. (i tried a session_register('blabla')
  > and
 > it works)...
 > the error only disappears when I remove the " session_start " statement!







Daniel BI wrote:
> 
> Did anybody have the same error?
> 
> I have this simple script:
> 
> ===============
> <?
> session_start() ;
> ?>
> 
> <FORM METHOD=POST NAME="form1"
>     ENCTYPE="multipart/form-data" ACTION="another_script.php">
> 
> <SELECT NAME="sel" onChange='hidden_filed.value=this.value<<3">

Maybe it's just typo, but line above should be:
<SELECT NAME="sel" onChange="hidden_field.value=this.value<<3">


-- 
Pavel a.k.a. Papi




::-----Original Message-----
::From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
::Sent: Tuesday, April 24, 2001 12:57 AM
::To: Php-General
::Subject: Re: [PHP] How to turn off warnings ???
::
::
::On Monday 23 April 2001 23:50, Roee Rubin wrote:

::> Whenever I try to execute some code I receive 'warnings', that
::> basically clutter up the screen. Since I am assuming that these are not
::> fatal - is there  any way to turn them off?
::
::Warnings are not fatal as such, but they often give hints that you have a
::bug somewhere. Correct your code.
::
::--
::Christian Reiniger
::LGDC Webmaster (http://sunsite.dk/lgdc/)
::
::...10001000110101011010101101011110111010113...????
::

Hello, I too am a novice and have the same problems with "warning: undefined
variable" or "undefined index" when I have display errors 'on'.  The scripts
work fine and I have reg_globals 'off' (I've been following that thread
closely as well!) .  How critical are these warnings? Is it overenthusiam on
php's error tracking?  You say to 'correct the code' and I believe you, but
what should I do?  I want my code to be as clean as possible.   I've been
enlightened to A LOT of things in the short time I've been on this list and
any input is greatly appreciated!!

tia,

ahmad






On Wednesday 25 April 2001 13:28, ahmad varoqua wrote:

> Hello, I too am a novice and have the same problems with "warning:
> undefined variable" or "undefined index" when I have display errors
> 'on'.  The scripts work fine and I have reg_globals 'off' (I've been
> following that thread closely as well!) .  How critical are these
> warnings? Is it overenthusiam on php's error tracking?  You say to

Well, "undefined variable" for example means, that at
if ($foobar == 0) {...}
$foobar hasn't been set to anything so far - it's value is undefined, 
meaning that the if() can do what it wants.

> 'correct the code' and I believe you, but what should I do?  I want my

Well, for example when working with URL parameters (which may or may not 
be set), use some wrapper function to access them. I use this code:

/*
 * Get global variable <name>
 * Automatically strips slashes when needed
 */
function pbGetGlobal ($Name)
{
        if (isset ($GLOBALS[$Name])) {
                if (get_magic_quotes_gpc () &&
                    is_string ($GLOBALS[$Name]))
                        return stripslashes ($GLOBALS[$Name]);
                else
                        return $GLOBALS[$Name];
        }
        else
        {
                return "";
        }
}

$MyVar = pbGetGlobal ("foobar");
if ($MyVar == 0) {...}

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

"Software is like sex: the best is for free" -- Linus Torvalds





>hello, i'm building an online payment form....
>the only thing is that i can't rely on the MOD10 CC validation algo...
>any one knows any company that provides CC validation (checks if account
>exists, and the money is enough to pay the price) ... ?
>I only need a company with such validation issue....
>All hints would be appriciated.

Dunno.. I saw a nice article about this on www.devshed.com

Bye,



B.





thank you.

""B. van Ouwerkerk"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> >hello, i'm building an online payment form....
> >the only thing is that i can't rely on the MOD10 CC validation algo...
> >any one knows any company that provides CC validation (checks if account
> >exists, and the money is enough to pay the price) ... ?
> >I only need a company with such validation issue....
> >All hints would be appriciated.
>
> Dunno.. I saw a nice article about this on www.devshed.com
>
> 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]
>






Hello List.

I'm having a little trouble with parsing HTML files and inputting the data
from
the HTML file into a MySQL database. I get the following error when trying
toparse the file.

Warning: file("http://www.server.com/file.htm";) - No error in
d:\webpages\world\lists.php on line 8

The following is part of my php code

<?

$url = "http://www.server.com/file.htm";;

$fileArray = file($url);

$state = 0;
$line = 0;
$ProvinceCount = 0;

$Details = Array();

****************

I then have more code which parses the file and parses the data and puts it in
an array.

I was wondering whether anybody could provide information as to what the
possible problem could be. If you want more information, please contact me
off-list.

Thanks,

James 




"Christian Reiniger" <[EMAIL PROTECTED]> wrote in message
01042417490700.07614@chrisbig">news:01042417490700.07614@chrisbig...
>Well, "needed to use" might be incorrect, because return value evaluation
>can be used instead (unless some functions never signal errors via their
>return value). Aside from that you're right.

OK, I will try to clarify my original problem...

At http://www.php.net/manual/en/function.xslt-process.php there is an
example program. When I use it as is, it works all right and produces a nice
table. Here is a short section of the code:
-----
[...]
if (xslt_process($xslData, $xmlData, $result)) {
[...]
} else {
echo "There was an error that occurred in the XSL transformation...\n";
echo "\tError number: " . xslt_errno() . "\n";
echo "\tError string: " . xslt_error() . "\n";
exit;
}
?>
-----

This is quite similar to what I am trying. If you now corrupts the xmlData
variable, e.g. by changing <article> to <rticl> without changing the closing
tag, you will get an error message saying

<br>
<b>Fatal error</b>:  XML parser error 7: mismatched tag in
<b>/var/www/test.php</b> on line <b>40</b><br>

As you can see here, xslt_process() dies with a fatal error and the program
is terminated, and we never get to testing the return value. The next
problem, is that since the error is "fatal", it is also not possible to use
set_error_handler() to catch the error. And placing the @-sing before the
variable only supresses the default error-message, which is not an
acceptable solution to us. The last thing I tried, was the
error_prepend_string and error_append_string in php.ini, but it is very
difficult making a valid error-message this way. Because of the unclosed
<br> tags we don't get a valid xml-message. And because of the <b> and <br>
tags, it would not comply with the error-message format we need to use
anyway. And using the @-sing causes error_append/prepend_string to be
ignored alltogether.

And in my opinion, there are too many things that can cause PHP to die with
a fatal error. So we simply *must* be able to handle it and give a valid and
reasonable error-message back.

--
Svein Roar Nilsen
Norwegian Hydrographic Services







On Wednesday 25 April 2001 13:32, Svein Roar Nilsen wrote:

[...]

> This is quite similar to what I am trying. If you now corrupts the
> xmlData variable, e.g. by changing <article> to <rticl> without
> changing the closing tag, you will get an error message saying
>
> <br>
> <b>Fatal error</b>:  XML parser error 7: mismatched tag in
> <b>/var/www/test.php</b> on line <b>40</b><br>
>
> As you can see here, xslt_process() dies with a fatal error and the
> program is terminated, and we never get to testing the return value.

[....]

> And in my opinion, there are too many things that can cause PHP to die
> with a fatal error. So we simply *must* be able to handle it and give a
> valid and reasonable error-message back.

Ok, agreed. I'd consider this a bug that should be submitted to 
bugs.php.net
It's certainly not acceptable that code using xslt_process() has *no way* 
of recovering from a (quite common) error. Corrupted data is something to 
be expected, something that even has to be considered *normal* when 
developing such a thing.

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

"Software is like sex: the best is for free" -- Linus Torvalds




Hi Dmitry,

In case you want a regular expression to check if it is a valid url you can try this...
 
$url = "yoururl";
if(empty($url)  && !eregi("^http://[A-Za-z0-9\%\?\_\:\~\/\.-]+$,$url))
    $errmsg="$url doesn't look like a valid URL\n";

I hope this helps.

Subodh Gupta
I have learned, Joy is not in things, it is in us.
You will ultimately be known by what you give and not what you get.

----- Original Message ----- 
From: "Dmitry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 2:14 AM
Subject: [PHP] checking url


Hello all.
Can you tell me, how can I check url address?
Also I want to know error, which return.
     Dmitry



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








Aside from " (quotes), which HTML characters should be preceded with a \
(backslash) to avoid parsing errors?

I have the following, which I have in an .inc file outside my web root. I
have tried sticking the \ in front of the # (pound) and the = (equal) -- not
out of any reason, but more out of frustration. I have been sticking
dropdown menu in inc files with no troubles, but this is the first table
I've tried to stick in there.  I'm trying not to ask questions here until
after trying to find an answer in PHP.net, but I've had no luck on this one.
<?
<table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
align=\"center\">
          <tr bgcolor=\"#ebebd6\">

....
?>

Much Thanks,
Wade






""Wade"" <[EMAIL PROTECTED]> wrote in message
9c6dcb$h8e$[EMAIL PROTECTED]">news:9c6dcb$h8e$[EMAIL PROTECTED]...
> Aside from " (quotes), which HTML characters should be preceded with a \
> (backslash) to avoid parsing errors?

No.

>
> I have the following, which I have in an .inc file outside my web root. I
> have tried sticking the \ in front of the # (pound) and the = (equal) -- not
> out of any reason, but more out of frustration. I have been sticking
> dropdown menu in inc files with no troubles, but this is the first table
> I've tried to stick in there.  I'm trying not to ask questions here until
> after trying to find an answer in PHP.net, but I've had no luck on this one.
> <?
> <table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
> align=\"center\">
>           <tr bgcolor=\"#ebebd6\">
>
> ....
> ?>

Why you put HTML like this inside PHP code tag? If you need HTML.

Try this

<?php
if ($var === TURE) {
?>
<h1> $var is true </h1>
<?php
}
else {
?>
<h1> $var is false </h1>
<?php
}
?>

Regards,
--
Yasuo Ohgaki

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




 "  double quotes
 '  single quotes (yes, they are used quite often)
 \  backslash (JavaScripts etc.)


there are your enemies, nothing else.
forget about + = & $ ...


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 8:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Escaping Characters


Aside from " (quotes), which HTML characters should be preceded with a \
(backslash) to avoid parsing errors?

I have the following, which I have in an .inc file outside my web root. I
have tried sticking the \ in front of the # (pound) and the = (equal) -- not
out of any reason, but more out of frustration. I have been sticking
dropdown menu in inc files with no troubles, but this is the first table
I've tried to stick in there.  I'm trying not to ask questions here until
after trying to find an answer in PHP.net, but I've had no luck on this one.
<?
<table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
align=\"center\">
          <tr bgcolor=\"#ebebd6\">

....
?>

Much Thanks,
Wade



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






My previous post is a bit misleading.

""Wade"" <[EMAIL PROTECTED]> wrote in message
9c6dcb$h8e$[EMAIL PROTECTED]">news:9c6dcb$h8e$[EMAIL PROTECTED]...
> Aside from " (quotes), which HTML characters should be preceded with a \
> (backslash) to avoid parsing errors?

No and Yes.

NO: You don't have to escape PHP special characters in HTML.
YES: You need to escape PHP special characters in string. (Generally speaking)

>
> I have the following, which I have in an .inc file outside my web root. I
> have tried sticking the \ in front of the # (pound) and the = (equal) -- not
> out of any reason, but more out of frustration. I have been sticking
> dropdown menu in inc files with no troubles, but this is the first table
> I've tried to stick in there.  I'm trying not to ask questions here until
> after trying to find an answer in PHP.net, but I've had no luck on this one.
> <?
> <table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
> align=\"center\">
>           <tr bgcolor=\"#ebebd6\">
>
> ....
> ?>

You cannot write HTML like this in PHP code.
You can write HTML in conditional statement as my previous post.
You also could write it as follows

$html =<<<EOH
<table width="90%" border="0" cellspacing="0" cellpadding="0"
align="center">
           <tr bgcolor="#ebebd6">

 ....
EOH;
print $html;


Heredoc does not require to escape ", ',newline,etc even if it is similar to
string with " or '.

Regards,
--
Yasuo Ohgaki




Hello,
        I tried to send mail through the mail function but it is not 
working. I am using php version 3.0.12 under linux, following is the
code I used to send mail.
        So what is the problem with it, any body please solve this.

Regards
Vishak

<html>

<?php
if ($submit) {
$recipient =
"[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]";
$sub = "this is a test";
$message = "this is a test message";
$headers .= "From: $from \n";
$headers .= "reply-To:$from\nX-Mailer: PHP/" .phpversion()." \n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$headers .= "X-Priority: 1";
mail($recipient,$sub,$message,$headers);
}
?>
<form action="<?php echo $PHP_SELF ?>">
<input type="submit" value="submit">
</html>





"Vishak K Tomy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
> I tried to send mail through the mail function but it is not
> working. I am using php version 3.0.12 under linux, following is the
> code I used to send mail.
> So what is the problem with it, any body please solve this.
>
> Regards
> Vishak

Hi

mail() uses the SMTP service running on localhost...errr... on the same
computer as the web service is running. So if there is no smtp service on
localhost, mail() won't work.
You must get SMTP libraray and use it to connect to some other server and
send the message. It's really simple and easy to come by.








Hello,
        I tried to send mail through the mail function but it is not 
working and it is not showing any error. I am using php version 3.0.12
under linux, following is the code I used to send mail.
        So what is the problem with it, any body please solve this.

Regards
Vishak

<html>

<?php
if ($submit) {
$recipient="[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]";
$sub = "this is a test";
$message = "this is a test message";
$headers = "Content-Type: text/html; charset=iso-8859-1\n";
$headers .= "X-Priority: 1";
mail($recipient,$sub,$message,$headers);
}
?>
<form action="<?php echo $PHP_SELF ?>">
<input type="submit" value="submit">
</form>
</html>




Hi,

I'm trying to write a script that generates XML dynamically and is
viewable in a browser (IE). Even though I send a header saying
"Content-type: text/xml\n", PHP still puts in a Content-type of
text/html before that. How can I write the script so that this doesn't
happen?

Here's the script:

<?php

header("Content-type: text/xml\n");

echo <<<EOS
<?xml version="1.0" encoding="UTF-8"?>
<test>
 <blah>df</blah>
</test>
EOS;

?>

Thanks so much for your help! (If you could cc a reply to my e-mail
address, that'd be really appreciated.)

Young





}I'm trying to write a script that generates XML dynamically and is
}viewable in a browser (IE). Even though I send a header saying
}"Content-type: text/xml\n", PHP still puts in a Content-type of
}text/html before that. How can I write the script so that this doesn't
}happen?
}
}Here's the script:
}
}<?php
}
}header("Content-type: text/xml\n");
}

First, ditch the \n in the above header... PHP will add the newline 
for you.. =)

Second, make sure that the <?php is the very first thing in your 
file. There should not be any spaces, newlines or any other 
characters before the <?php ... the < character should be the first 
character in the file.. =)

-- 
Jeff Carnahan - [EMAIL PROTECTED]




I'm a newbie and I trying to write a program that will take an email address
from a form and send an email to that address. I'm trying to use mutt to
send the email, due to needing to attach a file to the email. I'm using
system() to call mutt, but it doesn't appear to work. I'm passing php
variable to the system() call. I think the problem is the system() wants
shell variables and not the php variables. Can someone give me a hand.
Thanks.


***********************************************************
THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL
OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN
INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND EXEMPT
FROM DISCLOSURE UNDER APPLICABLE LAW.
If the reader of this message is not the intended
recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution,
forwarding, or copying of this communication is strictly
prohibited.  If you have received this communication in
error, please notify the sender immediately by e-mail or
telephone, and delete the original message immediately.
Thank you.
***********************************************************





Is it possible from PHP to look at the HTTP message sent to a script? If
so, how can I do it?

e.g.:

POST /MessageReceiver.jsp HTTP/1.0
Host: www.SomeHost.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 105

XML=%3C?xml%20version%3D%221.0%22%20encoding%3D%22utf-8%22?%3E%0A%3Cdoc%3Ehello%20world%3E%3C/doc%3E%0A





Hi,
I've got a load of records that are in different categories.
What is the best way to get all the records or selected records and print 
them in such a way that they are grouped (on the page) in their relevent 
category, like:

Fruit
-> Apples
-> Pears
-> Bananas

Vegetables
-> Carrots
-> Cabbages

etc, etc.

Sometime my categories are ina dfferent table, don't know if this matters?
How can I do this?

TIA,

Jord




well, as long as they are related to each other ..

just a quick SQL,



        SELECT
                groupName,
                title
        FROM
                table
        WHERE
                this='is what I need'
        GROUP BY
                groupName
        ORDER BY
                groupName,
                title

this ( I already know I was wrong in this example) will select you the
categories and it's members.

Just try to play with it for a while and you'll arrive to a solution,

with two tables it is still the same.

Just remember : use SQL to do it, not PHP. With PHP there's more job to do
and with it overhead.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 10:31 PM
To: PHP Database Mailing List; PHP General Mailing List
Subject: [PHP] Retrieving and Printing Categories


Hi,
I've got a load of records that are in different categories.
What is the best way to get all the records or selected records and print
them in such a way that they are grouped (on the page) in their relevent
category, like:

Fruit
-> Apples
-> Pears
-> Bananas

Vegetables
-> Carrots
-> Cabbages

etc, etc.

Sometime my categories are ina dfferent table, don't know if this matters?
How can I do this?

TIA,

Jord

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






Does anyone know how to install the mcrypt libraries for PHP in windows?

--------------------------------
I'm running: Apache 1.3.12
PHP 4.0.2
Windows 98
--------------------------------

I've downloaded libmcrypt-2.4.5b-win32.zip
(I think that this contains everything I need.)

I just need to know what to do next.

I couldn't find a "friendly" PHP module install guide anywhere and the
README file included with the mcrypt zip doesn't help a great deal.

Can anyone provide a step by step guide to installing mcrypt in windows?

Thanks in advance for all your help,

Ryan.
www.more4money.com







Hi,

This might be a bit of a long shot, but I'm willing to give it a go. :)

Does anyone know of a server-side SVG parser that can be called via some
kind of PHP extension? I want to be able to parse an SVG XML file and
write it out to disk, for usage with customisable menus. I have been given
a few options, by a friend, but they involve running Batik (SVG Java
parser/generator/rasteriser) under an application server - a bit beyond
me, at present. Would would be great is if there were some kind of binary
out there on the web that could do the processing for me, as opposed to
relying on Java (slight overhead as the VM has to initialise). Another
similar option would be to write a Java app that acts as an SVG daemon,
meaning that it would listen on a port, take SVG data in and spew out a
rasterised JPEG/PNG etc - all that would be required would be a PHP
wrapper that could send data to the daemon and receive the image in
return.

The question is: are there any solutions to my problem out there already,
or should I think about adopting the Orion/Java method? On the other hand,
should I look into developing a PHP wrapper to do this?

I'd rather not run Orion/J2EE, as I find it bulky and a bit cumbersome in
places - however, if I have to, I guess I have to. :)

TIA,

Nick Winfield
-[ [EMAIL PROTECTED] ]-





I don't know of anything specifically - all the existing java stuff we've
played with is very big and very slow. One possible solution might be to
write a wrapper for the Adobe SVG browser plugin - it would be a reasonable
amount of work though, and of course the plugin would have to be available
for your server platform - which it probably isn't if your server is
powerful enough for the job :)

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








What about writting a gimp plug-in...? http://www.gimp.org
____________________________ 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]


-----Original Message-----
From: Nick Winfield [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 9:50 AM
To: PHP General Mailing List
Subject: [PHP] SVG & PHP


Hi,

This might be a bit of a long shot, but I'm willing to give it a go. :)

Does anyone know of a server-side SVG parser that can be called via some
kind of PHP extension? 




Hi there,

I would like to use the PHP FTP functions.
Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.

So, I thought that I might upload the extension myself into my webspace then
call it using the command dl() from within a PHP webpage. That way, I could
(hopefully) get round my webhost - but not in a nasty way ;) !

First of all - will this work?

Secondly, where can I download the PHP extension? My webhost is using Cobalt
RaQ3 (x86 architecture running Linux).
Do I need to download an entire PHP package then extract the extension, or
can I just get the extension by itself.

Thanks in advance for all your help.

Ryan
www.more4money.com







I really don't think you can compile PHP on (not yours) server.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-----Original Message-----
From: ryan.barnett1 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 11:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php FTP


Hi there,

I would like to use the PHP FTP functions.
Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.

So, I thought that I might upload the extension myself into my webspace then
call it using the command dl() from within a PHP webpage. That way, I could
(hopefully) get round my webhost - but not in a nasty way ;) !

First of all - will this work?

Secondly, where can I download the PHP extension? My webhost is using Cobalt
RaQ3 (x86 architecture running Linux).
Do I need to download an entire PHP package then extract the extension, or
can I just get the extension by itself.

Thanks in advance for all your help.

Ryan
www.more4money.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]






I've never done it but here it is:

http://conf.php.net/pres/index.php?p=slides%2Fintro&id=ac2



> -----Original Message-----
> From: ryan.barnett1 [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 10:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php FTP
> 
> 
> Hi there,
> 
> I would like to use the PHP FTP functions.
> Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.
> 
> So, I thought that I might upload the extension myself into 
> my webspace then
> call it using the command dl() from within a PHP webpage. 
> That way, I could
> (hopefully) get round my webhost - but not in a nasty way ;) !
> 
> First of all - will this work?
> 
> Secondly, where can I download the PHP extension? My webhost 
> is using Cobalt
> RaQ3 (x86 architecture running Linux).
> Do I need to download an entire PHP package then extract the 
> extension, or
> can I just get the extension by itself.
> 
> Thanks in advance for all your help.
> 
> Ryan
> www.more4money.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]
> 





Interesting - looks just great with Netscape Navigator 4.7; Netscape 6.1 
and Opera 5.?

My IE 5.x does not show the links, the title or the background, nor does it 
have "blind" hot area where the links are at the top of the page. That 
could be my IE and I curse Microosft daily. I can't uninstall it, and 
running repair doesn't fix it. Javascript Windows which used to work just 
fine now generate errors.

Long live cross-browsership! If someone would check this with IE 5.1 & 5.5 
I'd like to know if this is just my browser. If it is I'll have to 
reinstall NT to fix it. Damn, damn, and double-damn!

Cheers - Miles


At 10:26 AM 4/25/01 -0400, Matt Schroebel wrote:
>I've never done it but here it is:
>
>http://conf.php.net/pres/index.php?p=slides%2Fintro&id=ac2
>
>
>
> > -----Original Message-----
> > From: ryan.barnett1 [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 25, 2001 10:03 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] php FTP
> >
> >
> > Hi there,
> >
> > I would like to use the PHP FTP functions.
> > Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.
> >
> > So, I thought that I might upload the extension myself into
> > my webspace then
> > call it using the command dl() from within a PHP webpage.
> > That way, I could
> > (hopefully) get round my webhost - but not in a nasty way ;) !
> >
> > First of all - will this work?
> >
> > Secondly, where can I download the PHP extension? My webhost
> > is using Cobalt
> > RaQ3 (x86 architecture running Linux).
> > Do I need to download an entire PHP package then extract the
> > extension, or
> > can I just get the extension by itself.
> >
> > Thanks in advance for all your help.
> >
> > Ryan
> > www.more4money.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]






Show fine in my I.E. 5.50.4134.0600

Incidentally, you need page 42 of the conference material for the ftp dl().  
instructions. 

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] php FTP
> 
> 
> 
> Interesting - looks just great with Netscape Navigator 4.7; 
> Netscape 6.1 
> and Opera 5.?
> 
> My IE 5.x does not show the links, the title or the 
> background, nor does it 
> have "blind" hot area where the links are at the top of the 
> page. That 
> could be my IE and I curse Microosft daily. I can't uninstall it, and 
> running repair doesn't fix it. Javascript Windows which used 
> to work just 
> fine now generate errors.
> 
> Long live cross-browsership! If someone would check this with 
> IE 5.1 & 5.5 
> I'd like to know if this is just my browser. If it is I'll have to 
> reinstall NT to fix it. Damn, damn, and double-damn!
> 
> Cheers - Miles
> 
> 
> At 10:26 AM 4/25/01 -0400, Matt Schroebel wrote:
> >I've never done it but here it is:
> >
> >http://conf.php.net/pres/index.php?p=slides%2Fintro&id=ac2
> >





Today my php 4/Apache/NT 4/Oracle 8i setup has started misbehaving. First
sign was a huge slowing down in the delivery of pages. Then Apache crashed.
I couldn't find anything interesting in the apache error log, but in the php
error log there are hundreds of messages like the ones below. Can anyone
explain, suggest how to deal with them? I should say that I have rebooted
both of the database and web servers.

TIA

Euan

[25-Apr-2001 14:34:48] PHP Warning:  Missing ] in üu variable in Unknown on
line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in }´üt variable in Unknown
on line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in üu variable in Unknown on
line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in }´üt variable in Unknown
on line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in üu variable in Unknown on
line 0
[25-Apr-2001 14:50:47] PHP Warning:  Missing ] in  variable in Unknown on
line 0
[25-Apr-2001 14:50:50] PHP Warning:  Missing ] in  variable in Unknown on
line 0
[25-Apr-2001 14:50:50] PHP Warning:  Missing ] in  variable in Unknown on
line 0








At 03:03 PM 4/25/01 +0100, Euan Greig wrote:
>[25-Apr-2001 14:34:48] PHP Warning:  Missing ] in üu variable in Unknown 
>on line 0
>[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in }´üt variable in Unknown 
>on line 0

  [...] etc

   I hate to say it, but this looks suspiciously like a memory leak in 
WindowsNT...  especially if the problem cleared up after rebooting.

  - Brian


  -------------------------------------
    Brian S. Dunworth
    Sr. Software Development Engineer
    Oracle Database Administrator
    The Printing House, Ltd.

    (850) 875-1500  x225
    <[EMAIL PROTECTED]>
  -------------------------------------






The only thing that I feel lack of in PHP is the real Object Oriented 
stuff, such as information hiding in the object in classes i.e. private and 
public variables, methods/functions.

This in a sene make it really difficult for developer to build an API for 
other developers that is secure. I myself have this problem. Is there any 
reasons why PHP was designed like this from the beginning? Is this issue 
going to be addresses somehow in the future? Anyone has any idea?

If anyone has any idea, or tricks to hide information in a variables or 
method in a class, or in other words, make a variable or method a private, 
I would really like to know. Thanks for any comments.


Reuben D. Budiardja
Web Database Application Programmer / Analyst
Devcorps, ITS
Goshen College, IN 46526





> The only thing that I feel lack of in PHP is the real Object Oriented
> stuff, such as information hiding in the object in classes i.e. private and
> public variables, methods/functions.
>
> This in a sene make it really difficult for developer to build an API for
> other developers that is secure. I myself have this problem. Is there any
> reasons why PHP was designed like this from the beginning? Is this issue
> going to be addresses somehow in the future? Anyone has any idea?

It was designed like this because PHP was designed as a procedural
language and not an object oriented one.

> If anyone has any idea, or tricks to hide information in a variables or
> method in a class, or in other words, make a variable or method a private,
> I would really like to know. Thanks for any comments.

PHP also doesn't have introspection, so there isn't a good way for people
to see what is in your API so a bit of obscurity should hide things for
you.

-Rasmus





At 4/25/2001 09:02 PM, Reuben D Budiardja wrote:

>The only thing that I feel lack of in PHP is the real Object 
>Oriented stuff, such as information hiding in the object in 
>classes i.e. private and public variables, methods/functions.
>
>This in a sene make it really difficult for developer to build 
>an API for other developers that is secure. I myself have this 
>problem. Is there any reasons why PHP was designed like this 
>from the beginning? Is this issue going to be addresses somehow 
>in the future? Anyone has any idea?
>
>If anyone has any idea, or tricks to hide information in a 
>variables or method in a class, or in other words, make a 
>variable or method a private, I would really like to know. 
>Thanks for any comments.

Python also does not do information hiding, but people rarely call
Python's OO features as not real. :-)  It's a matter of choice,
though, I don't see any real hindrance of PHP implementing this
in the future version.

As Rasmus said, PHP does not have introspection (once again, unlike
Python which is very "introspective"), this is less of a problem,
especially with function calls API.

What I *really* like to see in PHP is:

- NAMESPACE
- TRACEBACK INFO
- exception (try-except block)
- $obj->method()->anotherMethod()
- real destructor would be nice, but not extremely important for
   the time being, due to the nature of PHP usage in Web pages

Please tell me it's on the top'ish of the TODO list :-)

Steve 





Does anyone here use PHPUnit?

1. If a test script needs some external input to do testing 
(notably, database connect info), is it a good idea to present 
an HTML form to ask input from user? Or should it also be able 
to prompt the user for these in case the test script is run by the PHP binary.

2. I also use Python pyunit. Python has this idiom:

    if __name__=='__main__':
        # run the test

This is to detect whether the script is executed as the main 
module (and not being imported by some other module).

Is there a similar way to be able to do this in PHP? I need to 
know whether the PHP file is called directly by the browser/PHP 
binary and not include()'d/require()'d by other file. In the 
case of require_once() and include_once() I guess I can use 
get_required_files()/get_included_files().

Thanks,
Steve





I am sorry if this is one of the FAQ.

Last time I checked (well, a few months ago), PHP has the 
vulnerability that the user who submitted the form can 
manipulate the global namespace to let PHP pick up arbitrary 
file in the system. Can we now do safe file uploading without 
turning off register_globals?

Thanks,
Steve





> Last time I checked (well, a few months ago), PHP has the
> vulnerability that the user who submitted the form can
> manipulate the global namespace to let PHP pick up arbitrary
> file in the system. Can we now do safe file uploading without
> turning off register_globals?

Yes, this was fixed a while ago.  In PHP 4.0.3 I believe.

-Rasmus





I wrote a similar script of my own... Works fine for me

function email_valid($email) {

$pattern="^[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+)*@[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+
)+$";
 return ereg($pattern, $email);
 }

(returns false if email is not valid, true if it is)

N

"Martin Skjöldebrand" <[EMAIL PROTECTED]> wrote in message
9c4npf$ojq$[EMAIL PROTECTED]">news:9c4npf$ojq$[EMAIL PROTECTED]...
> Carlos Fernando Scheidecker Antunes wrote:
>
> > Hello all!
> >
> > I would like to know if anyone has or know any PHP code to verify if a
> > form entered e-mail address is valid?
> >
> > I would like that things like 4$%^%$@@.com.br could not be sent. I only
> > has to verify the syntax of it, the existance I believe should be harder
> > to verify but if it is possible I would be glad if anyone could point me
> > the way.
>
> This is taken from PHP Developers Cookbook. Don't ask me exactly what it
> does, because I don't know. I think I can grasp the basics of it though.
> It isn't fool proof tho.
>
>
> if (!eregi ("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$",
> $users)) die ("Invalid email");
>
> 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]
>






Is there a PHP command to round up to the nearest integer?

J




Hi

> 
> Is there a PHP command to round up to the nearest integer?

www.php.net/ceil
www.php.net/round

HTH

M@





> > Is there a PHP command to round up to the nearest integer?
>
> www.php.net/ceil
> www.php.net/round
>

These are the correct functions, but take great care in reading the user
contributed notes in the round function concerning x.5 rounding randomness.
Sometimes this can get you.

If you want to be sure 4.5 always rounds to 5, add a fudge factor smaller
than your precision, but larger than the precision of the computer.

$value = 4.5;
$fudge = 0.0000001;

round($value) sometimes returns 5
round($value) sometimes returns 4

$fudgedvalue = $value + $fudge;

round($fudgedvalue) = 5

This comes into play often when you do things like split a long list of
items into two columns on your web page and you use PHP (or any language) to
figure out where to end the first column and start the second.

It should be noted that this is not a PHP issue.  It affects any language
which relies on the hardware to compute.

Fun stuff eh?

John





I've observed a difference between how IE and NS interact with even simple
forms. With IE, hitting the RETURN or ENTER key usually but not always
triggers the submit button, but almost never with NS.  Is this behavior
controllable by my scripts?

For example:
<head><title>test form</title></head>
<body>
<?php
if( $ok )
{
        echo "name1 is $name1\n";
        echo "name2 is $name2\n";
}
else
{
    echo "<form action='$PHP_SELF' method=POST>\n";
    echo "Name1:<input type='TEXT' name='name1'>\n";
    #echo "Name2:<input type='TEXT' name='name2'>\n";
    echo "<input type='SUBMIT' name='ok' value='ok'>\n";
    echo "</form>\n";
}
?>
</body>

If I run this form using IE, hitting the Return/Enter key submits the form
but the 'ok' variable is not set; it just redraws the form.  If however, I
uncomment the third echo line (the one for Name2), then hitting the
Return/Enter key does have the desired effect in IE.  In NS, the first
version acts just like IE; the form redraws and that is all. But using the
second variant with both text fields, hitting the Return key in NS does
nothing at all.

Is this just the way it is?  :-(
Or is this behavior controllable somehow?  :-)
---
 Bill Rausch, Software Development, Unix, Mac, Windows
 Numerical Applications, Inc.  509-943-0861   [EMAIL PROTECTED]




Hi

Please help out a Linx/Postgres newbie.

I simply want to set the $PGDATA environmental variable, but can't
figure out how. The docs assume you already know...

I have tried setting it in my bash /etc/profile configuration file,
and it shows up ok if I "echo $PGDATA" in the shell. But none of the
postgres utilities such as "initdb" seem to be able to find it.

What don't I understand? I have already checked the docs/GreatBridge
manual/faqs/archive, so I would very much appreciate some help.

Geoff Caplan

PS sorry for the garbled duplicate posting - new mail client did
something strange....






I did put a spot ID because I never thought of building a temp table on
the fly and dropping it at the end of the script. :-) Now that is an
elegant concept !

I was going for a permanent table, wich would have been heavier to feed
when other tables got updated (but wich would have been automated). The
spot_id was the key to select the items. Making it a temp table is even
simpler. 
Altho on second though it means I have to grant create/write/drop
privileges to the clients, wich might open security issues... mmmhh.


I must say, this newsgroup rocks. I recieved highly valuable input on this
thread and by email. 
Thank you all !

Nicolas







In article <002b01c0cd39$3f86c240$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Steve Lawson") wrote:

> Doh, I shoulda thought of that, a temp table is the best way to do it.
> Altho, I don't see why you have a spot_id as a key for that table.  Your are
> probably never going to access that table via that arbitrary number.  If
> anything, you should make item_id the key.  The id on your other tables
> should also be keys.
> 
> SL.
>




I should tell you that the "text file" is an htm that i have to print 
withou the header "<HTML><TITLE>...." and footer "</BODY></HTML>"

:PP

Rafael

>I know, it was already answered before me (you),
>
>I just though that an SQL database is a good advice for these who are trying
>to do this kind of jobs.
>It is obvious that the reason to use this function is to manage a stored
>data in files.
>then why not a database, if possible?
>
>
>Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
>
>
>-----Original Message-----
>From: Jason Murray [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, April 25, 2001 4:52 PM
>To: Maxim Maletsky; 'Rafael Faria'; [EMAIL PROTECTED]
>Subject: RE: [PHP] Lines
>
>
> > > it's my first post on this list, and my doubt is...
> > >
> > > how can i take a file.txt and
> > >
> > > 1 - know how many lines i have in this text
> > > 2 - print line 5 until 10
>
> > Is there any chance for you to use a database?
> > these thing would become MUCH, MUCH easier.
>
>Actually, this is really easy without using a database.
>
>1. <?
>       $filename = "/path/to/file";
>       $filedata = file($filename);
>       $linesinfile = count($filedata);
>    ?>
>
>2. <?
>       $startline = 5;
>       $stopline = 10;
>
>       for ($i = $startline; $i < $stopline; $i++ )
>       {
>         echo $filedata[$i-1];
>       }
>    ?>
>
>(Use $i-1 because the first line is actually "0").
>
>Jason

---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665






>Hey Guys,

i'm here thinking what i did wrong.....can u guys help me?

i did 2 ways to upload a file and none of them work fine! :/

first way
        $folder = "/tmp";
        if(!copy($MyFile,$folder.$MyFile)){
              echo "can't copy";
        } else {
              echo "work it!";
        }

second way

        $folder = "/tmp";

        $dest = $folder."/".$MyFile_name;
        if(!move_uploaded_file($MyFile, $dest)) {
           echo "can't copy!";
           exit;
         }



so..... can someone help me please? i just have to make it to finish my job :/

thanks




---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665





i tried:
if (!move_uploaded_file($MyFile,"/home/vacamarela/public_html/rafael")) {
             echo "can't copy";
             exit;
}

and retur "can't copy"

my form is
<input type=file name=MyFile size=40>



:/

Rafael




>Acesso fácil, rápido e ilimitado? Suporte 24hs? R$19,90?
>Só no AcessoBOL. http://www.bol.com.br/acessobol/
>
>
>move_uploaded_file($newfile,"/complete/path/to/move/file/to");
>
>My form variable for the file was called "newfile".  That should help.  It
>is very nice, just use it instead of copy and uyou should be good.  Good
>luck.
>
>+-------------------------------------------------------------------+
>|                                                                   |
>|                  If Yoda so strong in force is,                   |
>|             why words in proper order he cannot put?              |
>|                                                                   |
>+-------------------------------------------------------------------+
>|                                                                   |
>+-------------------------------------------------------------------+
>| Daniel J. Cleveland                                               |
>|                                   e-mail: [EMAIL PROTECTED]|
>+-------------------------------------------------------------------+

---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665





On Wed, 25 Apr 2001, Rafael Faria wrote:

> i tried:
> if (!move_uploaded_file($MyFile,"/home/vacamarela/public_html/rafael")) {
>              echo "can't copy";
>              exit;
> }
>
> and retur "can't copy"

Does your web server used id have write permission in that directory and
execute permission all the way down the line to get to that directory?

-Rasmus





Even though PHP 4.0.0 doesn't have access to session_cache_limiter(), I can
still set the value inside an apache <Directory> block.

php_value session.cache_limiter "public"

So this works inside my httpd.conf keeping my other dynamic data from being
cached yet allowing the browser to cache the PDF (which is ok to cache as I
assume the user is finished and wants permanent data anyway)

<IfDefine SSL>

<VirtualHost 192.168.3.8:443>
    <lots of other SSL stuff>
    <Directory /path/to/my/files/pdfs>
        AllowOverride All
        php_value session.cache_limiter "public"
    </Directory>

</VirtualHost>
</IfDefine>


DAve

>> Subject:  Re: [PHP] MSIE on Windows can't open PDF via SSL
>> 
>> Aha, thanks for the answer, this is it exactly. I might add that this
>> problem is evident in Explorer 5+ and only on the PC in our tests.
>> 
>> Unfortunately I'm running PHP 4.0.0 which does not support setting
>> session_cache_limiter on a per request basis. So while this is a fix, it's
>> not a fix for me.
>> 
>> It looks as if an upgrade may be inevitable, I was really hoping to avoid
>> that.
>> 
>> DAve
>>> 
>>> It may be the no cache headers that are sent when you call session_start();
>>> You can try calling session_cache_limiter("public") first.
>>> 
>>> http://www.php.net/manual/en/function.session-cache-limiter.php
>>> 
>>> 
>>> DAve Goodrich <[EMAIL PROTECTED]> wrote:
>>> First off I'm aware of the service pack, installed it, no fix.
>>> 
>>> Currently we build a PDF for download to represent a hardcopy of our
>>> customers data. It works very well so far and will likely become a standard
>>> feature. We experienced no problems with cross-platform use until we moved
>>> into a mod_ssl server. The PDFs are no served from within the SSL realm. We
>>> changed no code but now MSIE on W2K and NT cannot get a PDF, MSIE complains
>>> that the file "cannot be found". The ssl_request log shows no error and the
>>> file was served completely. All Macs, Unixes, and NAV on wintel platforms
>>> work fine.
>>> 
>>> 
>>> This works:
>>> Dynamic PDF (built with php) over http MSIE/NAV PC/MAC
>>> Dynamic PDF (built with php) over https MSIE/NAV MAC and NAV PC
>>> Static PDF over http MSIE/NAV PC/MAC
>>> Static PDF over https MSIE/NAV PC/MAC
>>> 
>>> This doesn't:
>>> Dynamic PDF (built with php) over https MSIE on PC
>>> 
>>> Param strings on the URL make no difference (think sessions), failure still
>>> occurs with the same message. That was why I tested static PDFs, just to be
>>> sure.
>>> 
>>> We are running ->
>>> Apache 1.3.12
>>> PHP 4.0.0
>>> CPDF 2.02-r1-2
>>> 
>>> The code in question is as follows,
>>> 
>>> <?php
>>> 
>>> session_start();
>>> 
>>> 
>>> $cpdf = cpdf_open(0);
>>> 
>>> <build pdf things here>
>>> 
>>> cpdf_finalize($cpdf);
>>> 
>>> header("Content-type: application/pdf");
>>> header("Content-Disposition: attachment; filename=Results.pdf");
>>> header("Content-Description: PHP Generated PDF" );
>>> 
>>> cpdf_output_buffer($cpdf);
>>> 
>>> cpdf_close($cpdf);
>>> ?>
>>> 
>>> Any thoughts, suggestions, WAGs would be appreciated.
>>> 
>>> 
>>> DAve
>>> 





hi all!

i'm trying to get simple 2 line results from mysql in a wml card, but
i can't seem to manage it. here's my code:


<?
header("Content-type: text/vnd.wap.wml"); 
header("Cache-Control: no-cache, must-revalidate"); 
header("Pragma: no-cache"); 
echo ("<?xml version='1.0'?>"); 
?> 

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" 
                "http://www.wapforum.org/DTD/wml_1.1.xml";>";


<?
include ("db.php");
$query1 = "SELECT club FROM table WHERE day='monday' "; 

echo "
<wml>   
        <card id="card1" title="clubbing by day"> 
                <p>";
                
$result1 = mysql_query($query1);
        if ($result1) {
                echo " $day <br>";
                while ($r1 = mysql_fetch_array($result1)) {
                        extract($r1);
                        echo "$clubdetails <br>";
                }
        }

mysql_free_result($result1);

echo "          </p>
        </card>                   
</wml>";

?>

simple? yet all it seems to give m is :
--------------------
; = mysql_query( if ( { echo " 
; while ( = mysql_fetch_array( { extract( echo " 
; } }mysql_free_result( "
---------------------

in my emulator (WinWAP).

Any help greatly appreciated!

/sandeep

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie




Hi Sandeep,

The <br> tag looks like this in wml: <br/>

Have you escaped the doublequotes correctly in your double quoted "echo" 's?

Make sure that the database doesn't contain ampersands, or dollar signs, or
some of the foreign lettering (like é), as they are illegal characters in
wml (well, the dollar sign is used for variables, like PHP, but WML can't
accept them as part of a string as PHP does).

Ways to work around:

$string = ereg_replace("&", "", $string);

or

$string = ereg_replace("&", "&amp;", $string);

To get a dollar, use two dollars:

$string = ereg_replace("$", "$$", $string);

That's about as much I can suggest, without actually playing with the script
myself....  And I am too tired for that. :)

James

"Sandeep Hundal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi all!
>
> i'm trying to get simple 2 line results from mysql in a wml card, but
> i can't seem to manage it. here's my code:
>
>
> <?
> header("Content-type: text/vnd.wap.wml");
> header("Cache-Control: no-cache, must-revalidate");
> header("Pragma: no-cache");
> echo ("<?xml version='1.0'?>");
> ?>
>
> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
> "http://www.wapforum.org/DTD/wml_1.1.xml";>";
>
>
> <?
> include ("db.php");
> $query1 = "SELECT club FROM table WHERE day='monday' ";
>
> echo "
> <wml>
> <card id="card1" title="clubbing by day">
> <p>";
>
> $result1 = mysql_query($query1);
> if ($result1) {
> echo " $day <br>";
> while ($r1 = mysql_fetch_array($result1)) {
> extract($r1);
> echo "$clubdetails <br>";
> }
> }
>
> mysql_free_result($result1);
>
> echo " </p>
> </card>
> </wml>";
>
> ?>
>
> simple? yet all it seems to give m is :
> --------------------
> ; = mysql_query( if ( { echo "
> ; while ( = mysql_fetch_array( { extract( echo "
> ; } }mysql_free_result( "
> ---------------------
>
> in my emulator (WinWAP).
>
> Any help greatly appreciated!
>
> /sandeep
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>







If you have separate physically separate drives and F is one of them.
Installing it should not be too big a problem.

Nothing is your "Windows Bios should need to be changed"
This has to do with your master boot record.

Grab a Linux dist.  Most of them come with good installers now adays and
make it quite easy to install.

Upon installtion Linux will rewrite your MBR and use lilo or some
other boot manager instead of windows default boot manager.  After
installtion you will get the option of booting into windows or Linux.

For the most part..ealier posts were correct..this is not the list for
this persay:/

Also if you are a newbie to linux....get a different machine or be
prepared to lose data or windows on your present machine.

Cheers

Sono

On Wed, 25 Apr 2001, B. van Ouwerkerk wrote:

>
> >Current my Hard disk space for drive F:\  is 2.92 GB which is just fine
> >for the time being. Do you mean to say that I can increase from 2.9 GB to
> >let us say 4GB by taking it from some other drive may be D:\ ?
> >
> >Can you explain some more ?
>
> Partitionmagic is the SW you need to do this. It might be a better solution
> to buy a cheap Celeron based PC and build your Linux server. Buy 2 nics,
> one goes into the server, the other into your current system.
>
> I don't understand why you're having so many partitions. Unless you've got
> a good reason for this I would reinstall the lot with less partitions and
> install Linux as part of the process.
>
> Anyway.. if you don't have any experience with Linux you're going to see
> some problems..
>
> Bye,
>
>
> B.
>
>
>

-- 
Sono








>
>Also if you are a newbie to linux....get a different machine or be
>prepared to lose data or windows on your present machine.

Never lost any data.. Not even when I still was a newbie..

But it's always a good idea to create backups.

Bye,


B.





I've gone through the archives and through a bunch of RFC's, but have
had no luck in finding  <maximum length> for email addresses. Anybody
know if there is one and what it is?




At 4/26/2001 01:08 AM, Dennis Gearon wrote:
>I've gone through the archives and through a bunch of RFC's, but have
>had no luck in finding  <maximum length> for email addresses. Anybody
>know if there is one and what it is?

Perhaps it's one of those undefined values (like the maximum length of
an URL)? The username part is system-dependant, for example...

Steve





I am having troubles displaying all the information I need from an Exchange
server. I can display name, department, title, but can't get the phone
number to show up. Can someone show me a script that will pull the object
identifiers from the server so that I can make sure I have everything set
right?

Thanks.





I am having troubles displaying all the information I need from an Exchange
server. I can display name, department, title, but can't get the phone
number to show up. Can someone show me a script that will pull the object
identifiers from the server so that I can make sure I have everything set
right?

Thanks.





In article <9c1gqf$i3j$[EMAIL PROTECTED]>, "Wade"
<[EMAIL PROTECTED]> wrote:

well, in your first IF clause, you refer to my_type without the $.

For the else clause, you are outputting HTML while still inside
the PHP block.

try one of these:

} else {

?>
  <select tabindex=13 name="my_type">
                <option value="0" selected>Select a Value</option> <option
                value="one">One</option>
                <option value="two">Two</option>
                <option value="three">Three</option>
              </select>

<?php

}

or 

} else {

print<<<EOF

  <select tabindex=13 name="my_type">
                <option value="0" selected>Select a Value</option> <option
                value="one">One</option>
                <option value="two">Two</option>
                <option value="three">Three</option>
              </select>

EOF;

}


hope that helps,
Jeff

> I wanted to say thanks to all those that have helped me. This is really
> a great language and I am doing things I never thought I'd be able to
> do!
> 
> Now to my question:
> 
> I am doing some form validation, where I check the values entered by the
> user. If the value is correct, I format the results and print it out. If
> it is not correct, I want to allow them to fix it. When I have a text
> field, like first_name, I'm ok. But when I do an HTML list menu, I'm
> having troubles.
> 
> Basically, this is what I want to do. If the value is correct, print the
> value. If it is not correct, display the list box. Here's an example
> (but you can see my else statement is wrong, and this is what I need
> help with):
> 
>   if (my_type != "0"){
>         switch($my_type){
>             case "one":
>             print "<img src=\"/trillion/img/one.gif\" width=\"41\"
> height=\"26\" alt=\"One\">";
>             print " One";
>             break;
>             case "two":
>             print "<img src=\"/trillion/img/two.gif\" width=\"41\"
> height=\"26\" alt=\"Two\">";
>             print " Two";
>             break;
>             case "three":
>             print "<img src=\"/trillion/img/three.gif\" width=\"40\"
> height=\"26\" alt=\"Three\">";
>             print " Three";
>             break;
>            }
>       }
>   else {
>   <select tabindex=13 name="my_type">
>                 <option value="0" selected>Select a Value</option>
>                 <option value="one">One</option>
>                 <option value="two">Two</option>
>                 <option value="three">Three</option>
>               </select>
>          }
>      }
> 
> 
>




Hiya all.

I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
on Redhat 6.2 glibc2.1.

There seems to be a problem with the pfpro 3.0 SDK not being compatible with
PHP's header and .c files for pfpro. Are anyone aware of somewhere I can get
the 2.11 pfpro SDK (which should be compatible, according to what I've
hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
with PHP?

I've also tried the newest CVS build of PHP, but it's still the same ol',
same ol'...

Regards,
Henning Pedersen
Funcom Oslo AS





Hello there,
I have gotten the 3.0 SDK to work, all I had to do was edit out the version
function
and it compiled just fine.

Verisign was of ABSOLUTELY NO HELP in this matter.  They simply said "we don't
support PHP at all" and left me to flounder.  So I edited the source and got it
working after a few days of beating my head on it.

What types of problems are you having?

Dan

> -----Original Message-----
> From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Payflow Pro extension in php 4.0.4pl1
>
>
> Hiya all.
>
> I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
> on Redhat 6.2 glibc2.1.
>
> There seems to be a problem with the pfpro 3.0 SDK not being compatible with
> PHP's header and .c files for pfpro. Are anyone aware of somewhere I can get
> the 2.11 pfpro SDK (which should be compatible, according to what I've
> hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
> with PHP?
>
> I've also tried the newest CVS build of PHP, but it's still the same ol',
> same ol'...
>
> Regards,
> Henning Pedersen
> Funcom Oslo AS
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Wow, that was quick, Dan :)

Yeah, I'm having apache compile-time problems that stops on PNVersion() when
reading some PHP include/c file I can't remember the name of right now :)

Where did you edit it out? In the pfpro SDK files themselves, or in PHP's
header files?

Regards,
Henning


-----Original Message-----
From: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:47
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Hello there,
I have gotten the 3.0 SDK to work, all I had to do was edit out the version
function
and it compiled just fine.

Verisign was of ABSOLUTELY NO HELP in this matter.  They simply said "we
don't
support PHP at all" and left me to flounder.  So I edited the source and got
it
working after a few days of beating my head on it.

What types of problems are you having?

Dan

> -----Original Message-----
> From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Payflow Pro extension in php 4.0.4pl1
>
>
> Hiya all.
>
> I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
> on Redhat 6.2 glibc2.1.
>
> There seems to be a problem with the pfpro 3.0 SDK not being compatible
with
> PHP's header and .c files for pfpro. Are anyone aware of somewhere I can
get
> the 2.11 pfpro SDK (which should be compatible, according to what I've
> hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
> with PHP?
>
> I've also tried the newest CVS build of PHP, but it's still the same ol',
> same ol'...
>
> Regards,
> Henning Pedersen
> Funcom Oslo AS
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






I would not edit the files themselves as it causes server instabilities.
This is what I did and found that it did indeed work, for awhile, crashing
miserably.  Something like this is far from the production ready ecommerce
system that I would desire for my company.  We moved to the beta SDK until
PHP can be updated.

Ironically, I just got an update from PHP about a bug report I submitted a
couple of months ago on this subject.  The details follow:

Quote 1:
ID: 9530
Updated by: jdonagher
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Verisign Payflow Pro related
PHP Version: 4.0.4pl1
Assigned To: [EMAIL PROTECTED]
Comments:

Since I work on this extension for my company, work on
this will progress when Verisign converts our account from
v2 to v3. I've received notification of this; it will be
within the next couple weeks.

Quote 2:
ID: 9530
Updated by: jdonagher
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Assigned
Bug Type: Verisign Payflow Pro related
PHP Version: 4.0.4pl1
Assigned To: [EMAIL PROTECTED]
Comments:

As a sidenote, commenting out the pfpro_version function
will not solve the problem. There are other features that
the v3 SDK implements which this extension does not. The
extension does need some work.



Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-----Original Message-----
From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 2:52 PM
To: 'Dan Harrington'; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Wow, that was quick, Dan :)

Yeah, I'm having apache compile-time problems that stops on PNVersion() when
reading some PHP include/c file I can't remember the name of right now :)

Where did you edit it out? In the pfpro SDK files themselves, or in PHP's
header files?

Regards,
Henning


-----Original Message-----
From: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:47
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Hello there,
I have gotten the 3.0 SDK to work, all I had to do was edit out the version
function
and it compiled just fine.

Verisign was of ABSOLUTELY NO HELP in this matter.  They simply said "we
don't
support PHP at all" and left me to flounder.  So I edited the source and got
it
working after a few days of beating my head on it.

What types of problems are you having?

Dan

> -----Original Message-----
> From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Payflow Pro extension in php 4.0.4pl1
>
>
> Hiya all.
>
> I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
> on Redhat 6.2 glibc2.1.
>
> There seems to be a problem with the pfpro 3.0 SDK not being compatible
with
> PHP's header and .c files for pfpro. Are anyone aware of somewhere I can
get
> the 2.11 pfpro SDK (which should be compatible, according to what I've
> hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
> with PHP?
>
> I've also tried the newest CVS build of PHP, but it's still the same ol',
> same ol'...
>
> Regards,
> Henning Pedersen
> Funcom Oslo AS
>
>
> --
> PHP General Mailing List (http://www.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]






Well, I didn't comment out the function itself, just the PNVersion() calls
inside the function, meaning that it will just turn out empty if you use the
PHP function that shows you pfpro's version :)

(I hope)

Oh, and btw, Dan, it seems to work fine :)

Regards,
henning


-----Original Message-----
From: Robert Covell [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:56
To: Henning Kilset Pedersen; 'Dan Harrington'; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


I would not edit the files themselves as it causes server instabilities.
This is what I did and found that it did indeed work, for awhile, crashing
miserably.  Something like this is far from the production ready ecommerce
system that I would desire for my company.  We moved to the beta SDK until
PHP can be updated.

Ironically, I just got an update from PHP about a bug report I submitted a
couple of months ago on this subject.  The details follow:

Quote 1:
ID: 9530
Updated by: jdonagher
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Verisign Payflow Pro related
PHP Version: 4.0.4pl1
Assigned To: [EMAIL PROTECTED]
Comments:

Since I work on this extension for my company, work on
this will progress when Verisign converts our account from
v2 to v3. I've received notification of this; it will be
within the next couple weeks.

Quote 2:
ID: 9530
Updated by: jdonagher
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Assigned
Bug Type: Verisign Payflow Pro related
PHP Version: 4.0.4pl1
Assigned To: [EMAIL PROTECTED]
Comments:

As a sidenote, commenting out the pfpro_version function
will not solve the problem. There are other features that
the v3 SDK implements which this extension does not. The
extension does need some work.



Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-----Original Message-----
From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 2:52 PM
To: 'Dan Harrington'; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Wow, that was quick, Dan :)

Yeah, I'm having apache compile-time problems that stops on PNVersion() when
reading some PHP include/c file I can't remember the name of right now :)

Where did you edit it out? In the pfpro SDK files themselves, or in PHP's
header files?

Regards,
Henning


-----Original Message-----
From: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:47
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Hello there,
I have gotten the 3.0 SDK to work, all I had to do was edit out the version
function
and it compiled just fine.

Verisign was of ABSOLUTELY NO HELP in this matter.  They simply said "we
don't
support PHP at all" and left me to flounder.  So I edited the source and got
it
working after a few days of beating my head on it.

What types of problems are you having?

Dan

> -----Original Message-----
> From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Payflow Pro extension in php 4.0.4pl1
>
>
> Hiya all.
>
> I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
> on Redhat 6.2 glibc2.1.
>
> There seems to be a problem with the pfpro 3.0 SDK not being compatible
with
> PHP's header and .c files for pfpro. Are anyone aware of somewhere I can
get
> the 2.11 pfpro SDK (which should be compatible, according to what I've
> hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
> with PHP?
>
> I've also tried the newest CVS build of PHP, but it's still the same ol',
> same ol'...
>
> Regards,
> Henning Pedersen
> Funcom Oslo AS
>
>
> --
> PHP General Mailing List (http://www.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]






Hello,

Somebody know how to make IMLIB library compile into php ?
i tried --with, --enable, but doesn't work !

Thanks.
--
Charles




On Wed, Apr 25, 2001 at 03:34:18PM -0400, Charles wrote:

> Hello,
> 
> Somebody know how to make IMLIB library compile into php ?
> i tried --with, --enable, but doesn't work !

Check to see that it actually got added to the source properly with:

./configure --help|grep imlib

If it isn't there, read the side-note below.

Obligatory quote from the INSTALL file:

Built-in Extension Installation
-------------------------------
To build php_imlib into PHP, extract the extension into the ext/
subdirectory of the PHP source tree, run buildconf, and recompile.

tar -C /path/to/php_src/ext -zxvf php_imlib-0.3.tgz
cd /path/to/php_src
./buildconf
./configure --with-imlib[=/path/to/Imlib2] [other args]
make
make install

The side-note that I keep forgetting to add to the documentation: It
may be necessary to do 'touch ./config.m4' in ext/imlib before running
buildconf.  Otherwise buildconf may not add php_imlib to the available
extensions.

Matt




Or just type: phpize
in the imlib extension directory
then type: ./configure --with-imlib=shared
make

Then you will have an imlib.so file in your modules/ directory which you
can then point an extension=imlib.so directive to in your php.ini file.

-Rasmus

On Wed, 25 Apr 2001, Matt McClanahan wrote:

> On Wed, Apr 25, 2001 at 03:34:18PM -0400, Charles wrote:
>
> > Hello,
> >
> > Somebody know how to make IMLIB library compile into php ?
> > i tried --with, --enable, but doesn't work !
>
> Check to see that it actually got added to the source properly with:
>
> ./configure --help|grep imlib
>
> If it isn't there, read the side-note below.
>
> Obligatory quote from the INSTALL file:
>
> Built-in Extension Installation
> -------------------------------
> To build php_imlib into PHP, extract the extension into the ext/
> subdirectory of the PHP source tree, run buildconf, and recompile.
>
> tar -C /path/to/php_src/ext -zxvf php_imlib-0.3.tgz
> cd /path/to/php_src
> ./buildconf
> ./configure --with-imlib[=/path/to/Imlib2] [other args]
> make
> make install
>
> The side-note that I keep forgetting to add to the documentation: It
> may be necessary to do 'touch ./config.m4' in ext/imlib before running
> buildconf.  Otherwise buildconf may not add php_imlib to the available
> extensions.
>
> Matt
>
>





I'm doing a seach function... everything is ok....but i wanna put something 
like "Use more specific terms" when the search don't have anything to 
show..... but i can't do that.... can someone helpme?

i'm doing that!
=================

         $query = mysql_query("select * from Newsletter_Members where 
Newsletter_Members.email like '%$search%' order by id");

              while ($row = mysql_fetch_row($query)) {

                 echo "<tr bgcolor=#DDDDDD>\n";
                 echo "<td align=center><input type=checkbox name=id[] 
value=$row[0]></td>\n";
                 echo "<td align=center><font size=2 
face=verdana>&nbsp;$row[0]&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana>&nbsp;<a 
href=mailto:$row[1]>$row[1]</a>&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana><a 
href=\"javascript:openwin('editmember.php?email=$row[1]&id=$row[0]','adicionar','400','110')\">Editar</a></font></td>\n";
                 echo "</tr>\n";

              }

===================

how can i make if doen't match anything say "it doen't match anything" ?






---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665





Lookup the mysql_numrows function (think that's the correct spelling, I'm
using Oracle now ;-) - and go from there. Put in an

        if ($count=mysql_numrows($query)) {
          // put whatever message/form/whatever you want to show the user
here
      }

for example, and put that directly below your $query = mysql_query... line.

Maybe make it like this instead:

        if ($count=mysql_numrows($query)) {
          // put whatever message/form/whatever you want to show the user
here
      } else {
           while ($row ....

etc.

I never decided on those elses and elseifs :)

Regards,
Henning Pedersen
Funcom Oslo


-----Original Message-----
From: Rafael Faria [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:36
To: [EMAIL PROTECTED]
Subject: [PHP] Count....


I'm doing a seach function... everything is ok....but i wanna put something
like "Use more specific terms" when the search don't have anything to
show..... but i can't do that.... can someone helpme?

i'm doing that!
=================

         $query = mysql_query("select * from Newsletter_Members where
Newsletter_Members.email like '%$search%' order by id");

              while ($row = mysql_fetch_row($query)) {

                 echo "<tr bgcolor=#DDDDDD>\n";
                 echo "<td align=center><input type=checkbox name=id[]
value=$row[0]></td>\n";
                 echo "<td align=center><font size=2
face=verdana>&nbsp;$row[0]&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana>&nbsp;<a
href=mailto:$row[1]>$row[1]</a>&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana><a
href=\"javascript:openwin('editmember.php?email=$row[1]&id=$row[0]','adicion
ar','400','110')\">Editar</a></font></td>\n";
                 echo "</tr>\n";

              }

===================

how can i make if doen't match anything say "it doen't match anything" ?






---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


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







that should ofcourse be if(!$count=mysql_numrows($query))  {...

(put a ! directly infront of $count

-----Original Message-----
From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:42
To: 'Rafael Faria'; [EMAIL PROTECTED]
Subject: RE: [PHP] Count....


Lookup the mysql_numrows function (think that's the correct spelling, I'm
using Oracle now ;-) - and go from there. Put in an

        if ($count=mysql_numrows($query)) {
          // put whatever message/form/whatever you want to show the user
here
      }

for example, and put that directly below your $query = mysql_query... line.

Maybe make it like this instead:

        if ($count=mysql_numrows($query)) {
          // put whatever message/form/whatever you want to show the user
here
      } else {
           while ($row ....

etc.

I never decided on those elses and elseifs :)

Regards,
Henning Pedersen
Funcom Oslo


-----Original Message-----
From: Rafael Faria [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:36
To: [EMAIL PROTECTED]
Subject: [PHP] Count....


I'm doing a seach function... everything is ok....but i wanna put something
like "Use more specific terms" when the search don't have anything to
show..... but i can't do that.... can someone helpme?

i'm doing that!
=================

         $query = mysql_query("select * from Newsletter_Members where
Newsletter_Members.email like '%$search%' order by id");

              while ($row = mysql_fetch_row($query)) {

                 echo "<tr bgcolor=#DDDDDD>\n";
                 echo "<td align=center><input type=checkbox name=id[]
value=$row[0]></td>\n";
                 echo "<td align=center><font size=2
face=verdana>&nbsp;$row[0]&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana>&nbsp;<a
href=mailto:$row[1]>$row[1]</a>&nbsp;</font></td>\n";
                 echo "<td align=center><font size=2 face=verdana><a
href=\"javascript:openwin('editmember.php?email=$row[1]&id=$row[0]','adicion
ar','400','110')\">Editar</a></font></td>\n";
                 echo "</tr>\n";

              }

===================

how can i make if doen't match anything say "it doen't match anything" ?






---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


--
PHP General Mailing List (http://www.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]






How can I force dir.php to execute on http://www.mysite.com/dir/ and all
other subdirectories, which actually doesn’t exists? I tray to put ForceType
in .htaccess file, and this doesn’t work.

This is an example what I mean:
http://www.mysite.com/dir/
http://www.mysite.com/dir/subdir/
http://www.mysite.com/dir/subdir/subsir/
…

When I access any of subdirectory, I need to execute same dir.php, which
will display records from database based on path.

Thanks,
Mihailo.

P.S. I can only access to .htaccess file of apache configuration files.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





Name it "dir" instead of "dir.php", do the .htaccess to process "dir"
as php, then read $PATH_INFO to get the /subdir... stuff.

I may have a few details wrong, but that's the idea. I have the same
situation as you.

Hope this helps.

Mihailo Dzigurski wrote:

> How can I force dir.php to execute on http://www.mysite.com/dir/
> and all other subdirectories, which actually doesn't exists? I
> tray to put ForceType in .htaccess file, and this doesn't work.
> 
> This is an example what I mean: http://www.mysite.com/dir/
> http://www.mysite.com/dir/subdir/
> http://www.mysite.com/dir/subdir/subsir/
> 
> When I access any of subdirectory, I need to execute same
> dir.php, which will display records from database based on path.
> 
> P.S. I can only access to .htaccess file of apache configuration
> files.

John Platte

"Truth binds the mind to what satisfies it,
but worldly thinking does not satisfy
and therefore ignites curiosity."

               -- St. Theophan the Recluse




Hi all,

I have seen a few pages that echo the time it's taken to execute an SQL
query, like "The results in the database were returned in 0.3 seconds."
Anyone know if there's a built in function to display this, and if there is,
what it is?  My more-than-useless-ISP seems to have taken an aversion to
allowing me to surf tonight without disconnecting me.

Thanks.
James.






On Mié 25 Abr 2001 23:17, James, Yz wrote:
> Hi all,
>
> I have seen a few pages that echo the time it's taken to execute an SQL
> query, like "The results in the database were returned in 0.3 seconds."
> Anyone know if there's a built in function to display this, and if there
> is, what it is?  My more-than-useless-ISP seems to have taken an aversion
> to allowing me to surf tonight without disconnecting me.

That depends on the SQL server you are using (and I'm not talking about M$SQL 
Server! :-) ).
In postgreSQL you do that with an EXPLAIN query, but the results are given 
throught the warning output, and there is no function to grab it. But it 
wouldn't be difficult to build it. :-)

Saludos... :-)

-- 
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques                  |        [EMAIL PROTECTED]
Programador, Administrador      |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------




Sup,
    Adding "explain" before the select query will show you how long it will
take, along with some other info, but it won't actually give you the
results.

I use a the function microtime (http://php.net/microtime) to figure
execution time.  When called, microtime will return a string with
miliiseconds then seconds seperated by a space.  So you have to do something
like this...

function sn_Msecs()
{
   $mt = microtime();
   $mt = explode(" " , $mt);

   return ($mt[1] + $mt[0]);
}

That will return seconds.milliseconds or something like 13123141.1231, it is
not in proper math form.

 Just call it before a block of code or query, then call it after and
subtract the second one from the first.

SL.


----- Original Message -----
From: "James, Yz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 2:17 PM
Subject: [PHP] SQL Query time?


> Hi all,
>
> I have seen a few pages that echo the time it's taken to execute an SQL
> query, like "The results in the database were returned in 0.3 seconds."
> Anyone know if there's a built in function to display this, and if there
is,
> what it is?  My more-than-useless-ISP seems to have taken an aversion to
> allowing me to surf tonight without disconnecting me.
>
> Thanks.
> James.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi,

My problem is that my local apache 1.3.19 server running under windows 2000
on a LAN has slow execution issues.  When I submit a form with POST
variables, the script takes forever and a day to execute, sometimes
returning after 15 seconds, sometimes hitting a max execution time.  This
behavior is not seen under IE and is not seen when the scripts are running
from a freeBSD platform through netscape.

software:
windows 2000 pro sp1
php 4.0.4pl1
apache 1.3.19
mysql 3.23.33
all installed from binaries.

Thanks in advance,
Larry









Actually I kind of made the problem go away, but I don't know why...
I reduced the priority of the netscape process to Below Normal and it works
fine.  Why would netscape take up so much of the cpu?

Larry

""Laurence Gordon"" <[EMAIL PROTECTED]> wrote in message
9c7b2h$qcp$[EMAIL PROTECTED]">news:9c7b2h$qcp$[EMAIL PROTECTED]...
> Hi,
>
> My problem is that my local apache 1.3.19 server running under windows
2000
> on a LAN has slow execution issues.  When I submit a form with POST
> variables, the script takes forever and a day to execute, sometimes
> returning after 15 seconds, sometimes hitting a max execution time.  This
> behavior is not seen under IE and is not seen when the scripts are running
> from a freeBSD platform through netscape.
>
> software:
> windows 2000 pro sp1
> php 4.0.4pl1
> apache 1.3.19
> mysql 3.23.33
> all installed from binaries.
>
> Thanks in advance,
> Larry
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






        Basically I am just trolling for some thoughts on how others may
accomplish this task.

        I have a mysql database. In the database I of course have records.
These records have a date field and after so many days I have a script
to delete old records. Now, there are often times when a user will want
to "refresh" one or more records and also delete one or more as well and
possibly not do anything to other records.

        My initial thought was to have thier records displayed with 2
checkboxes, one to check to delete the record and one to check to
refresh(renew the record by setting the date field to the current date).
Not checking either will simply do nothing to the record in question. 

        Most users will have anywhere from 50 to 3000 records and 3k records
would be a little unwieldy to display on one page which brought up a
concern for how to handle the processing of the previous page of records
when you head to the next. Should I update the DB as I move to the next
page or perhaps after all pages are viewed? 

        Anyways, any thoughts, ideas and or suggestions are all welcome.
-- 
Larry H




Dan and others, following this thread;
Here is the result of my pfpro_version() call :




Yup, that's right. Blank, stare, squiddly-squat, etc. Which is what I
intended.
However, here is the result of the test script for the function provided in
the PHP4.0.4 manual, script is here:

<?php

pfpro_init();

$transaction = array(USER       => 'mylogin',
                     PWD        => 'mypassword',
                     TRXTYPE    => 'S',
                     TENDER     => 'C',
                     AMT        => 1.50,
                     ACCT       => '4111111111111111',
                     EXPDATE    => '0904'
                     );

$response = pfpro_process($transaction);

if (!$response) {
  die("Couldn't establish link to Verisign.\n");
}

echo "Verisign response code was ".$response[RESULT];
echo ", which means: ".$response[RESPMSG]."\n";

echo "\nThe transaction request: ";
print_r($transaction);

echo "\nThe response: ";
print_r($response);

pfpro_cleanup();

?>


and result is here:

Verisign response code was -31, which means: The certificate chain did not
validate, no local certificate found The transaction request: Array ( [USER]
=> mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
[ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
 [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
local certificate found )

Hmm. Certificate not found. I think that is in the directory that I
specified for --with-pfpro=....., under the ./certs subdirectory there. I
just downloaded the test version, tho. I haven't found any information from
Verisign on how to update/change that certificate if needed, or any
information from PHP's manuals on how to choose where the cert is located.
Should it be in some PHP includable directory, for example?

Regards,
Henning









http://www.php.net/bugs.php?id=9530

John

On Wed, 25 Apr 2001, Henning Kilset Pedersen wrote:

> Dan and others, following this thread;
> Here is the result of my pfpro_version() call :
> 
> 
> 
> 
> Yup, that's right. Blank, stare, squiddly-squat, etc. Which is what I
> intended.
> However, here is the result of the test script for the function provided in
> the PHP4.0.4 manual, script is here:
> 
> <?php
> 
> pfpro_init();
> 
> $transaction = array(USER     => 'mylogin',
>                    PWD        => 'mypassword',
>                    TRXTYPE    => 'S',
>                    TENDER     => 'C',
>                    AMT        => 1.50,
>                    ACCT       => '4111111111111111',
>                    EXPDATE    => '0904'
>                    );
> 
> $response = pfpro_process($transaction);
> 
> if (!$response) {
>   die("Couldn't establish link to Verisign.\n");
> }
> 
> echo "Verisign response code was ".$response[RESULT];
> echo ", which means: ".$response[RESPMSG]."\n";
> 
> echo "\nThe transaction request: ";
> print_r($transaction);
> 
> echo "\nThe response: ";
> print_r($response);
> 
> pfpro_cleanup();
> 
> ?>
> 
> 
> and result is here:
> 
> Verisign response code was -31, which means: The certificate chain did not
> validate, no local certificate found The transaction request: Array ( [USER]
> => mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
> [ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
>  [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
> local certificate found )
> 
> Hmm. Certificate not found. I think that is in the directory that I
> specified for --with-pfpro=....., under the ./certs subdirectory there. I
> just downloaded the test version, tho. I haven't found any information from
> Verisign on how to update/change that certificate if needed, or any
> information from PHP's manuals on how to choose where the cert is located.
> Should it be in some PHP includable directory, for example?
> 
> Regards,
> Henning
> 
> 
> 
> 
> 
> 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD






Congratulations,

So you've overcome the PNVersion demons, now to others.
What you need to do now is to locate the f73e89fd.0 file found in the PFPro
library and make sure it is present in your OpenSSL or other SSL certs
directory.
It should be in the same directory as your server cert(s).  That is what
is generating the response code -31.

That file is (in the SDK 3.0) found in

verisign/payflowpro/linux/certs/f73e89fd.0

You need that to be in your SSL Certs directory in order for PHP to recognize
that it exists, and present it to the Payflow Pro when it asks for it.

> Verisign response code was -31, which means: The certificate chain did not
> validate, no local certificate found The transaction request: Array ( [USER]
> => mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
> [ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
>  [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
> local certificate found )
>
> Hmm. Certificate not found. I think that is in the directory that I
> specified for --with-pfpro=....., under the ./certs subdirectory there. I
> just downloaded the test version, tho. I haven't found any information from
> Verisign on how to update/change that certificate if needed, or any
> information from PHP's manuals on how to choose where the cert is located.
> Should it be in some PHP includable directory, for example?
>
> Regards,
> Henning





Is anybody reading the other posts about the work in progress being done by
John?  This extra work seems pointless if it is being looked into by the PHP
development team.

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-----Original Message-----
From: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 3:52 PM
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow, story continued



Congratulations,

So you've overcome the PNVersion demons, now to others.
What you need to do now is to locate the f73e89fd.0 file found in the PFPro
library and make sure it is present in your OpenSSL or other SSL certs
directory.
It should be in the same directory as your server cert(s).  That is what
is generating the response code -31.

That file is (in the SDK 3.0) found in

verisign/payflowpro/linux/certs/f73e89fd.0

You need that to be in your SSL Certs directory in order for PHP to
recognize
that it exists, and present it to the Payflow Pro when it asks for it.

> Verisign response code was -31, which means: The certificate chain did not
> validate, no local certificate found The transaction request: Array
 [USER]
> => mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
> [ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
>  [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
> local certificate found )
>
> Hmm. Certificate not found. I think that is in the directory that I
> specified for --with-pfpro=....., under the ./certs subdirectory there. I
> just downloaded the test version, tho. I haven't found any information
from
> Verisign on how to update/change that certificate if needed, or any
> information from PHP's manuals on how to choose where the cert is located.
> Should it be in some PHP includable directory, for example?
>
> Regards,
> Henning


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






I am aware that people are "working on it" but when I needed to process
transactions
_today_, I decided to do some messing around with the code.  Time waits for no
man, even the
development team :-)

Thanks
Dan


> -----Original Message-----
> From: Robert Covell [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 2:55 PM
> To: Dan Harrington; Henning Kilset Pedersen; [EMAIL PROTECTED]
> Subject: RE: [PHP] Payflow, story continued
>
>
> Is anybody reading the other posts about the work in progress being done by
> John?  This extra work seems pointless if it is being looked into by the PHP
> development team.
>
> Sincerely,
>
> Robert T. Covell
> President / Owner
> Rolet Internet Services, LLC
> Web: www.rolet.com
> Email: [EMAIL PROTECTED]
> Phone: 816.210.7145
> Fax: 816.753.1952
>
> -----Original Message-----
> From: Dan Harrington [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 3:52 PM
> To: Henning Kilset Pedersen; [EMAIL PROTECTED]
> Subject: RE: [PHP] Payflow, story continued
>
>
>
> Congratulations,
>
> So you've overcome the PNVersion demons, now to others.
> What you need to do now is to locate the f73e89fd.0 file found in the PFPro
> library and make sure it is present in your OpenSSL or other SSL certs
> directory.
> It should be in the same directory as your server cert(s).  That is what
> is generating the response code -31.
>
> That file is (in the SDK 3.0) found in
>
> verisign/payflowpro/linux/certs/f73e89fd.0
>
> You need that to be in your SSL Certs directory in order for PHP to
> recognize
> that it exists, and present it to the Payflow Pro when it asks for it.
>
> > Verisign response code was -31, which means: The certificate chain did not
> > validate, no local certificate found The transaction request: Array
>  [USER]
> > => mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
> > [ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
> >  [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
> > local certificate found )
> >
> > Hmm. Certificate not found. I think that is in the directory that I
> > specified for --with-pfpro=....., under the ./certs subdirectory there. I
> > just downloaded the test version, tho. I haven't found any information
> from
> > Verisign on how to update/change that certificate if needed, or any
> > information from PHP's manuals on how to choose where the cert is located.
> > Should it be in some PHP includable directory, for example?
> >
> > Regards,
> > Henning
>
>
> --
> PHP General Mailing List (http://www.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]
>






If anyone has worked around the deficiencies, great; I just haven't received a
v3 SDK yet (and my company's account has not yet been converted) so I can't
speak intelligently about what may be missing from the extension.

As far as I know, the interface remains untouched, which means the work that
will need to be done will likely be minimal.

John

On Wed, 25 Apr 2001, Robert Covell wrote:

> Is anybody reading the other posts about the work in progress being done by
> John?  This extra work seems pointless if it is being looked into by the PHP
> development team.
> 
> Sincerely,
> 
> Robert T. Covell
> President / Owner
> Rolet Internet Services, LLC
> Web: www.rolet.com
> Email: [EMAIL PROTECTED]
> Phone: 816.210.7145
> Fax: 816.753.1952
> 
> -----Original Message-----
> From: Dan Harrington [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 3:52 PM
> To: Henning Kilset Pedersen; [EMAIL PROTECTED]
> Subject: RE: [PHP] Payflow, story continued
> 
> 
> 
> Congratulations,
> 
> So you've overcome the PNVersion demons, now to others.
> What you need to do now is to locate the f73e89fd.0 file found in the PFPro
> library and make sure it is present in your OpenSSL or other SSL certs
> directory.
> It should be in the same directory as your server cert(s).  That is what
> is generating the response code -31.
> 
> That file is (in the SDK 3.0) found in
> 
> verisign/payflowpro/linux/certs/f73e89fd.0
> 
> You need that to be in your SSL Certs directory in order for PHP to
> recognize
> that it exists, and present it to the Payflow Pro when it asks for it.
> 
> > Verisign response code was -31, which means: The certificate chain did not
> > validate, no local certificate found The transaction request: Array
>  [USER]
> > => mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
> > [ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
> >  [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
> > local certificate found )
> >
> > Hmm. Certificate not found. I think that is in the directory that I
> > specified for --with-pfpro=....., under the ./certs subdirectory there. I
> > just downloaded the test version, tho. I haven't found any information
> from
> > Verisign on how to update/change that certificate if needed, or any
> > information from PHP's manuals on how to choose where the cert is located.
> > Should it be in some PHP includable directory, for example?
> >
> > Regards,
> > Henning
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD






Good attitude ;) If you have any feedback from your tinkering, please do
share..

John

On Wed, 25 Apr 2001, Dan Harrington wrote:

> I am aware that people are "working on it" but when I needed to process
> transactions
> _today_, I decided to do some messing around with the code.  Time waits for no
> man, even the
> development team :-)
> 
> Thanks
> Dan
> 
> 
> > -----Original Message-----
> > From: Robert Covell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 25, 2001 2:55 PM
> > To: Dan Harrington; Henning Kilset Pedersen; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Payflow, story continued
> >
> >
> > Is anybody reading the other posts about the work in progress being done by
> > John?  This extra work seems pointless if it is being looked into by the PHP
> > development team.
> >
> > Sincerely,
> >
> > Robert T. Covell
> > President / Owner
> > Rolet Internet Services, LLC
> > Web: www.rolet.com
> > Email: [EMAIL PROTECTED]
> > Phone: 816.210.7145
> > Fax: 816.753.1952
> >
> > -----Original Message-----
> > From: Dan Harrington [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 25, 2001 3:52 PM
> > To: Henning Kilset Pedersen; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Payflow, story continued
> >
> >
> >
> > Congratulations,
> >
> > So you've overcome the PNVersion demons, now to others.
> > What you need to do now is to locate the f73e89fd.0 file found in the PFPro
> > library and make sure it is present in your OpenSSL or other SSL certs
> > directory.
> > It should be in the same directory as your server cert(s).  That is what
> > is generating the response code -31.
> >
> > That file is (in the SDK 3.0) found in
> >
> > verisign/payflowpro/linux/certs/f73e89fd.0
> >
> > You need that to be in your SSL Certs directory in order for PHP to
> > recognize
> > that it exists, and present it to the Payflow Pro when it asks for it.
> >
> > > Verisign response code was -31, which means: The certificate chain did not
> > > validate, no local certificate found The transaction request: Array
> >  [USER]
> > > => mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
> > > [ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
> > >  [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
> > > local certificate found )
> > >
> > > Hmm. Certificate not found. I think that is in the directory that I
> > > specified for --with-pfpro=....., under the ./certs subdirectory there. I
> > > just downloaded the test version, tho. I haven't found any information
> > from
> > > Verisign on how to update/change that certificate if needed, or any
> > > information from PHP's manuals on how to choose where the cert is located.
> > > Should it be in some PHP includable directory, for example?
> > >
> > > Regards,
> > > Henning
> >
> >
> > --
> > PHP General Mailing List (http://www.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]
> >
> 
> 
> 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD





John Donagher wrote:
> 
> If anyone has worked around the deficiencies, great; I just haven't received a
> v3 SDK yet (and my company's account has not yet been converted) so I can't
> speak intelligently about what may be missing from the extension.
> 
> As far as I know, the interface remains untouched, which means the work that
> will need to be done will likely be minimal.

        Looks like the PN*() funcs all became pfpro*().  They also split the
connection and process call into a context creator and a processing
call.  This can be just thrown in the middle of the existing
pfpro_process[_raw]() funcs, which is how I managed to get it to
compile, but never managed to get it to a testable phase as their 3.x
SDK is threaded, and they sent me the 2.x SDK before I got around to
working around that issue.  Cleaner implementation would be to expose
the additional step to PHP with default context selection, ala the MySQL
default db handles, but that's beyond my tinkering skills with PHP
extensions at the moment.  I'll be happy to send what I have to whomever
is most likely to end up doing the 3.x extension.  Just let me know.

-- -
Kelly Cochran  <[EMAIL PROTECTED]>
Technical Staff - funschool.com Corporation




Greetings!

Here's my problem:

I have a web-based application from which it is possible to log off.

The user is authenticated through a .htpasswd file and then he access the
system. After that a button is displayed that can log off the user. If he
clicks on this, the application does the following:

    session_unregister() all the session variables and then
session_destroy().

Now my problem is, if the user clicks back enough of time or if he manually
enter the initial .php page in the url bar, he will reach the initial page
where the user is usually authenticated throught he .htpasswd file. At this
point the user is accepted automatically and he does not need to re-enter
his user/password.

I don't want this to be possible, i want the user to enter the user/password
again. Is their an apache command to kill the session or  some other
approach to this problem???

Dominique Paquin








I am trying to implement transactions using PHP and MSSQL 7 (Microsoft).  Please tell 
me if there is a simple way of doing this, as there is for Interbase or Oracle, using 
the appropriate functions.eg ***_rollback or whatever.

Regards
Andrew 




you just have to execute a statement starting and ending the transaction.

BEGIN TRANSACTION

COMMIT

ROLLBACK

Yuu send thes commands to the server with mssql_query() as any other SQL statement.

- Frank

> I am trying to implement transactions using PHP and MSSQL 7 (Microsoft).  Please 
>tell me if there is a simple way of doing this, as there is for Interbase or Oracle, 
>using the appropriate functions.eg ***_rollback or whatever.
> 
> Regards
> Andrew 
> 







Hello,

I have seen your email at PHP site - developers.

I need a simple syntax that you may understand.

I want to send data TO mysql   FROM   my   contact  form.

the database is hosted and provided by my   hosting provider.

I do not know what is the syntax  to send  that data.

I make quality design services, maybe you will need 
anything to improve, I will be glad to  do it in  exchange.

Thank you !

Javier Yep 
[EMAIL PROTECTED]
 





To send any information you need to use the mysql_query() function after
connecting with mysql_connect() or mysql_pconnect(). They are all documented
in the manual. Or am I misreading your question??
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 5:01 PM
Subject: [PHP] I need help from you.


> Hello,
>
> I have seen your email at PHP site - developers.
>
> I need a simple syntax that you may understand.
>
> I want to send data TO mysql   FROM   my   contact  form.
>
> the database is hosted and provided by my   hosting provider.
>
> I do not know what is the syntax  to send  that data.
>
> I make quality design services, maybe you will need
> anything to improve, I will be glad to  do it in  exchange.
>
> Thank you !
>
> Javier Yep
> [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]
>
>





Has anyone any ideas/recomendations/pointers on how to send secure mail
through PHP??  Reason is that I may soon want to collect CC info through a
SSL secured page, and then email it off to me.

I have a linux server, PHP4.0.4pl1, and PGP2.6.2 at my disposal...

My theory is that I'd call PGP from within the PHP page, encode/sign the
mail body, and then use the PHP mail(..) function to send it off...

Is this a reasonable/feasible quest?   Has anyone got some sample code for
this?  A quick "HOW-TO" perhaps?

Thanks





I'm trying pass an array from one page to another.

Page 1 is a form.
Page 2 has the data sent by Page 1 available in $HTTP_POST_VARS.
This is where I'm stuck: Page three needs access to those same variables
in $HTTP_POST_VARS.

Any help?





I'm trying to create a multiple pattern search using LIKE (in mySQL) -- the
following doesn't seem to work and was wondering if someone knew of an easy
efficient way of adding multiple search criteria.

SELECT myTable.col
FROM myTable, otherTable
WHERE myTable.id = otherTable.ID
AND otherTable.data LIKE ("a.%" or "s.%" or "io.bean");

So....
LIKE ("a.%" or "s.%" or "io.bean");    <<- doesn't seem to work like this.

Thanks.
Jason









Why not do something like:

SELECT myTable.col
FROM myTable, otherTable
WHERE myTable.id = otherTable.ID
AND (otherTable.data LIKE "a.%" OR otherTable.data LIKE "s.%" OR
otherTable.data = "io.bean")

HTH

Sam Masiello
Systems Analyst
Chek.Com
(716) 853-1362 x289
[EMAIL PROTECTED]

 -----Original Message-----
From:   Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 5:40 PM
To:     [EMAIL PROTECTED]
Subject:        [PHP] MySQL and LIKE?

I'm trying to create a multiple pattern search using LIKE (in mySQL) -- the
following doesn't seem to work and was wondering if someone knew of an easy
efficient way of adding multiple search criteria.

SELECT myTable.col
FROM myTable, otherTable
WHERE myTable.id = otherTable.ID
AND otherTable.data LIKE ("a.%" or "s.%" or "io.bean");

So....
LIKE ("a.%" or "s.%" or "io.bean");    <<- doesn't seem to work like this.

Thanks.
Jason





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





Hello
I update my server from php 3.016 to php 4.0.4pl1 and it's work 
partially, because some of file called php3 that work perfect in php 
3.0.16 now dont'w show anything, How can I solve this problem? Any Ideas?

Thanks

-- 
Mauricio Alarcon Rincon
Webmaster - Webdepot
Linux Registered User # 157093


    CF-18 Hornet                                                               

                \     /                                                        
                 \ _ /                                                         
              ----/_\----                                                      
  x--------------( . )--------------x                                          
       x|x   | |_|\_/|_| |   x|x                                               
        x    x           x    x    

http://www.merlinux.org






In httpd.conf modify/adjust a line in similar fashion to :

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


regards,
philip


On Wed, 25 Apr 2001, Mauricio Alarcon wrote:

> Hello
> I update my server from php 3.016 to php 4.0.4pl1 and it's work 
> partially, because some of file called php3 that work perfect in php 
> 3.0.16 now dont'w show anything, How can I solve this problem? Any Ideas?
> 
> Thanks
> 
> -- 
> Mauricio Alarcon Rincon
> Webmaster - Webdepot
> Linux Registered User # 157093
> 
> 
>     CF-18 Hornet                                                               
> 
>                 \     /                                                        
>                  \ _ /                                                         
>               ----/_\----                                                      
>   x--------------( . )--------------x                                          
>        x|x   | |_|\_/|_| |   x|x                                               
>         x    x           x    x    
> 
> http://www.merlinux.org
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





Hi everyone,
    I'm a good perl programmer, but I'm not able to translate this small
Perl program to PHP:

$testo = 'Hi <%NOME%>, how are you? Tomorrow I\'ll go to <%DESTINAZIONE%>
with <%AMICO%>!';

%mioArray=( 'NOME' => 'Pippo',
   'AMICO' => 'Pluto',
   'DESTINAZIONE' => 'Roma');

print $testo."\n\n";

$testo =~ s/<%([a-zA-Z]*)%>/$mioArray{$1}/g;    # <== this is my problem!!!

print $testo."\n";


This is the output of the script:

Hi <%NOME%>, how are you? Tomorrow I'll go to <%DESTINAZIONE%> with
<%AMICO%>!

Hi Pippo, how are you? Tomorrow I'll go to Roma with Pluto!



HELP ME PLEASE!!! :)






Reply via email to