php-general Digest 19 Feb 2001 11:51:06 -0000 Issue 521

Topics (messages 40477 through 40557):

Re: SMTP on IIS 5.0 Windows 2000 Pro
        40477 by: Peter Knif
        40478 by: David Harrison
        40480 by: Peter Knif

dates
        40479 by: Julian Rockeu
        40486 by: eschmid+sic.s.netic.de
        40491 by: Julian Rockeu
        40495 by: eschmid+sic.s.netic.de

Re: About to update
        40481 by: Joseph H Blythe

Re: MySQL COUNT Won't Work
        40482 by: David Robley

Re: search engine
        40483 by: David Robley

Re: splitting up contents of a test box
        40484 by: David Robley

sending email problems
        40485 by: Peter Houchin
        40494 by: Peter Houchin

check all values in HTTP_GET_VARS
        40487 by: Matthew Delmarter
        40489 by: David Robley

add user to ldap using php
        40488 by: Sayumporn Darunwanna
        40540 by: Richard Lynch

Re: Exec issue
        40490 by: David Robley
        40496 by: Robin Vickery

A Question of Indexes
        40492 by: Chad Guilette

Re: Sum function
        40493 by: David Robley

PHP 4.0.4pl1 + Oracle 9iAS + AIX 4.3.3 - Seg faults at first PHP call - Pthreads?
        40497 by: Michael Champagne

mail() not working
        40498 by: Jacky.lilst
        40499 by: Simon Garner

PDF Functions
        40500 by: Mike Tuller

send error messages via email?
        40501 by: Jaxon

Pop-up warning dialog box
        40502 by: Edith Lai
        40505 by: Chris Adams
        40506 by: David Robley

Income on the Net!
        40503 by: Noel Hadfield

Trying to do a CVS import
        40504 by: Chris
        40508 by: David Robley
        40514 by: Chris

Re: Multiple Selection.
        40507 by: toto
        40509 by: David Robley

REgular expression....difficult is it?
        40510 by: Dhaval Desai
        40511 by: Ifrim Sorin
        40512 by: Brian White
        40513 by: CC Zona

Re: array - too stupid
        40515 by: Christian Reiniger
        40550 by: Tim Ward

Variable stores incomplete values...
        40516 by: Dhaval Desai
        40543 by: Richard Lynch

what error?
        40517 by: JW

directory listing and how to determine file size
        40518 by: Andris Jancevskis
        40544 by: Richard Lynch

Re: Is this potentially a problem?
        40519 by: Richard Lynch

Re: form variables showing blank but query shows non-blank ??
        40520 by: Richard Lynch

Re: Javascript running on another page
        40521 by: Richard Lynch

Re: unable to jump to row 1 on MySQL result
        40522 by: Richard Lynch

Re: Newbie: Fundamental question. Long.
        40523 by: Richard Lynch

Re: Measuring php on old and new server
        40524 by: Richard Lynch

Re: pgp text formatting
        40525 by: Richard Lynch

Re: PHP Session question
        40526 by: Richard Lynch

Re: Text box
        40527 by: Richard Lynch

Re: compare arrays problem
        40528 by: Richard Lynch
        40551 by: Tim Ward

Re: Mail
        40529 by: Richard Lynch

Re: Using Pipes / PGP
        40530 by: Richard Lynch

Re: EOF (End of File) character..
        40531 by: Richard Lynch

Re: dynamic pages/sessions/checkboxes
        40532 by: Richard Lynch

Re: Apache log analyzer
        40533 by: Richard Lynch

Re: Help!Opening another php file from a link of a completed form.
        40534 by: Richard Lynch

Re: making form, getting variables from
        40535 by: Richard Lynch

Re: using slash as delimiter
        40536 by: Richard Lynch

Re: PHP as CGI
        40537 by: Richard Lynch
        40555 by: Hrishi

Re: Apache and $HTTP_*_VARS
        40538 by: Richard Lynch

Re: PHP+MySQL SEARCH
        40539 by: Richard Lynch

mail() test method
        40541 by: Jacky.lilst
        40545 by: Richard Lynch

something wrong at my mail set up in php.ini
        40542 by: Jacky.lilst

system()
        40546 by: Ashley M. Kirchner

array
        40547 by: andreas \(.work\)

Re: [php_mysql] Creative solution with XML,PHP,MYSQL
        40548 by: Tom Knight

Re: hmm
        40549 by: Tim Ward

Apache & PHP (slighly OT)
        40552 by: Thierry Coopman

Mail function
        40553 by: Joe Njeru

ldapadd in php not allow more than one variable
        40554 by: Sayumporn Darunwanna

Directing Email to a script
        40556 by: Website4S.aol.com

Re: Creative solution with XML,PHP,MYSQL
        40557 by: James Moore

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]


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


I have SMTP = localhost

It worked when I set SMTP = my ISP smtp server, but I want to make it work
with the SMTP server on my system. Thanks.

--
***** Peter Knif *****

[EMAIL PROTECTED]
"David Harrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Have you set
>
> SMTP =  your.smtp.server.com ;for win32 only
>
> in you php.ini file?
>
> --dave
>
> > -----Original Message-----
> > From: Peter Knif [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, 19 February 2001 8:13 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] SMTP on IIS 5.0 Windows 2000 Pro
> >
> >
> > Hi everyone,
> >
> > I'm trying to run a simple PHP e-mail script on my Windows
> > 2000 Pro machine
> > and I keep receiving Server Error. I tried the same script on
> > a Unix server
> > and it worked fine. Does anyone know what the problem might
> > be? Thanks in
> > advance.
> >
> >
> > --
> > ***** Peter Knif *****
> >
> > [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






What mail server software is it that you're running on the server? 

--dave

> -----Original Message-----
> From: Peter Knif [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 19 February 2001 9:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] SMTP on IIS 5.0 Windows 2000 Pro
> 
> 
> I have SMTP = localhost
> 
> It worked when I set SMTP = my ISP smtp server, but I want to 
> make it work
> with the SMTP server on my system. Thanks.
> 
> --
> ***** Peter Knif *****
> 
> [EMAIL PROTECTED]
> "David Harrison" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Have you set
> >
> > SMTP =  your.smtp.server.com ;for win32 only
> >
> > in you php.ini file?
> >
> > --dave
> >
> > > -----Original Message-----
> > > From: Peter Knif [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, 19 February 2001 8:13 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] SMTP on IIS 5.0 Windows 2000 Pro
> > >
> > >
> > > Hi everyone,
> > >
> > > I'm trying to run a simple PHP e-mail script on my Windows
> > > 2000 Pro machine
> > > and I keep receiving Server Error. I tried the same script on
> > > a Unix server
> > > and it worked fine. Does anyone know what the problem might
> > > be? Thanks in
> > > advance.
> > >
> > >
> > > --
> > > ***** Peter Knif *****
> > >
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > > [EMAIL PROTECTED]
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




I have Windows 2000 Pro SP1 and IIS 5.0. I'm using SMTP that came with IIS
5.0.

--
***** Peter Knif *****

[EMAIL PROTECTED]
"David Harrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What mail server software is it that you're running on the server?
>
> --dave
>
> > -----Original Message-----
> > From: Peter Knif [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, 19 February 2001 9:39 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] SMTP on IIS 5.0 Windows 2000 Pro
> >
> >
> > I have SMTP = localhost
> >
> > It worked when I set SMTP = my ISP smtp server, but I want to
> > make it work
> > with the SMTP server on my system. Thanks.
> >
> > --
> > ***** Peter Knif *****
> >
> > [EMAIL PROTECTED]
> > "David Harrison" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Have you set
> > >
> > > SMTP =  your.smtp.server.com ;for win32 only
> > >
> > > in you php.ini file?
> > >
> > > --dave
> > >
> > > > -----Original Message-----
> > > > From: Peter Knif [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, 19 February 2001 8:13 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] SMTP on IIS 5.0 Windows 2000 Pro
> > > >
> > > >
> > > > Hi everyone,
> > > >
> > > > I'm trying to run a simple PHP e-mail script on my Windows
> > > > 2000 Pro machine
> > > > and I keep receiving Server Error. I tried the same script on
> > > > a Unix server
> > > > and it worked fine. Does anyone know what the problem might
> > > > be? Thanks in
> > > > advance.
> > > >
> > > >
> > > > --
> > > > ***** Peter Knif *****
> > > >
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Anyone know how to use the PHP date functions to work out the difference 
between two timestamps?

For example..

Figure out the number of seconds, minutes, hours, days, months and years 
between

5th October 2001 14:20:10
and
26th February 1998 109:54:10

Help much appreciated!
thanks
Julian





On Sun, Feb 18, 2001 at 04:40:08PM -0700, Julian Rockeu wrote:
> Anyone know how to use the PHP date functions to work out the difference 
> between two timestamps?
> 
> For example..
> 
> Figure out the number of seconds, minutes, hours, days, months and years 
> between
> 
> 5th October 2001 14:20:10
> and
> 26th February 1998 109:54:10

This should be doable with http://php.net/mktime and http://php.net/date. But
for such heavy calculations I prefer XEmacs calc-mode or the calendarr-mode. 

-Egon

-- 
http://www.linuxtag.de/
http://php.net/books.php 
http://www.concert-band.de/
http://www.php-buch.de/




Yes I had a look at mktime() and date() and tried to think of an easy 
way to do it but couldn't... you can convert both dates to a UNIX 
timestamp (millseconds after whatever date) then do a subtraction... and 
then what? Easy to work out number of days from millseconds as a day's 
length is fixed but to go to months is harder as of course you need more 
information than just the actual elapsed time. Similar problam with 
mktime() as it's designed for actual dates, not differences between days.

What is XEmacs calc- mode and calendar mode? I'm not all that familiar 
with Unix I'm afraid..

Thanks for your reply!
Julian

[EMAIL PROTECTED] wrote:

> On Sun, Feb 18, 2001 at 04:40:08PM -0700, Julian Rockeu wrote:
> 
>> Anyone know how to use the PHP date functions to work out the difference 
>> between two timestamps?
>> 
>> For example..
>> 
>> Figure out the number of seconds, minutes, hours, days, months and years 
>> between
>> 
>> 5th October 2001 14:20:10
>> and
>> 26th February 1998 109:54:10
> 
> 
> This should be doable with http://php.net/mktime and http://php.net/date. But
> for such heavy calculations I prefer XEmacs calc-mode or the calendarr-mode. 
> 
> -Egon
> 





On Sun, Feb 18, 2001 at 06:54:02PM -0700, Julian Rockey wrote:
> Yes I had a look at mktime() and date() and tried to think of an easy 
> way to do it but couldn't... you can convert both dates to a UNIX 
> timestamp (millseconds after whatever date) then do a subtraction... and 
> then what? Easy to work out number of days from millseconds as a day's 
> length is fixed but to go to months is harder as of course you need more 
> information than just the actual elapsed time. Similar problam with 
> mktime() as it's designed for actual dates, not differences between days.

The Unix timestamp is in seconds after midnight January 1 1970. A
approximatley calculation can be done with seconds. One minute has 60
seconds and 60 minutes are one hour. One day have 24 hours. But 24 hours
times 7 days are not everytime a week and you should know a year has
sometimes 365 days and sometimes 366 days. All calendar programs which are 
spret with GNU/Linux have some knowledge about the deviations.
 
> What is XEmacs calc- mode and calendar mode? I'm not all that familiar 
> with Unix I'm afraid..

I think you can use XEmacs on all Windows operating systems. If I have
time, I will install such a great editor on my Windows ME. Windows Notepad
is such a pain.

-Egon

> [EMAIL PROTECTED] wrote:
> 
> > On Sun, Feb 18, 2001 at 04:40:08PM -0700, Julian Rockeu wrote:
> > 
> >> Anyone know how to use the PHP date functions to work out the difference 
> >> between two timestamps?
> >> 
> >> For example..
> >> 
> >> Figure out the number of seconds, minutes, hours, days, months and years 
> >> between
> >> 
> >> 5th October 2001 14:20:10
> >> and
> >> 26th February 1998 109:54:10
> > 
> > 
> > This should be doable with http://php.net/mktime and http://php.net/date. But
> > for such heavy calculations I prefer XEmacs calc-mode or the calendarr-mode. 
> > 
> > -Egon
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
-- 
http://www.linuxtag.de/
http://php.net/books.php 
http://www.concert-band.de/
http://www.php-buch.de/




On Fri, 16 Feb 2001 10:59:52 -0500
Michael wrote:

MK> 2 things...
MK> 
MK> 1.  I've had nothing but problems with mysql3.23.  :(  I had 3.22 up for months at 
a stretch - I'm lucky to go more than a few weeks without a lockup on 3.23.  BUT... 
I've committed projects to
MK> the fulltext search feature.  :(  Just be careful and keep an eye on it.  Not 
really related to your question, but I had to bitch.  :)
MK> 
MK> 2.  Instead of the zend optimizer, think of trying the apc cache.  It'll give you 
much better performance results than the optimizer, and is cheaper than zend cache.  
apc.communityconnect.com
MK> 

Thanks for your feedback, mysql3.23 is now a stable release that seems strange, I 
tried to install apc but I keep getting unresolved symbol errors, so apache fails to 
start. What version of php are you using?

Regards,

Joseph.




On Sat, 17 Feb 2001 04:27, Jeff Oien wrote:
> Yes! That was it. Thank you very much.
> Jeff Oien
>
> > Are you using 3.23.33?  If so try removing the space between the
> > COUNT and the open paren.  It looks like there may be a bug in the
> > latest release (seeing this problem on the mysql list for MAX,
> > probably exists for COUNT as well).
> >
> > -jm

For future reference, you can use mysql_error() after your call to the 
database to return the text of the error message from the previous mysql 
operation. In conjuction with mysql_errno(), you could build a little 
error reporting routine...

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




On Sun, 18 Feb 2001 19:04, Brandon Feldhahn wrote:
> Can some one tell me how i would make a search engine, like what talbes
> and how many fields and what the form should look like

No need to reinvent the wheel - this uses MySQL and has a PHP front end - 
I believe that future versions of PHP will have more support for this app.

http://www.mnogosearch.ru/

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




On Sat, 17 Feb 2001 09:31, James, Yz wrote:
> If each of the scrolling lines is separated by something regular, like
> a carriage return, or a line break, tab (etc), you could use explode();
> and have the values returned as an array.
>
> James.
>
> > I have a form that contains a scrolling text box.  When I display the
> > contents of the text box, say in variable $form[mytextbox], it
> > displays all on one line (or wraps at end of line).  As the ending
> > character of each line will vary, does anyone know of away to split
> > the lines up so that I can display the text box contents line by
> > line?
> >
> > Thanks,
> > Don
> >
> >

Have you tried using the WRAP=VIRTUAL parameter for the TEXTAREA tag?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Could some one please take a look at this and offer any suggestions as to
why i can't 1 send multiple "to" emails and also why i can't send to the
addesses in the "CC" part (i can't send to either single or multiple in CC)
This has got me baffled as to why i can't...

Thanks in advance

Peter

<?

session_start();
if ($REQUEST_METHOD=='POST')
{
header('Expires: ' . gmdate("D, d M Y H:i:s", time()+1000) . ' GMT');
header('Cache-Control: Private');
}
session_register('user');
session_register('pass');
session_register('email');
session_register('company');
session_register('real_name');
$session = session_id();
$userid = '$user'; /* recipients */

$address .= $email  ;
$date = date("D M d, Y ");

// Subject

$subject = "abc Calculation Results";

//Body of email

$body = "Thank you $real_name ,\n
Company whom you are from:\t $company\n
Date of enquiry on \t $date\n
Your Customer type is:\t $custtype\n
Your Reference is:    \t $ref\n
Your Quote was for:   \t $equcost\n
Your Rental Monthly Figures are as follows:\n
\n 24 Months = $ $m2 \n 36 Months = $ $m3 \n 48 Months = $ $m4 \n
Your Quartly Figures are: \n
\n 24 Months = $ $q2  \n 36 Months = $ $q3 \n 48 Months = $ $q4 \n
\n\n\n\n
Thank you again.";

//Where the email is from

$headers .= "From: abc <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n";  // Return path for
errors

/* If you want to send html mail, uncomment the following line */
//$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type

$headers .= "cc:[EMAIL PROTECTED],[EMAIL PROTECTED]\n"; // CC to


//send the email

$mailsend = mail("$address", "$subject", "$body.", "$headers \nContent-Type:
text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" );
print ("$mailsend");
echo "<font face=Helvetica, sans-serif size=3 color=#00499C>Email
Sent!</font>";
include "incend.s";
?>





The email address for the "To"  part is taken from values saved within the
session  and that works fine .. just when i try to send to more than one
email alais that it doesn't do..

-----Original Message-----
From: James, Yz [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 19, 2001 11:59 AM
To: "Peter Houchin"
Subject: Re: [PHP] sending email problems


> Could some one please take a look at this and offer any suggestions as to
> why i can't 1 send multiple "to" emails and also why i can't send to the
> addesses in the "CC" part (i can't send to either single or multiple in
CC)
> This has got me baffled as to why i can't...
>
> Thanks in advance

I'm still beginning with PHP / Perl, big time, but shouldn't you have a
While loop wrapped around the mail(); (if selecting recipients from a
database)?

$sql = "SELECT email_address FROM users";

$result = @mysql_query($sql, $connection)
    or die ("Time for bed.");

while($row = mysql_fetch_array($result)) {
    $address = $row['address'];

    mail("$address", "$subject", "$body.", "$headers \nContent-Type:
text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" );

}


I see from your email address you're in Oz.  I am in the UK.  And should be
in bed... Work tomorrow. :)

James.

> $mailsend = mail("$address", "$subject", "$body.", "$headers
\nContent-Type:
> text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" );
> print ("$mailsend");
> echo "<font face=Helvetica, sans-serif size=3 color=#00499C>Email
> Sent!</font>";
> include "incend.s";
> ?>
>






I want to check to see if all vars in HTTP_GET_VARS array are empty. How can
I do this?

The code would work like this:

if(all HTTP_GET_VARS empty):
        do this;
else:
        echo this;
endif;




Regards,

Matthew Delmarter





On Mon, 19 Feb 2001 11:54, Matthew Delmarter wrote:
> I want to check to see if all vars in HTTP_GET_VARS array are empty.
> How can I do this?
>
> The code would work like this:
>
> if(all HTTP_GET_VARS empty):
>       do this;
> else:
>       echo this;
> endif;
>
>
>
>
> Regards,
>
> Matthew Delmarter

Seeing it is an array, you could use sizeof to determine the number of 
elements and go from there.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




I can  add user through ldap server by using command line. and my ldif file
is like this :
dn: uid=pang,dc=graduate,dc=com
uid: pang
cn: Sayumporn Darunwanna
sn: Darunwanna
userPassword: pang
objectClass: uidobject
objectClass: person

But when I try to write php script. I can bind to ldap server. Then I
prepare data like this:
$info["uid"]="beau";
$info["cn"]="beau";
$info["sn"]="beau";
$info["userPassword"]="beau";
$info["objectClass"]="uidobject";
$info["objectClass"]="person";
And using
$a=ldap_add($ds, "uid=beau, dc=graduate, dc=com", $info);
but it's an error
Waring LDAP: add operation could not be complete in. <my php file>

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





> $a=ldap_add($ds, "uid=beau, dc=graduate, dc=com", $info);
> but it's an error
> Waring LDAP: add operation could not be complete in. <my php file>

I don't know much about LDAP:

Have you checked that $ds is a valid LDAP connection?
Can you get your own record out of LDAP using it?
Presumably LDAP has some notion of who can add records (or whatever they
called them) and who can't.
Are you sure the user connected in ldap_open() is empowered to add records
at that level in the LDAP space?

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






On Sat, 17 Feb 2001 04:26, [EMAIL PROTECTED] wrote:
> I have been having some problems getting exec to run a 'find
> /var/spool/mail/ -mindepth 3 -type d' command. She just wont execute it
> and give me a result, however she will run 'ls'....

What result do you get running that command from the shell?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




>>>>> "DR" == David Robley <[EMAIL PROTECTED]> writes:

 > On Sat, 17 Feb 2001 04:26, [EMAIL PROTECTED] wrote:
 >> I have been having some problems getting exec to run a 'find
 >> /var/spool/mail/ -mindepth 3 -type d' command. She just wont
 >> execute it and give me a result, however she will run 'ls'....

 > What result do you get running that command from the shell?

The syntax of the command itself looks fine.

I assume that there are actually directories three levels below
/var/spool/mail for it to find?

If it's succeeding on the commandline and not from PHP, I'd guess
it's probably a path problem, especially if you can run 'ls'. Try
giving the full path to 'find'.

        -robin

-- 
Robin Vickery.................................................
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE




I know this is not really php but because php and mysql are so close to one
another I thought I would ask....

im looking to create an index or indexes on a table...reason being the table
can become very large and cumbersome and all of the queries on it use where
clauses as well to limit the results.  So to improve performance I want to
add an index...my question is the following:


each of the queries on the table has a common set of variables in the where
clause, say $var1 and $var2, but other queries build upon those and look for
$var3 as well...example:

where $var1=somevalue and $var2=somevalue
vs.
where $var1=somevalue and $var2=somevalue AND $var3=somevalue

can I create one index such as

index indexname($var1, $var2, $var3) and use it in all cases even if im only
looking at $var1 and $var2?? or do I have to build two separate indexes, one
for the two variable case and another for the three variable case??? sorry
for not trying this out ahead of time and using explain to see what would
happen, I haven't had a chance to look at it.

Thanks for any advice in advance.
Chad Guilette





On Mon, 19 Feb 2001 06:57, Claudia wrote:
> I am looking for code that explains how to sum a value in a database
> based on a current field retrieved from the database.
>
> Example:
>
> query = "select course_name, course_build, milestone, testcase,
> time_tested, issue_status, comment,
>    bug_number, tested_by, date_tested from testissues where
> test_issue_id = $viewid";
> $result = mysql_query( $query );
>
> 1 - retrieve needed fields from database based on the id the user links
> from ($viewid)
> 2 - assign the course_name value from the query statement to a variable
> to be used on html page
>
> Assign: $course_name = mysql_result( $result, 0, "course_name" );
>
> Use variable:    print " <td><font color =
> #006666><b>$course_name</b></font></td>\n";
>
>
> Now I would like to sum ALL the time_tested values in my database WHERE
> the course_name =
> $course_name (the variable retrieved for the record)
>
> query = "select sum(time_tested) where course_name = $course_name";
> $result = mysql_query( $query );
> $total_time = mysql_result( $result, 0, "sum(time_tested)");
>
> First issue -- php does not seem to recognize the value of $course_name

Do you mean here:
query = "select sum(time_tested) where course_name = $course_name";

because in that query $course_name should be enclosed in single quotes if 
it is a char type field.

> Second issue -- will the $total_time value be calculated correctly
> based on the above syntax?

What type of field is time_tested?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Anyone have any ideas as to what my problem is here?  From the core dump 
it looks like a problem with pthreads but I'm stuck as to where to go from 
here.

Here is exactly what I did to reproduce the problem.  This is on an AIX 
4.3.3 box with
Oracle 9iAS which runs Apache 1.3.12.  I have successfully installed PHP 
on Oracle 8iAS which
runs Apache 1.3.9.

Here's the exact steps I took to install PHP:

NOTE: I ran all of this as the oracle user and I had my ORACLE_HOME set to 
/ias/6iserver. 
This shouldn't be necessary since we specify this on the configure line 
but I did it to be
safe.

Added -I/ias/Apache/perl/lib/5.00503 to the end of the #!perl call at the 
top of the apxs
script.  A perl module (strict.pm) is required but is not found in the 
include path when
the configure script runs apxs.

Also, I'm not sure why, but Oracle 9iAS automatically assumes everyone is 
running Solaris.
In the apxs script I  changed a '-DSOLARIS2=260' reference to -DAIX=43.

Ran CC=cc configure --with-apxs=/ias/Apache/Apache/bin/apxs 
--with-oci8=/ias/6iserver
--without-mysql --prefix=/ias/Apache/Apache

After the configure script was done I edited config_vars.mk and added 
-I/ias/rdbms/demo
and -I/ias/rdbms/public to the INCLUDES variable.  IAS keeps some of the 
oci8 header files in
these directories.  Also, for 9i I had to add -I/ias/Apache/Apache/include 
to the INCLUDES
variable.  I did not have to do this for 8iAS.

AIX has a sparsely documented bug where alloca() is not defined on the 
system and the PHP
configure script does not seem to handle this properly.  We need to add 
-ma to CFLAGS to
get around this.

Created a link in /ias/6iserver/lib for libclntsh.a.  For some reason only 
a .so was
included in 9iAS.  I checked 8iAS and this file is not missing here.  Ran 
ln -s libclntsh.so
libclntsh.a in the /ias/6iserver/lib directory.

Ran make.

Ran make install.

Apache starts up ok, but I get a seg fault at the first call to PHP.  Only 
the child http
process dies.

Apache error log shows:

[Sun Feb 18 20:51:19 2001] [notice] Apache/1.3.12 (Unix) ApacheJServ/1.1 
PHP/4.0.4pl1
mod_perl/1.22 configured -- resuming normal operations
[Sun Feb 18 20:51:52 2001] [notice] child pid 16028 exit signal 
Segmentation fault (11)

DBX output of core file:

< Several pages of warnings like this snipped >
warning: Unable to access address 0x2007d6fc from core
warning: Unable to access address 0x2007d700 from core
warning: Unable to access address 0x2007d700 from core
warning: Unable to access address 0x2007d704 from core
warning: Unable to access address 0x2007d704 from core
warning: Unable to access address 0x2007d708 from core
warning: Unable to access address 0x2007d708 from core

[using memory image in ../core]
warning: Unable to access address 0xf01558e4 from core

Segmentation fault in signal._p_nsleep [/usr/lib/libpthreads.a] at 
0xd0013db4
0xd0013db4 (_p_nsleep+0x10) 80410014        lwz   r2,0x14(r1)

Any ideas?

Thanks,
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]


******************************************************************
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
******************************************************************




I have syntax below, it suppose to send me email after there is someone buy our stuffs 
together with the email from my merchant. So far I only recieve email from my merchant 
but not from mail() function, anything wrong in my syntax? I did echo for the value of 
a variable $mailTo and it does has valid email address in there, can anybody tell me 
what went wrong?

************************
$queryRequest  = "SELECT * FROM TouristRequests WHERE 
TouristRequestID='$TouristRequestID'";
$resultRequest = mysql_query($queryRequest) or die(mysql_error());


$mailAdmin = '[EMAIL PROTECTED]';  
// Mail to Activelifestyle Admin.
        $mailTo  =   "$mailAdmin";
        $mailSubject = "There has been a request from tourist for the 
resort:$ResortName for the Nodollar Form promotion";
        $mailBody    = "Dear Admininstrator, \n\n";
        $mailBody   .= "The client $FirstName $LastName would like to request 
accommodation or service at this time.";
        $mailBody   .= "Would you PLEASE copy the link below and send out the email to 
the hotels about this request. \n\n";
        $mailBody   .= "Accomodation/service QuickForm : \n";
        $mailBody   .= "$linkToApp \n\n";
        $mailHeaders = "From: [EMAIL PROTECTED]\n";

        mail($mailTo, $mailSubject, $mailBody, $mailHeaders);
        
        $mailTo       = "$Email";
        $mailSubject = "Your Offer Request is in process";
        $mailBody    = "Dear $First_Name $Last_Name, \n\n";
        $mailBody   .= "Your request for the offer is now in process.  Please allow 24 
hours to confirm your request via an email \n\n";
        $mailBody   .= "Sincerely, \n\n";
        $mailBody   .= "The Activelifestyle Travel Network .\n\n";

        $mailHeaders = "From: [EMAIL PROTECTED]\n";

         mail ($mailTo, $mailSubject, $mailBody, $mailHeaders);


echo "<b><font face ='verdana' size='2'>$x_response_reason_text,&nbsp;</font></b><br>";
echo "<b><font face ='verdana' size='2'>$mailAdmin;</font></b><br>";
echo "<b><font face ='verdana' size='2'>$Email;</font></b><br>";
echo "<b><font face ='verdana' size='2'>Thank you for using our service. No monies 
will be taken at this stage as your credit card number is only be verified. You will 
now be redirected back to the home page. There will be email sent to your email 
account for your reciept. Please wait for a while.......</font></b><br>";
print("<meta http-equiv='refresh' content='10;url=http://$hotelURL'>");
***********************************

Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




Hi Jacky,

Check that the value of sendmail_path in your php.ini is correct (restart
Apache after making any changes). You can confirm the value with phpinfo().

PHP will not show any error if it cannot find/use the mailer.


Cheers



From: "Jacky@lilst" <[EMAIL PROTECTED]>


> I have syntax below, it suppose to send me email after there is someone
buy
> our stuffs together with the email from my merchant. So far I only recieve
> email from my merchant but not from mail() function, anything wrong in my
> syntax? I did echo for the value of a variable $mailTo and it does has
valid
> email address in there, can anybody tell me what went wrong?
>
> ************************
> $queryRequest  = "SELECT * FROM TouristRequests WHERE
> TouristRequestID='$TouristRequestID'";
> $resultRequest = mysql_query($queryRequest) or die(mysql_error());
>
>
> $mailAdmin = '[EMAIL PROTECTED]';
> // Mail to Activelifestyle Admin.
>         $mailTo  =   "$mailAdmin";
>         $mailSubject = "There has been a request from tourist for the
> resort:$ResortName for the Nodollar Form promotion";
>         $mailBody    = "Dear Admininstrator, \n\n";
>         $mailBody   .= "The client $FirstName $LastName would like to
> request accommodation or service at this time.";
>         $mailBody   .= "Would you PLEASE copy the link below and send out
> the email to the hotels about this request. \n\n";
>         $mailBody   .= "Accomodation/service QuickForm : \n";
>         $mailBody   .= "$linkToApp \n\n";
>         $mailHeaders = "From: [EMAIL PROTECTED]\n";
>
>         mail($mailTo, $mailSubject, $mailBody, $mailHeaders);
>
>         $mailTo       = "$Email";
>         $mailSubject = "Your Offer Request is in process";
>         $mailBody    = "Dear $First_Name $Last_Name, \n\n";
>         $mailBody   .= "Your request for the offer is now in process.
> Please allow 24 hours to confirm your request via an email \n\n";
>         $mailBody   .= "Sincerely, \n\n";
>         $mailBody   .= "The Activelifestyle Travel Network .\n\n";
>
>         $mailHeaders = "From: [EMAIL PROTECTED]\n";
>
>          mail ($mailTo, $mailSubject, $mailBody, $mailHeaders);
>
>
> echo "<b><font face ='verdana'
> size='2'>$x_response_reason_text,&nbsp;</font></b><br>";
> echo "<b><font face ='verdana' size='2'>$mailAdmin;</font></b><br>";
> echo "<b><font face ='verdana' size='2'>$Email;</font></b><br>";
> echo "<b><font face ='verdana' size='2'>Thank you for using our service.
No
> monies will be taken at this stage as your credit card number is only be
> verified. You will now be redirected back to the home page. There will be
> email sent to your email account for your reciept. Please wait for a
> while.......</font></b><br>";
> print("<meta http-equiv='refresh' content='10;url=http://$hotelURL'>");
> ***********************************
>
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
>
>





Ok. I have done everything I have been told to do, found on the web, and I
can think of other than bringing in a voodoo priest to get this going. I'll
try to explain what I have done so far.

I have a system with RedHat 7.0 installed, and am trying to get PDFlib to
work with PHP 4.04. The configure script I am using is as follows:

./configure --with-mysql=/usr/local --with-config-file-path=/www/conf
--with-apache=../httpd --enable-track-vars    --with-system-regex=yes
--with-gd   --with-jpeg-dir=/usr  --with-png-dir=/usr   --with-zlib-dir=/usr
--with-pdflib=/usr/local    --with-tiff-dir=/usr

Configure runs fine, make runs without errors, make install too. When I go
to bring up the test page of the clock, I get this.

Fatal error: Call to undefined function: pdf_new() in
/www/servers/pdfclock.php on line 7

I have taken the advice of others to not use the rpm of apache and have
compiled it myself. I also spent the time removing RedHat 7 and putting 6.2
back on. Only to find that if anything needs updating, that dependency
problems forced me to go back to 7.0 anyway.

I have updated the system library and specified at
http://www.phpbuilder.com/columns/perugini20001026.php3?page=2

It still doesn't work! I finally decided to try using ClibPDF. That runs
into the same problem at the same spot.

Fatal error: Call to undefined function: cpdf_open() in
/www/servers/pdftest.php on line 2

So this tells me that there is probably not anything wrong with PDFlib or
ClibPDF, that it is something that I am not doing or something else. PHP is
working fine though, and if I compile with Mysql or anything else, they work
fine.

If anyone has anymore advice on how to get this PDFlib working, please let
me know.





Hi,

May be a silly newbie question, but is there a way to send captured warnings
and errors when calling a script to an admin email?

Perhaps configure either apache or php_mod to point all error reporting to a
script that does this?

I'd appreciate any suggestions!

Thanks!
Jaxon





If i want to validate a form and check for empty input which then will
produce a pop up warning dialog box, what should i do?

thanks






On 18 Feb 2001 20:54:16 -0800, Edith Lai <[EMAIL PROTECTED]> wrote:
>If i want to validate a form and check for empty input which then will
>produce a pop up warning dialog box, what should i do?

Read up on your JavaScript. And consider whether this is really a good idea -
many people find it annoying.




On Mon, 19 Feb 2001 15:25, Edith Lai wrote:
> If i want to validate a form and check for empty input which then will
> produce a pop up warning dialog box, what should i do?
>
> thanks

If you want to do that client side, you'll need to write a little 
javascript routine which checks the input and does the dialog box bit.

But don't forget a) user may have js turned off and b) don't rely only on 
client side validation - recheck the data server side prior to processing 
it.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




I wanted to let you know about a new opportunity that you can take up FREE. 
If you join as an affiliate, we'll teach you how to build a profitable 
business on the Internet; how to use our system to create an income stream; 
and how to earn income globally, 24 hours a day. 

Don't let this opportunity slip past you - we expect our organization to be 
at least 1 million-strong within less than two years! Join us and let's 
work together to get a share of all those members.

Just hit Reply and send a blank message with "Opportunity" on the Subject 
line.




Hi all,

I'm sludging away at writing PHP scripts that use CVS. It's been
pretty slow going, mostly because it seems to be taking me a while to
learn to think like CVS.

One thing has me stumped. How the heck do I create a new project using
import? Unless I'm totally offbase, I have to be 'in' the directory I
want to import. Since I can't do anything like a cd from PHP, what do
I do?

Thanks,
Chris




On Mon, 19 Feb 2001 15:34, Chris wrote:

> > Hi all,
>
> I'm sludging away at writing PHP scripts that use CVS. It's been
> pretty slow going, mostly because it seems to be taking me a while to
> learn to think like CVS.
>
> One thing has me stumped. How the heck do I create a new project using
> import? Unless I'm totally offbase, I have to be 'in' the directory I
> want to import. Since I can't do anything like a cd from PHP, what do
> I do?
>
> Thanks,
> Chris

Does chdir() not work for you?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Eep. I didn't know there was a chdir. It's not in the list of Filesystem 
functions, but when I looked for it by name in the quickref, there it was.

Thanks!
Chris





the solution is javascript-based rather than php-based.

Just put this code....and when you submit, the value you'll process stored
in variable hidden_list_selected. each value selected are separated by comma
delimiter.

<html>
        <head>
                <script language="javascript">
                        function insert(thisObject){
                                thisForm = eval("document.frmInput");
                                thisForm.hidden_list_selected.value = "";

                                // flag to put comma as separate variable for each 
selected category
                                flag_first = true;

                                
for(counter=0;counter<thisObject.options.length;counter++){
                                        if(thisObject.options[counter].selected){
                                                if(flag_first)
                                                        flag_first = false;
                                                else
                                                        
thisForm.hidden_list_selected.value+= ",";
                                                
thisForm.hidden_list_selected.value+=thisObject[counter].value;
                                        }
                                }
                        }
                </script>
        </head>
        <body>

                <form name="frmInput" method="post" action="testAction.php">
                        <select name="sel_category" multiple size="4"
onChange="javascript:insert(this);">
                        <option value="Fruit">Fruit</option>
                        <option value="vegetables">Vegetables</option>
                        <option value="fish">Fish</option>
                        </select>
                        <input type="text" name="hidden_list_selected" value="">
                        <input type="submit">
                </form>
        </body>
</html>


-----Original Message-----
From: BeeBoo [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 17, 2001 11:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Multiple Selection.


If i'm going to let users select multiple choices from a list in a form, let
say the part in the form is like this:

<select name="category" multiple size="4">
        <option value="Praise">Fruit</option>
        <option value="Worship">Vegetables</option>
        <option value="Fellowship">Fish</option>
</select>

what code should i put in the submit part of the php to collect the multiple
inputs? I tried array, but it seems not working. Please help.

Thanks.



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






On Mon, 19 Feb 2001 15:43, toto wrote:
> the solution is javascript-based rather than php-based.
>
> Just put this code....and when you submit, the value you'll process
> stored in variable hidden_list_selected. each value selected are
> separated by comma delimiter.
>
> <html>
>       <head>
>               <script language="javascript">
>                       function insert(thisObject){
>                               thisForm = eval("document.frmInput");
>                               thisForm.hidden_list_selected.value = "";
>
>                               // flag to put comma as separate variable for each 
>selected
> category flag_first = true;
>
>                               
>for(counter=0;counter<thisObject.options.length;counter++){
>                                       if(thisObject.options[counter].selected){
>                                               if(flag_first)
>                                                       flag_first = false;
>                                               else
>                                                       
>thisForm.hidden_list_selected.value+= ",";
>                                               
>thisForm.hidden_list_selected.value+=thisObject[counter].value;
>                                       }
>                               }
>                       }
>               </script>
>       </head>
>       <body>
>
>               <form name="frmInput" method="post" action="testAction.php">
>                       <select name="sel_category" multiple size="4"
> onChange="javascript:insert(this);">
>                       <option value="Fruit">Fruit</option>
>                       <option value="vegetables">Vegetables</option>
>                       <option value="fish">Fish</option>
>                       </select>
>                       <input type="text" name="hidden_list_selected" value="">
>                       <input type="submit">
>               </form>
>       </body>
> </html>
>
>
> -----Original Message-----
> From: BeeBoo [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 17, 2001 11:42 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Multiple Selection.
>
>
> If i'm going to let users select multiple choices from a list in a
> form, let say the part in the form is like this:
>
> <select name="category" multiple size="4">
>         <option value="Praise">Fruit</option>
>         <option value="Worship">Vegetables</option>
>         <option value="Fellowship">Fish</option>
> </select>
>
> what code should i put in the submit part of the php to collect the
> multiple inputs? I tried array, but it seems not working. Please help.
>
> Thanks.
>

I think you need to name the list as an array thus:
<select name="category[]" multiple size="4">

Then your receiving script can parse category as an array of the chosen 
elements.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hi!


I am not able to understand this REgular expression.

/Wil?/

would match "Winnie", "Wimpy" "Wilson" and "William",
though not "Wendy" or "Wolf".

Howz taht..?


Can anybody explain me please.

Thank You!
Dhaval Desai

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




The ? meta-character is used for matching zero or one occurence of the
preceding character , in this case , l .
T'his means that you'll match all words that begin with 'Wi' and continue
with one or zero 'l' .

HTH
Sorin Ifrim

----- Original Message -----
From: Dhaval Desai <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 7:23 AM
Subject: [PHP] REgular expression....difficult is it?


> Hi!
>
>
> I am not able to understand this REgular expression.
>
> /Wil?/
>
> would match "Winnie", "Wimpy" "Wilson" and "William",
> though not "Wendy" or "Wolf".
>
> Howz taht..?
>
>
> Can anybody explain me please.
>
> Thank You!
> Dhaval Desai
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.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]
>






At 21:23 18/02/2001 -0800, Dhaval Desai wrote:
>I am not able to understand this REgular expression.
>
>/Wil?/

English Translation: Find a string that contains "Wi" that may or may not
   be followed by "l".

In pure "does the string match?" terms, your example is equivalent to

/Wi/

>would match "Winnie", "Wimpy" "Wilson" and "William",
>though not "Wendy" or "Wolf".
>
>Howz taht..?


Does that help?

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





[rearranged back to bottom-posting order, for clarity]

In article <012901c09a35$7b64c640$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Ifrim 
Sorin") wrote:

> > I am not able to understand this REgular expression.
> >
> > /Wil?/

> The ? meta-character is used for matching zero or one occurence of the
> preceding character , in this case , l .
> T'his means that you'll match all words that begin with 'Wi' and continue
> with one or zero 'l' .

More than that, it'll match any string in which a capital 'W' is followed 
by a lowercase 'i'. For example:

"Don't you love Wile E. Coyote?"
"I'm Wigging Out."
"The password is 'KiWi'."
"The password is '123Wiked'."

-- 
CC




On Sunday 18 February 2001 21:26, [EMAIL PROTECTED] wrote:

> > hi,
>
> how can i store an array in mysql ?
>
>
> what i do now ( works fine  )
> ========================
>
>
> a) transform the array to a § delimeted string
> // $tempItem is a § dlimited string    example: 4321§117§A123§42WQ§1243
> b) $tempItem = serialize($tempItem);

Just 
$tempitem = serialize($myarray);
will work fine.

> c) store it in mysql-table
>
> and i get my array back with
>
>
> d) $myItems = explode("§",unserialize($myValueFromDB));

$myItems = unserialize ($myValueFromDB);

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

I sat laughing snidely into my notebook until they showed me a PC running
Linux. And oh! It was as though the heavens opened and God handed down a
client-side OS so beautiful, so graceful, and so elegant that a million
Microsoft developers couldn't have invented it even if they had a hundred
years and a thousand crates of Jolt cola.

- LAN Times




sorry about the first empty reply ...

the correct sql solution is that anything stored in an array in your program
should be a separate table in your database.

e.g
table order:
        ->order_num (primary key)
        ->customer
        ->date
        -> ...

table item:
        ->order_num
        ->item_num
        ->quantity
        -> ...
        foreign key order_num reference order


        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: andreas (@work) [mailto:[EMAIL PROTECTED]]
> Sent: 18 February 2001 20:27
> To: [EMAIL PROTECTED]
> Subject: array - too stupid
> 
> 
> hi,
> 
> how can i store an array in mysql ?
> 
> 
> what i do now ( works fine  )
> ========================
> 
> 
> a) transform the array to a § delimeted string 
> // $tempItem is a § dlimited string    example: 
> 4321§117§A123§42WQ§1243  
> b) $tempItem = serialize($tempItem);
> 
> c) store it in mysql-table
> 
> 
> 
> and i get my array back with
> 
> 
> d) $myItems = explode("§",unserialize($myValueFromDB));
> 
> 
> 
> but i think theres an easier way out there
> any solutions
> 
> 
> greetings
> 
> andreas
> 
> 




Hi!


I need help with this one. See I store a lot of data
into one variable like this:

$variable = This is the data.This is the data.This is
the data.This is the dataThis is the dataThis is the
dataThis is the dataThis is the dataThis is the
dataThis is the dataThis is the data
This is the dataThis is the dataThis is the data


This is the; da;taThi's is the dataThis is the
dataThis is the data

This is the dataThis is the dataThis is the dataThis
is the data


I mean to say taht it is kidof formatted with REturn
character, space characters, ', ; and a lot many
characters...




Now my question is that. If I store the variable in
MYSQL dataabse under a particular filed TYPe varchar
or TEXT.

It doesn't bring up the same kind of format like it
was when it was stored..

Is there any way I can get the same output like I
stored it.?


Thank YOu!
Dhaval Desai

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




> $variable = This is the data.This is the data.This is
> the data.This is the dataThis is the dataThis is the
> dataThis is the dataThis is the dataThis is the
> dataThis is the dataThis is the data
> This is the dataThis is the dataThis is the data
>
>
> This is the; da;taThi's is the dataThis is the
> dataThis is the data
>
> This is the dataThis is the dataThis is the dataThis
> is the data
>
>
> I mean to say taht it is kidof formatted with REturn
> character, space characters, ', ; and a lot many
> characters...
>
>
>
>
> Now my question is that. If I store the variable in
> MYSQL dataabse under a particular filed TYPe varchar
> or TEXT.
>
> It doesn't bring up the same kind of format like it
> was when it was stored..
>
> Is there any way I can get the same output like I
> stored it.?

Use http://php.net/addslashes maybe...
If it's varchar(XX) and your string is longer than XX, you will lose the end
of the string.
If you're not sure how long it might be, just use TEXT in MySQL.

--
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 installed the php into my computer cwin98 with pws. however, i don't
know why the error occurred during run the code of php whenever i browse the
homepage!

would anyone please to tell me what the meaning of the following message is?
And what is the reason(s) to cause it happen?

1157 (0x00000485)







Hi,

  I am going to develop virtual file management. Thus I want to know
  some things.
  1. how to determine file size _before_ file uploading or on loading
  time and how to avoid error message if file size will be too large.
  2. how to read directory content with it's size, modes etc in win32
  and linux.
  3. in what mode i should make directory for read/write permission
  (not execute). Any point to docs?
  4. Any other useful points to my project? I don't know all problems
  for it.
  
TIA,
-- 
Andris
mailto:[EMAIL PROTECTED]






>   I am going to develop virtual file management. Thus I want to know
>   some things.
>   1. how to determine file size _before_ file uploading or on loading
>   time and how to avoid error message if file size will be too large.

You can't determine file size before uploading...
*MAYBE* with some funky JavaScript?...

>   2. how to read directory content with it's size, modes etc in win32
>   and linux.

win32 doesn't have modes, really...

>   3. in what mode i should make directory for read/write permission
>   (not execute). Any point to docs?

man chmod

>   4. Any other useful points to my project? I don't know all problems
>   for it.

Allowing surfers to upload arbitrary files is inherently dangerous.  Be
very, very careful.  Just because a file isn't executable doesn't make it
"safe".  EG:  If you let them upload a readable file that they can trick the
browser into showing, and it contains PHP (or Perl, or JSP) code, they can
execute *that*, even though it's not executable.  I'm sure there are many,
many other potential holes.

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






> Warning: Releasing SysV semaphore id 1 key 0x7b2 in request cleanup in
> Unknown on line 0
>
> Is this warning message potentially a problem? Or could I just turn off
this
> warning in the php.ini? How can I prevent this message from appearing if
it
> is not potentially dangerous?

GUESS:
This is almost for sure a warning that you didn't call:
http://php.net/manual/en/function.sem-release.php
on the Semaphore id you have acquired/set/whatever.
You may probably safely ignore that warning.
I don't think it will show up in a browser ever -- It will probably get
swallowed by the ether, since it is occuring in PHP's cleanup code after
your script is done.
You may or may not be able to affect that warning using set_error_reporting
and/or setting error_reporting in php.ini -- But those are rather broad
brushes to use.
Actually, calling set_error_reporting() at the end of your semaphore script
may not be so bad...

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






Show us all the code you chopped out, or at least every single line that
mentions $pass_category.

Or, faster for you to figure it out:
Echo out $pass_category immediately before the if () statement.
I'm betting you set it accidentally in the other code.

> if ($pass_category > "") $sql2 = $sql2 . " and cat = '$pass_category' ";






>I'm fiddling around with the fopen function, using it on urls. I now need
to know how to run >a JavaScript on another page by using PHP. I know I'll
be able to do it from the url if only >there's a way to run JavaScript from
the url (just by using an fopen). Is there a way to run >a JavaScript
function from a url, or from PHP? For example:
>
>Would I be able to type something like:
>
>http://www.someurl.com/filename/javascript:javascriptname?parameterlist=val
uelist&
>
>or is there a way PHP can do this??

JavaScript runs in the browser.
PHP runs on your server.
They don't really run "together" in any way, shape, or form.

You can have your PHP script spew out a page with lots and lots of
JavaScript in it to be run on somebody's browser, based on the input
parameters, if that's what you are asking.  PHP doesn't really care if it
spits out HTML, JavaScript, or complete and utter nonsense to your browser.

If what you are asking is "Can I read somebody else's page with JavaScript
in it, and execute that JavaScript as I read it", the answer is this:

*MAYBE*, if you really worked at it, you could...  You'd have to store it in
a local file, or pipe it through to Netscape or whatever browser is
installed on your web-server, if any.  You wouldn't really have any way of
getting the "output" from the JavaScript, though, I don't think.  It also
sounds like a horrible idea security-wise...  Although, I guess, in theory,
it's no different from surfing to their site with your browser if you do it
right.  But why you want to do this is beyond me.

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






> Warning: Unable to jump to row 1 on MySQL result index 5 in
> admrelatoriowap.php3 on line 23
>
> Warning: Unable to jump to row 1 on MySQL result index 5 in
> admrelatoriowap.php3 on line 24
>
> Warning: Unable to jump to row 2 on MySQL result index 6 in
> admrelatoriowap.php3 on line 23
>
> Warning: Unable to jump to row 2 on MySQL result index 6 in
> admrelatoriowap.php3 on line 24

Your result set does not have 3 records in it -- There's nothing inherently
wrong with your SQL, nor with your result set.  It may have 0 records, or it
might have 1.  But it doesn't have a second record, nor a third.

And you are asking MySQL to give you the second (row #1) and third (row #2)
record.

These records don't exist.

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






You can't easily transfer a PHP variable from one FRAME to another, *unless*
you go through the parent (FRAMESET) page.

So, if you are using FRAMEs for their scrolling properties and their "look"
rather than "not refreshing" the left frame, you just have to make all your
TARGET="_top" and then in the main page, pass everything down to the FRAME
URLs.

<FRAMESET ...>
     <FRAME SRC=navbar.php?id=<?php echo $id;?> ...>
    <FRAME SRC=search.php?id=<?php echo $id;?> ...>
    <FRAME SRC=results.php?id=<?php echo $id;?> ...>
</FRAMESET ...>

--
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
----- Original Message -----
From: "james" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Friday, February 16, 2001 6:11 PM
Subject: [PHP] Newbie: Fundamental question. Long.


> I have a feeling that after receiving answer to this question I will be
able
> to do everything I want...:)
>
>
> SHOP:
>
> Page has three frames: left, right_top and right_down.
>
> Left frame:
> <?
> echo " <form method=post action=right_top.php target=right_top>";
> echo " <input type=hidden name=action value=search_for_phrase>";
> echo " <p> ";
> echo " <input type=text name=phrase>";
> echo " <input type=submit name=button value=Search>";
> echo " </p>";
> echo " </form>";
>
> ?>
>
> Right_top frame:
> (right_top.php)
>
>   if ($action=="search_for_phrase"){
>       searching_for_phrase($phrase);
>       exit();
>       }
>
> }
>
> function searching_for_phrase($phrase)
> {
>   ibase_connect('www.gdb','james','james');
>   $query=ibase_query("select id, name, price from shop where name like
> '%$phrase%';");
>   show_records($query);
> }
>
> function  showrecords($query)
> {
>     echo "<TABLE bgcolor=#FBFDB9 BORDER=1 borderColor=#ffffff
CELLPADDING=0
> CELLSPACING=2 HEIGTH=80><tr>";
>     echo "<TD ALIGN=CENTER>ID</TD><TD ALIGN=CENTER>Name</TD><TD
> ALIGN=CENTER>Price</TD></TR>";
>     while(&record=ibase_fetch_row($tresc_query)) {
>              echo "<tr><td align=center> $record[0] </td>";
> id_of_product
>              echo "<td align=center width=150> $record[1] </td>";
> name_of_product
>              echo "<td align=center width=150> $record[2] </td>";
> price_of_product
>
>
>
> //  echo " <input type=hidden name=id value=$record[1]>";
> //     echo "<td align=center><input type=submit name=action
> value='Add'></td></tr>";     ?????????????????????????
>
> //    echo "<td align=center><A HREF=\"$PHP_SELF
>
?id_of_product=$record[0]&name_of_product=$wiersz[1]&price_of_product=$wiers
> z[2]&action='add'\">Add</A></td>";??????????????//
>
> ***************How can I transfer variable $id_of_product to right_down
> frame?????????????????*************
>
>
> Right_down frame:
>
> <?
> if   ($action=="add") {
>       adding($id_of_product);
>       exit();
>       }
>
> function adding($id_of_product)
> {
>
>   if ($id_of_product!=""){
>     if (session_is_registered("ses_basket_items")){
>        $basket_position_counter=0;
>        $double=0;
>        if ($ses_basket_items>0){
>           foreach ($ses_basket_name as $basket_item){
>                        if ($basket_item==$name_of_product){
>                           $double=1;
>                           $basket_position=$basket_position_counter;
>                         }
>                        $basket_position_counter++;
>           }
>        }
>
>       if ($double==1){
>       $oldamount=$ses_basket_amount[$basket_position];
>       $ses_basket_amount[$basket_position]++;
>       $price_of_product*$ses_basket_amount[$basket_position];
>
>
$ses_basket_price[$basket_position]=$price_of_product*$ses_basket_amount[$ba
> sket_position];
>     }
>    else
>
>
>       $ses_basket_name[]=$name_of_product;
>       $ses_basket_amount[]=1;
>       $ses_basket_price[]=$price_of_product;
>       $ses_basket_items++;
>    }
>  }
>  else
>
>
>   $ses_basket_items=1;
>   $ses_basket_name[0]=$name_of_product;
>   $ses_basket_amount[0]=1;
>   $ses_basket_price[0]=$price_of_product;
>   session_register("ses_basket_items");
>   session_register("ses_basket_name");
>   session_register("ses_basket_amount");
>   session_register("ses_basket_price");
>  }
>
> }
>
> if ($ses_basket_items>0){
>    for
> ($basket_counter=0;$basket_counter<$ses_basket_items;$basket_counter++){
>       $price=sprintf("%01.2f",$ses_basket_price[$basket_counter]);
>       $amount=$ses_basket_amount[$basket_counter];
>       $name=$ses_basket_name[$basket_counter];
>       if ($amount>0){
>       echo "$amount $name $price";
>       echo "<BR>";
>    }
>  }
> else
> {
>    $ses_basket_items=0;
>    unset($ses_basket_name);
>    unset($ses_basket_amount);
>    unset($ses_basket_price);
> }
>
> ?>
>
> The purpose of this frame is to add items to a basket:
> - checking if there is product of a certain name in basket- if so
increasing
> amount by one if not adding the name to basket
> - printing on screen the state of the basket.
>
> Please answer my above question...:)
> I mean:
> ***************How can I transfer variable $id_of_product to right_down
> frame?????????????????*************
> Thanks in advance
>
> Adamski
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Apache has a benchmarking program called "ab"
Your new server probably has "ab" already on it, sitting right next to httpd
and apachectl.
Try this:
locate apachectl
Whatever directory that says, cd to it, and see if there's an "ab" program
there.
If so, do:
./ab --help

--
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
----- Original Message -----
From: "Cybercandy Ltd" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Saturday, February 17, 2001 5:26 AM
Subject: [PHP] Measuring php on old and new server


> I've recently swapped over from a virtual server to a dedicated server.
> I've been told that I will get much better performace from my
> new server and I want to verify this, particular with regard to handling
PHP
>
> Does any have or know of a PHP script I can download and use
> to do a general benchmark test of PHP/mySQL performance.
>
> Thanks for any advice offered.
>
>
> Allan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





> // then I place the message that is to be encrypted in a file
>
> $fp = fopen("plaintxt", "w+");

This won't scale up too well...  You would be better off to use pipe (|) to
shove it to the PGP program.  Actually, that's still not such a hot idea...
Anybody who can do "ps auxwwww" could catch the occasional credit card that
way.  Use popen instead of system.  OTOH, if you are using SSL, as you
should for this, and there exists a user with a login who can do "ps" that
you don't inherently trust, you're already in deeper trouble than system()
versus popen()...  Still, better safe than sorry, and popen won't be that
much harder than system()

> fputs($fp, $msg);

This adds a line break at the end, though.

And it maybe "escapes" the embedded newlines on the assumption that you
intend to use fgets()to read the "line" back in.  Also, if you have
MagicQuotes Whatsit turned on (not GPC, the other one) that will also maybe
attempt to add backslashes to the data.

Use fwrite to get *exactly* what you put in, and make sure php.ini doesn't
have the second MagicQuotes thingie turned on.

I've never turned it on, so don't remember what it's called. Magic Quotes
Runtime?  Yeah, that's it...

> // fyi ... if at this point, if I were to open the file plaintxt
> // all of my line breaks would still be there

Plus an extra one at the end. :-)

> // next I encrypt the data and write it to a file called crypted
>
> system("/usr/local/bin/pgpe -r [EMAIL PROTECTED] -o crypted -a
> plaintxt");
>
> unlink("plaintxt");
>
> // now ... if at this point I were to open the file crypted and decrypt
> it
> // I would get my message in a long line with squares where every break
> should be

If all else fails, fopen that and read it char by char printing out the
ASCII codes of any non-alphabetic chars and figure out what those little
squares are.  Your text editor shows all sorts of unprintable characters as
little squares.  You need to figure out which character it actually is.

(Or get a better editor that will tell you, or find out how to make your
editor tell you.)

> // here's the method I use to get this crypted data added to my log file
>
> $fd = fopen("crypted", "r");
>
> $msg_crypted = fread($fd, filesize("crypted"));
>
> fclose($fd);
>
> unlink("crypted");
>
> $order_log = fopen("order_log", "a");
>
> fwrite($order_log, $msg_crypted);
>
> fclose($order_log);
>
> So, if anyone can help me figure out a way to keep these line breaks in
> place all the way through to decryption, I would be VERY appreciative.
> I know this is possible ... because, if I take the same message from my
> code and place it in a text editor ... encrypt and decrypt it using my
> desktop PGP software ... all of the line breaks remain intact.

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






Did you recompile and forget to include --enable-trans-sid?...

What does <?php phpinfo();?> have to say about how you compiled PHP?

--
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
----- Original Message -----
From: "Yev" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Saturday, February 17, 2001 12:26 PM
Subject: [PHP] PHP Session question


> Hi,
>
> I enabled sessions via session.auto_start feature, and attempting to
> simulate sessions when a user has disabled cookies.  I remember it used to
> automatically append SESSIONID= to every href, etc.. (I compiled
> with --enable-trans-sid), but now it doesn't append it.
>
> What am I missing?
>
> Thanks in advance,
> Yev
>
>
> --
> PHP General Mailing List (http://www.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 you put in between the <textarea ...> and the </textarea> is what you
get.
Tabs, spaces, newlines, spiders and snakes and all.
If you don't want it there, don't put it there.
Since that messes up your indenting, for your editor, maybe you could do:

<?php
    $text = "Line 1\nLine2\n";
?>
<textarea ...><?php echo $text;?></textarea>
so you can squeeze it all on one line.
Or some variant on this idea.

--
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
----- Original Message -----
From: Todd Cary <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Saturday, February 17, 2001 3:06 PM
Subject: [PHP] Text box


> If I have the source of a <textarea> indented, the spaces are added to
> the left side.  Can this be avoided or do I have to make sure that me
> source is on the left side of the script?
>
> This will have spaces for the two lines:
>
>     <textarea name="textareaName" cols="62" rows="19">
>     This is line 1.
>     This is line 2.
>     </textarea>
>
> This will not:
>
> <textarea name="textareaName" cols="62" rows="19">
> This is line 1.
> This is line 2.
> </textarea>
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





> $pages=mysql_query("SELECT CP.page_id, pagename FROM cluster_pagetbl as
CP,
> pagetbl WHERE
> CP.cluster_id = '$id' AND CP.page_id=pagetbl.page_id order by page_id");
>
> /*
> SQL Result for $id=1:
> page_id pagename
>  1   breakingnews
>  3   weather
> */
>
> if (mysql_Numrows($pages)>0) {
>
> $prows=mysql_NumRows($pages);
>         $i=0;
>         while ($i<$prows){
>
> //figure out how to get page ids into array
> $pid= mysql_result($pages,$i, page_id);
> $pagename =mysql_result($pages, $i, pagename);
>
>  $pgids= array("$pid" => "$pagename");

This is *rebuilding* the array from scratch on each "page".

> foreach($pgids as $pid => $pagename){
>  print $pid.' => '.$pagename.'<br>';
> }

This is *inside* the loop, so shows you the first array, with page 1, and
then the second array, with page 3.

But you never really had an array with *both* pages in it at once.

Change the $pgids = array($pid => $pagename);
line to just:
$pgids[$pid] = $pagename;

Now, since you probably want $pgids to be an array even if there are *no*
pages matching the criteria, insert a line *before* the loop:
$pgids = array();
This will guarantee that $pgids is always an array.

> /* prints:
> 1 => breakingnews
> 3 => weather
>
> At this point the correct number of values appear to be in the pgids array
> */
>
> $i++;
> }
> }
>
> $query2=mysql_query("select page_id, pagename FROM
> pagetbl order by page_id");
>
> /*
> SQL Result:
> page_id pagename
>  1   breakingnews
>  2   pastnews
>  3   weather
> */
>

You'll want to reset($pgids) before you use it again.

> if (mysql_Numrows($query2)>0) {
>
> $numrows=mysql_NumRows($query2);
>         $x=0;
>         while ($x<$numrows){
>
> $mpid=mysql_result($query2,$x, page_id);
> $mpagename=mysql_result($query2,$x, pagename);
>
> $mpgids= array("$mpid" => "$mpagename");
>
> foreach ($mpgids as $mpid => $mpagename){
> print '<input type=checkbox name=page_ids[] value="'.$mpid.'"';
>
> if ($pgids == $mpgids){ print " checked"; }

You need to keep track of which $pgid[] you are on -- Keep a running counter
or something so that after you have $pgids[1] and $mpgids[1], you'll know
that you are on $pgids[3] and $mpgids[2], and then $pgids[3] (still) and
$mpgids[3].

In other words, you need two distinct iterators going in parallel.

> print '>'.$mpagename;
> }
>
> // prints out three checkboxes, since that's the total number of pages
> present
> //but only the third checkbox (weather) gets checked, the first one should
> be checked also
>
> $x++;
> }
> }
>
> file://I used the array intersect function to doublecheck what is going on
and it
> finds only weather also
> file://What is happening to the first value?
>
> $diff = array_intersect($mpgids,$pgids);
>
> foreach ($diff as $element){
> print '<p>'.$element.'<br>';}
>
> file://prints: weather
>
>


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


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





your problem is where you are creating the array, see my notes

> -----Original Message-----
> From: Onaje Johnston [mailto:[EMAIL PROTECTED]]
> Sent: 17 February 2001 22:47
> To: [EMAIL PROTECTED]
> Subject: compare arrays problem
> 
> 
> I am hoping that someone really understands arrays reads this 
> and can tell
> me why the following isn't working as I expect it to. I've 
> been trying for
> days to get it to work. 
> 
> $pages=mysql_query("SELECT CP.page_id, pagename FROM 
> cluster_pagetbl as CP,
> pagetbl WHERE 
> CP.cluster_id = '$id' AND CP.page_id=pagetbl.page_id order by 
> page_id");
> 
> /*
> SQL Result for $id=1:
> page_id pagename 
>  1   breakingnews  
>  3   weather  
> */

declare the array here:
$pgids= array();

>  
> if (mysql_Numrows($pages)>0) {
> 
>       $prows=mysql_NumRows($pages);
>         $i=0;
>         while ($i<$prows){
>  
> //figure out how to get page ids into array
> $pid= mysql_result($pages,$i, page_id);
> $pagename =mysql_result($pages, $i, pagename);
>  
>  $pgids= array("$pid" => "$pagename");

this reinitialises the array for each row of the answer to your query, what
you should do here is:
$pgids["$pid"] = "$pagename";

> 
> foreach($pgids as $pid => $pagename){
>  print $pid.' => '.$pagename.'<br>';
> }
> 
> /* prints:
> 1 => breakingnews
> 3 => weather

prints each row but at no point are both in the array. on each pass only the
current row is in your array.

> 
> At this point the correct number of values appear to be in 
> the pgids array
> */

no they are not, only one is in at a time

> 
> $i++;
> }
> }
> 
> $query2=mysql_query("select page_id, pagename FROM 
> pagetbl order by page_id");
> 
> /*
> SQL Result:
> page_id pagename 
>  1   breakingnews  
>  2   pastnews  
>  3   weather 
> */
> 
> if (mysql_Numrows($query2)>0) {
> 
>       $numrows=mysql_NumRows($query2);
>         $x=0;
>         while ($x<$numrows){
>               
> $mpid=mysql_result($query2,$x, page_id);
> $mpagename=mysql_result($query2,$x, pagename);
> 
> $mpgids= array("$mpid" => "$mpagename");   
>   
> foreach ($mpgids as $mpid => $mpagename){
> print '<input type=checkbox name=page_ids[] value="'.$mpid.'"';
> 
> if ($pgids == $mpgids){       print " checked"; }
> print '>'.$mpagename;
> }
> 
> // prints out three checkboxes, since that's the total number of pages
> present
> //but only the third checkbox (weather) gets checked, the 
> first one should
> be checked also

that's because your array only contains the last row ...

> 
> $x++;
> }
> }
> 
> //I used the array intersect function to doublecheck what is 
> going on and it
> finds only weather also
> //What is happening to the first value?
> 
> $diff = array_intersect($mpgids,$pgids);
> 
> foreach ($diff as $element){
> print '<p>'.$element.'<br>';} 
>  
> //prints: weather
>

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
 




> can somone give me a mail sending script it's like whatever i do there
> is always a error

I suspect the error is not in your actual script but in how you set up your
mail in php.ini...

Here's a test script:
<?php
    $headers = "From: [EMAIL PROTECTED]\r\n";
    $headers .= "Reply-to: [EMAIL PROTECTED]\r\n";
    mail('[EMAIL PROTECTED]', 'Test', 'This is a test',
$headers);
?>

What's the error message?

--
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
    $secret = "PHP Rocks!";
    system("$secret |
/path/to/pgp -f -g -o -d -k -n -o -w -s -w -h -a -t -f -l -a -g -s");
?>

Using popen and fwrite/fread would be even better...

--
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
----- Original Message -----
From: Martin Thoma <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, February 18, 2001 5:00 AM
Subject: [PHP] Using Pipes / PGP


> Hm, this is getting much more complicated as I thought.
>
> I want to use PGP. This works fine with temporary Files: You say to PGP:
> "Please take the file message.txt and encrypt it to the file
> encrypt.txt". Ok.
>
> But this could be a possible securety-hole, because the message-file is
> available on the disc for some time. The pgp-doc says, that you could
> use the -f paramter with pipes to avoid this.
>
> But: How is it done exactly ? I didn't get anything to work.
>
> (Using PGP 2.6.3. and Linux)
>
> Regards
>
> Martin
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I think EOF depends on the application/OS...

Try chr(26) [Control-Z] and chr(4) [Control-D]

Or have I just been using too many Un*x programs that can't agree on how to
indicate the end of my typing? :-^

If those don't work, try everything below 32.

Well, okay, I *know* it's not 9, 10, or 13 :-)

If all else fails, take a file that works, and get PHP to read it char by
char...

Hey, maybe you just need a newline at the end!
 "\n" (aka chr(13))
Or, in Windoze, "\r\n" (aka chr(10) . chr(13))

--
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
----- Original Message -----
From: "David Bouw" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, February 18, 2001 5:17 AM
Subject: [PHP] EOF (End of File) character..


> Hi...
>
> How do I get an EOF character when echo'ing an web page which will be
> written to an file.??
>
> What I am trying to do is the following. I have an textstring (variable):
>
> Then I do the following:
>
>       header("Content-disposition: filename=CLIEOP03");
>       header("Content-type: application/octetstream");
>       header("Pragma: no-cache");
>       header("Expires: 0");
>      echo ("$datestring");
>
> ($datastring contains the text)
>
> My browser pops up with a box to ask if I want to save this file..
>
> The problem is, that when I save this file it has no EOF character at the
> end.. Normally I then use my text editor to open the file and then I just
> save it again to get the needed character.. I generate this file for an
> application..
>
> The problem is that the application won't accept the file if there is no
EOF
> character..
>
> What is the correct characters to use to get an EOF character??
>
> Thanks for the help..
>
> Bye Bye
> David
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





<input type=checkbox name=product[42]> Widget #42
<input type=checkbox name=product[13]> Doohicky #13

<?php
    while (list($id) = each($product)){
        echo "You asked for $id<BR>\n";
    }
?>

--
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
----- Original Message -----
From: "kaab kaoutar" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, February 18, 2001 3:50 AM
Subject: [PHP] dynamic pages/sessions/checkboxes


> Hi!
> I'd like to do the following:
> i have a page where the user chooses from a combo of a products, a combo
of
> charactersitics, the date when he wants it and the quantity!
> he may not fill one of these inputs so the result will be the list of all
> products, or he may choose the product and not the characteristics etc so
i
> will check in my database and show them!
> but that page is dynamic cause i have to add checkboxes close to each
> product !The purpose of these checkboxes is that the user can add the
> products to its cart of estimates(devis), so as the final result will be
the
> estimate of the price of all products checked!
> The problem is that when the user checks a product, i should know wich
> product to add, i thought of giving the checkboxes, the product number !
> any ideas ?
>
> PS: i'm using sessions cause i have many pages from where he can add
> whatever he wants to its estimate cart
>
> Thanks
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Pretty much everybody just uses Webalizer or Analog (or whatever) rather
than code one in PHP...

PHP *could* do everything you needed, only slower, and it's not the right
weapon for the job in the first place...

--
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
----- Original Message -----
From: "John Vanderbeck" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, February 18, 2001 8:55 AM
Subject: [PHP] Apache log analyzer


> Hello,
>
> Does anyone know where I might find a good PHP script for analyzing apache
> logs, with as much information as can be gathered?
>
> I looked around on a few of the script sites, but didn't see any and I
> thought this wierd.
>
> - John Vanderbeck
> - Admin, GameDesign
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





>  echo "Or click <a href='http://mysite/b.php'>here</a> to input the
details
> of your product.";

echo "Or click <a href='http://mysite/b.php?product_id=$product_id'>here</a>
to input the details of your product.";

This assumes you are using $product_id for your product ID in the current
page and in b.php...

>
> I've made a blank (uncoded) page of "b.php" and one of the field is
product
> name.
> If i want the "b.php" page being opened up with the product name already
> filled with the value entered by user in "a.php", what should i do to
> achieve it?
>
> Please help!!
> Thanks
>
> Edith Lai
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





> Some questions about how to get a whole bunch of fields in a form as
> input to another page, i.e. *.cgi, or*.phpx:
>
> 1/ All fields, buttons, etc have to have different names?

Mostly, although it's common to:
A) Name several "submit" buttons the same, say $action, and the use the
value of $action (the text from the button) to decide what to do in your
script
B) Name multiple checkboxes as NAME=foo[] and then you have an array $foo in
your processing script
C) Name all radio buttons in a single group the same, since that's pretty
much the only way to get them to be radio buttons.

>         2/ Using 'selected' on pulldowns automatically returns that
> value
> unless selected?

Yes.

> 3/ The WHOLE PAGE is included in one form?
>                         -OR-
>    Multiple forms are used on one page, and submit button returns
> All forms?

A single SUBMIT button can only return one (1) form.
A single form might have multiple SUBMIT buttons.
A single page might have multiple FORMs.
Depends on how you want to design your pages and what makes it easiest for
you to navigate and write organized PHP code.

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






> okay, i swear, this *must* be a FAQ. :-) I looked on php.net's FAQ and
> php.faqts.com, but couldn't find it.

Ah, but did you check the Mailing List archives?

Though, I must admit, figuring out what to use for a search term is kinda
tough for this one...

> How do I use slashes to delimit query string (url) paramters?
>
> i.e., I want
>    http://foo.com/name/paul
> instead of
>    http://foo.com/?name=paul

Use mod_rewrite

There's an article on phpbuilder.com (?) about it.  A 'Net search of "PHP
and Rewrite" should turn it up.

The Apache docs by Ralf Engelshall (sp?) are *excellent*, especially the
samples.

[Actually, his docs on SSL are also most excellent as well :-)]

*TIP*:
You *WANT* to use RewriteLogLevel 9 and RewriteLog
/some/path/you/can/find/rewrite.log, and you *WANT* to use tail -f on that
sucker while you are figuring out what the heck these rewrite rules are
doing.  Any other attempts at analysis will leave you with a headache.
Promise.

I repeat:  LOOK AT THE LOG FILE FOR REWRITE.  IT TELLS YOU WHAT'S GOING ON.
IN DETAIL.

*TIP*:
There's some stuff in those docs about being in "directory" (.htaccess) and
"non-directory" status.  I found those particular statements rather...
obtuse. :-)  Translation:  Sometimes you need %{DOCUMENT_ROOT} in your
RewriteCond and/or RewriteRule, and sometimes you don't.  It depends on if
you are inside a <Directory> directive in httpd.conf (or in .htaccess file)
or if you are just hanging loose in the "top-level" of your httpd.conf file.
If your rules aren't firing (or fire too often), it's because you ain't got
that path right, almost for sure.  Apache/Rewrite is not going to "fill in"
the path for you.  Except when you're in a <Directory> section or .htaccess
where it is going to fill it in :-)

--
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've compiled PHP as CGI in /usr/local/php/ . Does anyone know what I
can write in >httpd.conf file?
>
>Tanks

I think it's:

AddType application/x-httpd-php .php
Action application/x-httpd-php /usr/local/php

A) I'm not sure you need the "." on ".php"
B) You can add more extensions: ...x-httpd-php .php .php3 .htm .html .phtml
C) Is there a php binary in a php directory? You'd want: /usr/local/php/php
   [Or did you just type that trailing / 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







>
> AddType application/x-httpd-php .php
> Action application/x-httpd-php /usr/local/php
>
> A) I'm not sure you need the "." on ".php"
> 

i've tried both with and without the '.' , but the server always responds :

---
Not Found

The requested URL /usr/bin/php4/test.php was not found on this server.

Apache/1.3.3 Server at www.website.com Port 80

---

the installed CGI is php 4.0.3pl1,
it runs fine from the command line.

any ideas?

thanks,
Hrishi




Has Apache been configured to not provide those variables?...

-- 
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
----- Original Message ----- 
From: Todd Cary <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, February 18, 2001 3:51 PM
Subject: [PHP] Apache and $HTTP_*_VARS


> I use
> 
> $myvar = $HTTP_GET_VARS[myvar];
> 
> This works with IIS running under Win 2K but it does not work with
> Apache running under Win 98.  I have
> 
> track_vars = On
> 
> Is there something else that I have missed?
> 
> I have
> 
> register_globals = Off
> 
> If I set it ON, the variable does get passed.
> 
> Todd
> 
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





> if ($search_in == "1"){
>    $query1 = "SELECT * FROM FISH where  ID LIKE '%$search_text%'
> OR name LIKE '%$search_text%' OR Category LIKE '%$search_text%' OR Color
> LIKE '%$search_text%' OR Size LIKE '%$search_text%'";
> }

Looks good the way it is for now.
Things you *could* do:

1) Break up your query like this:
$query1 = "select * from fish ";
$query1 .= " where id like '%$search_text%' ";
$query1 .= "    or name like '%$search_text%' ";
.
.
.

2) Calculate a "score" for your search:
$query1 = "select *, ";
$query1 .= " (   id like '%$search_text%' ";
$query1 .= "   + name like '%$search_text%' ";
$query1 .= "   + category like '%$search_text%' ";
.
.
.
$query1 .= " ) as score ";
$query1 .= " where score > 0 ";
$query1 .= " order by score desc ";

So, here, a record gets a "point" for each match, and we add all the
"points" up as a "score" and now you have not only all the matches, but you
have a "score" for each to say how *good* the match is.

You could even give more "weight" to the name field by using:

$query1 .= "    + 3*(name like '%$search_text%') ";

Here, a "match" in the name field is 3X as important as in the category
field.

You could also try to build an "advanced search" form where users would pick
which fields to search in.

--
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 people
My mail() script does not work, sniplet is simple that could not go wrong. I suspect 
there is something wrong with the php config on the server. Question is that how do I 
check it out if my assumption is correct? Is there any method that make php to write 
out something of the mail() does not work?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




mail() returns a true/false value to indicate success or failure.
Though I can never remember which means which, and the docs are not too
clear...

if (mail('[EMAIL PROTECTED]', 'test', 'test')){
    echo "mail returned true<BR>\n";
}
else{
    echo "mail returned false<BR>\n";
}

Also, there's some way of examining the mail queue for sendmail.  I have
absolutely no clue whatsoever how this is done, and man sendmail is entirely
too long and convoluted for me to try to find out. :-)  But you probably
have more patience and/or are smarter than me anyway.

If you're like 99.999% of the users that mess up, you left off the quotes in
php.ini:
sendmail_path = "/usr/local/bin/sendmail -t"

The quotes in the sample in php.ini were for real, not just for show.

--
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
----- Original Message -----
From: "Jacky" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Monday, February 19, 2001 2:15 AM
Subject: [PHP] mail() test method


Hi people
My mail() script does not work, sniplet is simple that could not go wrong. I
suspect there is something wrong with the php config on the server. Question
is that how do I check it out if my assumption is correct? Is there any
method that make php to write out something of the mail() does not work?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"






Dera folks,
I suspect there is something wrong at my php.ini mail setup. My script for mail() does 
not work and no error message, just did not send out anything. Is there anyway I can 
see if script mail() does not work and see what the problem is?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"





    While doing a test run on an idea I have, I tried running the
system() command on an audio application:

    <? system('amp -p song_one.mp3') ?>

    ...and found out that it works when I load the file up in a browser
- I get sound coming out from the physical web server's audio port.
Don't worry, this was the expected behavior, and also what I wanted to
happen.  However, as the manual page says, system() will hang till the
command is done running.

    I can hit the browser's Stop button, however the actual application
is still running - and won't stop till the file is done playing I assume
(or will it quit based on the webserver's time out value?)  I suppose I
can create a button on the same page that executes something like
system('killall -KILL amp'); and be done with it.  Haven't tried that
yet.

    But, if I'm still crazy tomorrow and plan on continuing with this
project, how should this be done properly?  Obviously, 'holding' the
browser while the program runs isn't the right way to do it.  And I need
a way to stop the audio somehow.

    The actual project looks something like this:

    The server has a few directories filled with mp3 files.  I'd like to
build a script that would dive into one of those directories (depending
on the user selection), and present a list of all the songs, with a
check box.  The user can then select the ones s/he would like to hear
and click a Play button and enjoy.  The amount of selections can be
anything, from one song, to all (should they want to sit there for 15
hours).

    However, when they click Play, I want the same page to be reloaded
again, with nothing selected, and their (previous) selection to start
playing in the background.  If they want to change their selection, they
can go ahead and pick other songs, and click Play again - THIS is where
the previous instance of the 'amp' program should be killed, and a new
one started, with the new play list queued.  And of course, it should
also have a Stop button on the page somewhere.

    A few notes on the amp program (for those that don't know it):  I
_CAN_ run several instances of it, and they will all output audio
simultaneously through the port (unlike Windows which will tell you the
audio device is busy).  So, if I start it once with song_one.mp3
playing, and a second time with song_two.mp3 playing, you will hear both
songs at the same time.  (for that matter, I can run some 6 or 7
instances of the thing before the CPU starts to hiccup).  It also
doesn't exit till the file is done playing (I believe all players do
this).

    I'm not asking for someone to actually build this for me, no.  But I
would be very grateful for some pointers, what can I do, and what I
should not do, and what to avoid all together.  It's something for my
household to use, so they can listen to music through a simple
interface, as opposed to having to log into the server and figuring out
how/what to do through the shell, or X-Win interface.

    Am I crazy?

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






hi,

is there a function to delete an item of an array

"1","7","14","33","99","A1","A12"

id like to delete the "33"


thank you

andreas






I hate to say it, but the only way I can see of doing this offhand is with
ecmascript & dhtml.... or does that Dynamic Data Binding (only works with
ie5, or 5.5?) do this sort of thing?

Either way, you're looking at unbounded fun catering for different browsers.

> -----Original Message-----
> From: Siim Einfeldt aka Itpunk [mailto:[EMAIL PROTECTED]]
> Sent: 17 February 2001 14:25
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [php_mysql] Creative solution with XML,PHP,MYSQL
>
>
> Hi everybody,
>
> I want to implement ordering something on a website without refreshing the
> page. Lets say i have four columns in the html table - name,age,skill and
> phone. All these are links - under these are the information, eg:
> Name Age Skill Phone
> Siim 23  php   051...
> Tony 18  html  132...
>
> Now, when i click on the name, it should order the listings by name, if I
> click on the age, I get the listing ordered by age and etc,etc. Generally
> it is easy to do it, but how to do it without refreshing the page every
> time I want to order by something else?
>
> It should be possible with XML; I get the data from mysql database with
> php, I write it into an array and ... now how could I make it function the
> way I just described? Could someone point me some already written code or
> explain me in detail how to do it?
>
>
> Thank you,
> Siim Einfeldt
>
> PS: Sorry about sending this message to so many lists, but I haven`t seen
> this kind of code anywhere, but at the same time I know it is possible.
>
>
> ------------------------ Yahoo! Groups Sponsor ---------------------~-~>
> eGroups is now Yahoo! Groups
> Click here for more details
> http://click.egroups.com/1/11231/1/_/19011/_/982419916/
> ---------------------------------------------------------------------_->
>
> the PHP_mySQL group is dedicated to learn more about the
> PHP_mySQL web database possibilities through group learning.
>
> http://www.1sdesign.com/web/books.shtml You can get books here.
>
>





ahh


> -----Original Message-----
> From: Brandon Feldhahn [mailto:[EMAIL PROTECTED]]
> Sent: 17 February 2001 11:45
> To: [EMAIL PROTECTED]
> Subject: hmm
> 
> 
> hmm
> 
> --
> GIF89aÔ<
> 
> 
> 




Hi,

I use PHP for more than 3 years now, and have found it very 
convienient and easey. The hardest way was to set it up, get it 
compiled and running.

I recently found out that there is a very easy way of using .so in 
Apache (apxs), and PHP can have extentions loaded dynamicly too.

I used to box everything into one binary, just for the 'performance' 
sake. This resulted in rather huge Apache binaries (1718372 bytes for 
Apache 1.3.14 with PHP 3.0.11, and 2211536 bytes for Apache 1.3.14 
with PHP 4.0.4)

These eat up a LOT of memory for each instance of http (and having 
+600 http deamons). I was wondering if it would be less memory 
intensive using apxs, knowing that every page gets parsed.

Would it be advisable to switch to apxs on busy servers, and will 
this use less RAM (rule: web server that swaps == web server that 
does no longer respond)?

I use a Solaris Sparc platform (some running take up to 9MB RAM).

Thanks

-- 
Thierry Coopman - [EMAIL PROTECTED]
My opinions are personal, and have really nothing or nothing to do 
with Keytrade!

Seriousness is the only refuge for the shallow.  --Oscar Wilde




Hi,
I am trying to send an email message using the mail() function. However when
I put new line breaks -> \n I get the following error
    Warning: Server Error in d:/wwwroot/admin/userdetails.php on line 12

But when I remove the newlines the function executes.
What should I do to be able to send HTML mail with <br> or alternative to \n
.

Thanks in advance,
Joe Njeru






I try to add user by using php.
ldap_add($ds, "cn=$username, c=$country, dc=graduate, dc=com" , $info);
because I want to receive data from my html page. it doesn't work when I try 
to add more than one variable. But when I try
ldap_add($ds, "cn=$username, dc=graduate, dc=com" , $info); or
ldap_add($ds, "cn=$username, c=US, dc=graduate, dc=com", $info);
it is work. Why? Do you have any solution for this problem
            thank you
            sayumporn
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





Hi,

I`m sure its possible but I can`t find any info on it, anyone know of any 
source or tutorials etc about directing email to a PHP script.

TIA
Ade





> -----Original Message-----
> From: Siim Einfeldt aka Itpunk [mailto:[EMAIL PROTECTED]]
> Sent: 17 February 2001 14:25
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] Creative solution with XML,PHP,MYSQL

Siim, Please dont cross post like this, I just got 4 copies of your email in
my inbox which I dont really want, 1 is enough. Be sensible and send it to
the correct mailing list rather than "Spaming" 7 groups.

James



Reply via email to