php-general Digest 8 Feb 2001 16:28:00 -0000 Issue 500

Topics (messages 38670 through 38775):

Re: sending mail with PHP from web
        38670 by: Yamin Prabudy

Re: base dir
        38671 by: Steve Werby
        38682 by: Maxim Maletsky
        38742 by: Martin A. Marques

Re: Variable quantity chooser.
        38672 by: Steve Werby
        38690 by: Jørg V. Bryne
        38755 by: David VanHorn
        38761 by: Steve Werby

Re: mail/sendmail lmitations?
        38673 by: Steve Werby

Re: Super SQL problem! Please advise!
        38674 by: Steve Werby

Re: test for undefined variables & renaming variables
        38675 by: Steve Werby

Re: reg-ex problem
        38676 by: Michael Dearman
        38734 by: Christian Reiniger

PEAR
        38677 by: Chad Guilette

PHP is the VMS of CGI languages...( Was "UN-Escaping text from a form submit?" )
        38678 by: Brian White
        38685 by: Maxim Maletsky

Cookies for Session
        38679 by: webMax
        38683 by: Maxim Maletsky

Re: Creating Directorys (slightlyOT)
        38680 by: Michael Dearman
        38681 by: szii.sziisoft.com

Re: Time problem
        38684 by: php3.developersdesk.com
        38749 by: Steve Werby

Re: HTTP Authentication - Message 2
        38686 by: Nick Kostirya

Re: PHP as Scripting Language
        38687 by: Hidayet Dogan

Re: PHP & HTACCESS
        38688 by: Christian Sakshaug
        38692 by: Jean-Arthur Silve
        38695 by: Richard Lynch

How to make PHP work in all sub-directories?
        38689 by: SED
        38745 by: Martin A. Marques

Exception Stack Error
        38691 by: Ashley M. Kirchner

Re: Unlink for windows?
        38693 by: Phil Driscoll
        38699 by: Richard Lynch

Re: uploading file
        38694 by: Richard Lynch
        38733 by: Maxim Maletsky
        38738 by: Phil Driscoll
        38752 by: Shane McBride

Re: AS400 SQL Errors and Resources
        38696 by: Richard Lynch

Re: Need some Help! [:)]
        38697 by: Richard Lynch

Re: Mail-Encryption
        38698 by: Richard Lynch

Re: PHP && mySQL
        38700 by: Richard Lynch

Re: sessions & javascript problem
        38701 by: Richard Lynch

Re: Strange behavior with parser/methods?
        38702 by: Richard Lynch

Re: db forms creator?
        38703 by: Richard Lynch

Re: XML methods(SAX/expat)
        38704 by: Richard Lynch

Re: *Animated* images. (repost)
        38705 by: Richard Lynch

Re: movies manipulation??
        38706 by: Richard Lynch

Re: Creating another php file
        38707 by: Richard Lynch

Re: porting a php3 module/patch to php4
        38708 by: Richard Lynch

Re: content retrieval from mp3.com band pages - need help
        38709 by: Richard Lynch

Re: PHP4 Changelog
        38710 by: Richard Lynch
        38735 by: Maxim Maletsky
        38736 by: Maxim Maletsky

Re: Compile error w/ libextra.a (ranlib)
        38711 by: Richard Lynch

Re: HTTP Authentication w/IIS
        38712 by: Richard Lynch

Re: php_imap4r2.dll not loaded ?!?!  (win2k)
        38713 by: Richard Lynch

Re: email function's sender
        38714 by: Richard Lynch

Re: Connectivity to AS/400
        38715 by: Richard Lynch

Re: FDF Toolkit uncompression error
        38716 by: Richard Lynch

Re: Possible bug in pg_connect (4.0.3.pl1) ?
        38717 by: Richard Lynch

Re: pdf question
        38718 by: Richard Lynch

Re: Using a background image with GD
        38719 by: Richard Lynch

Re: PHPSESSID location?
        38720 by: Richard Lynch

Re: SELECT options is null or not an object
        38721 by: Richard Lynch

Re: ora error
        38722 by: Richard Lynch
        38757 by: Mark

Re: MySQL previous next query
        38723 by: Richard Lynch

Re: Generic cloner?
        38724 by: Richard Lynch

Re: auto appending for each directory
        38725 by: Richard Lynch

Re: Getting referrer page
        38726 by: Richard Lynch

Re: COM?
        38727 by: Richard Lynch
        38764 by: Tim Knip

Re: Is there a way to call php functions in perl? and vice versa
        38728 by: Richard Lynch

Re: Moving files between 2 servers??
        38729 by: Richard Lynch

Re: Can I do this to write out html file using fopen
        38730 by: Richard Lynch

Re: open_basedir bug or misunderstanding?
        38731 by: Richard Lynch
        38732 by: Remco van den Berg

PHP function using a WML variable from a select list as to access the right data in a 
MYSQL database
        38737 by: Kato Strandjord

Events in HTML with PHP
        38739 by: Francesco Rossi

subscribe to the mailing list
        38740 by: harpreet kaur

Re: Compiling php??
        38741 by: Martin A. Marques

Re: Access a printer via PHP
        38743 by: Ankur Verma

Installing PHP on Redhat 7.0 ..
        38744 by: Petter
        38750 by: Michael Hall

can i install apache php-module AND php-cgi on the same windows-a pache?
        38746 by: Sebastian Stadtlich
        38759 by: Steve Werby

UserAUTH from webform
        38747 by: FredrikAT
        38767 by: Chris Lee

Previous Next problems !!
        38748 by: Niel Zeeman
        38760 by: Steve Werby

Weird one--PHP parsing jpg image!?
        38751 by: dphillips.rfdinc.com
        38753 by: Jon Haworth
        38772 by: Christian Reiniger

Parse WML to PHP?
        38754 by: Kato Strandjord
        38756 by: Chris Adams

Passing arrays as arguments to a method
        38758 by: rodrigo
        38766 by: Chris Lee

Re: [PHP-WIN] Re: [PHP] RE: [PHP-WIN] MSSQL Functions
        38762 by: Toby Miller

optimizing mysql with php
        38763 by: Patrik Wallstrom

Re: PHP File Uplaod Path
        38765 by: Shane McBride

Converting CFML to PHP
        38768 by: Kevin Queen

splitting a class across separate files?
        38769 by: Monte Ohrt
        38773 by: Chris Lee

COM - get existing instance?
        38770 by: Tim Knip

Php (&mysql) & different char-sets
        38771 by: Siim Einfeldt aka Itpunk

gif support
        38774 by: Pablo Martin De Natale

radiobutton
        38775 by: Miguel Loureiro

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]


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


hereis my code,....
mysql get all the user data at once and send it at once to prevent my sistem
from crash i add the sleep 2

        mysql_connect($hostname,$mysqluser,$mysqlpassword);
        $result=mysql_db_query("radius","SELECT * FROM profile");

        while ($rows=mysql_fetch_array($result)) {
        $to=$rows["UserName"];
        mail("$[EMAIL PROTECTED]","$subject","$mail","From:
[EMAIL PROTECTED]");
        sleep(2);
        }
echo "<p align=\"center\"><font size=\"+1\"><b><font face=\"Courier New,
Courier, mono\" color=\"#FFCC33\">";
echo " Sending Mail in Progress ...";
echo "</font></b></font></p>";

----- Original Message -----
From: Jon Haworth <[EMAIL PROTECTED]>
To: 'Yamin Prabudy' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 5:24 PM
Subject: RE: [PHP] sending mail with PHP from web


> Can we see some code? I run a very similar thing (sending mails to around
> 500 people whose details are stored in a MySQL database and accessed via
> PHP) - the only difference is my OS is NT4 not FreeBSD.
>
>
> -----Original Message-----
> From: Yamin Prabudy [mailto:[EMAIL PROTECTED]]
> Sent: 07 February 2001 02:58
> To: PHP List
> Subject: [PHP] sending mail with PHP from web
>
>
> Hi there,...
> i had make a web interface to send announcement mail to my
customers,..rite
> now i had about 500
> once I send mail to my customers my server hang ( i guess to much open
> file)...i complie by kernel again to get a big descriptor, but still
worried
> about the hang problem....i put a delay in my program so it send a mail
and
> delay in x time, but i get a web error and my mail stop sending in my
> customer number 300
>
> sorry for the broken english
>
> can any one help me with this kind of problem...
> i get my customer from mysql table, using freebsd4.1 and php4
>
> Yamin Prabudy
>
>
> --
> PHP General Mailing List (http://www.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]
>
>





"Brandon Orther" <[EMAIL PROTECTED]> wrote:
> I am sure this is a dumb/easy question but I can't seem to find it looking
> at the php manual... can someone tell me the function that gets the path
of
> where the script is?

Create a webpage containing the following:

<?php phpinfo(); ?>

It will show you the way and give you a lot more info. to save you from
asking a lot of questions in the future.  <smile>

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





Looking at the PHP manuals?

here: 
on http://www.php.net/manual/en/language.variables.predefined.php
where in fact it is documented, it says:

For a list of all predefined variables (and lots of other useful
information), please see (and use) phpinfo(). 


Cheers,
Maxim Maletsky


-----Original Message-----
From: Steve Werby [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 1:45 PM
To: Brandon Orther; PHP User Group
Subject: Re: [PHP] base dir


"Brandon Orther" <[EMAIL PROTECTED]> wrote:
> I am sure this is a dumb/easy question but I can't seem to find it looking
> at the php manual... can someone tell me the function that gets the path
of
> where the script is?

Create a webpage containing the following:

<?php phpinfo(); ?>

It will show you the way and give you a lot more info. to save you from
asking a lot of questions in the future.  <smile>

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.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]




El Jue 08 Feb 2001 01:44, Steve Werby escribió:
> "Brandon Orther" <[EMAIL PROTECTED]> wrote:
> > I am sure this is a dumb/easy question but I can't seem to find it
> > looking at the php manual... can someone tell me the function that gets
> > the path
>
> of
>
> > where the script is?
>
> Create a webpage containing the following:
>
> <?php phpinfo(); ?>
>
> It will show you the way and give you a lot more info. to save you from
> asking a lot of questions in the future.  <smile>

<g>
With you on this! ;-)

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  [EMAIL PROTECTED]
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------




"David VanHorn" <[EMAIL PROTECTED]> wrote:
> Is there a way, using PHP, to generate a quantity chooser that maxes out
at
> the quantity on hand?  IOW, I have $quantity from the database, for a
given
> line item, and I'd like to have a slider that lets you run up to, but not
> over, the quantity on hand.
>
> This might be more of an HTML question..

I'm sure I can help you, but I'm not able to follow your terminology.
What's a "quantity chooser" and what's a "slider"?  Are you referring to
select boxes?  I'm not trying to be rude, I just don't understand what
you're referring to.  I'm confident you can accomplish what you want using a
loop, but perhaps you can restate your question using different terminology
and some more details.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





The slider control is not a regular html-form-object. (on Windows you can
see one in the recycle-bin properties). If you want to, or need to, i guess
you can use an active-x control og make a javascript to do it. I wouldn't
reccomend either...

However if you need to set a not so spesific number you can use multiple
radiobuttons or something like that. I made one just in this case to see if
it's useful. One never know what will come in handy later on :-)
It's not excatly what you wanted, but you might want to take a look at
www.omnimedia.no/slider.php3
for the source and a quick try. Doesn't really do anything, though :-)
(btw: you don't need JS if you don't need to display the current value, as
it will be submitted as '$val')

-Y


----- Original Message -----
From: "Steve Werby" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "David VanHorn" <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 5:50 AM
Subject: Re: [PHP] Variable quantity chooser.


> "David VanHorn" <[EMAIL PROTECTED]> wrote:
> > Is there a way, using PHP, to generate a quantity chooser that maxes out
> at
> > the quantity on hand?  IOW, I have $quantity from the database, for a
> given
> > line item, and I'd like to have a slider that lets you run up to, but
not
> > over, the quantity on hand.
> >
> > This might be more of an HTML question..
>
> I'm sure I can help you, but I'm not able to follow your terminology.
> What's a "quantity chooser" and what's a "slider"?  Are you referring to
> select boxes?  I'm not trying to be rude, I just don't understand what
> you're referring to.  I'm confident you can accomplish what you want using
a
> loop, but perhaps you can restate your question using different
terminology
> and some more details.
>
> --
> Steve Werby
> COO
> 24-7 Computer Services, LLC
> Tel: 804.817.2470
> http://www.247computing.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'm sure I can help you, but I'm not able to follow your terminology.
>What's a "quantity chooser" and what's a "slider"?  Are you referring to
>select boxes?  I'm not trying to be rude, I just don't understand what
>you're referring to.  I'm confident you can accomplish what you want using a
>loop, but perhaps you can restate your question using different terminology
>and some more details.

Sorry, I've been away from this for a while.
Let me peel back a bit.

When I generate the form, I pull up from the db, the quantity on hand, and 
the quantity already committed to orders. So:
$max=$quantity-$commit is the maximum number I can allow someone to order.

In the form, I'd like to get to a mechanism that would allow entry (by most 
any means really) of an order number >0 and less than $max.
I know I can do it by submitting the form, but it would be irritating to 
have to do that..

Maybe I should just display $max, and let it go at that.


--
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9






"David VanHorn" <[EMAIL PROTECTED]> wrote:
> Sorry, I've been away from this for a while.
> Let me peel back a bit.
>
> When I generate the form, I pull up from the db, the quantity on hand, and
> the quantity already committed to orders. So:
> $max=$quantity-$commit is the maximum number I can allow someone to order.
>
> In the form, I'd like to get to a mechanism that would allow entry (by
most
> any means really) of an order number >0 and less than $max.
> I know I can do it by submitting the form, but it would be irritating to
> have to do that..
>
> Maybe I should just display $max, and let it go at that.

Trust your users, do ya?  <wry grin>  If you don't want to handle validation
on the server side using PHP, you should probably look at a JavaScript
solution that checks to see if the number is between a given range after
some event (like the form element losing the focus) and popping up a dialog
box if it's not valid.  Try internet.com's Javascript area or another JS
site to find a code snippet that does what you want.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





"Dave VanAuken" <[EMAIL PROTECTED]> wrote:
> anyone have an idea what the limit either in addresses or string
> length that sendmail can handle in a to, cc, or bcc field?

I think the total message header length can have a max byte size in sendmail
(I think primarily as a crude anti-spam method), but I'm not certain b/c I
quickly looked and couldn't find it.  Check sendmail.cf.  I don't think
there are specific limits for the fields you listed, but I could be wrong.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





"Sandeep Hundal" <[EMAIL PROTECTED]> wrote:
> SELECT diary.id, diary.thedate, diary.topic, diary.entry,
> count(comments.id) AS comments FROM diary, comments WHERE
> diary.month='$month' AND diary.id = comments.id GROUP BY comments.id
> ORDER BY diary.id DESC "
>
> Basically what I've done is made a diary table, and allowed people to
> comment on each diary entry, with the comments stored in a seperate
> comments table. What i'm doing there is getting the diary entry, plus
> the number of comments posted for that entry.
>
> Now the problem is that this query only displays entries from the
> diary table when a comment is added for that entry, otherwise it
> comes up with a blank, because (diary.id = comments.id) isn't true.
>
> Now, is there a way to make sure that it displays all diary entries
> anyway? because if i remove that check (diary.id = comments.id) -
> then all the numbers come up messed up.

Take a look at the LEFT JOIN syntax.  It will allow you to return all
records from diary and the records from comments that match based on a
common field between the two tables (in this case "id").  This query doesn't
give you exactly what you want, but it demonstrates LEFT JOIN usage.  You
had been doing a STRAIGHT JOIN (using alternate syntax where you didn't
actually use those words).

SELECT diary.entry, comments.id
FROM diary
LEFT JOIN comments ON comments.id = diary.id
WHERE where_clause;

See the MySQL documentation for more details.  Hopefully you can figure it
out on your own with a few minutes of research, trial and error.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





"August Malson" <[EMAIL PROTECTED]> wrote:
> Does anyone know of a way to test for undefined variables?  For example, I
> I have tried isdef(), but that function does not seem to work, and I

Try is_set().

> Also, does anyone know how to rename a variable?
>
> I want to create a variable $attributes_NameOfVariable, but it does not
seem
> to work.  is there a function that exists in PHP that will assist me in
this
> process?

I'm not clear what you're trying.  Can you repost with a better example of
what you mean?  You might be referring to variable variables, which are
documented on http://php.net/.

$age = 27;
$var = "age";
echo $$var; // prints 27

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/






Christian Reiniger wrote:
> 
> On Wednesday 07 February 2001 21:50, Michael Dearman wrote:
> > >         }
> > >         elseif( preg_match( "/^\d+$/", $arg[$i], $matches ) )
> >
> > Isn't this \d+ matching ----------^
> >
> > >         {
> > >                 $value = $matches[0];
> > >         }
> > >         elseif( preg_match( "/(div\d|prem)/", $arg[$i], $matches ) )
> >
> > the \d in this-----------------^------------^
> 
> No. the 1st expression is /^\d+$/ , i.e. match strings with at least one
> decimal number and nothing else (\d+) from their beginning (^) to their
> end ($)
> I.e. that one only catches strings consisting only of decimal digits.

That's what I get for shooting my mouth off without actually trying it out.
But I should of caught the ^$ 

> 
> > And the | is using '\d' and 'prem'. It probably should be
> > "/(div\d)|prem/ Unless those parens are part of the expression. Then

And after a second look, yea the \d is tightly bound to the div.
But in confirming this, besides matching something like
'div2' it will also match div23 - both returning div2. 
Don't know the data, so it might not make any difference.

Mike D.




On Thursday 08 February 2001 07:40, Michael Dearman wrote:
> > > And the | is using '\d' and 'prem'. It probably should be
> > > "/(div\d)|prem/ Unless those parens are part of the expression.
> > > Then
>
> And after a second look, yea the \d is tightly bound to the div.
> But in confirming this, besides matching something like
> 'div2' it will also match div23 - both returning div2.

Well, it matches on "div2", no matter what's around that. just like 
"prem" also matches on "appremoval"

> Don't know the data, so it might not make any difference.

Agreed 

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

The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offence.

- Edsger W. Dijkstra




Can anyone point me in the direction of a good site documenting PEAR?


Chad Guilette





... which isnt necesarily a bad thing.

At 14:27 8/02/2001 +1030, David Robley wrote:
>On Thu,  8 Feb 2001 14:17, John Vanderbeck wrote:
>...
> > The title of this book doesn\'t really matter to \"me\"!
> >
> > Note the addition of the escape sequences.  How can I stop this?
>...
>addslashes and stripslashes are the functions you need.

I remember somebody once saying about VMS that it wasn't that easy to
string commands together and munge them in the way you could with Unix,
but most of the time it didn't matter - if you dug about in the manuals
a bit you were eventually going to find something that did what you wanted.

I remember making the comparison when I saw the "hebrev" function
(http://www.php.net/manual/en/function.hebrev.php) which
will "convert logical Hebrew text to visual text".  What other language,
other than PHP ( or something done specifically for use in Talmudic
Studies ) would have as part of it's base code set a function
for processing hebrew text?

The thing is that PHP is designed to run as a Web Server module
which , in programming terms, is a bit of a desert island - you have to be
as self sufficient a you can because it isn't easy to duck down to the
corner store to get a sorting algorithm. So it makes sense to have as much
useful functionality on hand as possible.

So the moral of this long ramble is: if you need to do something like
stripping out or adding slashes it is well worth your while having a
dig through the manual - you may well find the function you need.


-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]





not about your new topic ...

I guess people talked here about how to escape/UN-escape the staff ... am I
right ? 


there's a solution to it called: *configuration*

If you'll look in the PHP.ini file you will then find to how to do it.
Plus on the pages themselves you can add the values to override these
settings.

(no, am not talking to you Brian, I refer to the guy whose comments I've
seen below)

Anyway, one thing you are right in:
*Windows - help button, everything else - read related documentation*

It is very important to study docs before doing something - the time you
would spend reading will be saved times more by not scratching your
back-head while coding.

Cheers,
Maxim Maletsky




-----Original Message-----
From: Brian White [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 2:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP is the VMS of CGI languages...( Was "UN-Escaping text
from a form submit?" )


... which isnt necesarily a bad thing.

At 14:27 8/02/2001 +1030, David Robley wrote:
>On Thu,  8 Feb 2001 14:17, John Vanderbeck wrote:
>...
> > The title of this book doesn\'t really matter to \"me\"!
> >
> > Note the addition of the escape sequences.  How can I stop this?
>...
>addslashes and stripslashes are the functions you need.

I remember somebody once saying about VMS that it wasn't that easy to
string commands together and munge them in the way you could with Unix,
but most of the time it didn't matter - if you dug about in the manuals
a bit you were eventually going to find something that did what you wanted.

I remember making the comparison when I saw the "hebrev" function
(http://www.php.net/manual/en/function.hebrev.php) which
will "convert logical Hebrew text to visual text".  What other language,
other than PHP ( or something done specifically for use in Talmudic
Studies ) would have as part of it's base code set a function
for processing hebrew text?

The thing is that PHP is designed to run as a Web Server module
which , in programming terms, is a bit of a desert island - you have to be
as self sufficient a you can because it isn't easy to duck down to the
corner store to get a sorting algorithm. So it makes sense to have as much
useful functionality on hand as possible.

So the moral of this long ramble is: if you need to do something like
stripping out or adding slashes it is well worth your while having a
dig through the manual - you may well find the function you need.


-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [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]




I am using cookies to maintain session. Now my problem is very vierd (at
least for me). On the same browser, on the same server and on the same
network, cookies sometimes work and some times don't.

Any idea?

Thanks in advance!






Once again, as I see some people complaining in here ...

we got lots of ideas and we are in many.

Just tell us some more!
more details!
more details!
more details!




-----Original Message-----
From: webMax [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 2:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cookies for Session


I am using cookies to maintain session. Now my problem is very vierd (at
least for me). On the same browser, on the same server and on the same
network, cookies sometimes work and some times don't.

Any idea?

Thanks in advance!



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






[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> I am trying to install a free mailing list manager for a mate, I have spent
> numerous hours trying to figure out why it won`t setup properly. I installed
> it on one of my own servers and it worked fine but not on his, however I have
> now dwindled it down to the fact that his server won`t allow the script to
> create directorys. I have checked the chmod and that is fine but I`m stumped.
> Anyone else have a possible solution??
> 

Until someone who might actually know something shows up...

What platforms?
umask?
real uid, gid vs effective(the process running the script) uid, gid?
permissions of the parent directory?

I get all queezy when trying to sort this stuff out.

Mike D.

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




Definately check the umask and uid/gid/eid.  Log in as that user and 
try to create it.  Most likely the server is running as "nobody" or
as another user and simply doesn't have access to it.
Run a ps -aux (on Linux - for other OS's your milage may vary) and 
see who that server is running as.  Make sure that the scripts executed
by process (x) aren't running as yet ANOTHER persona.  I know of a 
few programs which'll run as "nobody" and then run as "personX" for
all "userspace scripts."  That particular case is redundant, yes - many
programs that run as root will employ this to help quarantine userscripts
for security reasons though.

'Luck!

-Szii

At 12:11 AM 2/8/2001 -0700, Michael Dearman wrote:
>
>
>[EMAIL PROTECTED] wrote:
>> 
>> Hi,
>> 
>> I am trying to install a free mailing list manager for a mate, I have spent
>> numerous hours trying to figure out why it won`t setup properly. I
installed
>> it on one of my own servers and it worked fine but not on his, however I
have
>> now dwindled it down to the fact that his server won`t allow the script to
>> create directorys. I have checked the chmod and that is fine but I`m
stumped.
>> Anyone else have a possible solution??
>> 
>
>Until someone who might actually know something shows up...
>
>What platforms?
>umask?
>real uid, gid vs effective(the process running the script) uid, gid?
>permissions of the parent directory?
>
>I get all queezy when trying to sort this stuff out.
>
>Mike D.
>
>> Thanks
>> Ade
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>




Addressed to: "Steve Werby" <[EMAIL PROTECTED]>
              "Roman" <[EMAIL PROTECTED]>
              "Php-General" <[EMAIL PROTECTED]>

** Reply to note from "Steve Werby" <[EMAIL PROTECTED]> Wed, 7 Feb 2001 09:28:29 
-0500

Or you could do it the easy way in MySQL:

SELECT SEC_TO_TIME( TIME_TO_SEC( OUT ) - TIME_TO_SEC( IN )) AS Hours,
..
..
..

This requires IN and OUT to be type TIME.




>
> "Roman" <[EMAIL PROTECTED]> wrote:
> > I have one problem with mysql database. In table i have 2 arrays with time
> > format.
> > For example this arrays calls IN and OUT. In php script i want to have
> > distinction between
> > this arrays. For example IN is 8:30:45 and OUT is 16:45:15 and result
> > will be: 8:14:30. Exists any function which do this. Tnanx.
>
> If your MySQL fields are a datetime type (YYYY-MM-DD hh:mm:ss) then you can
> convert them to seconds since epoch (Jan 1, 1970 at midnight) and then
> calculate the difference and divide by a number to get appropriate units.
> Below is a set of functions I wrote to do that.  Before I get to that here's
> a simpler solution:
>
> // $time = "16:45:15";
> $time_array = explode( ":", $time);
> // $time[0] = 16, $time[1] = 45, $time[2] = 15
> $time_since_midnight = $time[0] * 3600 + $time[1] * 60 + $time[2];
> // Do this conversion for both times, subtract and convert units.
>
> function get_mysql_to_epoch( $date )
>     {
>     list( $year, $month, $day, $hour, $minute, $second ) = split(
> "([^0-9])", $date );
>     return date( "U", mktime( $hour, $minute, $second, $month, $day,
> $year ) );
>     }
>
> function get_elapsed_time( $time_start, $time_end, $units = "seconds",
> $decimals = "2" )
>     {
>     $divider[years]   = ( 60 * 60 * 24 * 365 );
>     $divider[months]  = ( 60 * 60 * 24 * 365 / 12 );
>     $divider[weeks]   = ( 60 * 60 * 24 / 7 );
>     $divider[days]    = ( 60 * 60 * 24 );
>     $divider[hours]   = ( 60 * 60 );
>     $divider[minutes] = ( 60 );
>     $divider[seconds] = 1;
>
>     $elapsed_time = ( ( get_mysql_to_epoch( $time_end ) -
> get_mysql_to_epoch( $time_start ) )
>                       / $divider[$units] );
>     $elapsed_time = sprintf( "%0.{$decimals}f", $elapsed_time );
>
>     return $elapsed_time;
>     }
>
> <?php
> // Usage example
> $time_in  = "2000-06-14 06:30:00";
> $time_out = "2000-12-22 13:45:00";
> // Full use of function.
> echo "<br>Days: ";
> echo get_elapsed_time( $time_in, $time_out, "days", "3" );
> // Use defaults for units and decimal places.
> echo "<br>Seconds: ";
> echo get_elapsed_time( $time_in, $time_out );
> ?>
>
> --
> Steve Werby
> COO
> 24-7 Computer Services, LLC
> Tel: 804.817.2470
> http://www.247computing.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]
>
>


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




<[EMAIL PROTECTED]> wrote:
> Or you could do it the easy way in MySQL:
>
> SELECT SEC_TO_TIME( TIME_TO_SEC( OUT ) - TIME_TO_SEC( IN )) AS Hours,
> This requires IN and OUT to be type TIME.

That is a pretty sweet function and it's definitely faster to handle the
conversion in MySQL instead of PHP.  My example was for a datetime MySQL
field as opposed to a plain time field.  Like Rick Widmer stated, usage of
TIME_TO_SEC() only works correctly on time fields.  If your data is a
datetime field you can use UNIX_TIMESTAMP() to convert a field to seconds
since epoch.  Do that for two fields take the difference and divide by a
constant to convert into desired time units.

SELECT UNIX_TIMESTAMP("2001-01-14 16:49:34") => 979508974

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/






Dear Shane,

Thanks for response.
But when I use PHP3 and Apache than all is good.
And when I use PHP4 (!!!) and Apache than Apache don't understanding header
('HTTP/1.0 401 Unauthorized'), and Apache's "error.log" consist of  "Bad
header=HTTP/1.0 401 Unauthorized: d:/program files/php/php.exe".
Do you know what is the matter?

Thanks in advance.
Nick.
----- Original Message -----
From: Shane McBride <[EMAIL PROTECTED]>
To: Nick Kostirya <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 7:06 PM
Subject: Re: [PHP] HTTP Authentication


> Nick,
>
> I'm not sure were you are getting the value of $PHP_AUTH_USER from, so you
> might want to try this snippet. This causes a dialog box to open and ask
for
> a username/password.
>
> Also, in your code: you do not need to escape the quotes in the header.
>
> <?
>  // Check to see if $PHP_AUTH_USER already contains info
>  if (!isset($PHP_AUTH_USER)) {
>     // If empty, send header causing dialog box to appear
>     header('WWW-Authenticate: Basic realm="Whatever You want to say"');
>     header('HTTP/1.0 401 Unauthorized');
>     echo 'Authorization Required!';
>     exit;
>  } else if (isset($PHP_AUTH_USER)) {
>     if (($PHP_AUTH_USER !="abc") || ($PHP_AUTH_PW !="123")) {
>        header('WWW-Authenticate: Basic realm="Whatever You want to say"');
>        header('HTTP/1.0 401 Unauthorized');
>        echo 'Authorization Required!';
>        exit;
>   } else {
>    // Start echo statement
>    echo "hello";
>   }
> }
> ?>






try

#/usr/local/bin/php -q
<?
...
?>

                                             Hidayet Dogan
                              [EMAIL PROTECTED]

Pleksus Bilisim Teknolojileri A.S.
----------------------------------------------------------
caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr
tel : +90 312 4355343 * faks: +90 312 4354006

On Wed, 7 Feb 2001, Michael Dearman wrote:

> 
> 
> John Huggins wrote:
> > 
> > Well, I have compiled a php binary for use as yet another scripting language
> > to work along side AWK, Perl, Sh, etc.
> > 
> > It works too.  I have this file...
> > 
> > #!/usr/local/bin/php
> > <?
> > print("Hello World\n");
> > ?>
> > 
> > I run it and get..
> > 
> > host:~/projects/PHPScripts # ./test.php
> > Content-type: text/html
> > 
> 
> Steve Werby had this solution for a previous post on the same
> problem.
> MD
> --------------------------------
> From: "Steve Werby" <[EMAIL PROTECTED]>
> To: "Tim Livers" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> 
> "Tim Livers" <[EMAIL PROTECTED]> wrote:
> > Everything works fine except that I get "X-Powered-By: PHP/4.0.4pl1
> > Content-type: text/html #!/usr/local/bin/php" at the top of the page.
> 
> 1. In php.ini, set "expose_php = Off"
> 2. Restart Apache.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> > Hello World
> > 
> > Great.  Now how do I get rid of the Content-type line?  I have searched the
> > docs with little clues.
> > 
> > Thanks for your help.
> > 
> > *******************************************
> > John Huggins
> > 
> > Transmitter Location Systems, LLC
> > 14120 Parke Long Court, 103
> > Chantilly, Virginia 20151
> > 703-227-8435
> > 703-968-8808 fax
> > [EMAIL PROTECTED]
> > http://www.tls2000.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]
> 





Hey

Take a look at www.phpbuilder.com, www.devshed.com or one of they many good 
sites on the net. Here you will find tutorials, forums, tips etc, that you 
can use for increase your experiance. I also suggest books to increase your 
exp to...

http://www.php.net/links.php for more links



At 05:16 08.02.2001, you wrote:
>Hello Everybody,
>
>Does anybody know or have some PHP code to read the htaccess file.
>I have a couple of directorys protected by the htaccess & htpasswd files on
>the Unix Apache server I use. But I want to create a webpage with input
>boxes to simulate the popup dialog that appears when entering the protected
>areas.
>
>So rather than enter the username & password in the dialog I want to enter
>them in a webpage.
>Its all for looks, to give the site a user friendly asthetic look.
>
>Please help.
>
>Pretty please....
>
>Chris
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]



Best Regards, Christian Sakshaug
-- 
Email: [EMAIL PROTECTED]
Web:   www.sakshaug.net
Tel:    +47 913 95 618






hello,

you can see with the following syntax :

http://login:[EMAIL PROTECTED]/protecteddir/

So, the user enter the code and passwd from a PHP form,

then you redirect him with this syntax.

But prefer redirection with a javascript, because M$ Explorer seems do not 
love this:

Header("Location: http://login:[EMAIL PROTECTED]/protecteddir/");

So in with a javascript, do the following :

<HTML>
<BODY>
<script language="javascript">
         document.location="<?echo 
"http://$CODE:$[EMAIL PROTECTED]/protecteddir/";?>";
</script></BODY>
</HTML>


where $CODE and $PWD are the login and password of the user.

jean-arthur

At 09:25 08/02/01 +0100, Christian Sakshaug wrote:
>Hey
>
>Take a look at www.phpbuilder.com, www.devshed.com or one of they many 
>good sites on the net. Here you will find tutorials, forums, tips etc, 
>that you can use for increase your experiance. I also suggest books to 
>increase your exp to...
>
>http://www.php.net/links.php for more links
>
>
>
>At 05:16 08.02.2001, you wrote:
>>Hello Everybody,
>>
>>Does anybody know or have some PHP code to read the htaccess file.
>>I have a couple of directorys protected by the htaccess & htpasswd files on
>>the Unix Apache server I use. But I want to create a webpage with input
>>boxes to simulate the popup dialog that appears when entering the protected
>>areas.
>>
>>So rather than enter the username & password in the dialog I want to enter
>>them in a webpage.
>>Its all for looks, to give the site a user friendly asthetic look.
>>
>>Please help.
>>
>>Pretty please....
>>
>>Chris
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>Best Regards, Christian Sakshaug
>--
>Email: [EMAIL PROTECTED]
>Web:   www.sakshaug.net
>Tel:    +47 913 95 618
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------
Le simple fait de passer par la fenetre ne suffit pas a la transformer en porte.





> Does anybody know or have some PHP code to read the htaccess file.

Off the top of my head:

<?php
    $valid = 0;
    $path = "/path/to/.htpasswd";
    $file = file($path) or die("Could not read $path");
    while (list(,$line) = each($file)){
        list($username, $password) = explode($line);
        if ($username == $user && crypt($pass) == $password){
            $valid = 1;
        }
    }
    if (!$valid){
        header("Location: index.htm");
        exit;
    }
?>

You may need to use mcrypt(), and the encryption used by your OS may or may
not be available, and your OS may or may not have been configured at some
point to use a different encryption, so the passwords in a single .htpasswd
might actually be in two different formats...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






Hi,

I´m hosting a PHP-doc in sub-directorie (http://myserver/subdirectory/) on
my IIS server Win2000 but it doesn't run, though it runs in the root
(http://myserver/).

Is there something in the PHP.ini to config (and how) or is it something
else?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

------------------------------------------
Phone:       (+354) 4615501
Mobile:      (+354) 8960376
Fax:         (+354) 4615503
E-mail:      [EMAIL PROTECTED]
Homepage:    www.sed.is <- New Homepage!
------------------------------------------





El Jue 08 Feb 2001 05:34, SED escribió:
> Hi,
>
> I´m hosting a PHP-doc in sub-directorie (http://myserver/subdirectory/) on
> my IIS server Win2000 but it doesn't run, though it runs in the root
> (http://myserver/).
>
> Is there something in the PHP.ini to config (and how) or is it something
> else?

NO! php.ini has no information regarding where you can execute it. You have 
to read the documentation of IIS (or switch to apache ;-) ).

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  [EMAIL PROTECTED]
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------





    I just compiled apache_1.3.17, mod_perl-1.25 and php-4.0.4pl1.
However, now when I try to start apache, I get the following error:

    Fatal System Error: Raise at top of Exception Stack

    Where might this error be coming from?  Apache?  PHP?  Some other
PHP extension I might have compiled in?  How can I find out which?

    My older binary works just fine (apache_1.2.14, mod_perl-1.24_01 and
php-4.0.4pl1)

    AMK4

--
H | Hi, I'm currently out of my mind.  Please leave a message.  BEEEEP!
  |____________________________________________________________________
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
  Director of Internet Operations / SysAdmin    .     800.441.3873 x130
  Photo Craft Laboratories, Inc.             .        eFax 248.671.0909
  http://www.pcraft.com                  .        3550 Arapahoe Ave, #6
  .................. .  .  .     .            Boulder, CO 80303, U.S.A.






>Hello,
>
>Does anyone have a function that can delete files like unlink(); for
>windows?
>
>Thank you,

Yes PHP does. It's unlink()!

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





> Does anyone have a function that can delete files like unlink(); for
> windows?

unlink should work...

Only things that Windows is inherently incapable of doing, or is just to
broken (threads?) to do, don't work.

Windows is real good at deleting files.   It's so good at it, it sometimes
just deletes random ones for fun. :-^

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






// Creates the image file with a timestamp
$timestamp = time();
$image= $timestamp.$picture_name;

if ($PLATFORM == "windows") {
$new_path = str_replace('^', '\\', $WINDOWS_PATH);   

What's with the "^"?...
And, since \ is special in PHP, you are changing ^ to \?  Why?

echo $picture;
if (is_uploaded_file($picture)) {
copy($picture, $new_path);
file://move_uploaded_file($picture, $new_path);
} else {
echo "Possible file upload attack: filename '$picture'.";
}

#add this:
echo "is_uploaded_file() failed.";

}



-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






Everyone say : "Good morning mr. Lynch" !

Man, I enjoy that,


Cheers,
Maxim Maletsky



-----Original Message-----
From: Richard Lynch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 5:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] uploading file


// Creates the image file with a timestamp
$timestamp = time();
$image= $timestamp.$picture_name;

if ($PLATFORM == "windows") {
$new_path = str_replace('^', '\\', $WINDOWS_PATH);   

What's with the "^"?...
And, since \ is special in PHP, you are changing ^ to \?  Why?

echo $picture;
if (is_uploaded_file($picture)) {
copy($picture, $new_path);
file://move_uploaded_file($picture, $new_path);
} else {
echo "Possible file upload attack: filename '$picture'.";
}

#add this:
echo "is_uploaded_file() failed.";

}



-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




>Everyone say : "Good morning mr. Lynch" !
Hear Hear! I was all overcome with a wave of nostalgia :)
Cheers
-- 
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org





Yea, I guess I should have stripped out some of the special code before I
posted. The ^ replaces \ when the user inserts the windows path, than I
replace the ^ with \\ so the path works correctly.

I did get this to work. I was sure fighting it though...

- Shane
DISCLAIMER: I am by no means an expert on this, or any other, topic...

----- Original Message -----
From: "Richard Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 3:40 AM
Subject: Re: [PHP] uploading file


> // Creates the image file with a timestamp
> $timestamp = time();
> $image= $timestamp.$picture_name;
>
> if ($PLATFORM == "windows") {
> $new_path = str_replace('^', '\\', $WINDOWS_PATH);
>
> What's with the "^"?...
> And, since \ is special in PHP, you are changing ^ to \?  Why?
>
> echo $picture;
> if (is_uploaded_file($picture)) {
> copy($picture, $new_path);
> file://move_uploaded_file($picture, $new_path);
> } else {
> echo "Possible file upload attack: filename '$picture'.";
> }
>
> #add this:
> echo "is_uploaded_file() failed.";
>
> }
>
>
>
> --
> Visit the Zend Store at http://www.zend.com/store/
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





> I reallize that the SQL syntax should be similar among all DB's which
allow
> SQL, but there are slight differences amongst them.  With that said, I
have
> written an SQL statement to the AS400 and am getting errors back.  So, and
I
> don't have ANY, I need a site to visit where I can reference DB2 and SQL
for
> the AS400.
> Here is my error code:
>
> SQL error: [IBM][CLI Driver][AS] SQL0401N The data types of the operands
for
> the operation "= " are not compatible. SQLSTATE=42818 , SQL state 42818 in
> SQLExecDirect
>
> Any ideas?

If you can't find docs, throw out bits and pieces of your SQL statement
until it doesn't complain, and those are the columns that it doesn't like
comparing/using with =, and look at their data types and find a way to cram
them down its throat. :-)

> Was this Off-Topic?
> Any suggestions where I could post these questions?

There's a [EMAIL PROTECTED] that would be more appropriate maybe...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Basically in a nutshell... i made a new row in post signature int(1)

And you have a new column (you said row, you meant column) in members
signature text?...
Where are you storing the actual text and how is it related to 1 or 2 or is
it always just 1?...

If I'm confusing you, draw it out on paper (yes, real paper) with pencil and
write tables of posts, people, signatures, whatever with several rows in
each.  Draw circles and arrows to describe how the tables relate to each
other.  The arrows need to start/end on some kind of unique IDs so each row
can get the right row out of the other table.

> i replaced the normal code of if ($signature == yes) { $message .= blah }
> with if ($signature == yes) { $memsig = "1"; }
>
> and in post i have
> if ($post[signature] == 1)
> $sql = "SELECT * FROM members WHERE username='UserName'";
> $query = mysql_db_query($database, $sql) or die(geterrdesc($sql));
> $msig = mysql_fetch_array($query);
> $msig[signature] = $sig;

That's backwards.  You just got $msig from the database, and all the fields
got filled in, including the 'signature' field, in the mysql_fetch_array()
line.
Then, you wipe that 'signature' field element out and shove $sig into it.
Since $sig is probably empty, that's why all your signatures are empty.

> $pagetext = $pagetext
> . "<BR>____________<BR>" . censor(bbcodeparse($sig));
>
>
> can u find any problems with this code at all?
> the two problems im having are...
> 1. it puts a 1 in the db reguardless of choice.
> 2. when it is set to one, it shows _____________ but the signature is
blank.
> Ive even tried to echo it out and its blank, and as far as i know its
right
> thanks in advance.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> I want to send mails via the "mail"-command which are encrypted and
> which uses the certificates used by Netscape Messenger and Outlook (if
> you export the files, it's extention is .p12).
>
> - How do I generate such keys (in general) ?

Install gnupg (http://gnupg.org) or PGP and use http://php.net/exec I
guess...

You can find a long-winded post from me a year or two ago about my trials
and tribulations (and a *lot* of help from others to get me going).

> - How can I send an encrypted email from an Unix-Server (with php) ?

You would encrypt it with the private key (read gnupg docs) and then just
use http://php.net/mail

At least, I think that's all you need to do...  You might have to use Manuel
Lemos mail class to *attach* the *signature* which is encrypted, if that's
what you mean...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> initial condition > 1) three are many *html in my SQL ex:xxx.html,and yyy.html > 2)I have domain ex: abc (ex: http://www.abc.com) > 3)database name : aaa > 4)table name :bbb > > > I want to try next step. > when I type in URL from brouze ,ex http://www.abc.com/xxx.html . > I can get xxx.html from my SQL. > when I type in URL from brouze ,ex http://www.abc.com/yyy.html > I can get yyy.html from my SQL. > How can I do this? > Is it posible to create it? Search for "Mod_Rewrite PHP" article. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm



> I have an interesting problem with sessions (using enable-trans-sid).
>
> I have created a page with the following javascript function on it:
>
> function swapImgRestore() {
>   var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
> x.src=x.oSrc;
> }
>
> However when I disable browser cookies the code is altered by
> enable-trans-sid - notice the "" :
>
> function swapImgRestore() {
>   var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x="a[i])&&x.oSrc;i++)"
> x.src="x.oSrc;
> "
>
> Why does enable-trans-sid do this? It effectively stuffs up the
javascript.
> Anyone know a solution, other than rewriting the javascript :)

As a short-term hack, try adding some spaces in there (just around your &&
and after ; in for() for example) ...

Fill out a bug report at http://bugs.php.net

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> That is, we can have
>   $TestObject->mTestMember = create_function('','echo "TestMember<br>";');
> but we can't do
>   $TestObject->mTestMember();
>
> Can I get around this using clever placement of {}'s or ()'s?

Wild Guess:

{$TestObject->mTestMember}();

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm







> Hi, can anyone point me towards an easy way to generate forms to update a
> mysql database?

I think there's something called PHPGen that does this...

myPHPAdmin or whatever it is does it in a generic sort of way, no?

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> while ($data = fread($fp,1)) // yes, I know you shouldn't use '1', but
it's
> an example
> {
>    xml_parse($parser, $data,feof($fp));
> }
>
> ie, should I set a flag if the CDATA's base64 encoded to persist over
> multiple CDATA events, or does it wait for the closing tag and send all
> of the data off to the handler as one batch?  Some CDATA elements
> may be multiple megabyte images.  (Yes, it's from an outside source
> that we have no control of.)

If nobody knows, you could run a simple test pretty quickly with that...

You might need to add some code to be sure you always have a full chunk of
XML in RAM...

Wouldn't exactly be tricky, would it?....

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> I'm sorry for the repost, but the last one was misunderstood (i think).
> i'm looking for ways to generate *animated* images using PHP.

Check if http://php.net/gd supports any animation.

Get GD from http://www.boutell.com

Install it.

Recompile PHP --with-gd

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> i'm working on a web site where users will be able to upload movies.
> the problem is that i want to dinamicly create a movie preview.
> is it possibile, even with some external programs in other languages, to
> exetract a picture from o movie?

QuickTime?  AVI?  What?...

Anyway, try to find a command-line utility program that will do that (IE,
one that you can do it without having to use a GUI).

Then just use http://php.net/exec

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>     $result2 = mysql_query("INSERT INTO winLoss(login, pass)
> VALUES('$login', '$pass')");
>
> if($result2)
>     {
>       $fp = fopen
("/home2/colorado/public_html/profiles/$screen_name$ext",
> "w");
>       fwrite($fp, "<?php
>                      $result = mysql_query("SELECT * from winLoss WHERE
> login='$login'    AND pass='$pass'");
>                    ?>
>
>                    <html>
>                    <head>
>                    <title>$screen_name</title>
>                    </head>").........
>
> Ive ommited the redundant things. Basicly it just creates this: SELECT *
> from winLoss WHERE login='' I need that value in there. Any ideas?

This seems pretty weird...  What are you really trying to do?  Big Picture.

What value do you need in that file, and why can't you just fwrite($fp,
"xxx") to get it there?

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Having seen Richard Lynch write recently on this list:
> : There really were very, very, very few changes from PHP3 to PHP4,
> : considering it was a complete re-write of the engine.
>
> I think I am going to break down and ask for tips, tricks,
> etc, porting a php3 module to php4.

For the record, I meant as far as PHP scripts go...

What may or may not have changed inside the Engine, I don't know [or want to
know :-)]

> This thing was written by someone else to be part of php-3.0.6 (!)
> and adds a few functions for accessing a specialized database to
> PHP.
>
> It was intended to live in the dl/ directory.
>
> What is it going to take to get this to work in ext/ or where-
> ever it should be for php4?

If I was you, I'd first try to just throw it in there and re-do ./configure
and sacrifice a rubber chicken.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Ok, I'm new to programming in PHP. What I'm trying to do is retrieve the
> song list with play links off of my bands' page at Mp3.com.  Ultimately
> I want to build it into a function I can call with an array of song
> names and it will return the html formatted as I like

COOL!!!

http://mp3.com/stations/NoGenre

> echo eregi_replace('<td><phrase><a
> href="http://my.mp3.com(.*)</tr></table>',
> '</td><td nowrap></td></tr></table></td>',$out[0]);
>
> What happens though is it takes the chuck out of the first occurance,
> and then prints the rest of the page unchanged. I want to do further
> formatting to the code after I remove these chunks though, such as
> replacing the img reference links and such.

I can't handle ereg, so would be doing a lot of http://php.net/strtok or
http://php.net/explode here...

> I'm starting to think I'm going about it wrong in the first place. I'm
> thinking I should just pull out the m3u and mp3 links, and use them

That would actually probably be easier.

Suck down the .m3u file, and just use explode("\n", $m3u) on it.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>     As I am working on the upgradation of my system into PHP 4.0 from the
> lower version, I want the Change log in a good format. A word document or
> some other good format which comprises the complete the Change log would
be
> great for me to look through and do the upgradation process in the right
> direction. As I got the change log from php.net, I couldn't format them
> perfectly as I wanted, bcoz I want print it out also. But the formation is
> not good enough.
>
>     Could some body send the good formatted change log to me (if you
have),
> so that it'll b helpful to me for the upgradation process.

I think that the ChangeLog as you see it online is it.  There is no other
ChangeLog.  It certainly would not be in Word.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






Hey, you know ... you've made me just too curious about cut&pasting. [sorry
guys, I know it's [[[TOTALLY ::: OT]]] ] 

I have just succeeded doing it myself - I highlighted the text on php.net
AND pasted it into word....  guess what : IT WORKED!  .... and I CAN EVEN
PRINT IT OUT!!!

Is it that bad? I really like the format I had in my word file: clean and
looking just as it looks on the site. However, because it's M$ Word, if I
would like I would even modify it! :-) .

sorry again,

Cheers,
Maxim Maletsky


 

-----Original Message-----
From: Maxim Maletsky 
Sent: Thursday, February 08, 2001 7:35 PM
To: 'Richard Lynch'; [EMAIL PROTECTED]; 'TV Karthick Kumar'
Subject: RE: [PHP] PHP4 Changelog


Why don't you just [highlight] the text you need on php.net/ChangeLog-4.php
- [CTRL+C], [paste] into a text editor, and then [cut&paste] into your M$
Word ?

easy enough ...

Cheers,
Maxim Maletsky

-----Original Message-----
From: Richard Lynch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 6:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP4 Changelog


>     As I am working on the upgradation of my system into PHP 4.0 from the
> lower version, I want the Change log in a good format. A word document or
> some other good format which comprises the complete the Change log would
be
> great for me to look through and do the upgradation process in the right
> direction. As I got the change log from php.net, I couldn't format them
> perfectly as I wanted, bcoz I want print it out also. But the formation is
> not good enough.
>
>     Could some body send the good formatted change log to me (if you
have),
> so that it'll b helpful to me for the upgradation process.

I think that the ChangeLog as you see it online is it.  There is no other
ChangeLog.  It certainly would not be in Word.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Why don't you just [highlight] the text you need on php.net/ChangeLog-4.php
- [CTRL+C], [paste] into a text editor, and then [cut&paste] into your M$
Word ?

easy enough ...

Cheers,
Maxim Maletsky

-----Original Message-----
From: Richard Lynch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 6:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP4 Changelog


>     As I am working on the upgradation of my system into PHP 4.0 from the
> lower version, I want the Change log in a good format. A word document or
> some other good format which comprises the complete the Change log would
be
> great for me to look through and do the upgradation process in the right
> direction. As I got the change log from php.net, I couldn't format them
> perfectly as I wanted, bcoz I want print it out also. But the formation is
> not good enough.
>
>     Could some body send the good formatted change log to me (if you
have),
> so that it'll b helpful to me for the upgradation process.

I think that the ChangeLog as you see it online is it.  There is no other
ChangeLog.  It certainly would not be in Word.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




that this was merely the somewhat out of date and rarely seen _PHP2_ (phew,
I guess...).

So I need to get hosting support for this site up ASAP. I will need support
for both PHP2 and PHP4 (which I will be converting the code to) and both
msql and mysql (again, converting from the former to the latter).  Seeing as

Unless I am grossly mistaken, the PHP/FI (aka PHP2) code simply wasn't
capable of doing that --enable-versioning thing that lets two PHP Modules
co-exist happily.

So you are *not* going to successfully get both installed in one httpd
binary as Modules.

You've got a couple options:

1. Install a whole 'nother httpd on a different port from 80 (say, 81) and
make that the new one with SSL, PHP4, MySQL etc. and port page by page until
you're all done.  Then a quick presto-chango, and you can swap out that
dinosaur.

2. Deprecate PHP2 to use CGI install with a different extension (.phtml or
.php2 or .phpfi or...) and have only PHP4 as a Module.  (Or, vice versa --
PHP2 as module, PHP4 as CGI).

Oh yeah -- msql to mysql conversion is probably going to be a breeze.
Global search and replace and test the page.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm







>OK, I loaded PHP with the ISAPI filter, but still no luck with
authentication..

Did you reboot?   It is Windows...

I think <?php phpinfo();?> will tell you if you are actually using ISAPI or
CGI or not...  Maybe.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm







> I'm trying to use some POP3 functions and the manual states I would need
to
> use the IMAP functions.
> So I uncommented the ";extension=php_imap4r2.dll" line in my
> "c:\winnt\php.ini" file. But it gave me the following error:
>
> "Unable to load dynamic library './php_imap4r2.dll' - The specified module
> could not be found".
>
>
> I read I needed the download install the "imap-4.5.tar" module. The README
> file has only instructions how to "make" it for UNIX. The default
"MakeFile"
> is for UNIX. So I tried to clown around and rename "MakeFile.nt" to
> "MakeFile" and make it. But I only get errors:

The tar file only has instructions on UNIX 'cuz it mostly is only useful on
Un*x....  Forget the tar file unless you actually have a license to MSVC 6.0
(That's a C compiler) and are used to compiling things with it.

Either you can find the php_imap4r2.dll on http://php4win.de or
http://downloads.swwwing.com or you're going to have to find somebody really
nice who owns MSVC and likes PHP or IMAP enough to do the world a favor.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>Since I've set sendmail_path to /var/qmail/bin/inject in php3.ini, all
>emails coming from the http client come from me, i.e. my email address on
>our server, and not from the apache client name, http ...
>
>What's wrong in my conf ...

qmail comes with a sendmail wrapper, so you may want to use that with:
sendmail_path = "/path/to/qmail/sendmail -t";

To alter the From/Reply-to, use the optional 4th argument to mail():

$headers = "From: [EMAIL PROTECTED]\r\n";
$headers .= "Reply-to: [EMAIL PROTECTED]\r\n";
$headers .= "X-Powered-By: PHP Mailer by Boucey\r\n";
mail($to, $subject, $body, $headers);

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm







> I'm going to be trying to connect to the native DB2 database in a AS/400
> So far thats all I know about the IBM side.
>
> Can someone give me a short update on what options I have ?

Option 1. ODBC bridge/whatsit from OpenlinkSW.com, EasyODBC.org (?) or that
other one I always forget.
Option 2. Roll your own ODBC driver and give/sell it to everybody with an
AS/400

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>     I've downloaded the FDF toolkit from adobe (fdftk4_05_C.tar.Z) and it
> doesn't uncompress.  I've noticed that other people are using it.  Has
> anyone else experianced this same problem and if so what was your work
> around.

Have you been able to uncompress other .Z files, or just .gz?...  Maybe you
need a different weapon...

Also, try to re-download.  Maybe you just got a garbled file.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>  $conexion2 = pg_Connect("host=$servidor user=$usuario password=$pass
> dbname=$bd port=$puerto");
> 
> and this one does not ?
> 
>  $conexion2 = pg_Connect("host=$servidor port=$puerto user=$usuario
> password=$pass dbname=$bd");

I always just copied the stuff in order...

Does the manual specifically say any order is legal?...

If not, that's a feature, not a bug :-)

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Is it possible to output to more than one pdf file at one time.

Probably not...

You could Zip them up into a .zip or .gz...

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Does anyone have an example or can someone tell me how to use a background
> image in GD?

You build the image with the background and get another image, and do that
CopyResized thing to copy the second onto the background.

If I actually used GD before I might know the function names...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>Where is the temp session file held at? I have a script that uses sessions
but I can't find the session file.
>My php.ini file indicates that the session.save_path = c:\php\sessiondata
but there is not any files there when there should be.

Change those \ to / and keep all the players happy.

>It does look like the session is working though.

C:/tmp
C:/temp
C:/Windows/temp
C:/Windows/System/temp
C:/Windows/Temporary Internet Files/
C:/Windows/Wherever Windows OS Felt Like It This Week
.
.
.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm







SELECT options is null or not an object


> Does anyone know why I get this error when selecting an option in the box?

I think that's a JavaScript error message, no?...  In a popup window rather
than in  the middle of your page...

> <script language=javascript>
> <!--
> function getDocID(form)
>

> var list = document.docIDchange.useCaseSelected;
> alert('list '+list);

Ah, yes.

*Here* you try to dig down into the form object to get your DocID:

> var docID = list.options[list.selectedIndex].value;

And *here* you also try to dig down into the form object to get your DocID:

> onChange=\"getDocID(this.options[this.selectedIndex].value)\" SIZE=5>\n";

You should only be doing all that this.options[this.selectedIndex].value in
*one* of the two places.

I'd put it in the function, myself.  YMMV.  It's a religious issue.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Oracle Error: 2042 (ORA-02042: too many distributed transactions
ORA-02063:
> preceding line from SHEETS -- while processing OCI function OPARSE)
> Session halted.

Well, maybe you have a lot of transactions and never commit them.

Wild Guesses:
You used that cool ora_plogin persistent thing, so the connection never
really closes as far as Oracle is concerned, and there's an automatic
transaction started when you login, so eventually, every httpd has a
transaction going.

You didn't use the cool ora_plogin persistent thing, but everything else
above is still true.

You are using transactions somewhere but never commit nor rollback.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






First guess is correct, yeah I did use the cool ora_plogin thing

I'm only doing selects so why do I need to do any commits

-Mark


""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message
09ab01c091b8$3e6b4000$[EMAIL PROTECTED]">news:09ab01c091b8$3e6b4000$[EMAIL PROTECTED]...
> > Oracle Error: 2042 (ORA-02042: too many distributed transactions
> ORA-02063:
> > preceding line from SHEETS -- while processing OCI function OPARSE)
> > Session halted.
>
> Well, maybe you have a lot of transactions and never commit them.
>
> Wild Guesses:
> You used that cool ora_plogin persistent thing, so the connection never
> really closes as far as Oracle is concerned, and there's an automatic
> transaction started when you login, so eventually, every httpd has a
> transaction going.
>
> You didn't use the cool ora_plogin persistent thing, but everything else
> above is still true.
>
> You are using transactions somewhere but never commit nor rollback.
>
> --
> Visit the Zend Store at http://www.zend.com/store/
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






> I need to build a query that needs to find the previous or next record in
a
> database using a form. The records are numbered using a field called
> 'sb_num'. This field is initially set using the form.
> Would something like this work
> Next:
> Select 'field1', 'field2' from table order by sb_num where
$sb_num>=++sb_num
> limit 1
>
> Previous
> Select 'field1', 'field2' from table order by sb_num desc where
> $sb_num<=--$sb_num limit 1

Yes, only not quite...

select ... where sb_num > $sb_num

select ... where sb_num < $sb_num

Note that it's possible to reach the first or last record, and then there is
no "Next" or "Previous".  A nice interface would disable the un-usuable
link.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>     I'm wondering if there is an easy way to code a generic cloner at top
> level of object inheritance tree so that all descendents can follow? Or by
> nature the clone() function needs be implemented at final class
> def.? Thanks a lot!

You could probably use something like:

function clone($whatever){
    $clone = $whatever;
    if (is_object($whatever)){
        while (list($var, $val) = each($whatever)){
            $clone->$var = clone($val);
        }
    }
    elseif (is_array($whatever)){
        while (list($var, $val) = each($whatever)){
            $clone[$var] = clone($val);
        }
    }
    else{
        $clone = $whatever;
    }
    return $clone;
}

No promises this can be made to work, much less to do what you want, but it
might...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> I'm developing a web page with a directory structure like this:
>     /main
>     -----/subject1/
>     --------------/subsubsect11
>     --------------/subsubsect12
>     --------------/subsubsect13
>     --------------/subsubsect14
>     --------------/subsubsect15
>     -----/subject2/
>     --------------/subsubsect21
>     --------------/subsubsect22
>     --------------/subsubsect23
>     --------------/subsubsect24
>     --------------/subsubsect25
>     -----/subject3/
> etc.....
>
> What I would like to do is have a menu for each directory which is saved
in
> a seperate file, (so there is a menu for main, menu for subject1, menu for
> subsubject11, etc). I need a php script that finds out what directory a
> current web page is in and automatically append all the menu files for
each
> directory up to the current directory. I know that php has functions for
> both directory access and file access. Could somebody give an idea how I
can
> achieve this with php.

Maybe something like this:
<?php
    function menu($dir){
        if (is_file("$dir/menu.inc")){
            menu("$dir/..");
            include "$dir/menu.inc";
        }
    }
    menu(dirname($PHP_SELF));
?>

Just put a menu.inc in each directory for what should appear at that level.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Is there any way in straight HTML to get the page referred from and make
> a link out of it? Or is scripting languages, like my favorite, PHP, the
> only way to do that?

SSI (Server Side Include) *might* be able to do it, and doesn't really
quality as a scripting language in my book.

You could use JavaScript to go "back", which is client-side, not
server-side.

The HTTP_REFERER is actually an encvironment variable set by the web-server
(or not, if configured that way) I think, so you don't really need a whole
full-blown scripting language to get it, technically...  Though who or what
may have provided just Environment variables, I dunno...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> Does Anyone know what needs to be installed on the server other than php
> 4.0.4 and IIS to instantiate COM Objects like Excel and word.

If Excel and Word are COM objects, that's pretty much it, I should think...

What magical incantation you have to type into:

$word = new COM("C:/path/to/word.exe???");

to make it work, I dunno.

PS  Posting the same message multiple times doesn't help you much...  Just
makes more noise.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






The magical incantations:

"Word.Application" etc..

----- Original Message -----
From: "Richard Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 10:31 AM
Subject: Re: [PHP] COM?


> > Does Anyone know what needs to be installed on the server other than php
> > 4.0.4 and IIS to instantiate COM Objects like Excel and word.
>
> If Excel and Word are COM objects, that's pretty much it, I should
think...
>
> What magical incantation you have to type into:
>
> $word = new COM("C:/path/to/word.exe???");
>
> to make it work, I dunno.
>
> PS  Posting the same message multiple times doesn't help you much...  Just
> makes more noise.
>
> --
> Visit the Zend Store at http://www.zend.com/store/
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





> Is there a way to call php functions in perl? or call perl functions from
> PHP codes?

<?php
    exec("/full/path/to/script.pl", $output, $error);
    while (list(,$line) = each($output)){
        echo $line, "<BR>\n";
    }
    if ($error){
        echo "OS Error: $error.  Usually path/permissions.<BR>\n";
    }
?>

Perl could call PHP the same way it calls anything (which I can say blithely
since I have no clue how that is), but you'll need to install PHP as a
stand-alone binary (aka CGI) or make Perl call wget or lynx to surf to a PHP
page.

[It's kinda like if you had mod_perl installed but *not* Perl itself... PHP
compiled as "CGI" is akin to Perl itself.  Except better, of course. :-)]

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






> I'm toying around with the thought of a dev-site/live-site administration
> system. Among other things, administrators would be able to remotely (via
a
> web interface), push files from the dev-site to the live-site.
>
> Can anyone help me understand what it would take to do this? Ideally, we
> could come up with a platform-independent solution, but I'm currently
> working with 2 NT boxes.
>
> I suspect this would be possible by using exec() or possibly shell_exec()
to
> mount the remote volume and perfom file copies. If this would work, can
> anyone help me with the syntax?

I would think the PHP FTP features or using cURL to do SCP (if cURL can do
that) would be better...

Especially as exec() is reputed to not work on Windows.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






>Is this correct way to do this?

It should work, but seems a pretty weird way to do whatever you are doing...
Actually, what are you doing?...

Creating a blank template home/page for a new customer on an ISP VirutalHost
setup or something?

That's about the only way this is making sense to me from the Big Picture
perspective.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm







> I found something strange and don't know if it is a bug or that it is the
> way it should work.
> 
> Situation:
> ----------
> 
>   open_basedir = .

I would try "./" for open_basedir...

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






Hi php users,

I found something strange and don't know if it is a bug or that it is the
way it should work.

Situation:
----------

  open_basedir = .

PHP-4 runs as apache module. (unix)
Safe-mode is on.

Webserver document tree:

  /home/www/html/

There exists a link in that tree to the www directory of a user:

  /home/www/html/rvdberg  ->  /home/rvdberg/www

I have a PHP script in:

  /home/rvdberg/www/test_fopen.php

and a file:

  /home/rvdberg/www/textfile.txt

Problem:
---------

When opening files in the current directory with PHP:

  $fp = fopen("./textfile.txt","r");

This gives an error complaining about the open_basedir setting not allowing
to open this file.

It all DOES work when I do the same thing in a directory which isn't
pointed to by a symbolic link! So, the same php file in the directory

  /home/www/html/php_testdir/test_fopen.php

works!? 

Question:
---------

What I want is clear I think: I only want the php scripts to be able to
open files in the current directory and further down in the tree.

Setting open_basedir to "." seems logical, but doesn't work.

Seems to be related to the symbolic link.

How to solve? Or should I submit a bug report?

-Remco

-- 
----------------------------------------------------------------------------
    Remco van den Berg                           Admin/SO/helpdesk DSE      
      ICQ: 47514668         [EMAIL PROTECTED]         http://www.dse.nl/       
----------------------------------------------------------------------------




I use apache server on win2000, php4, mysql and wml which I test local on my
harddrive.

The code under is working fine when I test it on emulators like UP SDK from
phone.com. or other, but i have fooled it to use static variables which is
not the solution i want.
My problem is. How can I use my variable:
print "<select name=\"fagkode\">";
in this code under so that I can use its value in my php function:
$tabfag=finnMeldinger($fagnr);
I can see the WML variable if i print it out in WML, but i can not print it
out as a variable in PHP. I have fooled the php function and put a static
variable in it, instead of the dynamic WML variable, which is generated from
a select list. I have tried for a week but al kinds of tricks did not work.
At one time i got the value from WML to PHP, but it came out like this
"=so480". The sign = was impossible to remove, so i could not use it. The
correct value is "so480" with out the "="

<?php
// send wml headers
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>

<card id="card1" title="Example 2">
<p>
<?php
print "<select name=\"fagkode\">";//HELP1
require ("funksjoner.php");
$tabfag=finnfag();
if (mysql_num_rows($tabfag) > 0)
{ 
while ($row = mysql_fetch_array($tabfag)) 
{ 
print "<option value=\"$row[fagkode]\">$row[fagbeskrivelse]</option>"; 

}//while 
}//if 
$temp=$fagkode; 
?> 
</select>Done. 
<anchor title="go"> 
<?php 
print "go $(fagkode)";//testing if i can see the WML variable from HELP1, and i can, 
but i can not use it in my PHP function 
?> 
<go href="#dato"/> 
</anchor> 
</p> 
</card> 

<card id="dato" title="dato"> 
<p><select name="dato">//HELP2 
<?php 
$fagnr="so480";//fooling the function with a static code, but this should be the HELP1 
$tabfag=finnMeldinger($fagnr);//this is the main problem, Impossible to solve!!!! 
if (mysql_num_rows($tabfag) > 0) 

{ 
while ($row = mysql_fetch_array($tabfag)) 
{ 
print "<option value=\"$row[dato]\">$row[dato]</option>"; 
}//while 
}//if 
?> 
</select>Done. 
<anchor title="go"> 
go $(fagkode) $(dato)// just another test, and is working fine so i can see both WML 
variables from other cards 
<go href="#meld"/> 
</anchor> 
</p> 
</card> 

<card id="meld" title="meld"> 
<p><?php 
$datonr="051201";//fooling the function, but this should be the WML varibeles value in 
HELP" 
$meldingen=finnMelding($fagnr,$datonr);// using the static value, should be HELP1 and 
HELP2 dynamic value instead!! 
print "$meldingen"; 
?></p> 
</card> 
</wml> 







Hi,
How i can use the event OnChange of a tag <Select> for run a php script ?
Es. <select name="myname" size="1" onchange="HOW?">
Thank.








____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1




El Jue 08 Feb 2001 00:48, GAYTAN BAHAMONDEZ DANIEL EDUARDO escribió:
> Hi there,
>       Is there a way to compile php files so that no one can read them
> but php will undestand them?? something like .exe in win

I think zend will (or is) do that.

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  [EMAIL PROTECTED]
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------




You cannot directly access a printer from a php script.

but you can try locating a a command line utility which will print the data
provided to it in the command line or a the contents of a filename provided
in the command line to the printer connected to the server. If the data is
quite large ( in the sense let's say a reciept as it seems in your case),
you might write the data to a temporary file and pass the filename to the
priniting utility using the exec() command in PHP.

You can obviously make the updates to teh database on the pHP page and call
the exec() command once the transaction is completed..

hope that helps

Ankur Verma
HCL Technologies Ltd,
A1CD, Sector16, Noida
UP, India



----- Original Message -----
From: "ThoVer Webproducties" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 7:02 PM
Subject: [PHP] Access a printer via PHP


> Hello,
>
> For an e-commerce project we want to connect
> the mySQL-database we created to a printer
> (attached to a computer which has 24h
> internet [and mySQL database] access). I
> assume it's different to couple the
> mySQL-database directly to a printer.
> We are however accessing the database via
> PHP, so I think it might be possible to send
> a command to a printer directly from the PHP
> file which puts the data into the database as
> well.
>
> We want to do this in order to have an order
> via the website printed directly. In fact,
> the printer should start printing as soon as
> an order is added to the seperate table in
> the mySQL database (by a special PHP
> document).
>
> Does anyone know whether this is possible
> and, if it's possible, could you tell me how?
>
>
>
>
> Thanks in advance,
> Thomas.
>
>
> --
> PHP General Mailing List (http://www.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.

Does anyone know where i can find a step-by step installation guide
for installing PHP on an Redhat 7.0 running apache ?

Regards.
Petter Dilling
PHP Newbie :-)






RedHat 7.0 should have rpm packages for PHP4 ( mod_php and standalone
rpms). Do <rpm -q php> and <rpm -q mod_php> to see if PHP4 is already
installed. If not, find them in the rpm directory of your CD. Then just
install the rpm. The mod_php package is what you want for setting PHP up
as a DSO with Apache (probably the most common setup). I think you should
install one or the other, not both.

If you want to install from source, download the source and read the
notes that come with it. The Apache source has some good install notes for
php too (README.configure or something like that).

Mick

On Thu, 8 Feb 2001, Petter wrote:

> Hi.
> 
> Does anyone know where i can find a step-by step installation guide
> for installing PHP on an Redhat 7.0 running apache ?
> 
> Regards.
> Petter Dilling
> PHP Newbie :-)
> 
> 
> -- 
> PHP General Mailing List (http://www.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 need it, because i want to do some image genaration and that is broken in 
win32 in the apache module. i would like to have  a different ending for
these 
skripts that need to be executed as CGI... it would be easy possible with
IIS, but i still would prefer apache, since with IIS there are other
problems...
( no i won't switch to linux on my laptop, because...)

thanks
sebastian




"Sebastian Stadtlich" <[EMAIL PROTECTED]> wrote:
> i need it, because i want to do some image genaration and that is broken
in
> win32 in the apache module. i would like to have  a different ending for
> these
> skripts that need to be executed as CGI... it would be easy possible with
> IIS, but i still would prefer apache, since with IIS there are other
> problems...

I've never done it on Windows, but I have on Linux with Apache so it'll
likely be accomplished the same way.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/





Can I set a userid & pw from a webbased interface.... (make iexplore ...
remember the id & pw ... like $PHP_AUTH_USER & PHP_AUTH_PW does while
sending headers?)

Do I have to set a cookie?

---------------------------------
Fredrik A. Takle
[EMAIL PROTECTED]







Please explain more...

IE, Netscape, Opera, Lynx, blah blah blah allways send the PHP_AUTH_USER /
PHP_AUTH_PW if there is a user / pw to send. this works on a per domain name
bases. ie.

if I was on www.mediawaveonline.com and had to enter a username / passwd
then anywhere I go on www.mediawaveonline.com the browser will send the
username / passwd to that page, any page on that domainname.


--



Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]




""FredrikAT"" <[EMAIL PROTECTED]> wrote in message
95u24u$t92$[EMAIL PROTECTED]">news:95u24u$t92$[EMAIL PROTECTED]...
> Can I set a userid & pw from a webbased interface.... (make iexplore ...
> remember the id & pw ... like $PHP_AUTH_USER & PHP_AUTH_PW does while
> sending headers?)
>
> Do I have to set a cookie?
>
> ---------------------------------
> Fredrik A. Takle
> [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]
>






Hi there 
I'd appreciate any help....

I'm looking for a way to have a "next 10 records" "previous 10 records" type of 
sinario, extracting records from a database.
Now the only problem is that I want to do it in Interbase.
I know mysql has a seek option and a method of only returning a segment of records but 
I'm having no luck in interbase..

Thanks for any/all  help
Niel Zeeman
Tel(W): (043)7014247
Cell: 082 651 4083
eMail: [EMAIL PROTECTED]




"Niel Zeeman" <[EMAIL PROTECTED]> wrote:
> I'm looking for a way to have a "next 10 records" "previous 10 records"
type
> of sinario, extracting records from a database.  Now the only problem is
that
> I want to do it in Interbase.  I know mysql has a seek option and a method
> of only returning a segment of records but I'm having no luck in
interbase..

I've never touched Interbase, but here's how I do it in MySQL in general
terms.

1. Get result set.
2. Count number of records in result.
3. Set records per page ( $records_per_page ).
4. Pass page number in query string ( $SCRIPT_URL?page=$page ).
5. Build hyperlinks for previous, next from variables from 2, 3 and 4.
Handle special case of previous or next not being valid based on first or
last page cases.
6. Use SELECT my_fields FROM my_table WHERE where_clause LIMIT $row_start,
$records_per_page to generate records for the web page.

Hopefully it will make sense once you start playing with it.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/






Our site, under construction, displays a gallery of jpeg images. We're 
using Apache with PHP 4.0.2 compiled in, on Windows 98SE. At one point we 
recall our page with $PHP_SELF, and it generates a URL like 
http://localhost/php/php.exe/sandbox/gallery_demo.php.

The weird thing is that some of the images show up as broken links. Okay, 
so we get the link properties and copy & paste the URL into the browser, 
like: http://localhost/php/php.exe/sandbox/images/rainbow.jpg. We get back 
an error message that PHP found an illegal character in line 7 of the jpeg 
file!?

If we excise the php/php.exe part that's generated by $PHP_SELF, making 
the URL simply http://localhost/sandbox/gallery_demo.php then all the 
images display correctly. So I guess we have two questions:

1. How to make PHP not treat the jpg files as code?
2. Or, as a work around, how to ensure the jpg image passes through PHP, 
as most of our images do successfully?

Thanks.
  --David
---------------------------------------
David M. Phillips
eBoing, Inc.   [EMAIL PROTECTED]
Austin, Texas





It sounds like you're running it as a CGI instead of a module.

Have you put the correct directives into your httpd.conf? They should be
something like:

LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .php3 .php4


HTH
Jon


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 08 February 2001 14:05
To: [EMAIL PROTECTED]
Cc: Bob Smoot; David Phillips
Subject: [PHP] Weird one--PHP parsing jpg image!?


Our site, under construction, displays a gallery of jpeg images. We're 
using Apache with PHP 4.0.2 compiled in, on Windows 98SE. At one point we 
recall our page with $PHP_SELF, and it generates a URL like 
http://localhost/php/php.exe/sandbox/gallery_demo.php.

The weird thing is that some of the images show up as broken links. Okay, 
so we get the link properties and copy & paste the URL into the browser, 
like: http://localhost/php/php.exe/sandbox/images/rainbow.jpg. We get back 
an error message that PHP found an illegal character in line 7 of the jpeg 
file!?

If we excise the php/php.exe part that's generated by $PHP_SELF, making 
the URL simply http://localhost/sandbox/gallery_demo.php then all the 
images display correctly. So I guess we have two questions:

1. How to make PHP not treat the jpg files as code?
2. Or, as a work around, how to ensure the jpg image passes through PHP, 
as most of our images do successfully?

Thanks.
  --David
---------------------------------------
David M. Phillips
eBoing, Inc.   [EMAIL PROTECTED]
Austin, Texas




On Thursday 08 February 2001 15:04, [EMAIL PROTECTED] wrote:

> The weird thing is that some of the images show up as broken links.
> Okay, so we get the link properties and copy & paste the URL into the
> browser, like: http://localhost/php/php.exe/sandbox/images/rainbow.jpg.
> We get back an error message that PHP found an illegal character in
> line 7 of the jpeg file!?

Well, you're calling php.exe, saying "parse /sandbox/images/rainbow.jpg"

Vour gallery should link to the real images instead:
<a href="/sandbox/images/rainbow.jpg"><img ...

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

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

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




How is it possible to parse a WML strin variable with a value="SO480", and
parse over to a PHP strin variabl , so you can use it to in a PFP function.
I get a error messages in M3gate WAP emulator, an UP SDK emulator telling me
this"unsupported content-type: text/html"






On 8 Feb 2001 06:24:20 -0800, Kato Strandjord <[EMAIL PROTECTED]> wrote:
>How is it possible to parse a WML strin variable with a value="SO480", and
>parse over to a PHP strin variabl , so you can use it to in a PFP function.
>I get a error messages in M3gate WAP emulator, an UP SDK emulator telling me
>this"unsupported content-type: text/html"

Yes. In fact, WML requests will behave just like normal HTML form requests. The
error you are receiving probably means that you need to set the mime-type for
the page you are returning:

header("Content-Type: text/vnd.wap.wml");

As a side note, consider testing your pages in Opera. Opera supports WML
reasonably well and has the side-benefit of being much easier to work with. If
you get an error, not all of the WAP emulators will show you the actual error
message. Many of them also have an annoying habit of caching pages even if you
ask them to clear the cache, which makes development rather more tedious than
it needs to be.




Is it possible to pass arrays as arguments to class methods? If so, how?
What is the proper syntax and things to look out for.

Thanks in advanced.
-- 
************************************
Ivan R. Quintero E.* (507)228-3477      
Aptdo 1263         * (507)228-9105
Balboa, Ancon      * 640-0370
Republic of Panama * 
************************************




Ive seen posts like this before ( 'how do I pass arrays as arguments to
functions?' ) this is quite simple, nothing at all has to be done.

<?php

 class test
 {
  function test($array)
  {
   foreach($array as $pos => $val)
    echo "$pos : $val <br>\n";
  }
 }

 $arr[] = 'chris ';
 $arr[] = 'lee ';
 $arr[] = 'works for ';
 $arr[] = 'mediawaveonline.com ';

 $test = new test($arr);
?>

there's nothing to it.


--



Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]




"rodrigo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it possible to pass arrays as arguments to class methods? If so, how?
> What is the proper syntax and things to look out for.
>
> Thanks in advanced.
> --
> ************************************
> Ivan R. Quintero E.* (507)228-3477
> Aptdo 1263    * (507)228-9105
> Balboa, Ancon    * 640-0370
> Republic of Panama *
> ************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Frank,

That worked like a charm. I just copied the ntwdblib.dll that comes with the
PHP 4 binaries to the Winnt/System32 directory so the MSSQL functions are
now working on a machine without the need to install MSSQL Server or Client.
You just saved me from having to do a whole web site with the ODBC
functions.

Thanks a lot,
Toby


----- Original Message -----
From: "Frank M. Kromann" <[EMAIL PROTECTED]>
To: "Flint Doungchak" <[EMAIL PROTECTED]>
Cc: "'Toby Miller'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 7:29 PM
Subject: [PHP-WIN] Re: [PHP] RE: [PHP-WIN] MSSQL Functions


> Hi All,the key komponent is ntwdblib.dll installed in winnt\system32. The
dll uses other dll's to comunicate with the server dbmssocn.dll (tcp/ip) and
dbmsnp.dll (NetBios). All the communication dll's should be installed with
the ODBC driver. Just copy ntwdblib.dll from the SQL server to the php
server.You will need to use the ODBC manager to create client configurations
as the tools for this will not be installed.- Frank>Toby,>>Yes, the client
is requires because the MSSQL module uses some libraries>from the client to
function. I don't know which one. If Frank see this, he>might be able to
give you some detailed insight. I just know it has to
be>installed.>>-Flint>>-----Original Message----->From: Toby Miller
[mailto:[EMAIL PROTECTED]]>Sent: Wednesday, February 07, 2001 4:04 PM>To:
[EMAIL PROTECTED]; [EMAIL PROTECTED]>Subject: [PHP-WIN]
MSSQL Functions>>>Hey all,>>I've got a question about using the MSSQL
Functions. The only way I'v!
> e been>able to use them is to install Microsoft SQL Client on the web
server. Is>there any way to get around this to use the MSSQL Functions
without>installing a copy of Microsoft SQL Client? Right now I am using the
ODBC>Functions to get around the problem, but I was wondering if it just
relies>on some DLL's that I could copy to the server or something like that?
I know>that people are using the MSSQL Functions on Linux and they obviously
didn't>need to install Microsoft SQL Client to get them to work so I'm just
hoping>there's a way around it?>>Thanks,>Toby>>>-- >PHP General Mailing List
(http://www.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 Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>









What settings should I have if I would like to optimize PHP without
exhausting my MySQL db?

There is the mysql.max_persistent setting, which is on a per process
level. Should I set this low, to 10 perhaps? If it's unlimited, PHP will
just eat up another persistent connection until MySQL is exhausted. If I
lower it, PHP will reuse the old ones.

I have set the MySQL setting to
set-variable    = max_connections=255
which should not be succeeded.

MaxSpareServers is 25 in my Apache. Which should result in the 10 setting
for PHP, right? Since 10*25 = 250.

Is this the correct reasoning behind this setting?

Are there any other Apache/PHP-related settings I should think about?

--
 patrik wallstrom     |      system design
 tel: +46-8-7298810   |      sonox.com
 gsm: +46-708405080   |      - - - - - - - - -
 fax: +46-859820060   |      a division of new media distribution






Dhaval,

You really do not nee to be concerned about the temp directory, but if you
are, you can wite a little script (if your not the sysadmin) to find this
out. Actually it tells you a ton of useful info. Here it is:

<?
phpinfo();
?>

Name it phpinfo.php or whatever you like, upload it to the server and view
it. I believe that PHP knows where to look to find the temp file.

As far as moving the file once its uploaded, here you go:

File to create the upload: (show_upload.php)
<html>
<head>
<title>Upload a File</title>
</head>
<body>
<h1>Upload a File</h1>
<form enctype="multipart/form-data" method="post" action="do_upload.php">
<p><strong>File to Upload:</strong><br>
<input type="file" name="img1" size="30"></p>
<P><input type="submit" name="submit" value="Upload File"></p>
</form>
</body>
</html>

File to do the work: (do_upload.php)
<?
if ($img1_name != "") {
copy("$img1", "/your/directory/path/$img1_name")
                or die("Couldn't copy the file!");
} else {
 die("No input file specified");
}
?>
<html>
<head>
<title>Successful File Upload!</title>
<body>
<h1>Success!</h1>
<P>You sent: <? echo "$img1_name"; ?>, a <? echo "$img1_size"; ?>
byte file with a mime type of <? echo "$img1_type"; ?>.</p>
</body>
</html>

This is taken from Julie Meloni's website. She writes GREAT books. "PHP
Essentials" is essential.
http://www.thickbook.com/extra/php_fileupload.phtml

Thanks Julie!!!

- Shane
DISCLAIMER: I am by no means an expert on this, or any other, topic...
----- Original Message -----
From: "Dhaval Desai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 3:42 AM
Subject: [PHP] PHP File Uplaod Path


> Hi!
>
> I need help with uploading files with php.
> What is the default directory where the files are
> uploaded..?
> I want to specify a particular directory where the
> files have to come after they are uploaded.
>
> Is it possible to specify a path in the script where
> the files will automatically be copied after uploading
> to the temporary directory.
>
> Please help me out ...
>
> Thank You
> Dhaval Desai
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.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]
>





List,
I have been given the task of converting all of our current ColdFusion pages
to PHP, I am wondering if there is some kind of converting tool out there
for this.  I don't need 100% accuracy as I can/will fix any errors, I am
just looking for the easiest way to convert 500+ files.

TIA,

Kevin Queen                    ____
Software Developer            ||""||
AnyDevice                     ||__||
Atlanta, Ga                   [ -=.]
http://www.anydevice.com      =======:0~

(w) (404)260.4155
(p) (888)645.2815
(e) [EMAIL PROTECTED]

"Ah, I see!", said the blind man to the deaf mute.  -Unknown





I have a class with many functions. About 80% of these functions are
rarely used, so I'd like to split them out to a separate file and
include them only if a certain condition applies. This way the PHP
compiling is kept to a minimum. How do I make the included functions
members of the current class?

Example:


myclass.php
-----------

<?php

class MyClass {

    function func1() {
        if($foo) {
                include_once("myclass2.php");
                $this->func2(); // this doesn't work, it won't find func2!
        }
    }

}

?>

myclass2.php
------------

<?php

   // I need these functions to be
   // members of MyClass... how?
    function func2() {
                // do something
        }

}

?>




Its called inheritance.
rarley.php
<?php

 class rarley_used
 {
  function one()
  {

  }

  function two()
  {

  }
 }
?>

main_class.php
<?php

  include_once('rarley.php');

 class main_class extends rarley_used
 {
  function three()
  {

  }

  function four()
  {

  }
 }
?>


--



Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]




"Monte Ohrt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a class with many functions. About 80% of these functions are
> rarely used, so I'd like to split them out to a separate file and
> include them only if a certain condition applies. This way the PHP
> compiling is kept to a minimum. How do I make the included functions
> members of the current class?
>
> Example:
>
>
> myclass.php
> -----------
>
> <?php
>
> class MyClass {
>
>     function func1() {
> if($foo) {
> include_once("myclass2.php");
> $this->func2(); // this doesn't work, it won't find func2!
> }
>     }
>
> }
>
> ?>
>
> myclass2.php
> ------------
>
> <?php
>
>    // I need these functions to be
>    // members of MyClass... how?
>     function func2() {
> // do something
> }
>
> }
>
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Is it possible to grab a running instance of for example Word?

In VisualBasic-words: can you use 'GetObject' instead of 'CreateObject'?

The latter is done by :

$word = new Com("Word.Application")

this creates a NEW instance, however i want to get an already running
instance. Possible?







Is it possible to make three textareas on one page (of course it is, but
read til the end, you`ll get the point) and let the user type into each
box in a different language with different charsets.

For example, lets say I want to insert three versions of one text on one
page (without submitting the page first). In the first box, when i start
writing, I can write with english char-set, as I move to the second box, I
can write in russian and in the third box, the charset could already be
swedish. Is it possible? If it is, how? And then I want to write it all to
mysql database as well (keeping the correct char-sets). 

Thanks,
Siim Einfeldt





Hello! I've installed php4 like apache module, with enable gd. But I
have't got gif support.
How can I install php with gif support?

Thanks
Pablo






Hello,
I have sometging like this:
<input type="Radio" name="radio1" value=<? echo $opt1 ?>">Opt1    

how I know if some user choose some radiobutton???
I tried if($opt1) , but without success....

T.Y.

Miguel Loureiro <[EMAIL PROTECTED] >


Reply via email to