[PHP] members page

2001-02-19 Thread Brandon Feldhahn

im making a webdesign website that has a members login, do i have to
make a member page for each member or can i get the
info from the database of the person whom logged in and put it on the
members page


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




Re: [PHP] RE: [php_mysql] Creative solution with XML,PHP,MYSQL

2001-02-19 Thread Chris Carbaugh


Check out webfx.eae.net for a sample on how to do this.

It does require IE4+ or Mozilla.

Chris

On Mon, 19 Feb 2001, Tim Ward wrote:
> Date: Mon, 19 Feb 2001 13:47:00 -
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED], [EMAIL PROTECTED],
> [EMAIL PROTECTED], [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED], [EMAIL PROTECTED]
> From: Tim Ward <[EMAIL PROTECTED]>
> Subject: [PHP] RE: [php_mysql] Creative solution with XML,PHP,MYSQL
> 
> you can do it with javascript. assign all of the cell contents to a
> javascript 2-d array of strings (mytext[x][y]). create the table with
> a
>  in each cell. create a 2-d array of object pointers pointing to
> each
> div. you can then change the contents of each div at will (for
> example when
> a button is pressed). i.e. divobject[x][y].innerHTML =
> mytext[x][new_y]. I
> use this technique a lot for game writing in js.
> 
> the complication in your case is that some of the js (building the
> arrays
> and the table) needs to be built by the php. I've never tried this
> but it
> should work if you just echo it as you would html.
> 
>   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: Tom Knight [mailto:[EMAIL PROTECTED]]
> > Sent: 19 February 2001 08:53
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> > [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> > [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: [php_mysql] Creative solution with XML,PHP,MYSQL
> > 
> > 
> > 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.
> > >
> > >
> > 
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 

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




Re: [PHP] Two questions

2001-02-19 Thread Brian T. Allen

SELECT SUBSTRING(COL3,0,100) AS COL3 FROM TABLE

That will return the first 100 characters of your 10 pages of text...

If you want characters 200 through 299 do:
SELECT SUBSTRING(COL3,200,100) AS COL3 FROM TABLE

Untested, but I am 99.9% sure that will meet your needs.

Brian


>
>   hmm...I don`t need the stuff from different rows. I have 10pages of text
> in one in one rows one column, eg
> col1 col2 col3 here is 10pages
>
> S.
>
>
> > SELECT * FROM x LIMIT 1,10;
> >
> > Where  1 = Start record,
> >   10 = How many records...
> >
> > Nexts queries will be:
> >
> > SELECT * FROM x LIMIT 11,10;
> > and
> > SELECT * FROM x LIMIT 21,10;
> > etc...
> >
> >
> >  - Diogo Zulli
> >
> > --[ www.sphynx.com.br ]---
> > "Why Live on The Edge When You Can BASE Jump Off It"
> >
>
>
> --
> PHP General Mailing List (http://www.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] RE: [php_mysql] Creative solution with XML,PHP,MYSQL

2001-02-19 Thread Tim Ward

you can do it with javascript. assign all of the cell contents to a
javascript 2-d array of strings (mytext[x][y]). create the table with a
 in each cell. create a 2-d array of object pointers pointing to each
div. you can then change the contents of each div at will (for example when
a button is pressed). i.e. divobject[x][y].innerHTML = mytext[x][new_y]. I
use this technique a lot for game writing in js.

the complication in your case is that some of the js (building the arrays
and the table) needs to be built by the php. I've never tried this but it
should work if you just echo it as you would html.

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: Tom Knight [mailto:[EMAIL PROTECTED]]
> Sent: 19 February 2001 08:53
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [php_mysql] Creative solution with XML,PHP,MYSQL
> 
> 
> 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.
> >
> >
> 
> 

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




Re: [PHP] Is this potentially a problem?

2001-02-19 Thread Richard Lynch

> 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



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




Re: [PHP] form variables showing blank but query shows non-blank ??

2001-02-19 Thread Richard Lynch

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' ";



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




Re: [PHP] Javascript running on another page

2001-02-19 Thread Richard Lynch

>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



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




Re: [PHP] unable to jump to row 1 on MySQL result

2001-02-19 Thread Richard Lynch

> 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



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




Re: [PHP] Newbie: Fundamental question. Long.

2001-02-19 Thread Richard Lynch

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.


  ...>
 ...>
 ...>


--
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 " ";
> echo " ";
> echo "  ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
>
> ?>
>
> 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 " CELLSPACING=2 HEIGTH=80>";
> echo "IDName ALIGN=CENTER>Price";
> while(&record=ibase_fetch_row($tresc_query)) {
>  echo " $record[0] ";
> id_of_product
>  echo " $record[1] ";
> name_of_product
>  echo " $record[2] ";
> price_of_product
>
>
>
> //  echo " ";
> // echo " value='Add'>"; ?
>
> //echo "
?id_of_product=$record[0]&name_of_product=$wiersz[1]&price_of_product=$wiers
> z[2]&action='add'\">Add";??//
>
> ***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 "";
>}
>  }
> 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]
>


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




Re: [PHP] Measuring php on old and new server

2001-02-19 Thread Richard Lynch

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


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




Re: [PHP] pgp text formatting

2001-02-19 Thread Richard Lynch

> // 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 aux" 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



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




Re: [PHP] PHP Session question

2001-02-19 Thread Richard Lynch

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

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



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




Re: [PHP] Text box

2001-02-19 Thread Richard Lynch

What you put in between the  and the  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:



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  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:
>
> 
> This is line 1.
> This is line 2.
> 
>
> This will not:
>
> 
> This is line 1.
> This is line 2.
> 
>
> 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]
>


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




Re: [PHP] compare arrays problem

2001-02-19 Thread Richard Lynch

> $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.'';
> }

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 '
> 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 ''.$element.'';}
>
> 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]


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




Re: [PHP] Mail

2001-02-19 Thread Richard Lynch

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


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




Re: [PHP] Using Pipes / PGP

2001-02-19 Thread Richard Lynch



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


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




Re: [PHP] EOF (End of File) character..

2001-02-19 Thread Richard Lynch

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


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




Re: [PHP] dynamic pages/sessions/checkboxes

2001-02-19 Thread Richard Lynch

 Widget #42
 Doohicky #13

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


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




[PHP-CVS] cvs: php4 /ext/pgsql config.m4 php_pgsql.h

2001-02-19 Thread Sascha Schumann

sas Mon Feb 19 00:14:50 2001 EDT

  Modified files:  
/php4/ext/pgsql config.m4 php_pgsql.h 
  Log:
  Fix incompatibility with PostgreSQL CVS.
  
  We now perform a check whether we need to include  to
  succesfully compile.
  
  PR: #9328
  
  
Index: php4/ext/pgsql/config.m4
diff -u php4/ext/pgsql/config.m4:1.18 php4/ext/pgsql/config.m4:1.19
--- php4/ext/pgsql/config.m4:1.18   Sun Feb 18 23:49:16 2001
+++ php4/ext/pgsql/config.m4Mon Feb 19 00:14:45 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.18 2001/02/19 07:49:16 sas Exp $
+dnl $Id: config.m4,v 1.19 2001/02/19 08:14:45 sas Exp $
 
 AC_DEFUN(PGSQL_INC_CHK,[if test -r $i$1/libpq-fe.h; then PGSQL_DIR=$i; 
PGSQL_INCDIR=$i$1])
 
@@ -23,6 +23,25 @@
 
   PGSQL_INCLUDE="-I$PGSQL_INCDIR"
 
+  AC_CACHE_CHECK([whether PostgreSQL needs postgres.h], ac_cv_php_pgsql_postgres_h,[
+  old_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS $PGSQL_INCLUDE"
+  AC_TRY_COMPILE([
+#include 
+],[
+  Oid x = InvalidOid;
+],[
+  ac_cv_php_pgsql_postgres_h=no
+],[
+  ac_cv_php_pgsql_postgres_h=yes
+])
+  CPPFLAGS=$old_CPPFLAGS
+])
+  
+  if test "$ac_cv_php_pgsql_postgres_h" = "yes"; then
+AC_DEFINE(PHP_PGSQL_NEEDS_POSTGRES_H, 1, [whether pgsql needs postgres.h])
+  fi
+  
   PGSQL_LIBDIR=$PGSQL_DIR/lib
   test -d $PGSQL_DIR/lib/pgsql && PGSQL_LIBDIR=$PGSQL_DIR/lib/pgsql
 
Index: php4/ext/pgsql/php_pgsql.h
diff -u php4/ext/pgsql/php_pgsql.h:1.25 php4/ext/pgsql/php_pgsql.h:1.26
--- php4/ext/pgsql/php_pgsql.h:1.25 Tue Feb 13 10:28:24 2001
+++ php4/ext/pgsql/php_pgsql.h  Mon Feb 19 00:14:45 2001
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: php_pgsql.h,v 1.25 2001/02/13 18:28:24 thies Exp $ */
+/* $Id: php_pgsql.h,v 1.26 2001/02/19 08:14:45 sas Exp $ */
 
 #ifndef PHP_PGSQL_H
 #define PHP_PGSQL_H
@@ -29,7 +29,9 @@
 
 #ifdef PHP_PGSQL_PRIVATE
 #undef SOCKET_SIZE_TYPE
+#ifdef PHP_PGSQL_NEEDS_POSTGRES_H
 #include 
+#endif
 #include 
 
 #ifdef PHP_WIN32



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




Re: [PHP] Apache log analyzer

2001-02-19 Thread Richard Lynch

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


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




Re: [PHP] making form, getting variables from

2001-02-19 Thread Richard Lynch

> 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



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




Re: [PHP] Help!Opening another php file from a link of a completed form.

2001-02-19 Thread Richard Lynch

>  echo "Or click here to input the
details
> of your product.";

echo "Or click here
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]
>


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




Re: [PHP] using slash as delimiter

2001-02-19 Thread Richard Lynch

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



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




Re: [PHP] Apache and $HTTP_*_VARS

2001-02-19 Thread Richard Lynch

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


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




Re: [PHP] PHP as CGI

2001-02-19 Thread Richard Lynch

>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




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




Re: [PHP] PHP+MySQL SEARCH

2001-02-19 Thread Richard Lynch

> 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



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




Re: [PHP] add user to ldap using php

2001-02-19 Thread Richard Lynch

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

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



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

2001-02-19 Thread Jacky

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"



[PHP] something wrong at my mail set up in php.ini

2001-02-19 Thread [EMAIL PROTECTED]

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"



Re: [PHP] Variable stores incomplete values...

2001-02-19 Thread Richard Lynch

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



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




Re: [PHP] directory listing and how to determine file size

2001-02-19 Thread Richard Lynch

>   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



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




Re: [PHP] mail() test method

2001-02-19 Thread Richard Lynch

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\n";
}
else{
echo "mail returned false\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"



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

2001-02-19 Thread Ashley M. Kirchner


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



...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.  BP!
  |
  ~
  Ashley M. Kirchner    .   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.



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

2001-02-19 Thread andreas \(@work\)

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





[PHP] RE: [php_mysql] Creative solution with XML,PHP,MYSQL

2001-02-19 Thread Tom Knight

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


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




[PHP] RE: hmm

2001-02-19 Thread Tim Ward

ahh


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

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




[PHP] RE: array - too stupid

2001-02-19 Thread Tim Ward

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

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




[PHP] RE: compare arrays problem

2001-02-19 Thread Tim Ward

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.'';
> }
> 
> /* 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 ' 
> 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 ''.$element.'';} 
>  
> //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
 

-- 
PHP General Mailing List (http://www.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] Apache & PHP (slighly OT)

2001-02-19 Thread Thierry Coopman

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

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




[PHP-CVS] cvs: php4 /sapi/thttpd thttpd.c

2001-02-19 Thread Sascha Schumann

sas Mon Feb 19 02:28:08 2001 EDT

  Modified files:  
/php4/sapi/thttpd   thttpd.c 
  Log:
  Include .  Apparently, the header cleanup in glibc 2.2.2
  caused that file to be included by accident.
  
  
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.34 php4/sapi/thttpd/thttpd.c:1.35
--- php4/sapi/thttpd/thttpd.c:1.34  Sun Feb 18 11:03:36 2001
+++ php4/sapi/thttpd/thttpd.c   Mon Feb 19 02:28:08 2001
@@ -24,6 +24,8 @@
 #include "php_variables.h"
 #include "version.h"
 
+#include 
+
 typedef struct {
httpd_conn *hc;
int post_off;



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




[PHP] Mail function

2001-02-19 Thread Joe Njeru

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  or alternative to \n
.

Thanks in advance,
Joe Njeru



-- 
PHP General Mailing List (http://www.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] ldapadd in php not allow more than one variable

2001-02-19 Thread Sayumporn Darunwanna

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.


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




Re: [PHP] PHP as CGI

2001-02-19 Thread Hrishi

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

-- 
PHP General Mailing List (http://www.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] Directing Email to a script

2001-02-19 Thread Website4S

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

-- 
PHP General Mailing List (http://www.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 Digest 19 Feb 2001 11:51:06 -0000 Issue 521

2001-02-19 Thread php-general-digest-help


php-general Digest 19 Feb 2001 11:51:06 - 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 expressiondifficult 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 p

[PHP] Problems with error handling.

2001-02-19 Thread Securez

When I change the error handler, i set the error_reporting to:

error_reporting ( E_ALL ^ E_NOTICE);

but when i call a is_file function that return false a E_NOTICE error is
generated and my error handle trap it.

I know that error_reporting works, becouse if i set it to 0, the parse
errors aren't printed, but E_NOTICE stat failed appears when a is_file,
is_dir function return false.

Can anybody help me on this




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

2001-02-19 Thread Montgomery-Recht, Evan

Good morning...

This should be a good monday morning question.

I have a cgi-bin written in perl (it's actually, a interface to a
perl-module which is a interface to a telnet-like protocol).

Anyways what I need to do is I have already existing code written in PHP,
but at some point I need to call this cgi-bin and get a return code from it
and process (good/bad result) and return to completed php script that says
it called this cgi-bin.  It's not very clear how to set the HTTP_POST_VARS
for sending to a post command (which doesn't seem to exist);

Any ideas I don't see a function called:

$HTTP_POST_VARS =set variables;
$result = http_post("http://localhost/cgi-bin/script.pl");

Thanks,

evan

PS.  I'd appricate a working example, even if it's a dummy version.

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




RE: [PHP] Creative solution with XML,PHP,MYSQL

2001-02-19 Thread James Moore


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


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




[PHP-CVS] cvs: php4 /pear/DB common.php ibase.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php /pear/DB/tests transactions.inc /pear/DB/tests/pgsql 011.phpt

2001-02-19 Thread Stig Bakken

ssb Mon Feb 19 04:22:31 2001 EDT

  Added files: 
/php4/pear/DB/tests transactions.inc 
/php4/pear/DB/tests/pgsql   011.phpt 

  Modified files:  
/php4/pear/DB   common.php ibase.php msql.php mssql.php mysql.php 
oci8.php odbc.php pgsql.php sybase.php 
  Log:
  @Fixed pgsql transaction support (Stig, PEAR/DB)
  also added "dsn" property in all backends
  
  
  

Index: php4/pear/DB/common.php
diff -u php4/pear/DB/common.php:1.37 php4/pear/DB/common.php:1.38
--- php4/pear/DB/common.php:1.37Sun Feb 18 08:23:03 2001
+++ php4/pear/DB/common.php Mon Feb 19 04:22:25 2001
@@ -44,6 +44,7 @@
 'persistent' => false,   // persistent connection?
 'optimize' => 'performance', // 'performance' or 'portability'
 );
+var $dbh;
 
 // }}}
 // {{{ toString()
Index: php4/pear/DB/ibase.php
diff -u php4/pear/DB/ibase.php:1.16 php4/pear/DB/ibase.php:1.17
--- php4/pear/DB/ibase.php:1.16 Fri Feb 16 09:14:39 2001
+++ php4/pear/DB/ibase.php  Mon Feb 19 04:22:26 2001
@@ -16,7 +16,7 @@
 // | Authors: Sterling Hughes <[EMAIL PROTECTED]>  |
 // +--+
 //
-// $Id: ibase.php,v 1.16 2001/02/16 17:14:39 chagenbu Exp $
+// $Id: ibase.php,v 1.17 2001/02/19 12:22:26 ssb Exp $
 //
 // Database independent query interface definition for PHP's Interbase
 // extension.
@@ -53,6 +53,7 @@
if (!$dsninfo || !$dsninfo['phptype']) {
return $this->raiseError("invalid data source name"); 
}
+$this->dsn = $dsninfo;
$user = $dsninfo['username'];
$pw = $dsninfo['password'];
$dbhost = $dsninfo['hostspec'] ? 
Index: php4/pear/DB/msql.php
diff -u php4/pear/DB/msql.php:1.15 php4/pear/DB/msql.php:1.16
--- php4/pear/DB/msql.php:1.15  Fri Feb 16 09:14:39 2001
+++ php4/pear/DB/msql.php   Mon Feb 19 04:22:26 2001
@@ -16,7 +16,7 @@
 // | Authors: Sterling Hughes <[EMAIL PROTECTED]>  |
 // +--+
 //
-// $Id: msql.php,v 1.15 2001/02/16 17:14:39 chagenbu Exp $
+// $Id: msql.php,v 1.16 2001/02/19 12:22:26 ssb Exp $
 //
 // Database independent query interface definition for PHP's Mini-SQL
 // extension.
@@ -53,7 +53,7 @@
 if (!$dsninfo || !$dsninfo['phptype']) {
 return $this->raiseError(); 
 }
-
+$this->dsn = $dsninfo;
 $user = $dsninfo['username'];
 $pw = $dsninfo['password'];
 $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost';
Index: php4/pear/DB/mssql.php
diff -u php4/pear/DB/mssql.php:1.18 php4/pear/DB/mssql.php:1.19
--- php4/pear/DB/mssql.php:1.18 Fri Feb 16 09:14:39 2001
+++ php4/pear/DB/mssql.php  Mon Feb 19 04:22:26 2001
@@ -16,7 +16,7 @@
 // | Authors: Sterling Hughes <[EMAIL PROTECTED]>  |
 // +--+
 //
-// $Id: mssql.php,v 1.18 2001/02/16 17:14:39 chagenbu Exp $
+// $Id: mssql.php,v 1.19 2001/02/19 12:22:26 ssb Exp $
 //
 // Database independent query interface definition for PHP's Microsoft SQL Server
 // extension.
@@ -53,7 +53,7 @@
 if (!$dsninfo || !$dsninfo['phptype']) {
 return $this->raiseError(mssql_get_last_message()); 
 }
-
+$this->dsn = $dsninfo;
 $user = $dsninfo['username'];
 $pw = $dsninfo['password'];
 $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost';
Index: php4/pear/DB/mysql.php
diff -u php4/pear/DB/mysql.php:1.48 php4/pear/DB/mysql.php:1.49
--- php4/pear/DB/mysql.php:1.48 Sat Feb 17 08:45:01 2001
+++ php4/pear/DB/mysql.php  Mon Feb 19 04:22:26 2001
@@ -102,6 +102,8 @@
 return $this->raiseError(); // XXX ERRORMSG
 }

+$this->dsn = $dsninfo;
+
 $dbhost = $dsninfo["hostspec"] ? $dsninfo["hostspec"] : "localhost";
 $user = $dsninfo["username"];
 $pw = $dsninfo["password"];
Index: php4/pear/DB/oci8.php
diff -u php4/pear/DB/oci8.php:1.18 php4/pear/DB/oci8.php:1.19
--- php4/pear/DB/oci8.php:1.18  Sun Feb 18 08:24:00 2001
+++ php4/pear/DB/oci8.php   Mon Feb 19 04:22:26 2001
@@ -79,6 +79,7 @@
if (!$dsninfo || !$dsninfo['phptype']) {
return $this->raiseError();
}
+$this->dsn = $dsninfo;
$user = $dsninfo['username'];
$pw = $dsninfo['password'];
$hostspec = $dsninfo['hostspec'];
Index: php4/pear/DB/odbc.php
diff -u php4/pear/DB/odbc.php:1.27 php4/pear/DB/odbc.php:1.28
--- php4/pear/DB/odbc.php:1.27  Sun Feb 18 16:14:27 2001
+++ php4/pear/DB/odbc.php   Mon Feb 19 04:22:26 2001
@@ -97,6 +97,7 @@
if (!$dsninfo || !$dsninfo['phptype']) {
return $this->raiseError(); //

[PHP] Excel not opened in browser when changing header

2001-02-19 Thread Tim

Hi
I tried using the code below to send the output to an Excel sheet in my
browser by changing the header to "Content-type: application/vnd.ms-excel".
However I only see normal text in a browser. Excel is not launched. What is
wrong??



--
";
   echo "";
   echo "F1F2";
   echo "HiHi";
   echo "";
   echo "";
?>
--

Thanks
Tim



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




Re: [PHP] something wrong at my mail set up in php.ini

2001-02-19 Thread Hrishi


> Is there anyway I can see if script mail() does not work and see what the
> problem is? Jack

Hey Jack,

take this line and put it before the part of the code that sends the mail:



this turns on ALL error reporting, so make sure yuo use it only for debugging.
also, if you dont see any warnings despite the above line, you can be sure 
its a configuration problem.

cheers,
Hrishi

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




Re: [PHP] EOF (End of File) character..

2001-02-19 Thread David Bouw

Thanks for the different characters to try..

I try tomorrow to see if I can try it on the program which needs it...
Indeed the trick of reading the file and echoing all the different chars
used should do the trick..

I will first try the underlying two chars to see if they do the trick...

Thanks..
Bye Bye
David


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


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




RE: [PHP] HTTP POST Question

2001-02-19 Thread MList


Hi

I read a article about posting data .. and there was a script but I dont
know resource of this script. But this is working. let me give you a example



-Original Message-
From: Montgomery-Recht, Evan [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 19, 2001 2:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP POST Question


Good morning...

This should be a good monday morning question.

I have a cgi-bin written in perl (it's actually, a interface to a
perl-module which is a interface to a telnet-like protocol).

Anyways what I need to do is I have already existing code written in PHP,
but at some point I need to call this cgi-bin and get a return code from it
and process (good/bad result) and return to completed php script that says
it called this cgi-bin.  It's not very clear how to set the HTTP_POST_VARS
for sending to a post command (which doesn't seem to exist);

Any ideas I don't see a function called:

$HTTP_POST_VARS =set variables;
$result = http_post("http://localhost/cgi-bin/script.pl");

Thanks,

evan

PS.  I'd appricate a working example, even if it's a dummy version.

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


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




RE: [PHP] HTTP POST Question

2001-02-19 Thread Montgomery-Recht, Evan

I see the basic's... but...  It's not completely clear from what I'm seeing.

1. It appears if I use the header function I have to redirect the page to
another page, it doesn't appear possible to retrieve a page into the current
page?  Unless someone can show me some code that would do that.

2. it's not clear how you would actually set the HTTP_POST_VARS's and when
you use the header("Request-URI:"); if that uses the HTTP_POST_VARS?

as of right now it looks like the code would go as follows:

http://localhost/cgi-bin/script.pl");
?>

Is that all that has to be done?

thanks,

evan


> -Original Message-
> From: Milan Mlynarcik [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 7:33 AM
> To:   Montgomery-Recht, Evan
> Subject:  Re: [PHP] HTTP POST Question
> 
> You have to use header() function and how POST work you can find in HTTP
> RFC
> at http://www.w3.org/Protocols/rfc2616/rfc2616.html
> -
> Milan Mlynarcik
> Web Programmer
> Charmed Technology Slovakia
> Nam. sv. Egidia 16/37
> 058 01 Poprad, Slovakia
> E-mail: [EMAIL PROTECTED]
> Office: 00421 92 7881 874
> Mobile: 00421 905 964 535
> Web page: http://www.charmed.com/
> -
> - Original Message -
> From: "Montgomery-Recht, Evan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 1:06 PM
> Subject: [PHP] HTTP POST Question
> 
> 
> > Good morning...
> >
> > This should be a good monday morning question.
> >
> > I have a cgi-bin written in perl (it's actually, a interface to a
> > perl-module which is a interface to a telnet-like protocol).
> >
> > Anyways what I need to do is I have already existing code written in
> PHP,
> > but at some point I need to call this cgi-bin and get a return code from
> it
> > and process (good/bad result) and return to completed php script that
> says
> > it called this cgi-bin.  It's not very clear how to set the
> HTTP_POST_VARS
> > for sending to a post command (which doesn't seem to exist);
> >
> > Any ideas I don't see a function called:
> >
> > $HTTP_POST_VARS =set variables;
> > $result = http_post("http://localhost/cgi-bin/script.pl");
> >
> > Thanks,
> >
> > evan
> >
> > PS.  I'd appricate a working example, even if it's a dummy version.
> >
> > --
> > PHP General Mailing List (http://www.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] Zend debugger running across virtual servers

2001-02-19 Thread Neil Kimber

I've got the Zend IDE and debugger up and running. But, the debugger isn't
picking up my 'Local Value' for the include path. It only seems to have the
'Master Value'.

Has anyone else experienced this? And more importantly, how do I get around
this problem.


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

2001-02-19 Thread Adrian Murphy

i'm sorry,i just had to share this with people who'd understand.
we've just secured clients who are m$ affiliated and they insist
everthing be done with asp.
excuse me while i go off for a little cry.


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




Re: [PHP] add user to ldap using php

2001-02-19 Thread Sayumporn Darunwanna

I can bind to ldap server successful but ldap add operation couldn't 
complete.


>From: "Richard Lynch" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Re: [PHP] add user to ldap using php
>Date: Mon, 19 Feb 2001 02:13:16 -0600
>
> > $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. 
>
>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
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

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


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




Re: [PHP] woe is me

2001-02-19 Thread Kath

Think of it this way:
Now you'll know both ASP and PHP for your next clients and can charge them
more because of your increased talents  :)

- Kath

- Original Message -
From: "Adrian Murphy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 7:21 AM
Subject: [PHP] woe is me


> i'm sorry,i just had to share this with people who'd understand.
> we've just secured clients who are m$ affiliated and they insist
> everthing be done with asp.
> excuse me while i go off for a little cry.
>
>
> --
> PHP General Mailing List (http://www.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] what's the difference between include and require??

2001-02-19 Thread Zenith

Though I have read the manual about these two things, include() and
require(), but I still not very clear about the difference between these??





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




[PHP] How can I use session variable in a function?

2001-02-19 Thread Zenith

In main.php,
then I use include("xxx.php"), in which, there is a function called temp();
If I use session_start() at the beginging of main.php, after include
statment,
and I cal the temp(), will the temp() function can get the session variable
I have?
Or I need to import it by using "global" in the function def.?



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




[PHP-CVS] cvs: php4 /ext/zziplib php_zziplib.h zziplib.c

2001-02-19 Thread Hartmut Holzgraefe

hholzgraMon Feb 19 05:30:25 2001 EDT

  Modified files:  
/php4/ext/zziplib   php_zziplib.h zziplib.c 
  Log:
  # no dos line endings please
  
  

Index: php4/ext/zziplib/php_zziplib.h
diff -u php4/ext/zziplib/php_zziplib.h:1.2 php4/ext/zziplib/php_zziplib.h:1.3
--- php4/ext/zziplib/php_zziplib.h:1.2  Thu Jan 11 01:23:34 2001
+++ php4/ext/zziplib/php_zziplib.h  Mon Feb 19 05:30:25 2001
@@ -19,8 +19,8 @@
 #ifndef PHP_ZZIPLIB_H
 #define PHP_ZZIPLIB_H
 
-#if HAVE_ZZIPLIB
-
+#if HAVE_ZZIPLIB
+
 #include 
 
 extern zend_module_entry zziplib_module_entry;
@@ -33,23 +33,23 @@
 #endif
 
 PHP_MINIT_FUNCTION(zziplib);
-PHP_MINFO_FUNCTION(zziplib);
-
-PHP_FUNCTION(zzip_opendir);
-PHP_FUNCTION(zzip_readdir);
-PHP_FUNCTION(zzip_closedir);
-PHP_FUNCTION(zzip_entry_name);
-PHP_FUNCTION(zzip_entry_compressedsize);
-PHP_FUNCTION(zzip_entry_filesize);
-PHP_FUNCTION(zzip_entry_compressionmethod);
-PHP_FUNCTION(zzip_open);
-PHP_FUNCTION(zzip_read);
+PHP_MINFO_FUNCTION(zziplib);
+
+PHP_FUNCTION(zzip_opendir);
+PHP_FUNCTION(zzip_readdir);
+PHP_FUNCTION(zzip_closedir);
+PHP_FUNCTION(zzip_entry_name);
+PHP_FUNCTION(zzip_entry_compressedsize);
+PHP_FUNCTION(zzip_entry_filesize);
+PHP_FUNCTION(zzip_entry_compressionmethod);
+PHP_FUNCTION(zzip_open);
+PHP_FUNCTION(zzip_read);
 PHP_FUNCTION(zzip_close);
-
-typedef struct {
-   ZZIP_FILE *fp;
-   ZZIP_DIRENT dirent;
-} php_zzip_dirent;
+
+typedef struct {
+   ZZIP_FILE *fp;
+   ZZIP_DIRENT dirent;
+} php_zzip_dirent;
 
 #else
 #define phpext_zziplib_ptr NULL
Index: php4/ext/zziplib/zziplib.c
diff -u php4/ext/zziplib/zziplib.c:1.2 php4/ext/zziplib/zziplib.c:1.3
--- php4/ext/zziplib/zziplib.c:1.2  Thu Jan 11 01:23:34 2001
+++ php4/ext/zziplib/zziplib.c  Mon Feb 19 05:30:25 2001
@@ -21,26 +21,26 @@
 #include "php_zziplib.h"
 
 #if HAVE_ZZIPLIB
-
-#include 
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
 
-static int le_zzip_dir;
+#include 
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+static int le_zzip_dir;
 static int le_zzip_entry;
 
-function_entry zziplib_functions[] = {
-   PHP_FE(zzip_opendir, NULL)
-   PHP_FE(zzip_readdir, NULL)
-   PHP_FE(zzip_closedir,NULL)
-   PHP_FE(zzip_entry_name,  NULL)
-   PHP_FE(zzip_entry_compressedsize,NULL)
-   PHP_FE(zzip_entry_filesize,  NULL)
-   PHP_FE(zzip_entry_compressionmethod, NULL)
-   PHP_FE(zzip_open,NULL)
-   PHP_FE(zzip_read,NULL)
+function_entry zziplib_functions[] = {
+   PHP_FE(zzip_opendir, NULL)
+   PHP_FE(zzip_readdir, NULL)
+   PHP_FE(zzip_closedir,NULL)
+   PHP_FE(zzip_entry_name,  NULL)
+   PHP_FE(zzip_entry_compressedsize,NULL)
+   PHP_FE(zzip_entry_filesize,  NULL)
+   PHP_FE(zzip_entry_compressionmethod, NULL)
+   PHP_FE(zzip_open,NULL)
+   PHP_FE(zzip_read,NULL)
PHP_FE(zzip_close,   NULL)
{NULL, NULL, NULL}
 };
@@ -59,30 +59,30 @@
 #ifdef COMPILE_DL_ZZIPLIB
 ZEND_GET_MODULE(zziplib)
 #endif
-
-static void php_zziplib_free_dir(zend_rsrc_list_entry *rsrc)
-{
-   ZZIP_DIR *z_dir = (ZZIP_DIR *) rsrc->ptr;
-   zzip_closedir(z_dir);
-}
-
-static void php_zziplib_free_entry(zend_rsrc_list_entry *rsrc)
-{
-   php_zzip_dirent *entry = (php_zzip_dirent *) rsrc->ptr;
-
-   if (entry->fp) {
-   zzip_close(entry->fp);
-   }
-
-   efree(entry);
+
+static void php_zziplib_free_dir(zend_rsrc_list_entry *rsrc)
+{
+   ZZIP_DIR *z_dir = (ZZIP_DIR *) rsrc->ptr;
+   zzip_closedir(z_dir);
+}
+
+static void php_zziplib_free_entry(zend_rsrc_list_entry *rsrc)
+{
+   php_zzip_dirent *entry = (php_zzip_dirent *) rsrc->ptr;
+
+   if (entry->fp) {
+   zzip_close(entry->fp);
+   }
+
+   efree(entry);
 }
 
 PHP_MINIT_FUNCTION(zziplib)
-{
-   le_zzip_dir   = zend_register_list_destructors_ex(php_zziplib_free_dir, NULL, 
"ZZIP Directory", module_number);
-   le_zzip_entry = zend_register_list_destructors_ex(php_zziplib_free_entry, 
NULL, "ZZIP Entry", module_number);
-
-   return(SUCCESS);
+{
+   le_zzip_dir   = zend_register_list_destructors_ex(php_zziplib_free_dir, NULL, 
+"ZZIP Directory", module_number);
+   le_zzip_entry = zend_register_list_destructors_ex(php_zziplib_free_entry, 
+NULL, "ZZIP Entry", module_number);
+
+   return(SUCCESS);
 }
 
 PHP_MINFO_FUNCTION(zziplib)
@@ -90,213 +90,213 @@
php_info_print_table_start();
php_info_print_table_header(2, "zziplib support", "enabled");
php_info_print_table_end();
+
+}
+
+/* {{{ proto resource zzip_opendir(string filename)
+   Open a new zzip archive for reading */
+PHP_FUNCTION(zzip_opendir)
+{
+   zval **filename;
+   ZZIP_DIR *archive_p = NULL;
+
+   if (ZEND_NUM_ARGS() != 1 ||
+

Re: [PHP] Variable stores incomplete values...

2001-02-19 Thread Joe Sheble (Wizaerd)


Your question encompasses two parts...  the subject says these variables 
are storing incomplete values and later in the email you state mySQL isn't 
maintaining the formatting of your data.

The first part is possible because your mySQL database field may not be 
declared big enough to actually hold the data.  AFAIK there is no limit on 
actual variable size, as long as the server has enough memory, it should be 
fine.

Your second question about formatting... well the answer is the formatting 
is most likely in the database, but when you retrieve it and siaplay it 
ina  browser, well the browser doesn't understand anything other than 
HTML.  So carriage returns, line feeds, tabs, etc... never get 
displayed.  If you want the formatting to be kept in the browser, convert 
the data.  A good starting place is nl2br()

At 02:22 AM 2/19/01 -0600, Richard Lynch wrote:
> > $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
>
>
>
>--
>PHP General Mailing List (http://www.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] Fax manipulation?

2001-02-19 Thread Joshua Long

Hello all...

Is there anyway at all for a PHP script to somehow interact with a fax?
dynamically generated pdfs... dynamically generated images... dynamically
generated... faxes? I mean i don't even know how it would begin to work but
is there a way to send a fax maybe as it does e-mail?

Thanks in advance, Josh


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




RE: [PHP] Fax manipulation?

2001-02-19 Thread Brian V Bonini

There are actually many ways to send an email to a fax
gateway. So, you could generate an email, send it to a
FAX gateway, ... and presto!

-Brian
*

> -Original Message-
> From: Joshua Long [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 9:26 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Fax manipulation?
> 
> 
> Hello all...
> 
> Is there anyway at all for a PHP script to somehow interact with a fax?
> dynamically generated pdfs... dynamically generated images... dynamically
> generated... faxes? I mean i don't even know how it would begin 
> to work but
> is there a way to send a fax maybe as it does e-mail?
> 
> Thanks in advance, Josh
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

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




RE: [PHP] HTTP POST Question

2001-02-19 Thread Montgomery-Recht, Evan

OK, any idea's on a good tutorial on how to create the socket to do a
HTTP_POST?

thanks,

evan

PS. My girlfriend always complains when I send back one line e-mail's.  Now
I understand why.

> -Original Message-
> From: Milan Mlynarcik [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 9:06 AM
> To:   Montgomery-Recht, Evan
> Subject:  Re: [PHP] HTTP POST Question
> 
> You can do it with socket functions.
> -
> Milan Mlynarcik
> Web Programmer
> Charmed Technology Slovakia
> Nam. sv. Egidia 16/37
> 058 01 Poprad, Slovakia
> E-mail: [EMAIL PROTECTED]
> Office: 00421 92 7881 874
> Mobile: 00421 905 964 535
> Web page: http://www.charmed.com/
> -
> - Original Message -
> From: "Montgomery-Recht, Evan" <[EMAIL PROTECTED]>
> To: "'Milan Mlynarcik'" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 2:06 PM
> Subject: RE: [PHP] HTTP POST Question
> 
> 
> > I see the basic's... but...  It's not completely clear from what I'm
> seeing.
> >
> > 1. It appears if I use the header function I have to redirect the page
> to
> > another page, it doesn't appear possible to retrieve a page into the
> current
> > page?  Unless someone can show me some code that would do that.
> >
> > 2. it's not clear how you would actually set the HTTP_POST_VARS's and
> when
> > you use the header("Request-URI:"); if that uses the HTTP_POST_VARS?
> >
> > as of right now it looks like the code would go as follows:
> >
> >  > $HTTP_POST_VARS (not sure how to set these
> > Something like this $HTTP_POST_VARS['uid']="userid"; )
> > header("Request-URI: http://localhost/cgi-bin/script.pl");
> > ?>
> >
> > Is that all that has to be done?
> >
> > thanks,
> >
> > evan
> >
> >
> > > -Original Message-
> > > From: Milan Mlynarcik [SMTP:[EMAIL PROTECTED]]
> > > Sent: Monday, February 19, 2001 7:33 AM
> > > To: Montgomery-Recht, Evan
> > > Subject: Re: [PHP] HTTP POST Question
> > >
> > > You have to use header() function and how POST work you can find in
> HTTP
> > > RFC
> > > at http://www.w3.org/Protocols/rfc2616/rfc2616.html
> > > -
> > > Milan Mlynarcik
> > > Web Programmer
> > > Charmed Technology Slovakia
> > > Nam. sv. Egidia 16/37
> > > 058 01 Poprad, Slovakia
> > > E-mail: [EMAIL PROTECTED]
> > > Office: 00421 92 7881 874
> > > Mobile: 00421 905 964 535
> > > Web page: http://www.charmed.com/
> > > -
> > > - Original Message -
> > > From: "Montgomery-Recht, Evan" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, February 19, 2001 1:06 PM
> > > Subject: [PHP] HTTP POST Question
> > >
> > >
> > > > Good morning...
> > > >
> > > > This should be a good monday morning question.
> > > >
> > > > I have a cgi-bin written in perl (it's actually, a interface to a
> > > > perl-module which is a interface to a telnet-like protocol).
> > > >
> > > > Anyways what I need to do is I have already existing code written in
> > > PHP,
> > > > but at some point I need to call this cgi-bin and get a return code
> from
> > > it
> > > > and process (good/bad result) and return to completed php script
> that
> > > says
> > > > it called this cgi-bin.  It's not very clear how to set the
> > > HTTP_POST_VARS
> > > > for sending to a post command (which doesn't seem to exist);
> > > >
> > > > Any ideas I don't see a function called:
> > > >
> > > > $HTTP_POST_VARS =set variables;
> > > > $result = http_post("http://localhost/cgi-bin/script.pl");
> > > >
> > > > Thanks,
> > > >
> > > > evan
> > > >
> > > > PS.  I'd appricate a working example, even if it's a dummy version.
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.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] Check Client BPS

2001-02-19 Thread Martin Marconcini

Hello,

I've seen on www.dentrek.com that their 'wizard' checks connection
speed by indicating you have a throughput of x bps.

It seems to be ASP made since there is a wizard.asp.

I'm interested in doing this in PHP. Anyone knows something about
this?

Thanks in advance,

Martin Marconcini.



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




Re: [PHP] Pay for help

2001-02-19 Thread Robert V. Zwink

Richard Bradley,

Posting to PHP general mailing list asking for help has never been a problem
in the past.  Mr Yahav should have mentioned that he is the owner operator
of weberdev.com, and that he has financial interest in contract positions
posted on his site.

If there was a mistake in net-etiquette, it was not your mistake Richard,
but Mr. Yahav's.  He should have clearly stated that his email, to you and
to the list, was an advertisement for his site.

Best of luck trying to find help with installation.  I have forwarded your
request to a friend of mine that might be able to help.  If you don't have
luck getting help, please repost and I'm sure someone will be happy to give
assistance.

Robert Zwink
http://zwink.levitate.org


- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subject:  Re: [PHP] Pay for help
From: rbradley <[EMAIL PROTECTED]>
Date: 2001-02-13 18:33:44

Thankyou Boaz, I'm sorry, I just needed help. I didn't care if I had to
pay or got free assistance.  I also realize that paying for Open Source
software help may not be etiquette either. Please forgive me I'll post
this in the places

Boaz Yahav wrote:
>
> Hi
>
> A good place to put this would be either in the projects area
> of weberdev
(http://www.weberdev.com/index.php3?GoTo=jobmatching/about.php3)
>
> or the jobs area (http://www.weberjob.com).
>
> Sincerely
>
>   berber
>
> Visit http://www.weberdev.com Today!!!
> To see where PHP might take you tomorrow.
>
>
> -Original Message-
> From: rbradley [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 13, 2001 3:43 AM
> To: PHP
> Subject: [PHP] Pay for help
>
> My company is willing to pay for some assistance in helping us install:
>
> PHP apache mod with oracle 8i functions on a Solaris 8 box.
>
> Are there any takers?
>
> --
> Richard Bradley
> CTO YourLink, inc.
> (321) 452-6699
> IM lagoonr
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Richard Bradley
CTO YourLink, inc.
(321) 452-6699
IM lagoonr

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]




-Original Message-
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 17, 2001 2:26 PM
To: '[EMAIL PROTECTED]'; PHP Lists
Subject: RE: [PHP] PHP Book Recommendations


And I remind you all to buy them at WeberDev.com and help
us pay the hosting :)

Sincerely

  berber

Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 16, 2001 11:14 PM
To: PHP Lists
Subject: [PHP] PHP Book Recommendations


Can I get some recommendations on some good PHP
books. Something broad but with good novice
concepts

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

2001-02-19 Thread Abe Asghar

Hi,

I am trying to get a total value of orders from a file.  The file has various fields 
separated by '|'.  It is the 15th field I am trying to total.  At the moment I am 
trying to search each character but it times out as the file is quite large - is there 
a more efficient way of doing this.

Thanks - Here is the script:

\n";
}
   }
   else if($counter==$totalfile)
   {
$counter++; 
   }
  }
 } 
 return($total);
   }
?>










[PHP] Multiple URLs and cookies

2001-02-19 Thread Jeremy Gillies

Hello all!

Okay, still going at it with PHP vs. JavaScript -- although one can remove
the power if they disable cookies -- in fact, with the way it is set up
here, it is doubtful they will get to the right page if they switch
languages, but i can work that out later with a simple if-then statement
that will create the link -- a test to see if cookies are enabled then print
the correct URL.

1) Joe: I used the index (splash.php) and choice pages (choice.php) as per
your suggestion. It works without a hitch. The cookie is set and it goes
accordingly from the splash.php page once you have mad a selection.

2) Angela: I have added a third page to this mix, a lang_swap.php which is
called from the document that people are looking at. So now it goes from a
language button on a doc, passes a document id to the lang_swap.php page
where a similar process tot he choice.php page takes place, sets the cookie
value to the other language, and kicks it back to the french version of the
english document (and vice-versa). It's all pretty quick, so i'm not worried
about the page requests and lag.


The trouble is... the lang_swap.php will not set the cookie for the language
change. If i swap to french and then i go back and load the splash page, it
send me to the english-front again, but it should send me to the
french-front... i was having this problem before when i was trying to get
this all to work... once the variable was set, i could not get it to change.

Thanks for your help and in advance of some more!
Jer
Canadian Union of Postal Workers


--
The splash.php is as follows:
--
http://www.english.com/english-front-page.php");
  exit;
  break;
case 2:
  header("Location: http://www.franch.com/french-front-page.php");
  exit;
  break;
  }
?>

.
passes a value to choice.php... depending upon langauge select...
.


--


--
The choice.php is as follows:
--

http://www.english.com/", "", 0);
  header("Location: http://www.english.com/english-front-page.php");
  exit;
  break;
case 2:
  setcookie ("lang", "2", "http://www.french.com/", "", 0);
  header("Location: http://www.franch.com/french-front-page.php");
  exit;
  break;
  }
}
?>



Choice





--


--
The lang_swap.php is as follows:
-

http://www.french.com/", "", 0);
  header("Location:
http://www.french.com/document-fra.php?Doc_ID=$Ident");
  exit;
  break;
case 2:
  setcookie ("lang", "1", "http://www.english.com/", "", 0);
  header("Location:
http://www.english.com/document-eng.php?Doc_ID=$Ident");
  exit;
  break;
  }
?>



Lang Swap





-- 
PHP General Mailing List (http://www.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] Shorten this MySQL code?

2001-02-19 Thread Jeff Oien

Newbie with MySQL. I have a user auth form before this
script which asks for username and password. First
Name and Last name are also in each record in the 
database along with username and password. When
the user successfully logs in, I have it say, "Welcome 
name_first, you're authorized! The only way I could figure
out how to do this is make a separate sql call to retrieve
the first name. Can I consolidate this into one call? Thanks.
(Based on "PHP Fast and Easy" code.)

Welcome $name_first1, you're authorized!";

} else { 

 header("Location: http://www.webdesigns1.f2s.com/db/auth_login.html");
 exit;
} 

?>


Welcome






-- 
PHP General Mailing List (http://www.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] Open location automatically after checking

2001-02-19 Thread Edith Lai

Hi,
I have a form for user input and after checking, it's gonna go to another
page for further input. What should i code to bring the second input page up
after checking done on the first??
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]




[PHP] php variables in sql statements.

2001-02-19 Thread Matt Davis

Can someone tell me if this is possible.

I have a PHP variable which i got from a html form using $HTTP_POST_VAR. I
collect a variable called Community. Therefore is it possible to have an sql
statement like this?

//create sql statement

 $sql = "select businessname from main where businesstype =
'consultancy' and $community != '0'";


if this is not ok how else can i extract a variable from another html page.

Matt.


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




Re: RE: [PHP] Fax manipulation?

2001-02-19 Thread Chris Carbaugh


Check out PHPFax.sourceforge.net

This is a project I started a while back and never quite finished.
The project does work, and is in use by the 20 windoze users I support.
 If you interested in the code, I suppose I can make the time to upload
it :)

Let me know,

Chris

On Mon, 19 Feb 2001, Brian V Bonini wrote:
> Date: Mon, 19 Feb 2001 09:38:20 -0500
> To: "Joshua Long" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> From: "Brian V Bonini" <[EMAIL PROTECTED]>
> Reply-To: <[EMAIL PROTECTED]>
> Subject: RE: [PHP] Fax manipulation?
> 
> There are actually many ways to send an email to a fax
> gateway. So, you could generate an email, send it to a
> FAX gateway, ... and presto!
> 
> -Brian
> *
> 
> > -Original Message-
> > From: Joshua Long [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 19, 2001 9:26 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Fax manipulation?
> > 
> > 
> > Hello all...
> > 
> > Is there anyway at all for a PHP script to somehow interact with a
> fax?
> > dynamically generated pdfs... dynamically generated images...
> dynamically
> > generated... faxes? I mean i don't even know how it would begin 
> > to work but
> > is there a way to send a fax maybe as it does e-mail?
> > 
> > Thanks in advance, Josh
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 

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




Re: [PHP] php variables in sql statements.

2001-02-19 Thread Ifrim Sorin

It is possible, but the syntax is :

  $sql = "select businessname from main where businesstype =
 'consultancy' and " .$community." != '0'";
This is the case where $comunity is the name of a field.

Regards
Sorin Ifrim

- Original Message -
From: Matt Davis <[EMAIL PROTECTED]>
To: Php Mailing List <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 6:05 PM
Subject: [PHP] php variables in sql statements.


> Can someone tell me if this is possible.
>
> I have a PHP variable which i got from a html form using $HTTP_POST_VAR.
I
> collect a variable called Community. Therefore is it possible to have an
sql
> statement like this?
>
> file://create sql statement
>
>  $sql = "select businessname from main where businesstype =
> 'consultancy' and $community != '0'";
>
>
> if this is not ok how else can i extract a variable from another html
page.
>
> Matt.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] Apache and $HTTP_*_VARS

2001-02-19 Thread Todd Cary

Richard -

I am very new to Apache.  It is installed on my notebook computer so
that I can do some PHP programming while I am on the road.  Though I
looked at the conf file, I was not aware that one could turn that
feature on and off in Apache.  Can you point me in the right direction?

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]




Re: [PHP] SMTP on IIS 5.0 Windows 2000 Pro

2001-02-19 Thread Todd Cary

This is how I have mine set with Win 2K:

[mail function]
SMTP= 192.172.0.1  ;for win32 only
sendmail_from   = [EMAIL PROTECTED]  ;for win32 only



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




Re: [PHP] PDF Functions

2001-02-19 Thread Michael Stearne

I think you're getting through the configure and compile somehow (maybe info is
cached), but not really compiling in the PDF functions.  I really think this is
an issue with the setup of RH 7.  Why don't you try to install the 7.1 which is
beta now to see if RH fixed it in anyway.  Or you can go back to 6.2 (which I
have).  Everything works in 6.2 now.

Michael


Mike Tuller wrote:

> 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.
>
> --
> PHP General Mailing List (http://www.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-CVS] cvs: php4 /ext/midgard article.c page.c topic.c

2001-02-19 Thread David Guerizec

davidg  Mon Feb 19 07:50:20 2001 EDT

  Modified files:  
/php4/ext/midgard   article.c page.c topic.c 
  Log:
  fixed bug #81, for more details, see:
  http://www.midgard-project.org/bugs/?id=81
  
  
  
Index: php4/ext/midgard/article.c
diff -u php4/ext/midgard/article.c:1.3 php4/ext/midgard/article.c:1.4
--- php4/ext/midgard/article.c:1.3  Sat Feb 17 15:21:49 2001
+++ php4/ext/midgard/article.c  Mon Feb 19 07:50:20 2001
@@ -1,4 +1,4 @@
-/* $Id: article.c,v 1.3 2001/02/17 23:21:49 emile Exp $
+/* $Id: article.c,v 1.4 2001/02/19 15:50:20 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -42,6 +42,16 @@
convert_to_long_ex(root);
convert_to_long_ex(article);
 
+   if((*article)->value.lval == 0 || /* useless to waste time if article=0 */
+   !mgd_exists_id(mgd_handle(),
+   "article", "id=$d",
+   (*article)->value.lval))
+   RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+   if ((*root)->value.lval == 0)
+   RETURN_TRUE; /* always true if topic = 0 */
+   if(!mgd_exists_id(mgd_handle(), "topic", "id=$d", (*root)->value.lval))
+   RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+
 #if 0
if (!isarticlereader((*article)->value.lval))
return;
@@ -534,6 +544,10 @@
convert_to_string_ex(extra3);
convert_to_long_ex(type);
 
+   /* author must NOT be 0 */
+   if (!(*author)->value.lval)
+  RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+
if (!istopicowner((*topic)->value.lval)) {
RETURN_FALSE_BECAUSE(MGD_ERR_ACCESS_DENIED);
}
@@ -555,12 +569,11 @@
   ( {
   RETURN_FALSE_BECAUSE(MGD_ERR_SITEGROUP_VIOLATION);
}
-   /* author must be in same SG or be 0 */
-   if ((*author)->value.lval != 0 && !mgd_exists_id(mgd_handle(), "person",
+   /* author must be in same SG */
+   if (!mgd_exists_id(mgd_handle(), "person",
  "id=$d AND sitegroup IN (0,$d)",
  (*author)->value.lval,
- mgd_sitegroup(mgd_handle
-   ( {
+ mgd_sitegroup(mgd_handle( {
   RETURN_FALSE_BECAUSE(MGD_ERR_SITEGROUP_VIOLATION);
}
 #endif
@@ -840,6 +853,10 @@
convert_to_string_ex(extra2);
convert_to_string_ex(extra3);
 
+   /* author must NOT be 0 */
+   if (!(*author)->value.lval)
+  RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+   
/* EEH: conversion to string is intentional, see update code */
if (type)
convert_to_string_ex(type);
@@ -865,9 +882,8 @@
RETURN_FALSE_BECAUSE(MGD_ERR_SITEGROUP_VIOLATION);
}
 
-   /* author must be in same SG or be 0 */
-   if ((*author)->value.lval != 0
-   && !mgd_exists_bool(mgd_handle(), "article,person",
+   /* author must be in same SG */
+   if (!mgd_exists_bool(mgd_handle(), "article,person",
   "article.id=$d AND person.id=$d"
   " AND (article.sitegroup=person.sitegroup"
   " OR article.sitegroup=0" " OR person.sitegroup=0)",
Index: php4/ext/midgard/page.c
diff -u php4/ext/midgard/page.c:1.3 php4/ext/midgard/page.c:1.4
--- php4/ext/midgard/page.c:1.3 Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/page.c Mon Feb 19 07:50:20 2001
@@ -1,4 +1,4 @@
-/* $Id: page.c,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: page.c,v 1.4 2001/02/19 15:50:20 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -79,6 +79,16 @@
WRONG_PARAM_COUNT;
 convert_to_long_ex(root);
 convert_to_long_ex(page);
+
+   if((*page)->value.lval == 0 || /* useless to waste time if page=0 */
+   !mgd_exists_id(mgd_handle(),
+   "page", "id=$d",
+   (*page)->value.lval))
+   RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+   if ((*root)->value.lval == 0)
+   RETURN_TRUE; /* always true if root=0 */
+   if(!mgd_exists_id(mgd_handle(), "page", "id=$d", (*root)->value.lval))
+   RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
 
 ids = mgd_tree(mgd_handle(), "page", (*root)->value.lval, 0, NULL);
if (ids)
Index: php4/ext/midgard/topic.c
diff -u php4/ext/midgard/topic.c:1.3 php4/ext/midgard/topic.c:1.4
--- php4/ext/midgard/topi

RE: [PHP] system()

2001-02-19 Thread ..s.c.o.t.t..

i am not positive about this, but you could try making
the amp process a background process by adding a
" &" to the end of the command line 
(at least if you're using *nix)


> -Original Message-
> From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 00:40
> To: PHP-General List
> Subject: [PHP] system()
> 
> 
> 
> While doing a test run on an idea I have, I tried running the
> system() command on an audio application:
> 
> 
> 
> ...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.  BP!
>   |
>   ~
>   Ashley M. Kirchner    .   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.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

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




RE: [PHP] array

2001-02-19 Thread ..s.c.o.t.t..

from the "unset" documentation on php.net

// destroy a single variable
unset ($foo);

// destroy a single element of an array
unset ($bar['quux']);

// destroy more than one variable
unset ($foo1, $foo2, $foo3);




> -Original Message-
> From: andreas (@work) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 00:50
> To: [EMAIL PROTECTED]
> Subject: [PHP] array
> 
> 
> 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
> 
> 
> 

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




RE: [PHP] PHP as CGI

2001-02-19 Thread ..s.c.o.t.t..

i had a very similar problem when i first setup PHP/Apache
on my linux box... i forgot to add a line to my httpd.conf
and got all sorts of "Cant find this" "Cant find that" type
of errors

my mistake was that i did not set ScriptAlias and Action
correctly, and thus apache was having all sorts of
problems executing my scripts becuase i put the physical
path to php after my Action directive, rather than alias it
via a ScriptAlias directive..  (silly me thought i could do
away with the ScriptAlias and just point to it directly)

make sure you have both of these (or something similar)
in your httpd.conf file:

ScriptAlias /php/ "/physical/path/to/php"
Action application/x-httpd-php "/php/php"

(and make sure to "killall -HUP httpd" after any changes to
the conf files, although you probably knew that already... :)

hope it helps.


> -Original Message-
> From: Hrishi [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 03:31
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP as CGI
> 
> 
> >
> > 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
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

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




RE: [PHP] Shorten this MySQL code?

2001-02-19 Thread Jared Eikenberg

The following should work okay for you:



>-Original Message-
>From: Jeff Oien [mailto:[EMAIL PROTECTED]]
>Sent: Monday, 19 February, 2001 08:50
>To: PHP
>Subject: [PHP] Shorten this MySQL code?
>
>
>Newbie with MySQL. I have a user auth form before this
>script which asks for username and password. First
>Name and Last name are also in each record in the
>database along with username and password. When
>the user successfully logs in, I have it say, "Welcome
>name_first, you're authorized! The only way I could figure
>out how to do this is make a separate sql call to retrieve
>the first name. Can I consolidate this into one call? Thanks.
>(Based on "PHP Fast and Easy" code.)
>
>
>if ((!$username) || (!$password)) {
> header("Location: blah");
> exit;
>}
>
>
>$db_name = "notgonnadoit";
>$table_name = "guess";
>
>$connection = @mysql_connect("blah", "bleck", "bleep")
> or die("Couldn't connect.");
>
>$db = mysql_select_db($db_name, $connection)
> or die("Couldn't select database.");
>
>$sql = "SELECT * FROM $table_name
> WHERE username = \"$username\"
> AND password = password(\"$password\")
> ";
>
>$result = mysql_query($sql)
>or die ("Can't execute query.");
>
>$num = mysql_numrows($result);
>
>if ($num != 0)

>
>$connection = @mysql_connect("blah", "bleck", "bleep")
> or die("Couldn't connect.");
>
>$db = mysql_select_db($db_name, $connection)
> or die("Couldn't select database.");
>
>$sql1 = "SELECT username, name_first
>   FROM $table_name
>   ";
>
>$result1 = @mysql_query($sql1,$connection)
>   or die("Couldn't execute query.");
>
>while ($row = mysql_fetch_array($result1)) {
>   $name_first = $row['name_first'];
>   $username1 = $row['username'];
>
>
>   if ($username1 == $username) {
>   $name_first1 = $name_first;
>   }
>}
>
> $msg = "Welcome $name_first1, you're authorized!";
>
>} else

>
> header("Location: http://www.webdesigns1.f2s.com/db/auth_login.html");
> exit;
>}
>
>?>
>
>
>Welcome
>
>
>
>
>
>
>--
>PHP General Mailing List (http://www.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] Making a living with PHP?

2001-02-19 Thread Mary E Tyler

I am a regular writer for Contract Professional Magazine (their 
weekly ezine, actually) and I am looking for several people to 
interview for an upcoming story on PHP. If you are:

1) An independent contractor
2) making a living ($25K+/yr) developing in PHP
and
3) are willing to talk to me for inclusion in a story

Please drop me a line off list.
-- 
--
Buy "On the Edge"! http://www.dejahsprivateice.com/PIshop/OTE_order.php3
Puberty has stolen Elayne Smith's chance for Olympic gold. Caught 
between love and lust, despair and determination, a golden boy and a 
troubled man, Elayne is On the Edge.
--
Apply to be a ForeWord Magazine eBook Reviewer! 
mailto:[EMAIL PROTECTED] for application.
--

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




[PHP-CVS] cvs: php4 /ext/pgsql config.m4 pgsql.c php_pgsql.h

2001-02-19 Thread Sascha Schumann

sas Mon Feb 19 08:31:17 2001 EDT

  Modified files:  
/php4/ext/pgsql config.m4 pgsql.c php_pgsql.h 
  Log:
  Simpler fix for the InvalidOid thing by Tom Lane.
  
  He assured me that InvalidOid has always expanded to (Oid) 0, so this
  should be safe.
  
  
Index: php4/ext/pgsql/config.m4
diff -u php4/ext/pgsql/config.m4:1.19 php4/ext/pgsql/config.m4:1.20
--- php4/ext/pgsql/config.m4:1.19   Mon Feb 19 00:14:45 2001
+++ php4/ext/pgsql/config.m4Mon Feb 19 08:31:17 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.19 2001/02/19 08:14:45 sas Exp $
+dnl $Id: config.m4,v 1.20 2001/02/19 16:31:17 sas Exp $
 
 AC_DEFUN(PGSQL_INC_CHK,[if test -r $i$1/libpq-fe.h; then PGSQL_DIR=$i; 
PGSQL_INCDIR=$i$1])
 
@@ -22,26 +22,6 @@
   fi
 
   PGSQL_INCLUDE="-I$PGSQL_INCDIR"
-
-  AC_CACHE_CHECK([whether PostgreSQL needs postgres.h], ac_cv_php_pgsql_postgres_h,[
-  old_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS $PGSQL_INCLUDE"
-  AC_TRY_COMPILE([
-#include 
-],[
-  Oid x = InvalidOid;
-],[
-  ac_cv_php_pgsql_postgres_h=no
-],[
-  ac_cv_php_pgsql_postgres_h=yes
-])
-  CPPFLAGS=$old_CPPFLAGS
-])
-  
-  if test "$ac_cv_php_pgsql_postgres_h" = "yes"; then
-AC_DEFINE(PHP_PGSQL_NEEDS_POSTGRES_H, 1, [whether pgsql needs postgres.h])
-  fi
-  
   PGSQL_LIBDIR=$PGSQL_DIR/lib
   test -d $PGSQL_DIR/lib/pgsql && PGSQL_LIBDIR=$PGSQL_DIR/lib/pgsql
 
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.90 php4/ext/pgsql/pgsql.c:1.91
--- php4/ext/pgsql/pgsql.c:1.90 Sun Feb 18 23:50:06 2001
+++ php4/ext/pgsql/pgsql.c  Mon Feb 19 08:31:17 2001
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.90 2001/02/19 07:50:06 sas Exp $ */
+/* $Id: pgsql.c,v 1.91 2001/02/19 16:31:17 sas Exp $ */
 
 #include 
 
@@ -31,6 +31,9 @@
 
 #if HAVE_PGSQL
 
+#ifndef InvalidOid
+#define InvalidOid ((Oid) 0)
+#endif
 
 #define PGSQL_ASSOC1<<0
 #define PGSQL_NUM  1<<1
Index: php4/ext/pgsql/php_pgsql.h
diff -u php4/ext/pgsql/php_pgsql.h:1.26 php4/ext/pgsql/php_pgsql.h:1.27
--- php4/ext/pgsql/php_pgsql.h:1.26 Mon Feb 19 00:14:45 2001
+++ php4/ext/pgsql/php_pgsql.h  Mon Feb 19 08:31:17 2001
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: php_pgsql.h,v 1.26 2001/02/19 08:14:45 sas Exp $ */
+/* $Id: php_pgsql.h,v 1.27 2001/02/19 16:31:17 sas Exp $ */
 
 #ifndef PHP_PGSQL_H
 #define PHP_PGSQL_H
@@ -29,9 +29,6 @@
 
 #ifdef PHP_PGSQL_PRIVATE
 #undef SOCKET_SIZE_TYPE
-#ifdef PHP_PGSQL_NEEDS_POSTGRES_H
-#include 
-#endif
 #include 
 
 #ifdef PHP_WIN32



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




[PHP] question about multidimension array

2001-02-19 Thread Zenith

Consider the following code:

$ary1 = array ("one","two");
$ary2 = array ("three","four");

$2d_Dimension[] = $ary1;
$2d_Dimension[] = $ary2;

// is $2d_Dimension a 2 dimensional array?

// and the next question, how to get out content of the $2d_Dimension[]
array

while ( list ( $rec_no, $ary ) = each ( $2d_Dimension ) )
{
echo ("Record No $rec_no:");
   while ( list ( $element1, $element2 ) = each ( $ary ) )
   echo "$element1, $element2";
}

// I want to use the above code to print something like
// Record No 0:one, two
// Record No 1:three, four

// But I only got the following
//Record No 0:
//Warning: Variable passed to each() is not an array or object in
d:/project/bizvista/testinc.php on line 27

What's the problem?





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




[PHP-CVS] cvs: php4 /ext/midgard attachment.c

2001-02-19 Thread David Guerizec

davidg  Mon Feb 19 08:39:20 2001 EDT

  Modified files:  
/php4/ext/midgard   attachment.c 
  Log:
  Small typo fixed.
  
  
Index: php4/ext/midgard/attachment.c
diff -u php4/ext/midgard/attachment.c:1.3 php4/ext/midgard/attachment.c:1.4
--- php4/ext/midgard/attachment.c:1.3   Sat Feb 17 15:21:49 2001
+++ php4/ext/midgard/attachment.c   Mon Feb 19 08:39:19 2001
@@ -1,4 +1,4 @@
-/* $Id: attachment.c,v 1.3 2001/02/17 23:21:49 emile Exp $
+/* $Id: attachment.c,v 1.4 2001/02/19 16:39:19 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -263,7 +263,7 @@
zv_mode = NULL;
break;
case 2:
-   if (zend_get_parameters_ex(1, &zv_id, &zv_mode) !=
+   if (zend_get_parameters_ex(2, &zv_id, &zv_mode) !=
SUCCESS) {
WRONG_PARAM_COUNT;
}



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




Re: [PHP] HTTP POST Question

2001-02-19 Thread John Monfort


  I've been struggling with the same idea.

  I haven't been able to process the returned value, but I've the
  following methods to DISPLAY the cgi results. Although, the PHP has no
  way  of knowing wether the CGI evaluated to a Yes or No result.

  If you solve this, then please let me know.

  $server =
"http://www.mydomain_name.com/my_cgi_file.cgi?var1=valueOne&var2=valueTWO";

 //var1 and var2 are the parameters that you are passing to the CGI
   for processing.
 //your cgi would process these variables, then 1) print out the
   result 2)  return the desired variable...like,  return ($var1,
   $var2).

  //open remote site

  $fp = fopen($server, "r");


  fpassthrough($fp);

  //this will display whatever the remote CGI sends to STDOUT
  //however, it will not process anything that is returned.

  That is, the PHP doesn't know wether the CGI evaluated to GOOD or BAD.


 That's as far as I've been able to get, I hope it helps.

 If you do find a better solution, then please send me a copy.
 I would appreciate it.




__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Mon, 19 Feb 2001, Montgomery-Recht, Evan wrote:

> Good morning...
>
> This should be a good monday morning question.
>
> I have a cgi-bin written in perl (it's actually, a interface to a
> perl-module which is a interface to a telnet-like protocol).
>
> Anyways what I need to do is I have already existing code written in PHP,
> but at some point I need to call this cgi-bin and get a return code from it
> and process (good/bad result) and return to completed php script that says
> it called this cgi-bin.  It's not very clear how to set the HTTP_POST_VARS
> for sending to a post command (which doesn't seem to exist);
>
> Any ideas I don't see a function called:
>
> $HTTP_POST_VARS =set variables;
> $result = http_post("http://localhost/cgi-bin/script.pl");
>
> Thanks,
>
> evan
>
> PS.  I'd appricate a working example, even if it's a dummy version.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] question about multidimension array

2001-02-19 Thread ..s.c.o.t.t..

> -Original Message-
> From: Zenith [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] question about multidimension array
> 
> Consider the following code:
> 
> $ary1 = array ("one","two");
> $ary2 = array ("three","four");
> 
> $2d_Dimension[] = $ary1;
> $2d_Dimension[] = $ary2;
> 
> // is $2d_Dimension a 2 dimensional array?

yes... the "dimension" of an array is basically how many
brackets you put after the variable name... 
1D = $this[];
2D = $this[][];
3D = $this[][][]; 
etc
 
> // and the next question, how to get out content of the $2d_Dimension[]
> array
> 
> while ( list ( $rec_no, $ary ) = each ( $2d_Dimension ) )
> {
> echo ("Record No $rec_no:");
>while ( list ( $element1, $element2 ) = each ( $ary ) )
>echo "$element1, $element2";
> }

with a slight modification, that code works perfectly:
(see end of email for why you probably got a parse error)

\n";
 }

?>


> // I want to use the above code to print something like
> // Record No 0:one, two
> // Record No 1:three, four

my code produces:
Record No 0:0=one; 1=two; 
Record No 1:0=three; 1=four; 

suppress printing $key, and you'll get the output you want.
 
> // But I only got the following
> //Record No 0:
> //Warning: Variable passed to each() is not an array or object in
> d:/project/bizvista/testinc.php on line 27
> 
> What's the problem?

if i use your code verbatim, i get a parse error becuase of the
variable name starting with a digit, but as for the error *you*
describe, when i put the loop inside of a function, and fail to declare
$twod as global, i get the same error:

"Warning: Variable passed to each() is not an array or object ..."

make sure you declare all globals as "global $varname" in your
functions... PHP is basically the reverse of almost every other
language (things are local by default, global by declaration)... 

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




RE: [PHP] HTTP POST Question

2001-02-19 Thread John Monfort



> 1. It appears if I use the header function I have to redirect the page to
> another page, it doesn't appear possible to retrieve a page into the current
> page?  Unless someone can show me some code that would do that.
>

  If all you want is to display the remote page, within the local page,
  then all you need is fpassthru()

  ex.

  $server = "http://www.site.com";

  $fp = fopen($server,"r")// "r" is for reading
  fpassthru($fp);

 This will display the results of the remote file (html or whatever) into
 the local file (in this case, your PHP file).


>
>
> > -Original Message-
> > From:   Milan Mlynarcik [SMTP:[EMAIL PROTECTED]]
> > Sent:   Monday, February 19, 2001 7:33 AM
> > To: Montgomery-Recht, Evan
> > Subject:Re: [PHP] HTTP POST Question
> >
> > You have to use header() function and how POST work you can find in HTTP
> > RFC
> > at http://www.w3.org/Protocols/rfc2616/rfc2616.html
> > -
> > Milan Mlynarcik
> > Web Programmer
> > Charmed Technology Slovakia
> > Nam. sv. Egidia 16/37
> > 058 01 Poprad, Slovakia
> > E-mail: [EMAIL PROTECTED]
> > Office: 00421 92 7881 874
> > Mobile: 00421 905 964 535
> > Web page: http://www.charmed.com/
> > -
> > - Original Message -
> > From: "Montgomery-Recht, Evan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, February 19, 2001 1:06 PM
> > Subject: [PHP] HTTP POST Question
> >
> >
> > > Good morning...
> > >
> > > This should be a good monday morning question.
> > >
> > > I have a cgi-bin written in perl (it's actually, a interface to a
> > > perl-module which is a interface to a telnet-like protocol).
> > >
> > > Anyways what I need to do is I have already existing code written in
> > PHP,
> > > but at some point I need to call this cgi-bin and get a return code from
> > it
> > > and process (good/bad result) and return to completed php script that
> > says
> > > it called this cgi-bin.  It's not very clear how to set the
> > HTTP_POST_VARS
> > > for sending to a post command (which doesn't seem to exist);
> > >
> > > Any ideas I don't see a function called:
> > >
> > > $HTTP_POST_VARS =set variables;
> > > $result = http_post("http://localhost/cgi-bin/script.pl");
> > >
> > > Thanks,
> > >
> > > evan
> > >
> > > PS.  I'd appricate a working example, even if it's a dummy version.
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] woe is me

2001-02-19 Thread John Monfort



   I feel your pain.
:-(


__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Mon, 19 Feb 2001, Adrian Murphy wrote:

> i'm sorry,i just had to share this with people who'd understand.
> we've just secured clients who are m$ affiliated and they insist
> everthing be done with asp.
> excuse me while i go off for a little cry.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] what's the difference between include and require??

2001-02-19 Thread John Monfort



  An unsuccessful include will give you an error.

  An unsuccessful require will kill the program.


__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Mon, 19 Feb 2001, Zenith wrote:

> Though I have read the manual about these two things, include() and
> require(), but I still not very clear about the difference between these??
>
>
>
>
>
> --
> PHP General Mailing List (http://www.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-CVS] cvs: php4 /ext/yaz php_yaz.c

2001-02-19 Thread Adam Dickmeiss

dickmeiss   Mon Feb 19 09:06:39 2001 EDT

  Modified files:  
/php4/ext/yaz   php_yaz.c 
  Log:
  Bug fix: number of records in yaz_range wrongly set to zero.
  
  
Index: php4/ext/yaz/php_yaz.c
diff -u php4/ext/yaz/php_yaz.c:1.10 php4/ext/yaz/php_yaz.c:1.11
--- php4/ext/yaz/php_yaz.c:1.10 Tue Feb 13 12:02:52 2001
+++ php4/ext/yaz/php_yaz.c  Mon Feb 19 09:06:39 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_yaz.c,v 1.10 2001/02/13 20:02:52 dickmeiss Exp $ */
+/* $Id: php_yaz.c,v 1.11 2001/02/19 17:06:39 dickmeiss Exp $ */
 
 #include "php.h"
 
@@ -360,10 +360,11 @@
t->resultSets->recordList->records[i] = 0;
if (t->numberOfRecordsRequested + t->resultSetStartPoint-1 > 
t->resultSets->resultCount)
-   t->numberOfRecordsRequested = 
t->resultSets->resultCount -
-   t->resultSetStartPoint + 1;
-   t->resultSets->recordList->num_records =
-   t->numberOfRecordsRequested;
+   t->resultSets->recordList->num_records =
+   t->resultSets->resultCount - 
+t->resultSetStartPoint + 1;
+   else
+   t->resultSets->recordList->num_records =
+   t->numberOfRecordsRequested;
}
if (sr && sr->which == Z_Records_DBOSD)
{



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




[PHP] ASP / PHP / embedded scripting (possibly OT)

2001-02-19 Thread ..s.c.o.t.t..

i dont know too much about ASP, as i've never had to use it,
but i thought ASP as more of an enviornment (or meta-language)
rather than an actual programming language (becuase VBscript
is the default language for ASP pages, i always assumed that
other languages could be utilized in place of VB(yuck))

could you use any other language aside from VBscript
if the client mandates ASP, or is ASP tied to VB/Microsoft?

the reason i ask is becuase i heard about a perl product that
would basically do almost the same thing as PHP (put perl code
in the HTML document, and the server would parse thru it
when someone requested the page)... and i always thought
that ASP was the meta-language that governed the rules
for embedded programming (use  -Original Message-
> From: John Monfort [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 10:16
> To: Adrian Murphy
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] woe is me
> 
> 
> 
> 
>I feel your pain.
> :-(
> 
> 
> __John Monfort_
> _+---+_
>  P E P I E  D E S I G N S
>www.pepiedesigns.com
> "The world is waiting, are you ready?"
> -+___+-
> 
> On Mon, 19 Feb 2001, Adrian Murphy wrote:
> 
> > i'm sorry,i just had to share this with people who'd understand.
> > we've just secured clients who are m$ affiliated and they insist
> > everthing be done with asp.
> > excuse me while i go off for a little cry.
> >
> >
> > --
> > PHP General Mailing List (http://www.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] trying to get xml-file

2001-02-19 Thread Jan Grafström

Hi!
I have this PHP:
-
$message = ereg_replace("\r","", $message);
$message =
"$message$name$email$adress$telefon";

$fp = fopen (basename($PHP_SELF) . ".xml", "a");
fwrite ($fp, $message);
fclose ($fp);
--
I want to getat the beginning and at the end, inside the bok
I want several . is  it possible to do?

Thanks for any help?

Jan


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




Re: [PHP] system()

2001-02-19 Thread Christian Reiniger

On Monday 19 February 2001 21:00, ..s.c.o.t.t.. wrote:
> i am not positive about this, but you could try making
> the amp process a background process by adding a
> " &" to the end of the command line
> (at least if you're using *nix)

That alone won't help - "nohup" is also needed.
What he could do is write a small Perl/C wrapper for amp, which launches 
the program in the background and returns its process id. Then he can do a
$AmpPID = system ("launchamp $Arg");

(the wrapper would have to execute "nohup amp $Args &")

and add a 'stop' link
Stop

And ampstop.php can do a 
system ("kill -KILL $pid");

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

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

I saw God - and she was black.

--
PHP General Mailing List (http://www.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] some more about include() and require()

2001-02-19 Thread ..s.c.o.t.t..

include() will only load the file if the include() statement is encountered
during the execution of your script
if (1==0) {
include("file");
}
the file will never be include()'d, since the if/then will always fail.

require() will always put the contents of the file being requie()'d
into your script, regardless if it is executed or not...
if (1==0) {
require("file");
}
the contents of "file" will be placed inside of the if/then,
even though it'll never be executed.

also, include() is evaluated every time it is encountered,
whereas require() is only evaluated once...

**
**From the PHP.net website documentation**

The include() statement includes and evaluates the specified file.

If "URL fopen wrappers" are enabled in PHP (which they are in the default
configuration), you can specify the file to be include()ed using an URL instead of a
local pathname. See Remote files and fopen() for more information.

An important note about how this works is that when a file is include()ed or
require()ed, parsing drops out of PHP mode and into HTML mode at the beginning of the
target file, and resumes again at the end. For this reason, any code inside the
target file which should be executed as PHP code must be enclosed within valid PHP
start and end tags.

This happens each time the include() statement is encountered, so you can use an
include() statement within a looping structure to include a number of different
files.

include() differs from require() in that the include statement is re-evaluated each
time it is encountered (and only when it is being executed), whereas the require()
statement is replaced by the required file when it is first encountered, whether the
contents of the file will be evaluated or not (for example, if it is inside an if
statement whose condition evaluated to false).



> -Original Message-
> From: John Monfort [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] what's the difference between include and require??
>
>   An unsuccessful include will give you an error.
>
>   An unsuccessful require will kill the program.
>
> On Mon, 19 Feb 2001, Zenith wrote:
>
> > Though I have read the manual about these two things, include() and
> > require(), but I still not very clear about the difference between these??


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




[PHP] How to determine the parameter is a 1 dimension array or not?

2001-02-19 Thread Zenith

In a self defined function, a one dimension or two dimension array may be
passed,
How can I check that, the passed in array is a one dimension array or a two
dimension array?



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




RE: [PHP] system()

2001-02-19 Thread ..s.c.o.t.t..

is there something with the PHP system command that
makes it unable to spawn nohup background processes

perl and PHP are closely related, so i cant really understand
how an external perl program would be able to do things that
PHP couldnt (at least in terms of this specific problem)
would a PHP call to "system('nohup ... &')" fail, or are your
reasons for suggesting an external program based on
something else other than simple feasability?

ive never had to do anything like that before, and im not
on a linux computer right now, so i cant test it myself.


> -Original Message-
> From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] system()
> 
> On Monday 19 February 2001 21:00, ..s.c.o.t.t.. wrote:
> > i am not positive about this, but you could try making
> > the amp process a background process by adding a
> > " &" to the end of the command line
> > (at least if you're using *nix)
> 
> That alone won't help - "nohup" is also needed.
> What he could do is write a small Perl/C wrapper for amp, which launches 
> the program in the background and returns its process id. Then he can do a
> $AmpPID = system ("launchamp $Arg");
> 
> (the wrapper would have to execute "nohup amp $Args &")
> 
> and add a 'stop' link
> Stop
> 
> And ampstop.php can do a 
> system ("kill -KILL $pid");
> 
> > > 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.
> 


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




Re: [PHP] ASP / PHP / embedded scripting (possibly OT)

2001-02-19 Thread Hrishi

> other languages could be utilized in place of VB(yuck))

you're right !!
that jogged my memory. i remember reading on M$DN (Jan 2000) that ASP could 
be generated with many languages (most of them third party extensions) one of 
them was Python. however i do not have any details other than the above, a 
preliminary search of M$DN online for the keyword 'python' yields :

http://msdn.microsoft.com/library/psdk/cdo/_olemsg_about_active_server_pages.htm

i think you can find your way from here,

cheers,
Hrishi

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




Re: [PHP] ASP / PHP / embedded scripting (possibly OT)

2001-02-19 Thread Michael Stearne

ASP is a framework in which laguages are used.  The most commonly used language
is VBScript.  You can also use JScript (MS's Javascript) or PerlScript within
ASP.  Check with MS for more info.

Of course you can always assign the .asp extenion to PHP files and say it's
ASP.

Michael


"..s.c.o.t.t.." wrote:

> i dont know too much about ASP, as i've never had to use it,
> but i thought ASP as more of an enviornment (or meta-language)
> rather than an actual programming language (becuase VBscript
> is the default language for ASP pages, i always assumed that
> other languages could be utilized in place of VB(yuck))
>
> could you use any other language aside from VBscript
> if the client mandates ASP, or is ASP tied to VB/Microsoft?
>
> the reason i ask is becuase i heard about a perl product that
> would basically do almost the same thing as PHP (put perl code
> in the HTML document, and the server would parse thru it
> when someone requested the page)... and i always thought
> that ASP was the meta-language that governed the rules
> for embedded programming (use  rules like that) rather than an actual *language*
>
> am i wrong?  anyone care to clarify what ASP is, and what
> it's relation to PHP is on or off the list, whichever suits you ;)
>
> PS: please excuse me if you feel that i am off topic
>
> > -Original Message-
> > From: John Monfort [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 19, 2001 10:16
> > To: Adrian Murphy
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] woe is me
> >
> >
> >
> >
> >I feel your pain.
> > :-(
> >
> >
> > __John Monfort_
> > _+---+_
> >  P E P I E  D E S I G N S
> >www.pepiedesigns.com
> > "The world is waiting, are you ready?"
> > -+___+-
> >
> > On Mon, 19 Feb 2001, Adrian Murphy wrote:
> >
> > > i'm sorry,i just had to share this with people who'd understand.
> > > we've just secured clients who are m$ affiliated and they insist
> > > everthing be done with asp.
> > > excuse me while i go off for a little cry.
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.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]




  1   2   3   >